/* =====================================
   Nutri X Go — Store Styles
   Premium Fitness Meal Prep
   ===================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

/* ── Custom properties ── */
:root {
  --wine:        #1A1A2E;
  --wine-dark:   #0F0F1A;
  --wine-light:  #2A2A4A;
  --gold:        #C9A96E;
  --gold-light:  #D4BC8E;
  --cream:       #FAFAFA;
  --cream-dark:  #F0F0F0;
  --espresso:    #1B1B1B;
  --brown-mid:   #6B6B6B;
  --olive:       #2D6A4F;
  --border:      #E5E5E5;
  --shadow-sm:   0 1px 4px rgba(0,0,0,.06);
  --shadow-md:   0 4px 16px rgba(0,0,0,.08);
  --shadow-lg:   0 8px 32px rgba(0,0,0,.12);
  --radius:      10px;
  --radius-lg:   16px;
  --font-serif:  'Montserrat', 'Helvetica Neue', sans-serif;
  --font-body:   'Inter', 'Helvetica Neue', sans-serif;
}

/* ── Splash Screen ── */
#splash-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #0F0F1A;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .5s ease;
}
#splash-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}
#splash-logo {
  width: min(260px, 55vw);
  height: auto;
  animation: splash-spin 1.5s cubic-bezier(.25,.46,.45,.94) forwards;
}
@keyframes splash-spin {
  0%   { transform: scale(0) rotate(-360deg); opacity: 0; }
  60%  { transform: scale(1.05) rotate(0deg); opacity: 1; }
  75%  { transform: scale(.97) rotate(0deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--espresso);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--cream-dark); }
::-webkit-scrollbar-thumb { background: #C0C0C0; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #999; }

/* ─────────────────────────────────────────
   STICKY NAVBAR
───────────────────────────────────────── */
#navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--wine-dark);
  box-shadow: 0 2px 12px rgba(0,0,0,.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 60px;
  gap: 12px;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.navbar-logo-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
}

.navbar-logo-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--wine);
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.navbar-title {
  font-family: var(--font-serif);
  color: var(--cream);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: .02em;
}

.navbar-title span { color: var(--gold); }

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-auth {
  font-family: var(--font-body);
  font-size: .82rem;
  color: var(--cream);
  background: transparent;
  border: 1px solid rgba(255,255,255,.25);
  padding: 6px 14px;
  border-radius: 100px;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.btn-auth:hover { background: rgba(255,255,255,.12); }

@keyframes pulse-install {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201,168,76,.7); }
  50%       { box-shadow: 0 0 0 7px rgba(201,168,76,0); }
}
.btn-install-nav {
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 700;
  color: var(--espresso);
  background: var(--gold);
  border: none;
  padding: 6px 12px;
  border-radius: 100px;
  cursor: pointer;
  white-space: nowrap;
  animation: pulse-install 1.4s ease-in-out infinite;
}
.btn-auth.logged { border-color: var(--gold); color: var(--gold); }

/* ─────────────────────────────────────────
   HERO BANNER (max 15vh)
───────────────────────────────────────── */
#hero {
  position: relative;
  height: 28vh;
  min-height: 180px;
  max-height: 260px;
  overflow: hidden;
  background: var(--espresso);
}

#hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .75;
}

#hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(15,15,26,.8) 0%, rgba(26,26,46,.3) 60%, transparent 100%);
}

#hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 24px;
}

#hero-title {
  font-family: var(--font-serif);
  font-size: clamp(.9rem, 2.5vw, 1.4rem);
  color: var(--cream);
  font-weight: 700;
  text-shadow: 0 1px 4px rgba(0,0,0,.5);
  line-height: 1.2;
}

#hero-subtitle {
  font-size: clamp(.7rem, 1.5vw, .9rem);
  color: var(--gold-light);
  margin-top: 4px;
  font-weight: 500;
  letter-spacing: .04em;
  line-height: 1.4;
}

#hero-subtitle-2 {
  font-size: clamp(.65rem, 1.3vw, .82rem);
  color: rgba(255,255,255,.65);
  margin-top: 2px;
  font-weight: 400;
  letter-spacing: .02em;
  line-height: 1.4;
}



/* ─────────────────────────────────────────
   CATEGORY TABS
───────────────────────────────────────── */
#category-bar {
  position: sticky;
  top: 60px;
  z-index: 90;
  background: var(--cream);
  border-bottom: 2px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
#category-bar::-webkit-scrollbar { display: none; }

#category-tabs {
  display: flex;
  gap: 0;
  padding: 0 16px;
  white-space: nowrap;
}

.cat-tab {
  font-family: var(--font-body);
  font-size: .82rem;
  font-weight: 600;
  color: var(--brown-mid);
  padding: 12px 18px;
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all .2s;
  letter-spacing: .02em;
}
.cat-tab:hover { color: var(--wine); }
.cat-tab.active {
  color: var(--wine);
  border-bottom-color: var(--wine);
}

/* ─────────────────────────────────────────
   MAIN CONTENT
───────────────────────────────────────── */
#main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 160px;
}

/* ─────────────────────────────────────────
   CATEGORY SECTION
───────────────────────────────────────── */
.category-section {
  margin-bottom: 42px;
  scroll-margin-top: 120px;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.category-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.category-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--wine);
  font-weight: 700;
}

.category-subtitle {
  font-size: .8rem;
  color: var(--brown-mid);
  font-style: italic;
  margin-top: 1px;
}

/* ─────────────────────────────────────────
   PRODUCT GRID
───────────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

/* ─────────────────────────────────────────
   PRODUCT CARD
───────────────────────────────────────── */
.product-card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s;
  position: relative;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.product-card.highlight {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold), var(--shadow-sm);
}

.product-badge-highlight {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--gold);
  color: var(--espresso);
  font-size: .65rem;
  font-weight: 700;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 3px 10px;
  border-radius: 100px;
  z-index: 2;
}

.product-img-wrap {
  height: 180px;
  background: var(--cream-dark);
  overflow: hidden;
  position: relative;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

.product-body {
  padding: 14px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.product-tag {
  font-size: .7rem;
  color: var(--olive);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.product-name {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--espresso);
  line-height: 1.35;
}

.product-desc {
  font-size: .8rem;
  color: var(--brown-mid);
  line-height: 1.55;
  flex: 1;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.product-price {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--wine);
  font-weight: 700;
}

.btn-add {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--wine);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 8px 16px;
  font-family: var(--font-body);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .1s;
}
.btn-add:hover { background: var(--wine-light); }
.btn-add:active { transform: scale(.96); }

/* Qty controls */
.qty-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-qty {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--wine);
  background: transparent;
  color: var(--wine);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
  line-height: 1;
}
.btn-qty:hover { background: var(--wine); color: #fff; }

.qty-value {
  width: 28px;
  text-align: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .95rem;
  color: var(--espresso);
}

/* ─────────────────────────────────────────
   CART BUTTON (floating)
───────────────────────────────────────── */
#cart-btn {
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 200;
  background: var(--wine);
  color: #fff;
  border: none;
  border-radius: 100px;
  padding: 14px 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(26,26,46,.35);
  transition: transform .2s, box-shadow .2s;
}
#cart-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(26,26,46,.45); }
#cart-btn.hidden { display: none; }

/* ── WhatsApp FAB ── */
#whatsapp-fab {
  position: fixed;
  bottom: 24px;
  left: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.wafab-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37,211,102,.45);
  transition: transform .2s, box-shadow .2s;
}
.wafab-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(37,211,102,.55); }
.wafab-btn.open { background: #128C7E; }
.wafab-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
  opacity: 0;
  transform: translateY(10px) scale(.9);
  pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.wafab-menu.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.wafab-option {
  display: block;
  background: #fff;
  color: var(--espresso);
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: .85rem;
  font-family: var(--font-body);
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0,0,0,.13);
  transition: background .15s;
}
.wafab-option:hover { background: #f0f0f0; }

#cart-btn-badge {
  background: var(--gold);
  color: var(--espresso);
  border-radius: 100px;
  padding: 2px 8px;
  font-size: .75rem;
  font-weight: 700;
}

/* ─────────────────────────────────────────
   CART SIDEBAR
───────────────────────────────────────── */
#cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
  backdrop-filter: blur(2px);
}
#cart-overlay.open { opacity: 1; pointer-events: all; }

#cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: min(460px, 100vw);
  height: 100vh;
  height: 100dvh;
  background: var(--cream);
  z-index: 400;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  box-shadow: -8px 0 48px rgba(0,0,0,.15);
}
#cart-sidebar.open { transform: translateX(0); }

.cart-header {
  background: var(--wine-dark);
  color: var(--cream);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.cart-header h2 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
}

.btn-close-cart {
  background: rgba(255,255,255,.1);
  border: none;
  color: var(--cream);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.btn-close-cart:hover { background: rgba(255,255,255,.2); }

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── Cart item ── */
.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
}

.cart-item-img {
  width: 52px;
  height: 52px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--cream-dark);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  overflow: hidden;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }

.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name {
  font-family: var(--font-body);
  font-size: .85rem;
  font-weight: 600;
  color: var(--espresso);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-item-price {
  font-size: .8rem;
  color: var(--wine);
  font-weight: 700;
  margin-top: 2px;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-cart-qty {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--wine);
  background: transparent;
  color: var(--wine);
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.btn-cart-qty:hover { background: var(--wine); color: #fff; }

.cart-qty-num {
  width: 22px;
  text-align: center;
  font-size: .85rem;
  font-weight: 700;
  color: var(--espresso);
}

/* ── Divider ── */
.cart-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 4px 0;
}

/* ── Section label ── */
.cart-section-label {
  font-family: var(--font-body);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--brown-mid);
  margin-bottom: 6px;
}

/* ── Coupon input ── */
.coupon-row {
  display: flex;
  gap: 8px;
}

.coupon-row input {
  flex: 1;
  padding: 9px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .85rem;
  outline: none;
  text-transform: uppercase;
  letter-spacing: .08em;
  background: #fff;
  transition: border-color .2s;
}
.coupon-row input:focus { border-color: var(--wine); }

.btn-apply-coupon {
  padding: 9px 16px;
  background: var(--wine);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s;
}
.btn-apply-coupon:hover { background: var(--wine-light); }

.coupon-success {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f0faf3;
  border: 1px solid #c3e6cb;
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: .82rem;
  color: #155724;
}

.coupon-remove {
  margin-left: auto;
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 1rem;
  padding: 0 4px;
}

/* ── Frete ── */
.frete-address-wrap {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.frete-address-wrap .frete-input-row {
  flex: 1;
  min-width: 0;
}
.frete-number-input {
  width: 72px;
  flex-shrink: 0;
  padding: 9px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .85rem;
  outline: none;
  background: #fff;
  transition: border-color .2s;
  text-align: center;
}
.frete-number-input:focus { border-color: var(--wine); }

.frete-input-row {
  position: relative;
}

.frete-input-row input {
  width: 100%;
  padding: 9px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .85rem;
  outline: none;
  background: #fff;
  transition: border-color .2s;
}
.frete-input-row input:focus { border-color: var(--wine); }

.geocode-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 600;
  background: #fff;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  max-height: 200px;
  overflow-y: auto;
  list-style: none;
  box-shadow: var(--shadow-md);
  display: none;
}
.geocode-dropdown.visible { display: block; }
.geocode-dropdown li {
  padding: 9px 13px;
  font-size: .82rem;
  cursor: pointer;
  border-bottom: 1px solid var(--cream-dark);
  color: var(--espresso);
  transition: background .15s;
}
.geocode-dropdown li:hover,
.geocode-dropdown li.active { background: var(--cream); }

.btn-calc-frete {
  width: 100%;
  margin-top: 8px;
  padding: 9px;
  background: var(--olive);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}
.btn-calc-frete:hover { background: #2f5540; }
.btn-calc-frete:disabled { opacity: .55; cursor: wait; }

.frete-result {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 13px;
  font-size: .82rem;
  color: var(--espresso);
}
.frete-result strong { color: var(--wine); }

/* ── Payment methods ── */
.payment-options {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.payment-option {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 13px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  font-family: var(--font-body);
  font-size: .85rem;
  color: var(--espresso);
}
.payment-option:hover { border-color: var(--wine-light); background: #f5f5f8; }
.payment-option.selected { border-color: var(--wine); background: #f0f0f5; }
.payment-option input[type="radio"] { accent-color: var(--wine); }

/* Change for cash */
#change-wrap {
  display: none;
  margin-top: 6px;
}
#change-wrap input {
  width: 100%;
  padding: 9px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .85rem;
  outline: none;
  transition: border-color .2s;
}
#change-wrap input:focus { border-color: var(--wine); }

/* ── Cart totals ── */
.cart-totals {
  background: var(--cream-dark);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.totals-row {
  display: flex;
  justify-content: space-between;
  font-size: .85rem;
  color: var(--espresso);
}

.totals-row.discount { color: var(--olive); }
.totals-row.total {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--wine);
  border-top: 1px solid var(--border);
  padding-top: 8px;
  margin-top: 4px;
}

/* ── Free shipping progress ── */
.free-ship-progress {
  margin-top: 6px;
  text-align: center;
}
.free-ship-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}
.free-ship-fill {
  height: 100%;
  background: var(--olive);
  border-radius: 3px;
  transition: width .4s ease;
}
.free-ship-text {
  font-size: .78rem;
  color: var(--espresso);
}
.free-ship-progress.achieved .free-ship-text {
  color: var(--olive);
  font-weight: 600;
}

/* ── Schedule section ── */
.schedule-wrap {
  display: flex;
  flex-direction: column;
}
.schedule-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--brown-mid);
  margin-bottom: 4px;
}
.schedule-select {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .85rem;
  outline: none;
  background: #fff;
  color: var(--espresso);
  cursor: pointer;
  transition: border-color .2s;
}
.schedule-select:focus { border-color: var(--wine); }
.schedule-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.schedule-slot-btn {
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  font-family: var(--font-body);
  font-size: .82rem;
  color: var(--espresso);
  cursor: pointer;
  transition: all .2s;
}
.schedule-slot-btn:hover {
  border-color: var(--wine);
  background: #f5f5f8;
}
.schedule-slot-btn.selected {
  border-color: var(--wine);
  background: var(--wine);
  color: #fff;
  font-weight: 600;
}
.schedule-no-slots {
  font-size: .82rem;
  color: #999;
  padding: 8px 0;
}
.schedule-confirm {
  margin-top: 8px;
  padding: 8px 12px;
  background: #f0faf3;
  border: 1px solid #c3e6cb;
  border-radius: var(--radius);
  font-size: .82rem;
  color: #155724;
}

/* ── Cart footer ── */
.cart-footer {
  padding: 16px 20px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  background: #fff;
  flex-shrink: 0;
}

.btn-checkout {
  width: 100%;
  padding: 14px;
  background: var(--wine);
  color: #fff;
  border: none;
  border-radius: var(--radius-lg);
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, transform .1s;
  letter-spacing: .03em;
}
.btn-checkout:hover { background: var(--wine-light); }
.btn-checkout:active { transform: scale(.98); }
.btn-checkout:disabled { opacity: .5; cursor: not-allowed; }

/* ── Cart empty ── */
.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 240px;
  gap: 12px;
  color: var(--brown-mid);
}
.cart-empty-icon { font-size: 3.5rem; }
.cart-empty p { font-size: .9rem; font-style: italic; }

/* ─────────────────────────────────────────
   AUTH MODAL
───────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--cream);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: scale(.95);
  transition: transform .25s;
}
.modal-overlay.open .modal { transform: scale(1); }

.modal-header {
  background: var(--wine-dark);
  color: var(--cream);
  padding: 20px 24px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
}

.btn-close-modal {
  background: none;
  border: none;
  color: rgba(255,255,255,.7);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
  transition: color .2s;
}
.btn-close-modal:hover { color: #fff; }

.modal-tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
}

.modal-tab {
  flex: 1;
  padding: 12px;
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: .85rem;
  font-weight: 600;
  color: var(--brown-mid);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all .2s;
}
.modal-tab.active { color: var(--wine); border-bottom-color: var(--wine); }

.modal-body { padding: 20px 24px; }

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  color: var(--brown-mid);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 5px;
}

.form-group input {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .9rem;
  background: #fff;
  outline: none;
  transition: border-color .2s;
  color: var(--espresso);
}
.form-group input:focus { border-color: var(--wine); }

.form-error {
  font-size: .78rem;
  color: #c0392b;
  margin-top: 5px;
}

.btn-submit {
  width: 100%;
  padding: 12px;
  background: var(--wine);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
  transition: background .2s;
}
.btn-submit:hover { background: var(--wine-light); }
.btn-submit:disabled { opacity: .5; cursor: wait; }

/* ─────────────────────────────────────────
   FOOTER
───────────────────────────────────────── */
#footer {
  background: var(--espresso);
  color: rgba(250,243,224,.65);
  padding: 40px 24px 32px;
  font-size: .82rem;
  line-height: 1.8;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px;
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 8px;
  display: block;
}

.footer-tagline {
  font-style: italic;
  opacity: .7;
  margin-bottom: 12px;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--gold);
  margin-bottom: 10px;
  font-weight: 700;
}

#footer-address,
#footer-hours { color: rgba(250,243,224,.7); }

.footer-bottom {
  max-width: 1100px;
  margin: 24px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.1);
  text-align: center;
  font-size: .72rem;
  opacity: .5;
}
.footer-admin-link { margin-top: 10px; }
.footer-admin-link a {
  color: rgba(250,243,224,.4);
  text-decoration: none;
  font-size: .68rem;
}
.footer-admin-link a:hover { color: var(--gold); }

/* ─────────────────────────────────────────
   PWA INSTALL BANNER
───────────────────────────────────────── */
#pwa-banner {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 250;
  background: var(--wine-dark);
  color: var(--cream);
  border-radius: var(--radius-lg);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  font-size: .82rem;
  max-width: 340px;
  width: calc(100% - 40px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s;
}
#pwa-banner.show {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

#pwa-banner p { flex: 1; line-height: 1.4; }
#pwa-banner p strong { color: var(--gold); }

.btn-pwa-install {
  background: var(--gold);
  color: var(--espresso);
  border: none;
  border-radius: var(--radius);
  padding: 7px 14px;
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.btn-pwa-dismiss {
  background: none;
  border: none;
  color: rgba(255,255,255,.5);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 2px 4px;
}

/* PWA Update Banner */
#pwa-update-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  background: linear-gradient(135deg, var(--wine-dark), var(--wine));
  color: var(--cream);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .82rem;
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s, transform .35s;
}
#pwa-update-banner.show {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}
#pwa-update-banner .update-icon {
  font-size: 1.4rem;
  animation: spin 2s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
#pwa-update-banner p { flex: 1; line-height: 1.4; }
#pwa-update-banner p strong { color: var(--gold); }
.btn-update-apply {
  background: var(--gold);
  color: var(--espresso);
  border: none;
  border-radius: var(--radius);
  padding: 8px 16px;
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}
.btn-update-apply:hover { background: var(--gold-light); }

/* ─────────────────────────────────────────
   TOAST
───────────────────────────────────────── */
#toast-wrap {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--espresso);
  color: var(--cream);
  padding: 10px 20px;
  border-radius: 100px;
  font-size: .85rem;
  box-shadow: var(--shadow-md);
  animation: toastIn .25s ease, toastOut .3s ease 2.5s forwards;
  white-space: nowrap;
}
.toast.success { background: var(--olive); }
.toast.error   { background: #b03030; }

@keyframes toastIn  { from { opacity: 0; transform: translateY(10px); } }
@keyframes toastOut { to   { opacity: 0; transform: translateY(-10px); } }

/* ─────────────────────────────────────────
   ORDER SUCCESS
───────────────────────────────────────── */
.order-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 20px;
  gap: 14px;
}
.order-success-icon { font-size: 3rem; }
.order-success h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--wine);
  font-weight: 700;
}
.order-success p { font-size: .88rem; color: var(--brown-mid); }
.order-id {
  background: var(--cream-dark);
  border-radius: var(--radius);
  padding: 8px 18px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--espresso);
}

/* ─────────────────────────────────────────
   FEATURED STRIP (infinite carousel)
───────────────────────────────────────── */
#featured-strip {
  background: linear-gradient(135deg, var(--wine-dark) 0%, var(--wine) 50%, var(--wine-dark) 100%);
  padding: 10px 0;
  overflow: hidden;
  position: relative;
}

/* Fade edges */
#featured-strip::before,
#featured-strip::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 56px;
  z-index: 2;
  pointer-events: none;
}
#featured-strip::before {
  left: 0;
  background: linear-gradient(to right, var(--wine-dark), transparent);
}
#featured-strip::after {
  right: 0;
  background: linear-gradient(to left, var(--wine-dark), transparent);
}

.fstrip-track-wrap { overflow: hidden; }

.fstrip-track {
  display: flex;
  gap: 12px;
  width: max-content;
  padding: 0 12px;
  animation: fstrip-scroll 20s ease-in-out infinite alternate;
  will-change: transform;
}
.fstrip-track:hover { animation-play-state: paused; }

@keyframes fstrip-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(calc(-100% + 100vw - 24px)); }
}

.fstrip-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius);
  padding: 7px 13px 7px 7px;
  cursor: pointer;
  transition: background .2s, transform .15s;
  flex-shrink: 0;
  min-width: 190px;
  max-width: 220px;
}
.fstrip-item:hover {
  background: rgba(255,255,255,.2);
  transform: translateY(-1px);
}

.fstrip-img {
  width: 46px;
  height: 46px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--cream-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}
.fstrip-img img { width: 100%; height: 100%; object-fit: cover; }
.fstrip-placeholder { font-size: 1.4rem; }

.fstrip-info { flex: 1; min-width: 0; }

.fstrip-name {
  font-family: var(--font-body);
  font-size: .71rem;
  font-weight: 600;
  color: var(--cream);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.fstrip-price {
  font-family: var(--font-serif);
  font-size: .82rem;
  font-weight: 700;
  color: var(--gold);
  margin-top: 2px;
}

/* ─────────────────────────────────────────
   CATEGORY BADGE on product card image
───────────────────────────────────────── */
.product-cat-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(26,26,46,.78);
  color: var(--cream);
  font-size: .62rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  z-index: 2;
  pointer-events: none;
  white-space: nowrap;
  backdrop-filter: blur(3px);
  letter-spacing: .02em;
}

/* ── Responsive ── */
@media (max-width: 880px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  #main { padding: 16px 14px calc(140px + env(safe-area-inset-bottom, 0px)); }
  .navbar-title { font-size: .95rem; }

  .product-body { padding: 10px 12px; }
  .product-name { font-size: .88rem; }
  .product-desc { display: none; }

  #cart-btn { padding: 12px 16px; font-size: .82rem; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); right: 14px; }
}

/* Safe-area insets for phones with on-screen navigation bar */
#cart-btn   { bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
#pwa-banner { bottom: calc(90px + env(safe-area-inset-bottom, 0px)); }
#toast-wrap { bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }

@media (max-width: 400px) {
  .product-grid { grid-template-columns: 1fr; }
}

/* ─────────────────────────────────────────
   ACCOUNT PANEL
───────────────────────────────────────── */
#account-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
  backdrop-filter: blur(2px);
}
#account-overlay.open { opacity: 1; pointer-events: all; }

#account-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(440px, 100vw);
  height: 100vh;
  background: var(--cream);
  z-index: 400;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  box-shadow: -8px 0 48px rgba(0,0,0,.15);
}
#account-panel.open { transform: translateX(0); }

.acct-header {
  background: var(--wine-dark);
  color: var(--cream);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.acct-header-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--cream);
}

.acct-header-sub {
  font-size: .78rem;
  color: var(--gold-light);
  margin-top: 3px;
  opacity: .85;
  font-style: normal;
}

.acct-btn-close {
  background: rgba(255,255,255,.1);
  border: none;
  color: var(--cream);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  flex-shrink: 0;
}
.acct-btn-close:hover { background: rgba(255,255,255,.2); }

.acct-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.acct-loading,
.acct-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  gap: 12px;
  color: var(--brown-mid);
  text-align: center;
  font-style: italic;
  font-size: .9rem;
}

.acct-empty-icon { font-size: 3rem; }
.acct-empty-sub {
  font-size: .8rem;
  color: var(--brown-mid);
  margin-top: 2px;
  font-style: normal;
}

.acct-section-title {
  font-family: var(--font-body);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--brown-mid);
  margin-top: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

/* ── Order card ── */
.acct-order-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.acct-order-card.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 1.5px var(--gold), var(--shadow-sm);
}

.acct-oc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.acct-oc-id {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .88rem;
  color: var(--espresso);
}

.acct-oc-date {
  font-size: .75rem;
  color: var(--brown-mid);
}

/* Status badges */
.acct-status-badge {
  font-size: .68rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  white-space: nowrap;
  flex-shrink: 0;
}
.badge-pending   { background: #FFF3CD; color: #7B5A00; }
.badge-confirmed { background: #D4EDDA; color: #155724; }
.badge-preparing { background: #FFE0B2; color: #7B3F00; }
.badge-ready     { background: #C8E6C9; color: #1B5E20; }
.badge-out_for_delivery { background: #FFE0B2; color: #E65100; }
.badge-delivered { background: #E8F5E9; color: #1B5E20; }
.badge-cancelled { background: #FFCDD2; color: #B71C1C; }

/* Progress bar */
.acct-progress {
  display: flex;
  align-items: center;
  margin: 2px 0 0;
}

.acct-step {
  display: flex;
  align-items: center;
  flex: 1;
}
.acct-step:last-child { flex: 0; }

.acct-step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  border: 2px solid var(--border);
  flex-shrink: 0;
  transition: all .3s;
}
.acct-step.done .acct-step-dot {
  background: var(--wine);
  border-color: var(--wine);
}

.acct-step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  transition: background .3s;
}
.acct-step.done .acct-step-line { background: var(--wine); }

.acct-progress-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2px;
}
.acct-progress-labels span {
  font-size: .62rem;
  color: var(--border);
  text-align: center;
  flex: 1;
}
.acct-progress-labels span.done { color: var(--wine); font-weight: 600; }
.acct-progress-labels span:last-child { flex: 0; text-align: right; }

/* Items list */
.acct-oc-items {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 2px 0;
}

.acct-item-tag {
  font-size: .72rem;
  background: var(--cream-dark);
  color: var(--espresso);
  padding: 2px 9px;
  border-radius: 100px;
  white-space: nowrap;
}

/* Footer row */
.acct-oc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  gap: 8px;
}

.acct-oc-total {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--wine);
}

.btn-repeat {
  background: var(--wine);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 7px 13px;
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
  white-space: nowrap;
}
.btn-repeat:hover { background: var(--wine-light); }

/* Panel footer */
.acct-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  background: #fff;
  flex-shrink: 0;
}

.btn-logout {
  width: 100%;
  padding: 11px;
  background: transparent;
  color: var(--brown-mid);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.btn-logout:hover { border-color: var(--wine); color: var(--wine); }
