/* Cart page: a clear checkout that hands the order to WhatsApp. Loaded only on cart.html. */
.cart-page-container { max-width: 760px !important; }
.cart-card { padding: 28px 28px 32px !important; border-radius: 22px !important; }

.cart-header-title {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border-bottom: 1px solid #efe3cc !important; padding-bottom: 14px !important; margin-bottom: 6px !important;
}
.cart-title { font-family: var(--fontFamily-forum, Georgia, serif); font-size: clamp(2.8rem, 4vw, 3.4rem); color: #111; margin: 0; font-weight: 400; }
.cart-count-label { font: 600 1.5rem/1 system-ui, -apple-system, "Segoe UI", sans-serif; color: #8a6a3c; background: #fbf4e6; border-radius: 999px; padding: 6px 12px; vertical-align: middle; }
.cart-count-label:empty { display: none; }
.cart-back { display: inline-flex; align-items: center; min-height: 44px; font: 600 1.5rem/1 system-ui, sans-serif; color: #795016; text-decoration: none; }
.cart-back:hover { text-decoration: underline; }

/* Rows */
.cart-item-row { display: flex !important; justify-content: space-between; align-items: center !important; gap: 16px; padding: 18px 0 !important; border-bottom: 1px solid #f1ece2 !important; flex-direction: row !important; }
.cart-item-info { min-width: 0; }
.cart-item-info h4 { font: 700 1.75rem/1.3 system-ui, -apple-system, "Segoe UI", sans-serif !important; color: #111; margin: 0 0 2px !important; overflow-wrap: anywhere; }
.cart-item-info p { font: 500 1.4rem/1.4 system-ui, sans-serif !important; color: #777 !important; margin: 0 !important; }
.cart-remove { margin-top: 6px; padding: 4px 0; min-height: 32px; border: 0; background: none; color: #b42318; font: 600 1.35rem/1 system-ui, sans-serif; cursor: pointer; }
.cart-remove:hover { text-decoration: underline; }
.cart-item-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.cart-line-total { font: 700 1.75rem/1 system-ui, sans-serif; color: #111; }
.cart-controls { display: inline-flex !important; align-items: center; gap: 2px !important; padding: 3px !important; border: 1px solid #e3d9c7 !important; border-radius: 999px !important; background: #fff !important; }
.cart-controls button { width: 40px; height: 40px; min-width: 40px !important; min-height: 40px !important; padding: 0 !important; border: 0; border-radius: 50%; background: #fbf4e6 !important; color: #3d2a10 !important; font: 700 2rem/1 system-ui, sans-serif !important; cursor: pointer; }
.cart-controls button:hover { background: #f3e3c4 !important; }
.cart-qty { min-width: 28px; text-align: center; font: 700 1.6rem/1 system-ui, sans-serif; }

/* Empty cart */
.cart-empty { text-align: center; padding: 36px 12px 28px; }
.cart-empty-title { font-family: var(--fontFamily-forum, Georgia, serif); font-size: 2.6rem; color: #111; margin-bottom: 8px; }
.cart-empty p { color: #666; font-size: 1.55rem; max-width: 420px; margin: 0 auto 18px; }
.cart-empty-btn { display: inline-flex; align-items: center; min-height: 48px; padding: 12px 26px; border-radius: 999px; background: #d4a359; color: #2d1d06; font: 700 1.6rem/1 system-ui, sans-serif; text-decoration: none; }
body.cart-is-empty .cart-summary { display: none; }

/* Summary and form */
.cart-summary { border-top: 0 !important; margin-top: 10px !important; padding-top: 10px !important; }
.summary-row { margin-bottom: 4px !important; font: 700 2rem/1.3 system-ui, -apple-system, "Segoe UI", sans-serif !important; }
.cart-fine-print { color: #777; font-size: 1.35rem; margin: 0 0 22px; }
.cart-field { margin-bottom: 20px; }
.cart-field label { display: block; margin-bottom: 8px; color: #111; font: 700 1.55rem/1.3 system-ui, sans-serif; }
.cart-optional { font-weight: 400; color: #888; }
#order-instructions {
  width: 100%; min-height: 96px; padding: 12px 14px; border-radius: 12px; border: 1px solid #d9d2c4 !important;
  background: #fff !important; color: #111; font: 400 1.6rem/1.45 system-ui, sans-serif !important; resize: vertical;
}
#order-instructions:focus { outline: 3px solid rgba(212, 163, 89, 0.35); border-color: #c8923f !important; }

.cart-pickup { padding: 14px 16px; border-radius: 14px; background: #fbf7ef; border: 1px solid #efe3cc; margin-bottom: 18px; }
.cart-pickup p { margin: 0; color: #555; font-size: 1.4rem; line-height: 1.5; }
.cart-pickup .cart-pickup-title { color: #111; font-weight: 700; font-size: 1.5rem; }

.cart-steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 20px; display: grid; gap: 8px; }
.cart-steps li { counter-increment: step; position: relative; padding-left: 38px; color: #444; font-size: 1.45rem; line-height: 1.45; }
.cart-steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; background: #e7f6ec; color: #14532d; font: 800 1.3rem/1 system-ui, sans-serif;
}

/* WhatsApp button */
.cart-send {
  width: 100%; min-height: 56px; display: inline-flex !important; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 20px !important; border: 0 !important; border-radius: 14px !important;
  background: #1f8f4e !important; color: #fff !important; font: 800 1.75rem/1.2 system-ui, -apple-system, "Segoe UI", sans-serif !important;
  letter-spacing: 0 !important; text-transform: none !important; box-shadow: 0 10px 24px rgba(31, 143, 78, 0.3); cursor: pointer; overflow: visible !important;
}
.cart-send::before, .cart-send::after { display: none !important; }
.cart-send svg { width: 24px; height: 24px; flex: 0 0 24px; }
.cart-send:hover { background: #187a42 !important; }
.cart-send:disabled { opacity: 0.6; cursor: progress; }
.cart-status { color: #14532d; font-size: 1.5rem; margin: 14px 0 0; overflow-wrap: anywhere; }
.cart-status:empty { display: none; }
.cart-reopen { display: inline-block; margin-top: 8px; color: #1f8f4e; font-weight: 700; text-decoration: underline; }
.cart-help { margin: 18px 0 0; color: #666; font-size: 1.4rem; }
.cart-help a { color: #795016; text-decoration: underline; }

@media (max-width: 575px) {
  .cart-card { padding: 20px 16px 24px !important; }
  .cart-item-row { align-items: flex-start !important; }
  .cart-line-total { font-size: 1.6rem; }
}

/* The base stylesheet makes spans and links blocks; keep these inline. */
.cart-card .cart-count-label { display: inline-block; margin-left: 8px; }
.cart-card .cart-optional, .cart-card .cart-send span { display: inline; }
.cart-help a, .cart-steps strong { display: inline; }
.cart-send { max-width: none !important; width: 100% !important; }

/* After sending: keep the confirmation and the reopen link on screen. */
body.cart-sent .cart-empty { display: none; }
body.cart-sent .cart-summary { display: block !important; }
body.cart-sent .cart-summary > :not(.cart-status):not(.cart-reopen):not(.cart-help) { display: none !important; }
body.cart-sent .cart-status {
  display: block; padding: 18px 18px 18px 52px; position: relative; border-radius: 14px;
  background: #e7f6ec; border: 1px solid #b7e2c4; color: #14532d; font-size: 1.6rem; line-height: 1.5;
}
body.cart-sent .cart-status::before { content: ""; position: absolute; left: 16px; top: 16px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #1f8f4e; color: #fff; font-weight: 800; }
body.cart-sent .cart-reopen { display: inline-flex; margin-top: 14px; }
.cart-card .cart-count-label:empty { display: none; }

/* Custom tick icon (replaces the ✓ character). */
body.cart-sent .cart-status::after {
  content: ""; position: absolute; left: 21px; top: 21px; width: 16px; height: 16px; background-color: #fff;
  -webkit-mask: var(--ak-icon-check) center / contain no-repeat; mask: var(--ak-icon-check) center / contain no-repeat;
}
