/* ============================================================
   USMAN RESTAURANT — Shared Design System
   styles.css v2.0
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700;800&family=Inter:wght@400;500;600;700&family=Noto+Nastaliq+Urdu:wght@400;600&family=JetBrains+Mono:wght@600;700&display=swap');

/* ============================================================
   CSS VARIABLES — DARK THEME (DEFAULT)
   ============================================================ */

:root {
  --bg:           #0b0b0f;
  --bg2:          #12121a;
  --bg3:          #1a1a24;
  --surface:      #1f1f2e;
  --surface2:     #272738;
  --border:       rgba(255,255,255,0.07);
  --border2:      rgba(255,255,255,0.12);
  --text:         #eeeef5;
  --text2:        #a0a0c0;
  --text3:        #606080;
  --primary:      #d4a017;
  --primary-hover:#b8890f;
  --primary-glow: rgba(212,160,23,0.25);
  --primary-dim:  rgba(212,160,23,0.10);
  --gold:         #e8c96a;
  --gold-glow:    rgba(232,201,106,0.15);
  --gold-deep:    #c8961e;
  --success:      #22c55e;
  --warning:      #f59e0b;
  --danger:       #ef4444;
  --info:         #3b82f6;

  --font:         'Inter', sans-serif;
  --font-display: 'Playfair Display', serif;
  --font-urdu:    'Noto Nastaliq Urdu', serif;
  --font-mono:    'JetBrains Mono', monospace;

  --radius-sm:    6px;
  --radius:       12px;
  --radius-lg:    18px;
  --radius-xl:    24px;
  --radius-pill:  999px;

  --shadow:       0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow:  0 0 32px rgba(212,160,23,0.15);

  --transition:   0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   MILK.HTML OVERRIDE — WHITE/LIGHT THEME
   Applied with class="milk-theme" on <body>
   ============================================================ */

body.milk-theme {
  --bg:           #fefdf8;
  --bg2:          #f7f4ed;
  --bg3:          #efe9de;
  --surface:      #ffffff;
  --surface2:     #f4f0e8;
  --border:       rgba(0,0,0,0.08);
  --border2:      rgba(0,0,0,0.15);
  --text:         #1a1206;
  --text2:        #5c4a2a;
  --text3:        #9c8760;
  --primary:      #b8890f;
  --primary-hover:#9a7209;
  --primary-glow: rgba(184,137,15,0.20);
  --primary-dim:  rgba(184,137,15,0.08);
  --gold:         #8b6914;
  --gold-glow:    rgba(139,105,20,0.12);
  --gold-deep:    #7a5c10;
  --surface:      #ffffff;
  --shadow:       0 4px 24px rgba(0,0,0,0.08);
  --shadow-glow:  0 0 32px rgba(184,137,15,0.12);
}

/* ============================================================
   RESET + BASE
   ============================================================ */

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Premium background texture & elements */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(212,160,23,0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(232,201,106,0.03) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(200,150,30,0.02) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Subtle grain texture overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.015;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  pointer-events: none;
  z-index: 0;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { font-family: var(--font); cursor: pointer; border: none; }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 99px; }

/* Selection */
::selection { background: var(--primary-dim); color: var(--primary); }

/* ============================================================
   SCROLL PROGRESS BAR
   ============================================================ */

#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  z-index: 99999;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ============================================================
   PAGE TRANSITION — SHOP GATE / SHUTTER EFFECT
   ============================================================ */

#shutter-top,
#shutter-bottom {
  position: fixed;
  left: 0; right: 0;
  z-index: 99998;
  pointer-events: none;
  background: var(--bg);
}

#shutter-top {
  top: 0;
  height: 50vh;
  transform: translateY(-100%);
}

#shutter-bottom {
  bottom: 0;
  height: 50vh;
  transform: translateY(100%);
}

.shutter-closing #shutter-top { animation: shutter-close-top 450ms ease-in forwards; }
.shutter-closing #shutter-bottom { animation: shutter-close-bottom 450ms ease-in forwards; }

.shutter-opening #shutter-top { animation: shutter-open-top 600ms cubic-bezier(0.16,1,0.3,1) forwards; }
.shutter-opening #shutter-bottom { animation: shutter-open-bottom 600ms cubic-bezier(0.16,1,0.3,1) forwards; }

@keyframes shutter-close-top    { from { transform: translateY(-100%); } to { transform: translateY(0); } }
@keyframes shutter-close-bottom { from { transform: translateY(100%); }  to { transform: translateY(0); } }
@keyframes shutter-open-top     { from { transform: translateY(0); }     to { transform: translateY(-100%); } }
@keyframes shutter-open-bottom  { from { transform: translateY(0); }     to { transform: translateY(100%); } }

/* Logo in shutter */
.shutter-logo {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--primary);
}
.shutter-closing .shutter-logo { animation: logo-appear 200ms ease forwards 250ms; }
.shutter-opening .shutter-logo { animation: logo-disappear 200ms ease forwards; }

@keyframes logo-appear    { from { opacity: 0; } to { opacity: 1; } }
@keyframes logo-disappear { from { opacity: 1; } to { opacity: 0; } }

/* ============================================================
   TOPBAR / NAVBAR
   ============================================================ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11,11,15,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body.milk-theme .topbar {
  background: rgba(254,253,248,0.9);
}

.topbar-logo {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.topbar-logo .logo-emoji { font-size: 22px; }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.cart-chip:hover { background: var(--primary-hover); transform: scale(1.04); }
.cart-chip.empty { display: none; }

.cart-chip .count {
  background: rgba(0,0,0,0.2);
  border-radius: 50%;
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800;
}

/* Category nav (in topbar) */
.cat-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
}
.cat-tabs::-webkit-scrollbar { display: none; }

.cat-tab {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border2);
  background: transparent;
  color: var(--text2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.cat-tab:hover { border-color: var(--primary); color: var(--primary); }
.cat-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ============================================================
   HERO SECTION
   ============================================================ */

.hero {
  position: relative;
  padding: 56px 20px 48px;
  text-align: center;
  overflow: hidden;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .hero {
    min-height: 400px;
    padding: 40px 16px 36px;
  }
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% -10%, var(--primary-glow) 0%, transparent 65%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-dim);
  border: 1px solid var(--primary-dim);
  color: var(--primary);
  border-radius: var(--radius-pill);
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 8vw, 58px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 12px;
  color: var(--text);
}

.hero-title .accent { color: var(--primary); }

.hero-urdu {
  font-family: var(--font-urdu);
  font-size: clamp(20px, 4vw, 32px);
  color: var(--text2);
  margin-bottom: 16px;
  direction: rtl;
}

.hero-sub {
  font-size: 16px;
  color: var(--text2);
  max-width: 480px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 20px var(--primary-glow);
}
.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--primary-glow);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border2);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

.btn-gold {
  background: var(--gold);
  color: #1a1000;
  font-weight: 700;
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 8px 24px var(--gold-glow); }

.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }

/* ============================================================
   CARDS
   ============================================================ */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.card-glass {
  background: rgba(31, 31, 46, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
}

body.milk-theme .card-glass {
  background: rgba(255,255,255,0.7);
}

/* ============================================================
   MENU ITEM CARDS
   ============================================================ */

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
  padding: 0 16px;
}

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

.item-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  position: relative;
}

.item-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

.item-card .sold-out-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  border-radius: inherit;
}

.item-card .sold-out-overlay span {
  background: var(--danger);
  color: #fff;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 1px;
  transform: rotate(-15deg);
}

.item-img-wrap {
  position: relative;
  overflow: hidden;
  height: 180px;
}

.item-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.item-card:hover .item-img { transform: scale(1.06); }

.item-placeholder {
  width: 100%; height: 100%;
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  font-size: 52px;
}

.popular-badge {
  position: absolute;
  top: 10px; left: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.item-body {
  padding: 14px 16px 16px;
}

.item-name {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 2px;
  color: var(--text);
}

.item-name-urdu {
  font-family: var(--font-urdu);
  font-size: 14px;
  color: var(--text2);
  direction: rtl;
  margin-bottom: 6px;
}

.item-desc {
  font-size: 12px;
  color: var(--text3);
  line-height: 1.5;
  margin-bottom: 14px;
}

.item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.item-price {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qty-btn {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  line-height: 1;
}
.qty-btn:hover { border-color: var(--primary); color: var(--primary); }

.qty-num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
  min-width: 22px;
  text-align: center;
}

.add-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
}
.add-btn:hover { background: var(--primary-hover); transform: scale(1.1); }
.add-btn:active { transform: scale(0.95); }

/* ============================================================
   SCROLL REVEAL ANIMATIONS
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

/* ============================================================
   SECTION HEADERS
   ============================================================ */

.section-header {
  padding: 28px 20px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 4px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

/* ============================================================
   FLOATING BUTTONS
   ============================================================ */

.fab-group {
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
}

.fab {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  cursor: pointer;
  border: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  transition: all var(--transition);
  text-decoration: none;
}

.fab-whatsapp {
  background: #25d366;
  color: #fff;
  font-size: 26px;
}
.fab-whatsapp:hover { transform: scale(1.1); box-shadow: 0 6px 28px rgba(37,211,102,0.4); }

.fab-call {
  background: var(--primary);
  color: #fff;
  font-size: 22px;
}
.fab-call:hover { transform: scale(1.1); box-shadow: 0 6px 28px var(--primary-glow); }

/* Cart float (bottom center) */
#cart-float {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  display: none;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 8px 32px var(--primary-glow);
  cursor: pointer;
  z-index: 150;
  text-decoration: none;
  animation: float-up 0.4s cubic-bezier(0.34,1.56,0.64,1);
  white-space: nowrap;
}
#cart-float.show { display: flex; }
@keyframes float-up { from { transform: translateX(-50%) translateY(80px); opacity: 0; } }

#cart-float .cf-count {
  background: rgba(0,0,0,0.2);
  border-radius: 50%;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */

#toast-container {
  position: fixed;
  top: 70px; right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--surface);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  pointer-events: all;
  cursor: pointer;
  transform: translateX(120%);
  transition: transform 0.3s ease;
  max-width: 300px;
  border-left: 3px solid var(--primary);
}

.toast.show { transform: translateX(0); }
.toast.toast-success { border-left-color: var(--success); }
.toast.toast-error   { border-left-color: var(--danger); }
.toast.toast-warning { border-left-color: var(--warning); }
.toast.toast-order   { border-left-color: var(--primary); background: var(--primary-dim); }

/* ============================================================
   CHAT SYSTEM
   ============================================================ */

.chat-window {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 500px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 75%;
}

.chat-msg.mine {
  align-self: flex-end;
  align-items: flex-end;
}

.chat-msg.theirs {
  align-self: flex-start;
  align-items: flex-start;
}

.chat-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  position: relative;
}

.chat-msg.mine .chat-bubble {
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-msg.theirs .chat-bubble {
  background: var(--surface2);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.chat-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--text3);
  margin-top: 3px;
}

.msg-status { font-size: 12px; }
.msg-status.sent     { color: var(--text3); }
.msg-status.delivered { color: var(--text3); }
.msg-status.seen      { color: var(--info); }

/* Voice note bubble */
.voice-bubble {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface2);
  border-radius: 14px;
  cursor: pointer;
}

.voice-play-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.voice-wave {
  display: flex;
  gap: 2px;
  align-items: center;
  height: 24px;
}

.voice-bar {
  width: 3px;
  background: var(--text3);
  border-radius: 2px;
  animation: wave-pulse 1s ease-in-out infinite;
}

@keyframes wave-pulse {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}

.voice-bar:nth-child(1) { height: 10px; animation-delay: 0.0s; }
.voice-bar:nth-child(2) { height: 18px; animation-delay: 0.1s; }
.voice-bar:nth-child(3) { height: 24px; animation-delay: 0.2s; }
.voice-bar:nth-child(4) { height: 16px; animation-delay: 0.3s; }
.voice-bar:nth-child(5) { height: 22px; animation-delay: 0.4s; }
.voice-bar:nth-child(6) { height: 12px; animation-delay: 0.5s; }

/* Typing indicator */
.typing-indicator {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  color: var(--text3);
  font-size: 12px;
}

.typing-indicator.show { display: flex; }

.typing-dots {
  display: flex;
  gap: 4px;
  align-items: center;
}

.typing-dot {
  width: 6px; height: 6px;
  background: var(--text3);
  border-radius: 50%;
  animation: typing-bounce 1.2s ease-in-out infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* Chat input */
.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  align-items: flex-end;
}

.chat-input {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 22px;
  padding: 10px 16px;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  resize: none;
  max-height: 120px;
  min-height: 40px;
  transition: border-color var(--transition);
}
.chat-input:focus { border-color: var(--primary); }
.chat-input::placeholder { color: var(--text3); }

.chat-send-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 18px;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}
.chat-send-btn:hover { background: var(--primary-hover); transform: scale(1.1); }

.chat-voice-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}
.chat-voice-btn:hover { border-color: var(--primary); color: var(--primary); }
.chat-voice-btn.recording { background: var(--danger); color: #fff; border-color: var(--danger); animation: pulse-rec 1s infinite; }

@keyframes pulse-rec {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.5); }
  50% { box-shadow: 0 0 0 8px rgba(239,68,68,0); }
}

/* ============================================================
   WATERMARK FOOTER
   ============================================================ */

.watermark {
  position: fixed;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  text-align: center;
  pointer-events: none;
  white-space: nowrap;
}

.watermark-text {
  font-size: 10px;
  color: var(--text3);
  opacity: 0.35;
  letter-spacing: 0.8px;
  animation: shimmer 4s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.5; }
}

/* ============================================================
   FORMS + INPUTS
   ============================================================ */

.form-group { margin-bottom: 14px; }
.form-label { font-size: 12px; font-weight: 600; color: var(--text2); margin-bottom: 5px; display: block; letter-spacing: 0.3px; }

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="number"],
input[type="password"],
textarea,
select {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text);
  padding: 12px 14px;
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

input:focus, textarea:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-dim);
}

input::placeholder, textarea::placeholder { color: var(--text3); }

/* ============================================================
   STATUS BADGES
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.badge-placed   { background: var(--primary-dim); color: var(--primary); }
.badge-accepted { background: rgba(59,130,246,0.15); color: var(--info); }
.badge-preparing{ background: rgba(245,158,11,0.15); color: var(--warning); }
.badge-ready    { background: rgba(34,197,94,0.15);  color: var(--success); }
.badge-assigned { background: rgba(139,92,246,0.15); color: #a78bfa; }
.badge-picked   { background: rgba(34,197,94,0.2);   color: var(--success); }
.badge-delivered{ background: rgba(100,100,120,0.15);color: var(--text3); }
.badge-cancelled{ background: rgba(239,68,68,0.15);  color: var(--danger); }

/* ============================================================
   GLASSMORPHISM PANELS
   ============================================================ */

.glass-panel {
  background: rgba(31,31,46,0.55);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-xl);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes scale-in {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px var(--primary-glow); }
  50%       { box-shadow: 0 0 40px var(--primary-glow), 0 0 80px var(--primary-glow); }
}

.animate-fade-in  { animation: fade-in 0.4s ease; }
.animate-slide-up { animation: slide-up 0.5s ease; }
.animate-scale-in { animation: scale-in 0.35s cubic-bezier(0.34,1.56,0.64,1); }

/* ============================================================
   HERO IMAGE SLIDER
   ============================================================ */

.hero-slider {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  will-change: opacity;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.08);
  transition: transform 6s ease-out;
}

.hero-slide.active img {
  transform: scale(1);
}

.hero-slider-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11,11,15,0.2) 0%, rgba(11,11,15,0.45) 40%, rgba(11,11,15,0.92) 100%);
  z-index: 1;
  pointer-events: none;
}

.hero-slider-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.hero-dot.active {
  background: var(--primary);
  width: 24px;
  border-radius: 4px;
}

.hero-content {
  position: relative;
  z-index: 2;
}

/* Category page hero (shorter) */
.hero-cat .hero-slider {
  height: 220px;
}

@media (max-width: 768px) {
  .hero-cat .hero-slider {
    height: 180px;
  }
}

/* ============================================================
   ENHANCED ANIMATIONS
   ============================================================ */

/* Floating animation */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.float-anim {
  animation: float 3s ease-in-out infinite;
}

/* Pulse glow on important elements */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 5px var(--primary-glow); }
  50% { box-shadow: 0 0 20px var(--primary-glow), 0 0 40px var(--primary-dim); }
}

.pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* Slide in from left */
@keyframes slide-in-left {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

.slide-in-left {
  animation: slide-in-left 0.6s cubic-bezier(0.16,1,0.3,1) both;
}

/* Slide in from right */
@keyframes slide-in-right {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

.slide-in-right {
  animation: slide-in-right 0.6s cubic-bezier(0.16,1,0.3,1) both;
}

/* Scale up entrance */
@keyframes pop-in {
  0% { opacity: 0; transform: scale(0.8); }
  60% { transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}

.pop-in {
  animation: pop-in 0.5s cubic-bezier(0.34,1.56,0.64,1) both;
}

/* Shimmer loading */
@keyframes shimmer-load {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--surface2) 25%, var(--border2) 50%, var(--surface2) 75%);
  background-size: 200% 100%;
  animation: shimmer-load 1.5s infinite;
  border-radius: var(--radius);
}

/* Stagger children animation */
.stagger-children > * {
  opacity: 0;
  animation: slide-up 0.5s ease both;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(7) { animation-delay: 0.35s; }
.stagger-children > *:nth-child(8) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(9) { animation-delay: 0.45s; }
.stagger-children > *:nth-child(10) { animation-delay: 0.5s; }

/* Card hover tilt effect */
.card-tilt {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-tilt:hover {
  transform: translateY(-6px) rotateX(2deg);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

/* Text gradient animation */
@keyframes text-shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

.text-shimmer {
  background: linear-gradient(90deg, var(--primary), var(--gold), var(--primary));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: text-shimmer 3s linear infinite;
}

/* Rotate slow animation for decorative elements */
@keyframes rotate-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.rotate-slow {
  animation: rotate-slow 20s linear infinite;
}

/* Ripple click effect */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--ripple-x, 50%) var(--ripple-y, 50%), rgba(255,255,255,0.2) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}

.ripple:active::after {
  opacity: 1;
  transition: opacity 0s;
}

/* Count-up number animation */
.count-up {
  display: inline-block;
  transition: transform 0.2s;
}

/* Smooth button press */
.btn-press {
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-press:active {
  transform: scale(0.95) !important;
}

/* Progress bar animation */
@keyframes progress-fill {
  from { width: 0; }
}

.progress-animated {
  animation: progress-fill 1s ease-out both;
}

/* Order card entrance */
@keyframes order-slide-in {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.order-card-anim {
  animation: order-slide-in 0.4s ease both;
}

/* Particle decorations */
.particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.2;
  animation: particle-float 8s ease-in-out infinite;
}

@keyframes particle-float {
  0%, 100% { transform: translateY(0) translateX(0); opacity: 0.1; }
  25% { transform: translateY(-30px) translateX(10px); opacity: 0.3; }
  50% { transform: translateY(-15px) translateX(-10px); opacity: 0.15; }
  75% { transform: translateY(-40px) translateX(5px); opacity: 0.25; }
}

/* Loading spinner for buttons */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.8;
}

.btn-loading::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  left: 50%;
  top: 50%;
  margin-left: -8px;
  margin-top: -8px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Notification badge bounce */
@keyframes badge-bounce {
  0%, 100% { transform: translateY(-50%) scale(1); }
  50% { transform: translateY(-50%) scale(1.2); }
}

.nav-badge.show {
  animation: badge-bounce 0.5s ease;
}

/* Stat card counter animation */
.stat-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

/* Tooltip */
.has-tooltip {
  position: relative;
}

.has-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--surface);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  z-index: 100;
}

.has-tooltip:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Milk theme slider overlay */
body.milk-theme .hero-slider-overlay {
  background: linear-gradient(180deg, rgba(254,253,248,0.1) 0%, rgba(254,253,248,0.35) 40%, rgba(254,253,248,0.95) 100%);
}

/* ============================================================
   PREMIUM UI ENHANCEMENTS v3.0
   ============================================================ */

/* ── Animated Gradient Border ── */
@keyframes border-rotate {
  0% { --border-angle: 0deg; }
  100% { --border-angle: 360deg; }
}

@property --border-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

.gradient-border {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 2px;
  border-radius: inherit;
  background: conic-gradient(from var(--border-angle), var(--primary), var(--gold), transparent 40%, transparent 60%, var(--primary));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: border-rotate 4s linear infinite;
  pointer-events: none;
}

/* ── Scroll To Top Button ── */
#scroll-top {
  position: fixed;
  bottom: 90px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border2);
  color: var(--primary);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 190;
  opacity: 0;
  transform: translateY(20px) scale(0.8);
  transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
  pointer-events: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

#scroll-top.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

#scroll-top:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 28px var(--primary-glow);
}

/* ── Cart Bounce Animation ── */
@keyframes cart-bounce {
  0% { transform: scale(1); }
  20% { transform: scale(1.3); }
  40% { transform: scale(0.9); }
  60% { transform: scale(1.1); }
  80% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

.cart-bounce .count {
  animation: cart-bounce 0.5s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes cart-fly {
  0% { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--fly-x, 0), var(--fly-y, -100px)) scale(0.3); }
}

.fly-to-cart {
  position: fixed;
  width: 30px;
  height: 30px;
  background: var(--primary);
  border-radius: 50%;
  z-index: 9999;
  pointer-events: none;
  animation: cart-fly 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* ── Image Blur-Up Loading ── */
.img-blur-up {
  position: relative;
  overflow: hidden;
  background: var(--surface2);
}

.img-blur-up img {
  opacity: 0;
  filter: blur(20px) saturate(1.8);
  transform: scale(1.1);
  transition: opacity 0.6s ease, filter 0.8s ease, transform 0.8s ease;
}

.img-blur-up img.loaded {
  opacity: 1;
  filter: blur(0) saturate(1);
  transform: scale(1);
}

/* ── Enhanced Item Card Hover ── */
.item-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s;
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(212,160,23,0.06), transparent 40%);
  pointer-events: none;
  z-index: 3;
}

.item-card:hover::after {
  opacity: 1;
}

/* ── Cursor Glow (subtle mouse-following glow) ── */
#cursor-glow {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,160,23,0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
  opacity: 0;
}

#cursor-glow.active {
  opacity: 1;
}

/* ── Skeleton Loading Cards ── */
.skeleton-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.skeleton-card .skeleton-img {
  width: 100%;
  height: 180px;
  background: linear-gradient(90deg, var(--surface2) 25%, var(--border2) 50%, var(--surface2) 75%);
  background-size: 200% 100%;
  animation: shimmer-load 1.5s infinite;
}

.skeleton-card .skeleton-line {
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(90deg, var(--surface2) 25%, var(--border2) 50%, var(--surface2) 75%);
  background-size: 200% 100%;
  animation: shimmer-load 1.5s infinite;
  margin: 12px 16px;
}

.skeleton-card .skeleton-line:nth-child(2) { width: 60%; margin-bottom: 16px; }
.skeleton-card .skeleton-line:nth-child(3) { width: 35%; }

/* ── Enhanced Feature Cards ── */
.feature-card-enhanced {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.16,1,0.3,1);
}

.feature-card-enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary), var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.feature-card-enhanced:hover::before {
  opacity: 1;
}

.feature-card-enhanced:hover {
  transform: translateY(-6px);
  border-color: rgba(212,160,23,0.2);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3), 0 0 30px var(--primary-dim);
}

/* ── Enhanced Hero Badge ── */
.hero-badge-enhanced {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-dim);
  border: 1px solid rgba(212,160,23,0.2);
  color: var(--primary);
  border-radius: var(--radius-pill);
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}

.hero-badge-enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(212,160,23,0.15), transparent);
  animation: badge-shimmer 3s ease-in-out infinite;
}

@keyframes badge-shimmer {
  0% { left: -100%; }
  50%, 100% { left: 100%; }
}

/* ── Smooth Counter Animation ── */
.counter-animate {
  display: inline-block;
  transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1);
}

.counter-animate.bump {
  transform: scale(1.15);
}

/* ── Premium Section Divider ── */
.divider-premium {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 24px;
}

.divider-premium::before,
.divider-premium::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border2), transparent);
}

.divider-premium span {
  color: var(--primary);
  font-size: 12px;
  letter-spacing: 3px;
  white-space: nowrap;
  font-weight: 600;
}

/* ── Text Glow Effect ── */
.text-glow {
  text-shadow: 0 0 20px var(--primary-glow), 0 0 40px var(--primary-dim);
}

/* ── Smooth Page Content ── */
main, .page-content {
  position: relative;
  z-index: 1;
}

/* ── Better Focus States ── */
*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Premium CTA Button ── */
.btn-premium {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary) 0%, var(--gold-deep) 100%);
  color: #fff;
  border: none;
  padding: 14px 32px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
  box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-premium::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.5s;
}

.btn-premium:hover::before {
  left: 100%;
}

.btn-premium:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 36px var(--primary-glow), 0 0 60px var(--primary-dim);
}

.btn-premium:active {
  transform: translateY(-1px) scale(0.98);
}

/* ── Hover Card Shine ── */
.card-shine {
  position: relative;
  overflow: hidden;
}

.card-shine::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to bottom right,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0) 40%,
    rgba(255,255,255,0.03) 50%,
    rgba(255,255,255,0) 60%,
    rgba(255,255,255,0) 100%
  );
  transform: rotate(30deg);
  transition: transform 0.6s;
  pointer-events: none;
}

.card-shine:hover::after {
  transform: rotate(30deg) translate(30%, 30%);
}

/* ── Tooltip v2 ── */
.tooltip-v2 {
  position: relative;
}

.tooltip-v2::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: var(--surface);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16,1,0.3,1);
  border: 1px solid var(--border2);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  z-index: 100;
  font-weight: 500;
}

.tooltip-v2::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  border: 6px solid transparent;
  border-top-color: var(--surface);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16,1,0.3,1);
  z-index: 101;
}

.tooltip-v2:hover::after,
.tooltip-v2:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Smooth Image Error State ── */
.img-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--surface2);
  color: var(--text3);
  font-size: 14px;
  gap: 8px;
}

.img-fallback-icon {
  font-size: 36px;
  opacity: 0.4;
}

/* ── Mobile Bottom Safe Area ── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  #cart-float,
  .fab-group {
    bottom: calc(24px + env(safe-area-inset-bottom));
  }
  #scroll-top {
    bottom: calc(90px + env(safe-area-inset-bottom));
  }
}

/* ============================================================
   EVENT THEME INFRASTRUCTURE
   ============================================================ */
#event-theme-layer{position:fixed;inset:0;pointer-events:none;z-index:9990;overflow:hidden}

/* ── Ramadan Fanoos (Hanging Lantern) ── */
.fanoos{position:absolute;top:0;display:flex;flex-direction:column;align-items:center;animation:fanoos-swing var(--sw-dur,4s) ease-in-out infinite;animation-delay:var(--sw-del,0s);transform-origin:top center;filter:drop-shadow(0 0 10px rgba(212,160,23,0.25))}
.fanoos-hook{width:10px;height:6px;border:1.5px solid rgba(212,160,23,0.5);border-bottom:none;border-radius:5px 5px 0 0}
.fanoos-chain{width:1px;height:var(--ch-h,40px);background:linear-gradient(to bottom,rgba(212,160,23,0.15),rgba(212,160,23,0.6))}
.fanoos-cap{width:22px;height:7px;background:linear-gradient(to bottom,#e8c96a,#c8961e);border-radius:3px 3px 1px 1px;position:relative}
.fanoos-cap::before,.fanoos-cap::after{content:'';position:absolute;bottom:-2px;width:1.5px;height:5px;background:#b8860b}
.fanoos-cap::before{left:4px}
.fanoos-cap::after{right:4px}
.fanoos-body{width:36px;height:50px;position:relative;background:linear-gradient(180deg,rgba(212,160,23,0.06) 0%,rgba(212,160,23,0.03) 30%,rgba(212,160,23,0.06) 70%,rgba(212,160,23,0.1) 100%);border:1.5px solid rgba(212,160,23,0.3);clip-path:polygon(18% 0%,82% 0%,100% 18%,100% 82%,82% 100%,18% 100%,0% 82%,0% 18%);overflow:hidden;box-shadow:0 0 20px rgba(212,160,23,0.15),inset 0 0 20px rgba(212,160,23,0.08)}
.fanoos-body::before{content:'';position:absolute;inset:0;background:linear-gradient(90deg,transparent 48.5%,rgba(212,160,23,0.15) 48.5%,rgba(212,160,23,0.15) 51.5%,transparent 51.5%),linear-gradient(0deg,transparent 48.5%,rgba(212,160,23,0.15) 48.5%,rgba(212,160,23,0.15) 51.5%,transparent 51.5%)}
.fanoos-glow{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:14px;height:14px;background:radial-gradient(circle,rgba(255,225,140,0.95) 0%,rgba(212,160,23,0.5) 35%,transparent 70%);border-radius:50%;animation:fanoos-pulse 2.5s ease-in-out infinite}
.fanoos-bcap{width:18px;height:4px;background:linear-gradient(to bottom,#c8961e,#a07616);border-radius:0 0 2px 2px}
.fanoos-tassel{width:1.5px;height:14px;background:linear-gradient(to bottom,#d4a017,rgba(184,134,11,0.3));position:relative}
.fanoos-tassel::after{content:'';position:absolute;bottom:0;left:50%;transform:translateX(-50%);width:7px;height:7px;border:1.5px solid rgba(212,160,23,0.5);border-top:none;border-radius:0 0 50% 50%}

@keyframes fanoos-swing{0%,100%{transform:rotate(calc(var(--sw-deg,3)*-1deg))}50%{transform:rotate(calc(var(--sw-deg,3)*1deg))}}
@keyframes fanoos-pulse{0%,100%{opacity:.55;transform:translate(-50%,-50%) scale(.8)}50%{opacity:1;transform:translate(-50%,-50%) scale(1.25)}}

/* ── Ramadan Stars ── */
.ramadan-star{position:absolute;width:var(--st-s,3px);height:var(--st-s,3px);background:#e8c96a;border-radius:50%;animation:star-twinkle var(--st-dur,3s) ease-in-out infinite;animation-delay:var(--st-del,0s);box-shadow:0 0 4px rgba(232,201,106,0.6)}
@keyframes star-twinkle{0%,100%{opacity:.2;transform:scale(.6)}50%{opacity:1;transform:scale(1.3)}}

/* ── Ramadan Crescent Moon ── */
.ramadan-crescent{position:absolute;top:12px;right:20px;width:50px;height:50px;border-radius:50%;box-shadow:7px -4px 0 0 #d4a017;filter:drop-shadow(0 0 12px rgba(212,160,23,0.4));animation:crescent-glow 4s ease-in-out infinite}
@keyframes crescent-glow{0%,100%{filter:drop-shadow(0 0 12px rgba(212,160,23,0.4))}50%{filter:drop-shadow(0 0 25px rgba(212,160,23,0.7))}}

/* ── Eid-ul-Fitr Moon & Star ── */
.eid-fitr-moon{position:absolute;top:18px;right:25px;width:65px;height:65px;border-radius:50%;box-shadow:10px -5px 0 0 #22c55e;filter:drop-shadow(0 0 15px rgba(34,197,94,0.5));animation:crescent-glow 4s ease-in-out infinite}
.eid-fitr-star{position:absolute;top:30px;right:72px;font-size:18px;color:#d4a017;animation:star-twinkle 2s ease-in-out infinite;filter:drop-shadow(0 0 6px rgba(212,160,23,0.6))}

/* ── Falling Sparkles (Eid) ── */
.theme-sparkle{position:absolute;top:-10px;width:var(--sp-s,4px);height:var(--sp-s,4px);background:var(--sp-c,#d4a017);border-radius:50%;animation:sparkle-fall var(--sp-dur,6s) linear infinite;animation-delay:var(--sp-del,0s);opacity:0}
@keyframes sparkle-fall{0%{transform:translateY(0) rotate(0);opacity:0}8%{opacity:.9}85%{opacity:.3}100%{transform:translateY(100vh) rotate(540deg);opacity:0}}

/* ── Confetti ── */
.theme-confetti{position:absolute;top:-20px;width:var(--cf-w,8px);height:var(--cf-h,8px);background:var(--cf-c,#d4a017);animation:confetti-fall var(--cf-dur,5s) linear infinite;animation-delay:var(--cf-del,0s);opacity:0;border-radius:1px}
@keyframes confetti-fall{0%{transform:translateY(0) rotate(0deg) translateX(0);opacity:0}5%{opacity:.9}50%{transform:translateY(50vh) rotate(360deg) translateX(var(--cf-drift,30px))}100%{transform:translateY(100vh) rotate(720deg) translateX(calc(var(--cf-drift,30px)*-1));opacity:0}}

/* ── Balloons ── */
.theme-balloon{position:absolute;bottom:-80px;width:28px;height:36px;border-radius:50% 50% 50% 50% / 60% 60% 40% 40%;animation:balloon-rise var(--bl-dur,8s) ease-in-out infinite;animation-delay:var(--bl-del,0s);opacity:0}
.theme-balloon::before{content:'';position:absolute;bottom:-30px;left:50%;transform:translateX(-50%);width:1px;height:30px;background:rgba(255,255,255,0.3)}
.theme-balloon::after{content:'';position:absolute;top:6px;left:6px;width:8px;height:10px;background:rgba(255,255,255,0.25);border-radius:50%;transform:rotate(-30deg)}
@keyframes balloon-rise{0%{transform:translateY(0) translateX(0) scale(.8);opacity:0}10%{opacity:.85}90%{opacity:.6}100%{transform:translateY(calc(-100vh - 100px)) translateX(var(--bl-drift,40px)) scale(1);opacity:0}}

/* ── Firework ── */
.firework-burst{position:absolute;width:4px;height:4px;border-radius:50%;animation:firework-explode 2.5s ease-out infinite;animation-delay:var(--fw-del,0s);opacity:0}
@keyframes firework-explode{0%{transform:scale(0);opacity:0}10%{opacity:1;transform:scale(1)}60%{opacity:.6;transform:scale(var(--fw-size,60))}100%{opacity:0;transform:scale(var(--fw-size,60))}}

/* ── Theme Color Overrides ── */
body.theme-ramadan{--primary:#d4a017;--primary-dim:rgba(212,160,23,0.12);--primary-glow:rgba(212,160,23,0.25)}
body.theme-ramadan::before{content:'';position:fixed;inset:0;background:linear-gradient(180deg,rgba(88,28,135,0.08) 0%,rgba(88,28,135,0.03) 40%,transparent 70%);pointer-events:none;z-index:-1}
body.theme-eid-fitr{--primary:#22c55e;--primary-dim:rgba(34,197,94,0.12);--primary-glow:rgba(34,197,94,0.25)}
body.theme-eid-fitr::before{content:'';position:fixed;inset:0;background:linear-gradient(180deg,rgba(34,197,94,0.06) 0%,transparent 50%);pointer-events:none;z-index:-1}
body.theme-eid-adha{--primary:#d4a017;--primary-dim:rgba(180,83,9,0.12);--primary-glow:rgba(180,83,9,0.25)}
body.theme-eid-adha::before{content:'';position:fixed;inset:0;background:linear-gradient(180deg,rgba(180,83,9,0.06) 0%,transparent 50%);pointer-events:none;z-index:-1}
body.theme-pakistan{--primary:#00a651;--primary-dim:rgba(0,166,81,0.12);--primary-glow:rgba(0,166,81,0.25)}
body.theme-new-year{--primary:#e11d48;--primary-dim:rgba(225,29,72,0.12);--primary-glow:rgba(225,29,72,0.25)}
body.theme-birthday{--primary:#a855f7;--primary-dim:rgba(168,85,247,0.12);--primary-glow:rgba(168,85,247,0.25)}

/* ── Pakistan Day Crescent & Star ── */
.pakistan-crescent{position:absolute;top:16px;right:22px;width:44px;height:44px;border-radius:50%;box-shadow:6px -4px 0 0 #fff;filter:drop-shadow(0 0 8px rgba(0,166,81,0.5))}
.pakistan-star{position:absolute;top:28px;right:55px;color:#fff;font-size:16px;filter:drop-shadow(0 0 6px rgba(255,255,255,0.6));animation:star-twinkle 2.5s ease-in-out infinite}
.pakistan-stripe{position:absolute;top:0;left:0;right:0;height:4px;background:linear-gradient(90deg,#00a651 25%,#fff 25%,#fff 75%,#00a651 75%);animation:stripe-shimmer 3s linear infinite}
@keyframes stripe-shimmer{0%{background-position:0 0}100%{background-position:200px 0}}

/* ── Firework rockets ── */
.firework-rocket{position:absolute;width:2px;height:12px;background:linear-gradient(to top,rgba(255,255,255,0.1),#fff);border-radius:1px;animation:rocket-rise 3s ease-out infinite;animation-delay:var(--fw-del,0s);opacity:0}
@keyframes rocket-rise{0%{transform:translateY(0);opacity:0}10%{opacity:1}40%{opacity:.8}50%{transform:translateY(var(--fw-y,-200px));opacity:0}51%{opacity:0}100%{opacity:0}}

/* ── Arch Decoration (Eid-ul-Adha) ── */
.eid-arch{position:absolute;bottom:0;left:50%;transform:translateX(-50%);width:300px;height:200px;border:2px solid rgba(212,160,23,0.15);border-bottom:none;border-radius:150px 150px 0 0;animation:arch-glow 4s ease-in-out infinite}
.eid-arch::before{content:'';position:absolute;top:-20px;left:50%;transform:translateX(-50%);width:8px;height:20px;background:linear-gradient(to top,rgba(212,160,23,0.3),transparent);border-radius:4px 4px 0 0}
@keyframes arch-glow{0%,100%{border-color:rgba(212,160,23,0.1);box-shadow:none}50%{border-color:rgba(212,160,23,0.25);box-shadow:0 0 30px rgba(212,160,23,0.05)}}

/* ── Responsive ── */
@media(max-width:768px){
  .fanoos{transform:scale(0.75)}
  .ramadan-crescent,.eid-fitr-moon{width:36px;height:36px;right:10px;top:8px}
  .eid-fitr-star{right:40px;top:16px;font-size:14px}
  .eid-arch{width:200px;height:130px}
  .pakistan-crescent{width:32px;height:32px}
  .pakistan-star{right:40px;top:22px;font-size:12px}
}

body.milk-theme .hero-dot.active {
  background: var(--primary);
}

body.milk-theme .hero-dot {
  background: rgba(0,0,0,0.2);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  .menu-grid { grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 12px; }
  .item-img-wrap { height: 140px; }
  .fab-group { bottom: 80px; right: 14px; }
  .hero-slider-dots { bottom: 12px; }
}

@media (max-width: 480px) {
  .menu-grid { grid-template-columns: 1fr; }
  .topbar { padding: 0 12px; }
}
