/* 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; }

/* Product card video plays only on hover/focus/tap (no scroll-autoplay).
   Hint icon fades out once the video starts playing. */
.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-hint { transition:opacity .2s ease; }
.product-card:hover .video-hint,
.product-card:focus-within .video-hint { opacity:0; }
.product-card video.product-video { width:100%; height:100%; object-fit:cover; display:block; }

/* 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;
}
