/* ============================================================
   CHA VALA — "It's your tea"
   Design tokens grounded in the shop's own stamp: turmeric orange,
   tea-leaf green, roasted-brown ink, warm unbleached paper.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Work+Sans:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

:root{
  /* -- palette -- */
  --ink:            #2C1C12;   /* roasted brown, near-black */
  --ink-soft:       #5B4636;
  --paper:          #FFFCF6;   /* card surface */
  --cream:          #F7ECD8;   /* page background — warm unbleached paper, not the cliché F4F1EA */
  --turmeric:       #E08A1E;
  --turmeric-deep:  #B96A0F;
  --leaf:           #4B7A3B;
  --leaf-deep:      #35592A;
  --clay:           #A8441F;   /* CTA rust — deeper/more saturated than the generic D97757 */
  --clay-deep:      #832F14;
  --gold-line:      #C99A3E;
  --line:           rgba(44,28,18,0.14);
  --shadow:         0 10px 30px rgba(44,28,18,0.10);

  /* -- type -- */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Work Sans', -apple-system, sans-serif;
  --font-mono:    'Space Mono', 'Courier New', monospace;

  --radius: 14px;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background: var(--cream);
  background-image:
    radial-gradient(circle at 1px 1px, rgba(44,28,18,0.06) 1px, transparent 0);
  background-size: 22px 22px;
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 90px; /* room for mobile sticky cart bar */
}

a{ color: inherit; }
img{ max-width: 100%; display: block; }
button{ font-family: inherit; }

::selection{ background: var(--turmeric); color: var(--paper); }

/* focus visibility for accessibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible{
  outline: 2.5px solid var(--leaf);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

.container{
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------------- Top bar ---------------- */
.topbar{
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247,236,216,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner{
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  max-width: 1180px;
  margin: 0 auto;
}

.brand{
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand img{ width: 46px; height: 46px; border-radius: 50%; }
.brand-text{ display: flex; flex-direction: column; line-height: 1.05; }
.brand-text .name{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
}
.brand-text .tag{
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--leaf-deep);
  font-weight: 600;
}

.topbar-spacer{ flex: 1; }

/* On desktop this wrapper is invisible to layout — its children (icons,
   spacer, actions) behave exactly as if they were direct children of
   .topbar-inner, so desktop is unaffected by this wrapper existing.
   Mobile turns it into its own row — see the mobile media query below. */
.topbar-icons-actions{ display: contents; }

.cart-btn{
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: var(--paper);
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.cart-btn:hover{ background: var(--clay); transform: translateY(-1px); }
.cart-btn .badge{
  background: var(--turmeric);
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.75rem;
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* category chip nav */
.cat-nav{
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 20px 12px;
  max-width: 1180px;
  margin: 0 auto;
  scrollbar-width: thin;
}
.cat-nav::-webkit-scrollbar{ height: 5px; }
.cat-nav::-webkit-scrollbar-thumb{ background: var(--gold-line); border-radius: 4px; }

.cat-chip{
  flex-shrink: 0;
  padding: 7px 15px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s ease;
}
.cat-chip:hover{ border-color: var(--turmeric); }
.cat-chip.active{
  background: var(--leaf);
  border-color: var(--leaf);
  color: #fff;
}

/* ---------------- Hero ---------------- */
.hero{
  padding: 56px 20px 40px;
  text-align: center;
  position: relative;
  background-image:
    linear-gradient(rgba(247,236,216,0.88), rgba(247,236,216,0.94)),
    url('../images/hero-banner.jpg');
  background-size: cover;
  background-position: center;
}
.hero .eyebrow{
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--clay);
  font-weight: 700;
}
.hero h1{
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  margin: 8px 0 10px;
  font-weight: 600;
  font-optical-sizing: auto;
}
.hero h1 em{
  font-style: italic;
  color: var(--clay);
}
.hero p{
  max-width: 480px;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.55;
}
.hero .divider{
  width: 120px;
  height: 3px;
  margin: 22px auto 0;
  border-top: 3px dashed var(--gold-line);
}

/* ---------------- Menu sections ---------------- */
.menu-wrap{ padding: 10px 0 60px; }

.cat-section{
  padding: 34px 0 6px;
  scroll-margin-top: 128px;
}

.cat-section h2{
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 600;
  margin: 0 0 4px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.cat-section h2::after{
  content: '';
  flex: 1;
  border-bottom: 2px dotted var(--gold-line);
  margin-bottom: 6px;
}

.item-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.item-card{
  background: var(--paper);
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.item-card:hover{
  border-color: var(--turmeric);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.item-thumb{
  width: 60px;
  height: 60px;
  border-radius: 10px;
  background: var(--cream);
  border: 1px solid var(--line);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--gold-line);
}
.item-thumb img{ width: 100%; height: 100%; object-fit: cover; }
.item-thumb svg{ width: 26px; height: 26px; }

.item-info{ flex: 1; min-width: 0; }
.item-info .item-name{
  font-weight: 600;
  font-size: 0.94rem;
  line-height: 1.28;
  margin: 0 0 4px;
}
.item-info .item-price{
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--clay-deep);
  font-size: 0.92rem;
}

.item-add{
  flex-shrink: 0;
}
.add-btn{
  border: 1.5px solid var(--leaf);
  color: var(--leaf-deep);
  background: transparent;
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all .15s ease;
}
.add-btn:hover{ background: var(--leaf); color: #fff; }

.qty-stepper{
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--leaf);
  border-radius: 999px;
  padding: 4px 6px;
}
.qty-stepper button{
  width: 24px; height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.22);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  line-height: 1;
}
.qty-stepper button:hover{ background: rgba(255,255,255,0.4); }
.qty-stepper .qty-val{
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 700;
  min-width: 14px;
  text-align: center;
  font-size: 0.85rem;
}

.empty-note{
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-soft);
}

/* ---------------- Cart Drawer ---------------- */
.overlay{
  position: fixed; inset: 0;
  background: rgba(44,28,18,0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 60;
}
.overlay.open{ opacity: 1; pointer-events: auto; }

.cart-drawer{
  position: fixed;
  top: 0; right: 0;
  height: 100%;
  width: min(420px, 100%);
  background: var(--paper);
  box-shadow: -8px 0 30px rgba(44,28,18,0.18);
  z-index: 70;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
}
.cart-drawer.open{ transform: translateX(0); }

.cart-head{
  padding: 18px 20px;
  border-bottom: 1.5px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cart-head h3{
  font-family: var(--font-display);
  margin: 0;
  font-size: 1.3rem;
}
.close-btn{
  background: none; border: none; cursor: pointer;
  font-size: 1.4rem; color: var(--ink-soft); line-height: 1;
  padding: 4px;
}

.cart-body{
  flex: 1;
  overflow-y: auto;
  padding: 12px 20px;
}

.cart-line{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.cart-line .cl-name{ flex: 1; font-weight: 600; font-size: 0.9rem; }
.cart-line .cl-price{ font-family: var(--font-mono); font-size: 0.82rem; color: var(--ink-soft); }
.cart-line .qty-stepper{ background: var(--cream); }
.cart-line .qty-stepper button{ background: var(--ink); color: #fff; }
.cart-line .qty-stepper .qty-val{ color: var(--ink); }
.cart-empty{ text-align: center; padding: 40px 10px; color: var(--ink-soft); }
.cart-empty svg{ width: 54px; height: 54px; color: var(--gold-line); margin-bottom: 10px; }

.cart-foot{
  border-top: 1.5px dashed var(--line);
  padding: 16px 20px 20px;
}
.cart-total-row{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}
.cart-total-row .label{ font-weight: 600; color: var(--ink-soft); }
.cart-total-row .value{
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--clay-deep);
}

.checkout-btn{
  width: 100%;
  background: var(--clay);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 14px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background .15s ease;
}
.checkout-btn:hover{ background: var(--clay-deep); }
.checkout-btn:disabled{ background: var(--line); color: var(--ink-soft); cursor: not-allowed; }

/* mobile sticky cart bar */
.mobile-cart-bar{
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 55;
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 -6px 18px rgba(44,28,18,0.2);
}
.mobile-cart-bar.show{ display: flex; }
.mobile-cart-bar .mcb-info{ font-family: var(--font-mono); font-size: 0.85rem; }
.mobile-cart-bar button{
  background: var(--turmeric);
  color: var(--ink);
  border: none;
  border-radius: 999px;
  padding: 9px 18px;
  font-weight: 700;
  cursor: pointer;
}

/* ---------------- Checkout form (inside drawer, step 2) ---------------- */
.checkout-form{ display: none; padding: 4px 0 0; }
.checkout-form.active{ display: block; }
.cart-step.hidden{ display: none; }

.field{ margin-bottom: 14px; }
.field label{
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.field input, .field textarea{
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--cream);
  color: var(--ink);
}
.field input:focus, .field textarea:focus{ border-color: var(--leaf); }
.field textarea{ resize: vertical; min-height: 60px; }

.pay-options{
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.pay-chip{
  flex: 1;
  min-width: 100px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ink-soft);
  background: var(--paper);
  position: relative;
}
.pay-chip.active{ border-color: var(--leaf); background: rgba(75,122,59,0.1); color: var(--leaf-deep); }
.pay-chip.disabled{ opacity: 0.55; cursor: not-allowed; }
.pay-chip .soon{
  display: block;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--clay);
  margin-top: 2px;
}

.back-link{
  background: none; border: none; color: var(--ink-soft);
  font-weight: 600; cursor: pointer; padding: 0 0 12px;
  font-size: 0.85rem;
}

.error-msg{
  background: rgba(168,68,31,0.1);
  color: var(--clay-deep);
  border: 1px solid rgba(168,68,31,0.25);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.85rem;
  margin-bottom: 12px;
  display: none;
}
.error-msg.show{ display: block; }

/* ---------------- Token / success screen ---------------- */
.token-screen{ text-align: center; padding: 10px 4px 6px; }
.token-stamp{
  width: 170px;
  height: 170px;
  margin: 6px auto 18px;
  border-radius: 50%;
  border: 3px solid var(--leaf);
  outline: 2px dashed var(--turmeric);
  outline-offset: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  transform: rotate(-4deg);
  position: relative;
}
.token-stamp .ts-label{
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.token-stamp .ts-token{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--clay-deep);
  margin: 4px 0;
}
.token-stamp .ts-brand{
  font-size: 0.62rem;
  color: var(--leaf-deep);
  font-weight: 700;
  letter-spacing: 0.08em;
}
.token-screen h3{
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin: 4px 0 8px;
}
.token-screen p{ color: var(--ink-soft); font-size: 0.92rem; line-height: 1.5; }
.token-detail-row{
  display: flex; justify-content: space-between;
  font-size: 0.88rem;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}
.token-detail-row span:first-child{ color: var(--ink-soft); }
.token-detail-row span:last-child{ font-weight: 700; font-family: var(--font-mono); }

.new-order-btn{
  margin-top: 18px;
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 700;
  cursor: pointer;
}

/* ---------------- Footer ---------------- */
footer{
  text-align: center;
  padding: 40px 20px 30px;
  color: var(--ink-soft);
  font-size: 0.82rem;
  background-image:
    linear-gradient(rgba(247,236,216,0.93), rgba(247,236,216,0.97)),
    url('../images/promo-banner.jpg');
  background-size: cover;
  background-position: center;
}
footer .foot-brand{
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--ink);
  margin-bottom: 6px;
}
footer a.admin-link{
  color: var(--gold-line);
  text-decoration: none;
  font-size: 0.75rem;
}

/* ---------------- Toast ---------------- */
.toast{
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all .25s ease;
  z-index: 90;
}
.toast.show{ opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------------- Responsive ---------------- */
@media (max-width: 640px){
  .brand-text .name{ font-size: 1.05rem; }
  .cart-btn span.label{ display: none; }
  .cart-btn{ padding: 10px 12px; }
  .hero{ padding: 30px 16px 20px; }
  .cat-section h2{ font-size: 1.4rem; }
  .item-grid{ grid-template-columns: 1fr; }
  body{ padding-bottom: 0; }
}

/* ============================================================
   MULTI-CAFE ADDITIONS
   ============================================================ */

/* ---------------- Full-page loader (before a cafe is resolved) ---------------- */
.cv-page-loader{
  position: fixed; inset: 0; z-index: 200;
  background: var(--cream);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 14px;
}
.cv-page-loader img{ width: 56px; height: 56px; border-radius: 50%; animation: cvPulse 1.4s ease-in-out infinite; }
.cv-page-loader span{ color: var(--ink-soft); font-size: 0.9rem; }
@keyframes cvPulse{ 0%,100%{ opacity: 0.55; transform: scale(0.96); } 50%{ opacity: 1; transform: scale(1); } }

/* ---------------- Cafe selector (compulsory popup) ---------------- */
.cafe-picker-overlay{
  position: fixed; inset: 0; z-index: 150;
  background: rgba(44,28,18,0.55);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.cafe-picker-overlay.open{ display: flex; }
.cafe-picker-card{
  background: var(--paper);
  border-radius: 20px;
  max-width: 480px; width: 100%;
  max-height: 86vh; overflow-y: auto;
  padding: 30px 26px;
  box-shadow: var(--shadow);
  text-align: center;
}
.cafe-picker-card img.picker-logo{ width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 12px; }
.cafe-picker-card h2{ font-family: var(--font-display); font-size: 1.5rem; margin: 0 0 6px; }
.cafe-picker-card p.picker-sub{ color: var(--ink-soft); font-size: 0.88rem; margin: 0 0 20px; }
.cafe-picker-list{ display: flex; flex-direction: column; gap: 10px; text-align: left; }
.cafe-picker-item{
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  cursor: pointer;
  background: var(--cream);
  transition: border-color .15s ease, transform .15s ease;
}
.cafe-picker-item:hover{ border-color: var(--turmeric); transform: translateY(-1px); }
.cafe-picker-item .cpi-logo{
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: var(--leaf); color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem; object-fit: cover;
}
.cafe-picker-item .cpi-info{ flex: 1; min-width: 0; }
.cafe-picker-item .cpi-name{ font-weight: 700; font-size: 0.95rem; }
.cafe-picker-item .cpi-address{ font-size: 0.78rem; color: var(--ink-soft); margin-top: 2px; }
.cafe-picker-empty{ color: var(--ink-soft); padding: 30px 10px; }

/* ---------------- Cafe badge in topbar (switch cafe) ---------------- */
.cafe-badge{
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.78rem; color: var(--leaf-deep); font-weight: 700;
  border: 1.5px dashed var(--leaf); border-radius: 999px;
  padding: 5px 12px; cursor: pointer; white-space: nowrap;
  background: rgba(75,122,59,0.08);
}
.cafe-badge:hover{ background: rgba(75,122,59,0.16); }

/* ---------------- Cafe name + address row (scrolls away, not sticky) ---------------- */
.cafe-info-bar{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 20px 0;
}
.cafe-address-line{
  font-size: 0.82rem;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 640px){
  .cafe-info-bar{ flex-direction: column; align-items: flex-start; gap: 4px; }
  .cafe-address-line{ white-space: normal; font-size: 0.76rem; }
}

/* ---------------- Account button + banner ---------------- */
.account-btn{
  border: 1.5px solid var(--line); background: transparent; color: var(--ink);
  border-radius: 999px; padding: 8px 14px; font-size: 0.82rem; font-weight: 700;
  cursor: pointer; white-space: nowrap;
}
.account-btn:hover{ border-color: var(--turmeric); color: var(--clay-deep); }

.repeat-order-banner{
  display: none;
  max-width: 1180px; margin: 0 auto; padding: 0 20px;
}
.repeat-order-banner.show{ display: block; }
.repeat-order-banner .rob-inner{
  background: var(--paper);
  border: 1.5px dashed var(--leaf);
  border-radius: 14px;
  padding: 12px 16px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 16px;
}
.rob-text{ flex: 1; min-width: 180px; font-size: 0.86rem; color: var(--ink-soft); }
.rob-text strong{ color: var(--ink); }
.rob-btn{
  background: var(--leaf); color: #fff; border: none; border-radius: 999px;
  padding: 8px 16px; font-weight: 700; font-size: 0.82rem; cursor: pointer; white-space: nowrap;
}
.rob-btn:hover{ background: var(--leaf-deep); }

/* ---------------- Account modal (register / OTP / login) ---------------- */
.account-overlay{
  position: fixed; inset: 0; z-index: 160;
  background: rgba(44,28,18,0.5);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.account-overlay.open{ display: flex; }
.account-card{
  background: var(--paper); border-radius: 18px; max-width: 400px; width: 100%;
  max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow);
}
.account-card-head{
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1.5px dashed var(--line);
}
.account-card-head h3{ font-family: var(--font-display); margin: 0; font-size: 1.2rem; }
.account-card-body{ padding: 18px 20px 22px; }
.account-tabs{ display: flex; gap: 6px; margin-bottom: 16px; }
.account-tab-btn{
  flex: 1; border: 1.5px solid var(--line); background: var(--cream); color: var(--ink-soft);
  border-radius: 999px; padding: 8px; font-weight: 700; font-size: 0.82rem; cursor: pointer;
}
.account-tab-btn.active{ background: var(--leaf); border-color: var(--leaf); color: #fff; }
.account-step{ display: none; }
.account-step.active{ display: block; }
.account-step p.step-hint{ font-size: 0.82rem; color: var(--ink-soft); margin: -4px 0 14px; line-height: 1.5; }
.otp-inputs{ display: flex; gap: 8px; justify-content: center; margin-bottom: 14px; }
.otp-inputs input{
  width: 42px; height: 50px; text-align: center; font-size: 1.2rem; font-weight: 700;
  border: 1.5px solid var(--line); border-radius: 10px; background: var(--cream); font-family: var(--font-mono);
}
.otp-inputs input:focus{ border-color: var(--leaf); }
.account-link-btn{
  background: none; border: none; color: var(--leaf-deep); font-weight: 700;
  font-size: 0.82rem; cursor: pointer; padding: 0; text-decoration: underline;
}
.debug-otp-hint{
  font-size: 0.76rem; color: var(--turmeric-deep); background: rgba(224,138,30,0.12);
  border: 1px dashed var(--gold-line); border-radius: 8px; padding: 8px 10px; margin-bottom: 12px;
}

/* ---------------- Track order screen ---------------- */
.track-status-track{
  display: flex; justify-content: space-between; margin: 20px 0 6px; position: relative;
}
.track-status-track::before{
  content: ''; position: absolute; top: 13px; left: 5%; right: 5%; height: 2px; background: var(--line); z-index: 0;
}
.track-step{ flex: 1; text-align: center; position: relative; z-index: 1; }
.track-step .ts-dot{
  width: 26px; height: 26px; border-radius: 50%; background: var(--paper); border: 2px solid var(--line);
  margin: 0 auto 6px; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; color: var(--ink-soft);
}
.track-step.done .ts-dot{ background: var(--leaf); border-color: var(--leaf); color: #fff; }
.track-step.current .ts-dot{ background: var(--turmeric); border-color: var(--turmeric); color: #fff; }
.track-step .ts-label{ font-size: 0.68rem; color: var(--ink-soft); font-weight: 600; }
.track-step.done .ts-label, .track-step.current .ts-label{ color: var(--ink); }
.track-cancelled-note{
  text-align: center; color: var(--clay-deep); background: rgba(168,68,31,0.1);
  border: 1px solid rgba(168,68,31,0.25); border-radius: 10px; padding: 10px; font-size: 0.85rem; margin-top: 14px;
}

.track-order-form{ padding: 4px 0; }
.track-order-form .field{ margin-bottom: 12px; }

@media (max-width: 640px){
  .cafe-picker-card{ padding: 24px 18px; }
  .account-card{ max-width: 100%; }
}

/* ---------------- My Orders dashboard (logged-in customers) ---------------- */
.my-orders-head{
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.my-orders-subhead{
  font-family: var(--font-display); font-size: 1rem; margin: 0 0 8px; color: var(--ink);
}
.current-order-card{
  border: 1.5px solid var(--leaf);
  background: rgba(75,122,59,0.06);
  border-radius: 14px;
  padding: 14px;
}
.current-order-card .coc-top{
  display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 8px;
}
.current-order-card .coc-cafe{ font-weight: 700; font-size: 0.9rem; }
.current-order-card .coc-token{ font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-soft); }

.previous-order-item{
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.previous-order-item .poi-top{
  display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 6px;
}
.previous-order-item .poi-cafe{ font-weight: 700; font-size: 0.88rem; }
.previous-order-item .poi-date{ font-size: 0.74rem; color: var(--ink-soft); }
.previous-order-item .poi-bottom{
  display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap;
}
.previous-order-item .poi-total{ font-family: var(--font-mono); font-weight: 700; }
.poi-pdf-btn{
  background: var(--ink); color: #fff; border: none; border-radius: 999px;
  padding: 6px 14px; font-size: 0.76rem; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-block;
}
.poi-pdf-btn:hover{ background: var(--clay); }
.poi-track-btn{
  background: transparent; border: 1.5px solid var(--line); border-radius: 999px;
  padding: 6px 14px; font-size: 0.76rem; font-weight: 700; cursor: pointer; color: var(--ink);
}
.poi-track-btn:hover{ border-color: var(--leaf); color: var(--leaf-deep); }
.current-order-total{ font-family: var(--font-mono); font-weight: 700; color: var(--clay-deep); font-size: 1rem; }

/* ---------------- Header action group (Account/My Orders + Cart together) ---------------- */
.topbar-actions{
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---------------- My Orders: vertical timeline for previous orders ---------------- */
#previousOrdersList{
  position: relative;
  padding-left: 18px;
}
#previousOrdersList::before{
  content: '';
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--line);
}
.previous-order-item{
  position: relative;
}
.previous-order-item::before{
  content: '';
  position: absolute;
  left: -18px;
  top: 16px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--gold-line);
}
.previous-order-item.status-completed::before{ border-color: var(--leaf); background: var(--leaf); }
.previous-order-item.status-cancelled::before{ border-color: var(--clay); background: var(--clay); }

/* ---------------- Cancellation reason (shown to customer) ---------------- */
.cancel-reason-line{
  font-size: 0.8rem;
  color: var(--clay-deep);
  font-style: italic;
  margin: 4px 0 6px;
}
.track-cancelled-note .cancel-reason-line{
  color: var(--clay-deep);
  margin-top: 6px;
}

/* ============================================================
   COMPREHENSIVE MOBILE RESPONSIVENESS (all customer-facing screens)
   ============================================================ */
@media (max-width: 640px){
  /* Header layout: row 1 = logo, row 2 = cafe name (its own line), row 3 =
     icons + Track Order + Cart together, packed tightly on the left with
     no dead gap in between. */
  .topbar-inner{ flex-wrap: wrap; row-gap: 8px; justify-content: flex-start; }
  .cafe-badge{ order: 2; flex-basis: 100%; }
  .topbar-icons-actions{
    display: flex;
    align-items: center;
    gap: 10px;
    order: 3;
    flex-basis: 100%;
  }
  .topbar-spacer{ display: none; }
  .topbar-actions{ gap: 6px; }
  .account-btn{ padding: 8px 10px; font-size: 0.76rem; }

  /* Cafe picker */
  .cafe-picker-overlay{ padding: 0; align-items: flex-end; }
  .cafe-picker-card{ border-radius: 20px 20px 0 0; max-height: 92vh; padding: 22px 16px; width: 100%; }
  .cafe-picker-item{ padding: 12px; }
  #cafeSearchInput{ font-size: 16px; } /* prevents iOS auto-zoom on focus */

  /* Account / My Orders modal */
  .account-overlay{ padding: 0; align-items: flex-end; }
  .account-card{ border-radius: 20px 20px 0 0; max-height: 94vh; }
  .account-card-body{ padding: 16px 16px 20px; }
  .my-orders-head{ flex-wrap: wrap; gap: 8px; }
  .otp-inputs{ gap: 6px; }
  .otp-inputs input{ width: 38px; height: 46px; font-size: 1.05rem; }
  .current-order-card{ padding: 12px; }
  .coc-top{ flex-wrap: wrap; }
  #previousOrdersList{ padding-left: 14px; }
  .previous-order-item::before{ left: -14px; }
  .poi-bottom{ flex-wrap: wrap; gap: 8px; }

  /* Track order modal */
  .track-status-track{ flex-wrap: nowrap; }
  .track-step .ts-label{ font-size: 0.6rem; }
  .track-order-form .field{ margin-bottom: 10px; }
  .track-login-upsell{ margin-top: 16px; padding-top: 14px; }
  .tlu-btn{ min-height: 44px; font-size: 0.86rem; }

  /* Extra items (checkout add-ons) */
  .extra-item-row{ padding: 10px 12px; }
  .ei-name{ font-size: 0.84rem; }
  .ei-add-btn{ min-height: 36px; padding: 6px 12px; }

  /* Repeat order banner */
  .rob-inner{ flex-direction: column; align-items: stretch; text-align: center; }
  .rob-btn{ width: 100%; }

  /* Forms/inputs: prevent iOS zoom-on-focus and keep touch targets comfortable */
  .field input, .field textarea, #loginIdentifier, #loginPassword, #regName, #regPhone, #regEmail{
    font-size: 16px;
  }
  .checkout-btn, .account-btn, .cart-btn, .add-btn, .rob-btn, .new-order-btn{
    min-height: 40px;
  }

  /* Full-page loader logo a touch smaller on tiny screens */
  .cv-page-loader img{ width: 48px; height: 48px; }
}

@media (max-width: 380px){
  .otp-inputs input{ width: 34px; height: 42px; font-size: 0.95rem; }
  .hero h1{ font-size: 1.8rem; }
}

/* ---------------- Razorpay payment status block (shown after placing an order) ---------------- */
.razorpay-status-box{
  background: var(--cream);
  border: 1.5px dashed var(--leaf);
  border-radius: 14px;
  padding: 16px;
  margin: 14px 0;
  text-align: center;
}
#razorpayStatusText{ font-size: 0.9rem; color: var(--ink-soft); margin: 0; line-height: 1.5; }
#retryRazorpayBtn{ margin-top: 12px; }

/* ---------------- Cafe Instagram link (next to cafe badge) ---------------- */
.cafe-insta-link{
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(45deg, #f9ce34, #ee2a7b, #6228d7);
  color: #fff; flex-shrink: 0;
  transition: transform .15s ease;
}
.cafe-insta-link:hover{ transform: scale(1.08); }

/* ---------------- Cafe location link (next to Instagram icon) ---------------- */
.cafe-map-link{
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--clay); color: #fff; flex-shrink: 0;
  transition: transform .15s ease;
}
.cafe-map-link:hover{ background: var(--clay-deep); transform: scale(1.08); }

/* ---------------- Track Order modal: login/create account upsell ---------------- */
.track-login-upsell{
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1.5px dashed var(--line);
  text-align: center;
}
.track-login-upsell .step-hint{ margin-bottom: 10px; }
.tlu-btn{
  flex: 1;
  border-radius: 999px;
  padding: 11px 16px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all .15s ease;
}
.tlu-btn-outline{
  background: transparent;
  border: 1.5px solid var(--line);
  color: var(--ink);
}
.tlu-btn-outline:hover{ border-color: var(--leaf); color: var(--leaf-deep); }
.tlu-btn-primary{
  background: var(--clay);
  border: 1.5px solid var(--clay);
  color: #fff;
}
.tlu-btn-primary:hover{ background: var(--clay-deep); }

/* ---------------- Extra Items (checkout add-ons) ---------------- */
.extra-items-list{
  border: 1.5px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--cream);
}
.extra-item-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.extra-item-row:last-child{ border-bottom: none; }
.ei-name-wrap{ display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ei-name{ font-weight: 600; font-size: 0.88rem; color: var(--ink); }
.ei-price{ font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-soft); }
.ei-control{ flex-shrink: 0; }
.ei-add-btn{
  border: 1.5px solid var(--leaf);
  color: var(--leaf-deep);
  background: transparent;
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all .15s ease;
}
.ei-add-btn:hover{ background: var(--leaf); color: #fff; }

.extra-tag{
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--leaf-deep);
  background: rgba(75,122,59,0.12);
  border-radius: 999px;
  padding: 1px 7px;
  margin-left: 4px;
  vertical-align: middle;
}

/* ---------------- Menu search (inside sticky header, above category chips) ---------------- */
.menu-search-wrap{
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 10px;
  display: flex;
  align-items: center;
}
.menu-search-icon{
  position: absolute;
  left: 32px;
  color: var(--ink-soft);
  pointer-events: none;
}
#menuSearchInput{
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 9px 38px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  background: var(--paper);
  color: var(--ink);
}
#menuSearchInput:focus{ border-color: var(--leaf); }
.menu-search-clear{
  position: absolute;
  right: 32px;
  background: none;
  border: none;
  color: var(--ink-soft);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}
.menu-search-clear:hover{ color: var(--clay); }

/* ---------------- Extra Items — dropdown UI at the end of the cart popup ---------------- */
.cart-extra-items-section{
  border-top: 1.5px dashed var(--line);
  padding: 14px 20px;
  background: var(--cream);
}
.extra-items-caption{
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 4px;
}
.extra-items-examples{
  font-weight: 500;
  color: var(--ink-soft);
  font-size: 0.78rem;
}
.extra-items-dropdown-row{
  display: flex;
  gap: 8px;
  margin: 10px 0;
}
#cartExtraItemSelect{
  flex: 1;
  min-width: 0;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  font-family: var(--font-body);
  font-size: 0.86rem;
  background: var(--paper);
  color: var(--ink);
}
#cartExtraItemSelect:focus{ border-color: var(--leaf); }
.extra-items-selected-list .extra-item-row{ background: var(--paper); }
