/* Shannana Foods — purchase cart and guest checkout. Loaded after the shared form styles. */
.cart-toggle {
  position:relative;
  display:inline-grid;
  place-items:center;
  flex:none;
  width:44px;
  height:44px;
  border:1px solid rgba(36,32,30,.13);
  border-radius:14px;
  background:#fff;
  color:var(--brand-red);
  cursor:pointer;
  transition:background .2s,border-color .2s,transform .2s;
}
.cart-toggle:hover { background:var(--cream); border-color:rgba(168,32,44,.3); transform:translateY(-1px); }
.cart-toggle:focus-visible { outline:3px solid var(--olive-soft); outline-offset:3px; }
.cart-count {
  position:absolute;
  inset-block-start:-6px;
  inset-inline-end:-6px;
  min-width:19px;
  height:19px;
  display:grid;
  place-items:center;
  padding:0 5px;
  border:2px solid #fff;
  border-radius:999px;
  background:var(--brand-red);
  color:#fff;
  font-size:10px;
  line-height:1;
  font-weight:900;
  font-variant-numeric:tabular-nums;
}
.cart-count[hidden] { display:none !important; }

.product-add-btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:38px;
  padding:7px 13px;
  border:1px solid rgba(168,32,44,.2);
  border-radius:999px;
  background:#fff;
  color:var(--brand-red);
  font:inherit;
  font-size:13px;
  font-weight:900;
  cursor:pointer;
  transition:background .2s,border-color .2s,color .2s,transform .2s,box-shadow .2s;
}
.product-add-btn:hover { background:var(--brand-red); border-color:var(--brand-red); color:#fff; box-shadow:0 8px 18px rgba(168,32,44,.16); transform:translateY(-1px); }
.product-add-btn:focus-visible { outline:3px solid var(--olive-soft); outline-offset:3px; }

.sf-cart-dialog { width:min(740px,calc(100vw - 24px)); max-width:none; max-height:min(92dvh,900px); margin:auto; padding:0; overflow:hidden; }
.sf-cart-dialog::backdrop { background:rgba(36,32,30,.58); backdrop-filter:blur(3px); }
.sf-cart-shell { display:flex; flex-direction:column; max-height:min(92dvh,900px); background:var(--paper); }
.sf-cart-head { flex:none; padding-bottom:14px; border-bottom:1px solid var(--line); }
.sf-cart-head h2 { margin:0; font-size:23px; line-height:1.35; font-weight:900; }
.sf-cart-subtitle { margin:4px 0 0; color:var(--muted); font-size:12px; line-height:1.65; max-width:560px; }
.sf-cart-body { overflow:auto; overscroll-behavior:contain; padding-top:16px; }
.sf-cart-items { display:grid; gap:12px; }
.sf-cart-item { padding:14px; border:1px solid var(--line); border-radius:18px; background:#fff; }
.sf-cart-item-top { display:flex; align-items:center; gap:12px; min-width:0; }
.sf-cart-thumb { width:58px; height:58px; flex:none; display:grid; place-items:center; overflow:hidden; border-radius:13px; border:1px solid var(--line); background:var(--cream); }
.sf-cart-thumb img { width:100%; height:100%; object-fit:contain; }
.sf-cart-placeholder { font-size:24px; color:var(--olive-dark); font-weight:900; }
.sf-cart-item-name { display:flex; flex:1; flex-direction:column; gap:3px; min-width:0; }
.sf-cart-item-name strong { font-size:15px; font-weight:900; overflow-wrap:anywhere; }
.sf-cart-carton-info { color:var(--olive-dark); font-size:11px; font-weight:800; }
.sf-cart-carton-info.is-muted { color:var(--muted); font-weight:600; }
.sf-cart-remove { flex:none; width:34px; height:34px; border:0; border-radius:50%; background:#f8eeec; color:var(--brand-red-deep); font-size:23px; line-height:1; cursor:pointer; }
.sf-cart-remove:hover { background:#f3dddd; }
.sf-cart-quantities { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:13px; }
.sf-cart-quantities label { display:flex; flex-direction:column; gap:5px; color:var(--muted); font-size:12px; font-weight:800; }
.sf-cart-quantities input { width:100%; min-height:40px; padding:7px 10px; border:1px solid rgba(36,32,30,.16); border-radius:11px; background:var(--cream); color:var(--ink); font:inherit; font-size:15px; font-weight:800; text-align:start; }
.sf-cart-quantities input:focus { outline:0; border-color:var(--olive); box-shadow:0 0 0 3px rgba(113,140,63,.14); }
.sf-cart-quantities input:disabled { opacity:.48; cursor:not-allowed; }
.sf-cart-item-total { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-top:10px; padding-top:9px; border-top:1px solid #f0ebe4; color:var(--muted); font-size:12px; }
.sf-cart-item-total strong { color:var(--ink); font-size:13px; font-weight:900; }
.sf-cart-summary { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:14px; padding:14px; border:1px solid rgba(113,140,63,.19); border-radius:16px; background:#f4f6ef; }
.sf-cart-summary > div { display:flex; flex-direction:column; gap:3px; color:var(--muted); font-size:12px; font-weight:700; }
.sf-cart-summary strong { color:var(--olive-dark); font-size:18px; font-weight:900; }
.sf-cart-foot { justify-content:space-between; border-top:1px solid var(--line); margin-top:15px; padding-top:14px; }
.sf-cart-foot .sf-note { font-size:12px; }
.sf-cart-foot .btn { white-space:normal; }
.sf-cart-foot .btn:disabled { opacity:.5; cursor:not-allowed; transform:none; }
.sf-cart-empty { padding:28px 10px 34px; text-align:center; }
.sf-cart-empty-icon { display:grid; place-items:center; width:62px; height:62px; margin:0 auto 12px; border-radius:20px; background:#edf1e7; font-size:29px; }
.sf-cart-empty h3 { margin:0 0 5px; font-size:21px; font-weight:900; }
.sf-cart-empty p { margin:0 auto 17px; color:var(--muted); font-size:14px; }
.sf-cart-stepbar { display:flex; flex-direction:column; gap:10px; margin-bottom:17px; }
.sf-cart-stepbar h3 { margin:0; font-size:19px; font-weight:900; }
.sf-cart-stepbar p { margin:3px 0 0; color:var(--muted); font-size:13px; }
.sf-cart-stepbar .link-btn { align-self:flex-start; color:var(--olive-dark); font-weight:900; }
.sf-cart-checkout-summary { margin-top:12px; padding:13px 14px; border:1px solid var(--line); border-radius:15px; background:var(--cream); }
.sf-cart-summary-heading { margin-bottom:7px; color:var(--ink); font-size:13px; font-weight:900; }
.sf-cart-summary-row,.sf-cart-summary-total { display:flex; justify-content:space-between; gap:14px; padding:6px 0; border-bottom:1px solid rgba(36,32,30,.08); font-size:12px; }
.sf-cart-summary-row span { color:var(--muted); }
.sf-cart-summary-row strong { text-align:end; }
.sf-cart-summary-total { border:0; color:var(--olive-dark); font-weight:900; }
.sf-cart-summary-total strong { font-size:14px; }
.sf-cart-success { display:flex; flex-direction:column; align-items:center; text-align:center; padding-block:32px 28px; }
.sf-cart-success .tick { width:64px; height:64px; border-radius:50%; background:#e9efdc; color:var(--olive-dark); display:grid; place-items:center; font-size:34px; font-weight:900; }
.sf-cart-success h3 { margin:8px 0 0; font-size:22px; font-weight:900; }
.sf-cart-success p { max-width:430px; margin:0 0 8px; color:var(--muted); }
.sf-cart-reference { display:flex; flex-direction:column; gap:2px; min-width:190px; margin:6px 0 12px; padding:11px 20px; border:1px dashed rgba(86,112,43,.45); border-radius:14px; background:#f4f6ef; }
.sf-cart-reference span { color:var(--muted); font-size:11px; font-weight:800; }
.sf-cart-reference strong { color:var(--olive-dark); font-size:22px; font-weight:900; direction:ltr; }
.sf-cart-toast { position:fixed; z-index:1000; inset:auto 18px calc(18px + env(safe-area-inset-bottom,0px)); width:max-content; max-width:min(440px,calc(100vw - 36px)); margin-inline:auto; padding:11px 17px; border:1px solid rgba(255,255,255,.14); border-radius:999px; background:#292522; color:#fff; box-shadow:0 12px 34px rgba(0,0,0,.2); font-size:13px; font-weight:800; text-align:center; opacity:0; visibility:hidden; transform:translateY(8px); transition:opacity .2s,visibility .2s,transform .2s; pointer-events:none; }
.sf-cart-toast.is-visible { opacity:1; visibility:visible; transform:translateY(0); }

html[dir="rtl"] .sf-cart-stepbar .link-btn { text-align:right; }
html[dir="ltr"] .sf-cart-stepbar .link-btn { text-align:left; }

.sf-cart-success .sf-cart-whatsapp-link { display:inline-flex; align-items:center; justify-content:center; width:min(100%, 340px); margin:6px 0 2px; text-decoration:none; text-align:center; }
.sf-cart-success .sf-cart-whatsapp-link[hidden] { display:none; }
.sf-cart-success .sf-cart-whatsapp-hint { max-width:430px; margin:4px auto 10px; font-size:12px; color:var(--muted); }

@media (max-width:560px) {
  .sf-cart-dialog { width:calc(100vw - 16px); max-height:calc(100dvh - 16px); border-radius:20px; }
  .sf-cart-shell { max-height:calc(100dvh - 16px); }
  .sf-cart-head { padding:16px 17px 12px; }
  .sf-cart-head h2 { font-size:20px; }
  .sf-cart-body { padding:13px 17px 17px; }
  .sf-cart-quantities { gap:8px; }
  .sf-cart-item { padding:11px; }
  .sf-cart-thumb { width:50px; height:50px; }
  .sf-cart-foot { padding:13px 17px 17px; }
  .sf-cart-foot .sf-note { flex-basis:100%; }
  .sf-cart-foot .btn { width:100%; }
  .sf-cart-summary { grid-template-columns:1fr 1fr; }
}
@media (prefers-reduced-motion:reduce) {
  .cart-toggle,.product-add-btn,.sf-cart-toast { transition:none; }
}

/* Product-card refinement: one clear, full-width cart action. */
.products-grid .product-card {
  display:flex;
  flex-direction:column;
}
.products-grid .product-body {
  display:flex;
  flex:1;
  flex-direction:column;
}
.products-grid .product-footer {
  display:block;
  margin-top:auto;
  padding-top:2px;
}
.products-grid .product-footer .product-add-btn {
  display:flex;
  width:100%;
  min-height:44px;
  align-items:center;
  justify-content:center;
  padding:9px 14px;
  border:1px solid var(--brand-red);
  border-radius:13px;
  background:var(--brand-red);
  color:#fff;
  font-size:13px;
  font-weight:900;
  line-height:1.45;
  box-shadow:0 7px 16px rgba(168,32,44,.13);
}
.products-grid .product-footer .product-add-btn:hover {
  border-color:var(--brand-red-deep);
  background:var(--brand-red-deep);
  color:#fff;
  box-shadow:0 9px 19px rgba(119,25,35,.2);
  transform:translateY(-1px);
}
.products-grid .product-footer .product-add-btn:active {
  transform:translateY(0);
  box-shadow:none;
}
@media (max-width:540px) {
  .products-grid .product-footer .product-add-btn { min-height:42px; padding:8px 10px; font-size:12.5px; }
}
