/* Bub-It custom CSS additions on top of Tailwind */

/* "Gang of Three" — custom display font used ONLY for the literal word
   "Bub-It" when it appears in titles / headlines / loading screens. */
@font-face {
  font-family: 'GangOfThree';
  src: url('/static/fonts/go3v2.ttf') format('truetype');
  font-display: swap;
  font-weight: normal;
  font-style: normal;
}
.gang-of-three {
  font-family: 'GangOfThree', 'Plus Jakarta Sans', system-ui, sans-serif !important;
  letter-spacing: 0.01em;
  /* GO3 renders tight — slight bump so it sits visually balanced next to
     Jakarta/Inter body text. Individual call-sites can still override. */
  font-weight: normal !important;
}

html, body { -webkit-font-smoothing: antialiased; }

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ---- Horizontal-rail scroll affordances ----------------------------
   Every rail/chip strip that overflows horizontally now shows:
     * a thin, subtle scrollbar (so the user knows there is more),
     * edge fades that appear when more content is off-screen,
     * round chevron buttons on desktop (hidden on touch / when at ends).
   These replace the old `no-scrollbar` behaviour on the customer menu. */

/* Chip strips (small buttons): keep it minimal — just a thin scrollbar.
   On touch devices the native scrollbar is already invisible, so users
   still have momentum scrolling. */
.scroll-chips {
  scrollbar-width: thin;             /* Firefox */
  scrollbar-color: #d6c8b0 transparent;
  scroll-behavior: smooth;
}
.scroll-chips::-webkit-scrollbar      { height: 6px; }
.scroll-chips::-webkit-scrollbar-thumb{ background: #d6c8b0; border-radius: 999px; }
.scroll-chips::-webkit-scrollbar-track{ background: transparent; }

/* Product / offer / combo rails — wrapped in .scroll-rail-wrap so we can
   layer fade-edge gradients + chevron buttons on top. */
.scroll-rail-wrap {
  position: relative;
}
.scroll-rail {
  scrollbar-width: thin;
  scrollbar-color: #d6c8b0 transparent;
  scroll-behavior: smooth;
}
.scroll-rail::-webkit-scrollbar      { height: 8px; }
.scroll-rail::-webkit-scrollbar-thumb{ background: #d6c8b0; border-radius: 999px; }
.scroll-rail::-webkit-scrollbar-thumb:hover { background: #b8a783; }
.scroll-rail::-webkit-scrollbar-track{ background: transparent; }

/* Edge fade gradients — visible only when more content exists that way.
   Uses ::before / ::after on the wrapper so the rail itself stays clean. */
.scroll-rail-wrap::before,
.scroll-rail-wrap::after {
  content: "";
  position: absolute; top: 0; bottom: 10px; width: 32px;
  pointer-events: none;
  opacity: 0; transition: opacity .2s ease;
  z-index: 1;
}
.scroll-rail-wrap::before {
  left: 0;
  background: linear-gradient(to right, rgba(250,246,237,.95), rgba(250,246,237,0));
}
.scroll-rail-wrap::after {
  right: 0;
  background: linear-gradient(to left,  rgba(250,246,237,.95), rgba(250,246,237,0));
}
.scroll-rail-wrap.has-more-left::before  { opacity: 1; }
.scroll-rail-wrap.has-more-right::after  { opacity: 1; }

/* Round chevron buttons sit on top of the fades.  Hidden by default;
   setupScrollRails() shows them via the .has-more-{left,right} class on
   the wrapper.  Hidden on touch / small screens where swipe already
   covers the gesture. */
.scroll-rail-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px;
  background: #fff; color: #111;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 999px;
  box-shadow: 0 4px 14px -6px rgba(0,0,0,.25);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, background .15s ease;
  z-index: 2;
}
.scroll-rail-btn:hover { background: #f7efe0; transform: translateY(-50%) scale(1.05); }
.scroll-rail-btn-left  { left: 6px;  }
.scroll-rail-btn-right { right: 6px; }
.scroll-rail-wrap.has-more-left  > .scroll-rail-btn-left,
.scroll-rail-wrap.has-more-right > .scroll-rail-btn-right {
  opacity: 1; pointer-events: auto;
}
/* On touch devices (where swipe is the primary gesture) don't show the
   buttons — the fade gradients + native scrollbar are enough. */
@media (hover: none) and (pointer: coarse) {
  .scroll-rail-btn { display: none; }
}

.product-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sheet-backdrop {
  position: fixed; inset: 0; background: rgba(17,17,17,0.55);
  z-index: 60; opacity: 0; transition: opacity .25s ease;
}
.sheet-backdrop.open { opacity: 1; }

.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 61;
  background: #fff; border-top-left-radius: 1.75rem; border-top-right-radius: 1.75rem;
  max-height: 92vh; overflow-y: auto; transform: translateY(100%);
  transition: transform .3s cubic-bezier(.22,1,.36,1);
  box-shadow: 0 -10px 40px -15px rgba(0,0,0,.25);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.sheet.open { transform: translateY(0); }

.chip-active { background:#111; color:#fff; border-color:#111; }

.veg-mark { width:14px;height:14px;border:1.5px solid #2E7D32;display:inline-flex;align-items:center;justify-content:center;border-radius:2px; }
.veg-mark::after { content:''; width:7px;height:7px;border-radius:9999px;background:#2E7D32; }
.nonveg-mark { width:14px;height:14px;border:1.5px solid #B91C1C;display:inline-flex;align-items:center;justify-content:center;border-radius:2px; }
.nonveg-mark::after { content:''; width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:7px solid #B91C1C; }

.add-btn {
  background:#fff; color:#111; border:1.5px solid #111;
  padding:.4rem .85rem; border-radius:.6rem; font-weight:700; font-size:.85rem;
  transition: all .15s;
}
.add-btn:hover { background:#111; color:#fff; }
.add-btn.in-cart { background:#D72638; color:#fff; border-color:#D72638; }

.btn-primary {
  background:#D72638; color:#fff; font-weight:700;
  padding:.85rem 1.2rem; border-radius:.85rem;
  box-shadow: 0 8px 20px -8px rgba(215,38,56,.55);
  transition: transform .1s ease, filter .15s;
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-primary:active { transform: scale(.98); }
.btn-secondary {
  background:#fff; color:#111; border:1.5px solid #111;
  padding:.75rem 1.1rem; border-radius:.85rem; font-weight:600;
}

.qty-btn { width:28px;height:28px;border-radius:9999px;background:#F8F6F2;display:inline-flex;align-items:center;justify-content:center;font-weight:700; }

.skel { background: linear-gradient(90deg,#ececec 0%,#f5f5f5 50%,#ececec 100%); background-size:200% 100%; animation: shimmer 1.3s infinite; border-radius:.6rem; }
@keyframes shimmer { 0%{background-position:-200% 0;} 100%{background-position:200% 0;} }

.fade-in { animation: fadeIn .35s ease both; }
@keyframes fadeIn { from{opacity:0;transform:translateY(6px);} to{opacity:1;transform:translateY(0);} }

.hero-grad { background: linear-gradient(135deg,#111 0%,#1b1b1b 55%,#D72638 140%); }

.cat-chip { white-space: nowrap; padding:.55rem .95rem; border-radius:9999px; background:#fff; border:1.5px solid #EDEAE3; font-weight:600; font-size:.9rem; color:#111; }
.cat-chip.active { background:#111; color:#fff; border-color:#111; }

.guided-tile {
  background: linear-gradient(135deg, #fff 0%, #F8F6F2 100%);
  border:1.5px solid #EDEAE3; border-radius:1rem; padding:1rem; text-align:left;
  transition: all .15s; display:flex; align-items:center; gap:.7rem;
}
.guided-tile:hover { border-color:#D72638; transform: translateY(-2px); box-shadow: 0 12px 24px -12px rgba(215,38,56,.2); }

.pill { display:inline-block; padding:.18rem .55rem; border-radius:9999px; font-size:.68rem; font-weight:700; letter-spacing:.02em; }
.pill-bestseller { background:#FEF3C7; color:#92400E; }
.pill-new { background:#DCFCE7; color:#166534; }
.pill-signature { background:#111; color:#fff; }
.pill-premium { background:#F3E8FF; color:#6B21A8; }
.pill-low-sugar { background:#E0F2FE; color:#075985; }
.pill-fan-fav   { background:linear-gradient(135deg,#FCE7F3 0%,#FBCFE8 100%); color:#9D174D; }

/* Instagram "Watch real reactions" CTA — gradient brand button that opens IG in new tab */
.ig-cta {
  background: linear-gradient(135deg,#F58529 0%,#DD2A7B 45%,#8134AF 80%,#515BD4 100%);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 8px 22px -8px rgba(221,42,123,.45);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.ig-cta:hover, .ig-cta:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 12px 28px -10px rgba(221,42,123,.6);
}
.ig-cta-icon {
  width:38px; height:38px; display:flex; align-items:center; justify-content:center;
  border-radius:50%; background:rgba(255,255,255,.22); font-size:1.1rem;
}

/* "Tag us & get featured" banner — cream-ish surface, brand-red text */
.tag-us-banner {
  background: #FFF7E6;
  border: 1px dashed #F4B942;
  color: #1a1a1a;
  text-decoration: none;
  transition: transform .18s ease, background .18s ease;
}
.tag-us-banner:hover, .tag-us-banner:focus-visible {
  background: #FFF1CC;
  transform: translateY(-1px);
}
.tag-us-icon { line-height: 1; }

/* Product card: reels-style — videos autoplay (muted) when on screen and
   pause when off. No overlay icon, no click-to-toggle. */
.product-card { outline:none; transition:transform .18s ease, box-shadow .18s ease; }
.product-card:focus-visible { box-shadow:0 0 0 3px #D72638, 0 10px 25px -10px rgba(0,0,0,.25); transform:translateY(-2px); }
.product-card:hover          { transform:translateY(-2px); box-shadow:0 14px 26px -12px rgba(0,0,0,.18); }
.product-card video.product-video { width:100%; height:100%; object-fit:cover; display:block; pointer-events:none; }
/* Legacy overlay – fully hidden in case any cached HTML still emits it. */
.product-card .video-hint { display:none !important; }

/* Refreshing toast */
.bubit-refresh-toast { position:fixed; top:.75rem; left:50%; transform:translateX(-50%);
  background:#111; color:#fff; padding:.4rem .9rem; border-radius:9999px; font-size:.75rem;
  font-weight:700; z-index:60; box-shadow:0 10px 30px -10px rgba(0,0,0,.3); opacity:0;
  transition:opacity .2s ease; pointer-events:none; }
.bubit-refresh-toast.show { opacity:1; }

/* ---------- First-visit store picker gate ---------- */
.store-gate {
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 1.25rem;
  background: linear-gradient(135deg, #FFF9F4 0%, #F8F6F2 60%, #FDECE0 100%);
}
.store-gate-card {
  width: 100%; max-width: 28rem;
  background: #fff; border-radius: 1.25rem;
  padding: 1.75rem 1.5rem;
  text-align: center;
  box-shadow: 0 24px 60px -24px rgba(0,0,0,.25);
  border: 1px solid #EDEAE3;
  animation: storeGateIn .35s ease;
}
@keyframes storeGateIn { from { opacity:0; transform: translateY(10px);} to { opacity:1; transform: none;} }
.store-gate-title { font-size: 1.5rem; font-weight: 800; color: #111; line-height: 1.2; }
.store-gate-sub   { margin-top: .4rem; font-size: .95rem; font-weight: 600; color: #333; }
.store-gate-hint  { margin-top: .3rem; font-size: .75rem; color: #7A7A7A; }
.store-gate-list  { margin-top: 1.25rem; display: flex; flex-direction: column; gap: .6rem; }
.store-pick-card {
  display: flex; align-items: center; gap: .8rem;
  padding: .9rem 1rem;
  background: #fff; border: 1.5px solid #EDEAE3; border-radius: 1rem;
  text-align: left; cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.store-pick-card:hover,
.store-pick-card:focus-visible { border-color: #D72638; box-shadow: 0 10px 24px -12px rgba(215,38,56,.3); transform: translateY(-1px); outline: none; }
.store-pick-icon {
  width: 2.5rem; height: 2.5rem; border-radius: 9999px;
  background: #FDECE0; color: #D72638;
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.store-pick-body  { flex: 1; min-width: 0; }
.store-pick-name  { font-weight: 800; color: #111; font-size: .95rem; }
.store-pick-sub   { font-size: .72rem; color: #7A7A7A; margin-top: .1rem; }
.store-pick-arrow { color: #C0BCB3; }
.store-pick-card:hover .store-pick-arrow { color: #D72638; }
.store-pick-card-recent { border-color: #D72638; box-shadow: 0 6px 18px -8px rgba(215,38,56,.25); }
.store-pick-recent-pill {
  display: inline-block; margin-left: .4rem;
  font-size: .55rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: .12rem .4rem; border-radius: 999px;
  background: #FDECE0; color: #D72638;
  vertical-align: middle;
}

/* ============================================================
   Iteration A — Cart, Checkout, Receipt UI
   ============================================================ */
.add-to-cart-btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-color, #D72638); color: #fff;
  font-weight: 700; font-size: .75rem;
  padding: .35rem .7rem; border-radius: 999px;
  box-shadow: 0 4px 10px -4px rgba(215,38,56,.5);
  transition: transform .12s ease, background .15s ease;
}
.add-to-cart-btn:active { transform: scale(0.96); }
.add-to-cart-btn:hover  { background: var(--brand-dark, #B81E2C); }
.add-to-cart-btn[data-in-cart] {
  background: #fff; color: var(--brand-color,#D72638);
  border: 1.5px solid var(--brand-color,#D72638);
  box-shadow: none;
}

/* Sticky cart footer (always visible when there are items) */
.cart-footer-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: flex; align-items: center; gap: .75rem;
  padding: .85rem 1rem calc(.85rem + env(safe-area-inset-bottom));
  background: var(--brand-color,#D72638); color: #fff;
  box-shadow: 0 -10px 30px -10px rgba(0,0,0,.3);
  cursor: pointer;
  animation: cartIn .25s ease;
}
@keyframes cartIn { from { transform: translateY(110%); } to { transform: translateY(0); } }
.cart-footer-icon {
  width: 2.25rem; height: 2.25rem; border-radius: 999px;
  background: rgba(255,255,255,.15);
  display:flex; align-items:center; justify-content:center;
  position: relative;
}
.cart-footer-count {
  position: absolute; top: -4px; right: -4px;
  background: #fff; color: var(--brand-color,#D72638);
  font-size: .65rem; font-weight: 800;
  border-radius: 999px;
  min-width: 1.1rem; height: 1.1rem; line-height: 1.1rem;
  text-align: center; padding: 0 .25rem;
}
.cart-footer-text { flex: 1; font-weight: 700; font-size: .95rem; }
.cart-footer-text small { display: block; font-weight: 500; opacity:.85; font-size: .7rem; margin-top: 1px; }
.cart-footer-cta {
  background: #fff; color: var(--brand-color,#D72638);
  font-weight: 800; padding: .5rem 1rem; border-radius: 999px;
  font-size: .85rem;
}

/* Cart / checkout / receipt drawer */
.cart-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.45);
  display: flex; align-items: flex-end; justify-content: center;
  animation: cartFade .2s ease;
}
@keyframes cartFade { from { opacity:0;} to { opacity:1;} }
.cart-panel {
  width: 100%; max-width: 28rem; max-height: 92vh;
  background: #fff;
  border-radius: 1.25rem 1.25rem 0 0;
  display: flex; flex-direction: column;
  animation: cartUp .25s ease;
}
@keyframes cartUp { from { transform: translateY(100%);} to { transform: translateY(0);} }
.cart-header { padding: 1rem 1.25rem; border-bottom: 1px solid #F0EDE7; display:flex; align-items:center; justify-content: space-between;}
.cart-header h2 { font-weight: 800; font-size: 1.1rem; }
.cart-header button { width: 2rem; height: 2rem; border-radius: 999px; background: #F4F1EB; display:flex; align-items:center; justify-content:center; }
.cart-body  { flex: 1; overflow-y: auto; padding: .5rem 1.25rem; }
.cart-empty { padding: 2rem 1rem; text-align: center; color: #7A7A7A; }
.cart-empty .fa-cart-shopping { font-size: 2.5rem; color: #DDD7CC; margin-bottom: .5rem; }
.cart-item  { display: flex; gap: .75rem; padding: .75rem 0; border-bottom: 1px solid #F4F1EB; }
.cart-item img { width: 3.25rem; height: 3.25rem; object-fit: cover; border-radius: .75rem; flex-shrink:0; background:#EFEAE0;}
.cart-item-body { flex: 1; min-width: 0; }
.cart-item-name { font-weight: 700; font-size: .9rem; line-height: 1.2; }
.cart-item-price { font-size: .75rem; color: #7A7A7A; }
.cart-qty { display: inline-flex; align-items: center; gap: .5rem; margin-top: .35rem; }
.cart-qty button {
  width: 1.6rem; height: 1.6rem; border-radius: 999px;
  background: #F4F1EB; color: #111;
  display:flex; align-items:center; justify-content:center;
  font-weight: 800;
}
.cart-qty button:hover { background: #E8E2D4; }
.cart-qty span { min-width: 1.5rem; text-align: center; font-weight: 700; font-size: .9rem; }
.cart-remove { color: #B81E2C; font-size: .72rem; margin-top: .35rem; font-weight: 700;}
.cart-line-total { font-weight: 800; font-size: .9rem; }

.cart-summary { padding: .75rem 1.25rem; background: #FBF8F1; border-top: 1px solid #F0EDE7; }
.cart-summary-row { display:flex; justify-content: space-between; font-size: .85rem; padding: .25rem 0; }
.cart-summary-row.total { font-size: 1.1rem; font-weight: 800; padding-top: .5rem; border-top: 1px dashed #DDD7CC; margin-top: .35rem; }
.cart-summary-row.discount { color: #047857; font-weight: 700; }

.coupon-row { display: flex; gap: .5rem; padding: .75rem 1.25rem .25rem; }
.coupon-row input { flex:1; border:1.5px solid #E8E2D4; padding: .55rem .75rem; border-radius: .75rem; font-family: ui-monospace, monospace; text-transform: uppercase; font-size: .85rem; }
.coupon-row button { background: #111; color: #fff; padding: 0 1rem; border-radius: .75rem; font-weight: 700; font-size: .85rem; }
.coupon-applied { padding: .25rem 1.25rem .5rem; font-size: .75rem; color: #047857; font-weight: 700; }
.coupon-applied .coupon-clear { color:#B81E2C; margin-left: .5rem; cursor: pointer; }
.coupon-error { padding: .25rem 1.25rem .5rem; font-size: .75rem; color: #B81E2C; font-weight: 600;}

.cart-cta {
  width: calc(100% - 2.5rem); margin: .75rem 1.25rem 1.25rem;
  background: var(--brand-color,#D72638); color: #fff;
  padding: .9rem 1rem; border-radius: 999px;
  font-weight: 800; font-size: 1rem;
  display:flex; align-items:center; justify-content:center; gap: .5rem;
  box-shadow: 0 12px 24px -12px rgba(215,38,56,.5);
}
.cart-cta:disabled { opacity:.5; cursor: not-allowed; }
.cart-cta-secondary { background: #111; }

/* Checkout form fields */
.checkout-field { display:block; margin-bottom: .8rem; }
.checkout-field label { display:block; font-size: .7rem; font-weight: 700; color:#555; text-transform: uppercase; letter-spacing: .03em; margin-bottom: .25rem; }
.checkout-field input, .checkout-field textarea {
  width: 100%; border:1.5px solid #E8E2D4; padding: .65rem .8rem; border-radius: .75rem;
  font-size: .95rem; background: #FFFCF6;
}
.checkout-field input:focus, .checkout-field textarea:focus { outline: none; border-color: var(--brand-color,#D72638); }
.checkout-hint { font-size: .7rem; color: #7A7A7A; margin-top: .15rem; }

/* Receipt */
.receipt-card {
  margin: .5rem 1.25rem 1rem;
  border:2px dashed #DDD7CC; border-radius: 1rem;
  padding: 1.25rem 1.1rem;
  background: #FFFCF6;
}
.receipt-paid { text-align: center; color: #047857; font-weight: 800; font-size: 1.5rem; margin-bottom: .5rem; }
.receipt-paid .fa-circle-check { font-size: 2.25rem; display: block; margin-bottom: .25rem; }
.receipt-meta { font-size: .8rem; color: #555; text-align: center; }
.receipt-meta b { color: #111; }
.receipt-table { width: 100%; margin-top: .75rem; border-collapse: collapse; font-size: .85rem; }
.receipt-table th, .receipt-table td { padding: .35rem .25rem; text-align: left; }
.receipt-table th { font-size: .7rem; text-transform: uppercase; letter-spacing: .03em; color:#555; border-bottom: 1px solid #DDD7CC; }
.receipt-table tr td:nth-child(2) { text-align:center; }
.receipt-table tr td:nth-child(3) { text-align:right; }
.receipt-totals { margin-top: .5rem; border-top: 1px dashed #DDD7CC; padding-top: .5rem; font-size: .85rem; }
.receipt-totals .row { display:flex; justify-content:space-between; padding: .15rem 0;}
.receipt-totals .row.total { font-size: 1.05rem; font-weight: 800; border-top: 1px dashed #DDD7CC; padding-top: .35rem; margin-top: .3rem; }
.receipt-table-area {
  margin-top: .9rem; padding: .65rem .85rem;
  background: #FDECE0; border-radius: .75rem;
  text-align: center;
}
.receipt-table-area .label { font-size: .65rem; font-weight:700; text-transform: uppercase; color:#7A7A7A; }
.receipt-table-area .value { font-size: 1.4rem; font-weight: 800; color:#B81E2C; }
.receipt-show-staff { text-align:center; font-size: .7rem; color:#555; padding: .5rem; font-style: italic; }
