/* =====================================================================
   کافه آلبا — Digital Menu
   Design system: white canvas · orange (primary) · blue (secondary)
   Author: ALBA · RTL · Light + Dark · fully offline
   ===================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
  --primary: #ff7a1a;
  --primary-strong: #f2660a;
  --primary-light: #ff9d4d;
  --primary-soft: #fff3e9;
  --blue: #1f6fff;
  --blue-strong: #1559db;
  --blue-light: #5b93ff;
  --blue-soft: #ebf2ff;
  --gold: #f4a623;

  --bg: #ffffff;
  --bg-soft: #f5f7fc;
  --bg-deep: #eef1f8;
  --surface: #ffffff;
  --surface-2: #f8fafd;
  --surface-glass: rgba(255, 255, 255, 0.72);

  --text: #131722;
  --text-soft: #586074;
  --text-mute: #939bac;
  --border: #e8ebf3;
  --border-strong: #d8dee9;

  --grad-primary: linear-gradient(135deg, #ffa53d 0%, #ff7a1a 55%, #f2660a 100%);
  --grad-blue: linear-gradient(135deg, #5b93ff 0%, #1f6fff 100%);
  --grad-brand: linear-gradient(120deg, #ff9d2e 0%, #ff7a1a 45%, #1f6fff 115%);
  --grad-text: linear-gradient(100deg, #ff7a1a 0%, #f2660a 40%, #1f6fff 110%);

  --shadow-xs: 0 1px 2px rgba(20, 28, 48, 0.06);
  --shadow-sm: 0 4px 14px rgba(20, 28, 48, 0.07);
  --shadow: 0 14px 36px rgba(20, 28, 48, 0.10);
  --shadow-lg: 0 28px 70px rgba(20, 28, 48, 0.18);
  --shadow-primary: 0 14px 34px rgba(255, 122, 26, 0.34);
  --shadow-blue: 0 14px 34px rgba(31, 111, 255, 0.30);

  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;
  --radius-xl: 34px;

  --nav-h: 68px;
  --container: 1240px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  color-scheme: light;
}

[data-theme="dark"] {
  --primary: #ff8a33;
  --primary-strong: #ff7a1a;
  --primary-soft: #2a1c0e;
  --blue: #4f8bff;
  --blue-strong: #357bff;
  --blue-soft: #131e36;

  --bg: #0a0f1e;
  --bg-soft: #0e1426;
  --bg-deep: #070b16;
  --surface: #121a30;
  --surface-2: #0f1729;
  --surface-glass: rgba(16, 24, 45, 0.72);

  --text: #eef2fb;
  --text-soft: #aab4c8;
  --text-mute: #76819a;
  --border: #233048;
  --border-strong: #2e3c58;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.45);
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 30px 70px rgba(0, 0, 0, 0.62);
  color-scheme: dark;
}

/* ---------- 2. Reset & base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 84px);
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: 'Vazirmatn', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background 0.5s var(--ease), color 0.5s var(--ease);
  min-height: 100vh;
}
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(18px, 4vw, 44px); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.gradient-text {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------- 3. Ambient background ---------- */
.bg-decor { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
/* soft radial gradients (no CSS blur filter — keeps scrolling smooth on mobile) */
.bg-decor .blob { position: absolute; border-radius: 50%; }
.bg-decor .b1 { width: 60vw; height: 60vw; background: radial-gradient(circle, color-mix(in srgb, var(--primary) 55%, transparent), transparent 62%); top: -22vw; inset-inline-start: -16vw; opacity: 0.5; animation: drift 26s var(--ease) infinite alternate; }
.bg-decor .b2 { width: 54vw; height: 54vw; background: radial-gradient(circle, color-mix(in srgb, var(--blue) 50%, transparent), transparent 62%); bottom: -20vw; inset-inline-end: -14vw; opacity: 0.42; animation: drift 32s var(--ease) infinite alternate-reverse; }
[data-theme="dark"] .bg-decor .b1 { opacity: 0.22; }
[data-theme="dark"] .bg-decor .b2 { opacity: 0.20; }
.bg-grain { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
[data-theme="dark"] .bg-grain { opacity: 0.05; }

@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(6vw, 5vh) scale(1.12); } }

/* ---------- 4. Preloader ---------- */
#preloader {
  position: fixed; inset: 0; z-index: 9999;
  display: grid; place-content: center; justify-items: center; gap: 22px;
  background: var(--bg);
  transition: opacity 0.7s var(--ease), visibility 0.7s;
}
#preloader.done { opacity: 0; visibility: hidden; }
.pl-cup { position: relative; width: 92px; height: 92px; }
.pl-cup svg { width: 100%; height: 100%; }
.pl-fill { transform-origin: bottom; animation: fillUp 1.8s var(--ease) infinite; }
.pl-steam { position: absolute; top: -22px; inset-inline-start: 50%; display: flex; gap: 9px; transform: translateX(-50%); }
.pl-steam span { width: 5px; height: 20px; border-radius: 4px; background: var(--text-mute); opacity: 0; animation: steam 1.8s ease-in-out infinite; }
.pl-steam span:nth-child(2) { animation-delay: 0.3s; }
.pl-steam span:nth-child(3) { animation-delay: 0.6s; }
.pl-name { font-size: 26px; font-weight: 800; letter-spacing: 1px; }
.pl-bar { width: 180px; height: 5px; border-radius: 3px; background: var(--bg-deep); overflow: hidden; }
.pl-bar i { display: block; height: 100%; width: 40%; border-radius: 3px; background: var(--grad-primary); animation: load 1.4s var(--ease) infinite; }
@keyframes fillUp { 0%, 100% { transform: scaleY(0.35); } 50% { transform: scaleY(1); } }
@keyframes steam { 0% { opacity: 0; transform: translateY(6px) scaleY(0.6); } 40% { opacity: 0.7; } 100% { opacity: 0; transform: translateY(-16px) scaleY(1.3); } }
@keyframes load { 0% { transform: translateX(-120%); } 100% { transform: translateX(360%); } }

/* ---------- 5. Scroll progress ---------- */
#progress { position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 600; transform-origin: 0 50%; transform: scaleX(0); background: var(--grad-brand); }
html[dir="rtl"] #progress { transform-origin: 100% 50%; }

/* ---------- 6. Header ---------- */
.header {
  position: sticky; top: 0; z-index: 500;
  backdrop-filter: blur(16px) saturate(140%);
  background: var(--surface-glass);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.4s var(--ease), background 0.4s var(--ease);
}
.header.scrolled { box-shadow: var(--shadow-sm); }
.header-inner { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 42px; height: 42px; border-radius: 13px; box-shadow: var(--shadow-primary); }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name { font-size: 18px; font-weight: 800; }
.brand-latin { font-size: 10px; font-weight: 600; letter-spacing: 3px; color: var(--primary); }
.header-actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  position: relative; width: 44px; height: 44px; border-radius: 13px;
  display: grid; place-content: center;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  font-size: 19px; transition: all 0.25s var(--ease);
}
.icon-btn:hover { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }
.icon-btn .ic-moon { display: none; }
[data-theme="dark"] .icon-btn .ic-sun { display: none; }
[data-theme="dark"] .icon-btn .ic-moon { display: inline; }
.cart-count-pill {
  position: absolute; top: -6px; inset-inline-end: -6px; min-width: 21px; height: 21px; padding: 0 5px;
  border-radius: 11px; background: var(--grad-primary); color: #fff; font-size: 11px; font-weight: 700;
  display: grid; place-content: center; border: 2px solid var(--surface); transform: scale(0); transition: transform 0.3s var(--ease-back);
}
.cart-count-pill.show { transform: scale(1); }
.cart-count-pill.bump { animation: bump 0.4s var(--ease-back); }

/* ---------- 7. Hero ---------- */
.hero { position: relative; padding: clamp(48px, 9vh, 104px) 0 clamp(40px, 7vh, 72px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 30px;
  background: var(--primary-soft); color: var(--primary-strong); font-size: 13px; font-weight: 700;
  border: 1px solid color-mix(in srgb, var(--primary) 28%, transparent); margin-bottom: 22px;
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 0 var(--primary); animation: ping 2s var(--ease) infinite; }
.hero-title { font-size: clamp(38px, 7vw, 76px); font-weight: 800; line-height: 1.07; letter-spacing: -1px; margin-bottom: 18px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.hero-title .ln { display: block; }
/* brand tagline + wordmark images (replace the hero text) — each swaps per theme */
.hero-tagline { height: clamp(24px, 4.2vw, 44px); aspect-ratio: 1551 / 233; max-width: 100%; background: url('../img/brand/tagline.png') no-repeat right center / contain; }
html[data-theme="dark"] .hero-tagline { background-image: url('../img/brand/tagline-dark.png'); }
.hero-logo { height: clamp(50px, 8.5vw, 92px); aspect-ratio: 727 / 250; max-width: 100%; background: url('../img/brand/alba-wordmark.png') no-repeat right center / contain; }
html[data-theme="dark"] .hero-logo { background-image: url('../img/brand/alba-wordmark-dark.png'); }
.hero-sub { font-size: clamp(15px, 2.2vw, 19px); color: var(--text-soft); max-width: 30em; margin-bottom: 30px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 38px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 26px; border-radius: 15px; font-size: 15px; font-weight: 700;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}
.btn-primary { background: var(--grad-primary); color: #fff; box-shadow: var(--shadow-primary); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 20px 44px rgba(255, 122, 26, 0.46); }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); box-shadow: var(--shadow-xs); }
.btn-ghost:hover { transform: translateY(-3px); border-color: var(--blue); color: var(--blue); box-shadow: var(--shadow-blue); }
.btn:active { transform: scale(0.97); }

.hero-stats { display: flex; gap: 30px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat b { font-size: clamp(24px, 4vw, 34px); font-weight: 800; line-height: 1; }
.stat span { font-size: 13px; color: var(--text-mute); margin-top: 6px; }
.stat-sep { width: 1px; align-self: stretch; background: var(--border); }

/* hero visual: floating cup + beans */
.hero-visual { position: relative; min-height: 340px; display: grid; place-items: center; }
.hero-disc { position: absolute; width: 78%; aspect-ratio: 1; border-radius: 50%; background: var(--grad-brand); filter: blur(8px); opacity: 0.22; animation: pulseSlow 6s var(--ease) infinite; }
.hero-cup { position: relative; width: min(330px, 76%); filter: drop-shadow(0 30px 50px rgba(20, 28, 48, 0.28)); animation: floaty 6s var(--ease) infinite; }
.hero-steam { position: absolute; top: 6%; inset-inline-start: 50%; transform: translateX(-50%); display: flex; gap: 14px; }
.hero-steam span { width: 8px; height: 46px; border-radius: 8px; background: linear-gradient(var(--text-mute), transparent); opacity: 0; animation: steam 3s ease-in-out infinite; }
.hero-steam span:nth-child(2) { animation-delay: 0.7s; height: 60px; }
.hero-steam span:nth-child(3) { animation-delay: 1.4s; }
.bean { position: absolute; font-size: 26px; opacity: 0.85; animation: floaty 5s var(--ease) infinite; filter: drop-shadow(0 8px 12px rgba(20,28,48,.2)); }

@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-18px) rotate(3deg); } }
@keyframes pulseSlow { 0%, 100% { transform: scale(1); opacity: 0.18; } 50% { transform: scale(1.08); opacity: 0.3; } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary) 60%, transparent); } 70%, 100% { box-shadow: 0 0 0 12px transparent; } }

/* ---------- 8. Section heading ---------- */
.section { padding-block: clamp(34px, 6vh, 60px); scroll-margin-top: calc(var(--nav-h) + 90px); }
.sec-head { display: flex; align-items: center; gap: 16px; margin-bottom: 30px; }
.sec-icon { width: 56px; height: 56px; border-radius: 17px; display: grid; place-content: center; font-size: 27px; background: var(--surface-2); border: 1px solid var(--border); box-shadow: var(--shadow-xs); flex-shrink: 0; }
.sec-titles { display: flex; flex-direction: column; }
.sec-title { font-size: clamp(22px, 3.6vw, 30px); font-weight: 800; line-height: 1.2; }
.sec-desc { font-size: 13px; color: var(--text-mute); }
.sec-count { margin-inline-start: auto; font-size: 13px; font-weight: 600; color: var(--text-soft); background: var(--surface-2); border: 1px solid var(--border); padding: 7px 14px; border-radius: 30px; }

/* ---------- 9. Product grid & cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 26px; }
.cat-empty { grid-column: 1 / -1; text-align: center; padding: 46px 20px; color: var(--text-soft); font-weight: 600; background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); }
.card {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
  transform-style: preserve-3d;
}
/* will-change only while actually tilting — a permanent hint would pin every
   card to its own GPU layer (32 layers idling in VRAM). */
.card:hover, .card.tilt { will-change: transform; }
.card:hover { box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); }
.card.tilt { transform: perspective(900px) rotateX(var(--ry,0)) rotateY(var(--rx,0)) translateY(-6px); }
.card-media { position: relative; aspect-ratio: 16 / 11; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); transform: translateZ(0); }
.card:hover .card-media img { transform: scale(1.09); }
.card-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,0.22)); opacity: 0; transition: opacity 0.4s; }
.card:hover .card-media::after { opacity: 1; }

.badge {
  position: absolute; top: 14px; inset-inline-start: 14px; z-index: 2;
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 30px;
  font-size: 11.5px; font-weight: 700; color: #fff; backdrop-filter: blur(4px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}
.badge-bestseller { background: var(--grad-primary); }
.badge-new { background: var(--grad-blue); }
.badge-special { background: linear-gradient(120deg, var(--gold), var(--primary) 60%, var(--blue)); }

.fav {
  position: absolute; top: 12px; inset-inline-end: 12px; z-index: 2; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-content: center; font-size: 16px; background: var(--surface-glass); backdrop-filter: blur(6px);
  border: 1px solid var(--border); color: var(--text-mute); transition: all 0.25s var(--ease-back);
}
.fav:hover { transform: scale(1.12); color: var(--primary); }
.fav.on { color: #ff3b6b; border-color: #ff3b6b; }

.card-body { padding: 18px 18px 20px; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.card-name { font-size: 16.5px; font-weight: 700; }
.card-price { font-size: 19px; font-weight: 800; color: var(--primary-strong); white-space: nowrap; }
.card-price .cur { font-size: 11px; font-weight: 600; color: var(--text-mute); margin-inline-start: 3px; }
.card-desc { font-size: 13px; color: var(--text-soft); margin: 9px 0 16px; min-height: 44px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.add-btn {
  width: 100%; padding: 12px; border-radius: 14px; background: var(--grad-primary); color: #fff;
  font-size: 14.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 8px 20px rgba(255, 122, 26, 0.28); transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), filter 0.22s;
}
.add-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(255, 122, 26, 0.42); }
.add-btn:active { transform: scale(0.97); }
.add-btn.added { background: linear-gradient(135deg, #15c26b, #0fa85c); box-shadow: 0 10px 24px rgba(15, 168, 92, 0.4); }

/* card stepper (shown when item already in cart) */
.stepper { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stepper button {
  width: 42px; height: 42px; border-radius: 13px; background: var(--surface-2); border: 1px solid var(--border-strong);
  font-size: 20px; font-weight: 700; color: var(--text); display: grid; place-content: center; transition: all 0.2s var(--ease);
}
.stepper button:hover { background: var(--primary); color: #fff; border-color: var(--primary); transform: translateY(-2px); }
.stepper .qty { flex: 1; text-align: center; font-size: 16px; font-weight: 800; }
.card.sold-out { opacity: 0.62; }
.sold-tag { width: 100%; padding: 12px; border-radius: 14px; text-align: center; font-weight: 700; font-size: 14px; background: var(--surface-2); color: var(--text-mute); border: 1px dashed var(--border-strong); }

/* tabs-only: show one category section at a time, with a staggered entrance */
.cat-section { display: none; }
.cat-section.active { display: block; }
.cat-section.active .sec-head { animation: secIn 0.5s var(--ease) backwards; }
.cat-section.active .card { animation: cardIn 0.55s var(--ease) backwards; }
.cat-section.active .card:nth-child(1) { animation-delay: 0.05s; }
.cat-section.active .card:nth-child(2) { animation-delay: 0.10s; }
.cat-section.active .card:nth-child(3) { animation-delay: 0.15s; }
.cat-section.active .card:nth-child(4) { animation-delay: 0.20s; }
.cat-section.active .card:nth-child(5) { animation-delay: 0.25s; }
.cat-section.active .card:nth-child(6) { animation-delay: 0.30s; }
.cat-section.active .card:nth-child(7) { animation-delay: 0.35s; }
.cat-section.active .card:nth-child(n+8) { animation-delay: 0.40s; }
@keyframes cardIn { from { opacity: 0; transform: translateY(28px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes secIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* ---------- 10. Category nav (sticky scroll-spy) ---------- */
.catnav { position: sticky; top: var(--nav-h); z-index: 480; background: var(--surface-glass); backdrop-filter: blur(16px) saturate(140%); border-bottom: 1px solid var(--border); }
.catnav-inner { display: flex; align-items: center; gap: 14px; padding-block: 14px; }
.tabs { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth; flex: 1; padding-bottom: 2px; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 7px; padding: 10px 17px; border-radius: 13px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-soft);
  font-size: 13.5px; font-weight: 600; white-space: nowrap; transition: all 0.3s var(--ease);
}
.tab:hover { color: var(--text); border-color: var(--border-strong); transform: translateY(-2px); }
.tab.active { background: var(--grad-primary); border-color: transparent; color: #fff; box-shadow: var(--shadow-primary); }
.tab .ti { font-size: 16px; }

/* ---------- 11. Info ---------- */
.info { background: var(--bg-soft); border-block: 1px solid var(--border); }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.info-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; text-align: center; box-shadow: var(--shadow-xs); transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s; }
.info-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.info-ic { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 16px; display: grid; place-content: center; font-size: 25px; color: #fff; }
.info-ic.insta { background: linear-gradient(135deg, #f09433, #dc2743, #bc1888); }
.info-ic.phone { background: var(--grad-blue); }
.info-ic.clock { background: linear-gradient(135deg, #34d399, #059669); }
.info-ic.loc { background: var(--grad-primary); }
.info-label { font-size: 12px; color: var(--text-mute); margin-bottom: 6px; }
.info-val { font-size: 14.5px; font-weight: 600; line-height: 1.9; }
.info-val a { color: var(--primary); }

/* ---------- 12. Footer ---------- */
.footer { background: linear-gradient(160deg, #0d1426, #0a1020); color: #cdd6e8; padding: 54px 0 26px; }
.footer-top { display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; align-items: flex-start; padding-bottom: 30px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.footer .brand-name { color: #fff; }
.footer-tag { max-width: 26em; color: #9aa6bf; font-size: 14px; margin-top: 12px; }
.footer-socials { display: flex; gap: 12px; }
.footer-socials a { width: 44px; height: 44px; border-radius: 13px; background: rgba(255, 255, 255, 0.06); display: grid; place-content: center; font-size: 18px; transition: all 0.25s var(--ease); }
.footer-socials a:hover { background: var(--grad-primary); transform: translateY(-3px); }
.footer-bottom { text-align: center; padding-top: 22px; font-size: 12.5px; color: #7e8aa6; }
.footer-bottom b { color: var(--primary); }

/* ---------- 13. Floating buttons ---------- */
.fab {
  position: fixed; inset-block-end: 26px; inset-inline-start: 26px; z-index: 450; width: 62px; height: 62px; border-radius: 50%;
  background: var(--grad-primary); color: #fff; font-size: 25px; display: grid; place-content: center;
  box-shadow: var(--shadow-primary); transition: transform 0.35s var(--ease-back), opacity 0.35s var(--ease);
  opacity: 0; transform: scale(0.5); pointer-events: none;
}
.fab.show { opacity: 1; transform: none; pointer-events: auto; }
.fab.show:hover { transform: scale(1.1) translateY(-2px); }
.fab .cart-count-pill { inset-inline-end: -4px; top: -4px; border-color: var(--bg); }
.to-top {
  position: fixed; inset-block-end: 26px; inset-inline-end: 26px; z-index: 440; width: 50px; height: 50px; border-radius: 14px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow); font-size: 19px;
  display: grid; place-content: center; opacity: 0; transform: translateY(20px) scale(0.8); pointer-events: none; transition: all 0.35s var(--ease-back);
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--blue); color: #fff; border-color: var(--blue); }

/* fly-to-cart clone */
.fly-clone { position: fixed; z-index: 700; border-radius: 14px; object-fit: cover; box-shadow: var(--shadow-lg); pointer-events: none; transition: all 0.85s cubic-bezier(0.5, -0.2, 0.4, 1); }

/* ---------- 14. Cart drawer ---------- */
.overlay { position: fixed; inset: 0; z-index: 700; background: rgba(8, 12, 24, 0.55); backdrop-filter: blur(5px); opacity: 0; visibility: hidden; transition: all 0.4s var(--ease); }
.overlay.open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; inset-block: 0; inset-inline-end: 0; z-index: 710; width: min(440px, 100%); background: var(--surface);
  display: flex; flex-direction: column; box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform 0.45s var(--ease);
}
html[dir="rtl"] .drawer { transform: translateX(-100%); }
.drawer.open { transform: translateX(0) !important; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--border); }
.drawer-head h2 { font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 9px; }
.drawer-head .dcount { font-size: 12px; font-weight: 700; color: #fff; background: var(--grad-primary); padding: 3px 11px; border-radius: 20px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 22px; }
.cart-empty { text-align: center; padding: 60px 16px; color: var(--text-mute); }
.cart-empty .ce-emoji { font-size: 64px; opacity: 0.4; margin-bottom: 14px; }
.cart-empty h3 { color: var(--text); font-size: 18px; margin-bottom: 6px; }

.citem { display: flex; gap: 13px; padding: 13px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px; margin-bottom: 12px; animation: slideIn 0.35s var(--ease); }
.citem img { width: 70px; height: 70px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.citem-info { flex: 1; min-width: 0; }
.citem-name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.citem-unit { font-size: 12px; color: var(--text-mute); margin-top: 2px; }
.citem-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; gap: 8px; }
.mini-step { display: flex; align-items: center; gap: 9px; }
.mini-step button { width: 28px; height: 28px; border-radius: 9px; background: var(--surface); border: 1px solid var(--border-strong); font-size: 16px; font-weight: 700; display: grid; place-content: center; transition: all 0.2s; }
.mini-step button:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.mini-step .q { font-size: 14px; font-weight: 800; min-width: 18px; text-align: center; }
.citem-total { font-size: 13px; font-weight: 800; color: var(--primary-strong); }
.citem-del { color: var(--text-mute); font-size: 15px; align-self: flex-start; transition: color 0.2s; }
.citem-del:hover { color: #ff3b6b; }

.drawer-foot { padding: 18px 22px; border-top: 1px solid var(--border); background: var(--surface-2); }
.sum-row { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--text-soft); margin-bottom: 7px; }
.sum-row.total { font-size: 17px; font-weight: 800; color: var(--text); padding-top: 12px; margin-top: 6px; border-top: 1px dashed var(--border-strong); }
.sum-row.total b { color: var(--primary-strong); font-size: 21px; }
.checkout { width: 100%; padding: 15px; margin-top: 14px; border-radius: 15px; background: linear-gradient(135deg, #25d366, #1aaf52); color: #fff; font-size: 15.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 9px; box-shadow: 0 10px 26px rgba(37, 211, 102, 0.35); transition: transform 0.22s var(--ease), box-shadow 0.22s; }
.checkout:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(37, 211, 102, 0.5); }
.clear-cart { width: 100%; padding: 11px; margin-top: 9px; border-radius: 13px; background: transparent; border: 1px solid var(--border-strong); color: var(--text-soft); font-size: 13px; font-weight: 600; transition: all 0.25s; }
.clear-cart:hover { background: #ff3b6b; color: #fff; border-color: #ff3b6b; }

/* ---------- 15. Toast ---------- */
.toast { position: fixed; inset-block-end: 100px; left: 0; right: 0; margin-inline: auto; width: fit-content; max-width: min(420px, calc(100vw - 28px)); box-sizing: border-box; transform: translateY(30px); z-index: 720; display: flex; align-items: center; gap: 10px; padding: 13px 20px; border-radius: 14px; background: var(--text); color: var(--bg); font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transition: all 0.4s var(--ease-back); }
.toast #toastMsg { min-width: 0; overflow-wrap: anywhere; line-height: 1.5; }
.toast.show { opacity: 1; visibility: visible; transform: translateY(0); }
.toast .tic { width: 24px; height: 24px; border-radius: 50%; background: #15c26b; color: #fff; display: grid; place-content: center; font-size: 14px; flex-shrink: 0; }

/* ---------- 16. Order success modal ---------- */
.order-modal { position: fixed; inset: 0; z-index: 800; display: grid; place-items: center; padding: 20px; background: rgba(8, 12, 24, 0.6); backdrop-filter: blur(6px); opacity: 0; visibility: hidden; transition: opacity 0.35s var(--ease), visibility 0.35s var(--ease); }
.order-modal.open { opacity: 1; visibility: visible; }
.order-card { position: relative; width: min(460px, 100%); max-height: 88vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 36px 28px 26px; text-align: center; transform: translateY(18px) scale(0.96); transition: transform 0.45s var(--ease-back); }
.order-modal.open .order-card { transform: translateY(0) scale(1); }
.order-x { position: absolute; inset-block-start: 14px; inset-inline-end: 14px; width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-mute); font-size: 15px; display: grid; place-content: center; transition: all 0.2s; }
.order-x:hover { background: #ff3b6b; color: #fff; border-color: #ff3b6b; }
.order-check { width: 84px; height: 84px; margin: 4px auto 18px; border-radius: 50%; background: linear-gradient(135deg, #25d366, #1aaf52); color: #fff; display: grid; place-content: center; font-size: 46px; font-weight: 800; box-shadow: 0 12px 30px rgba(37, 211, 102, 0.4); animation: orderPop 0.5s var(--ease-back); }
@keyframes orderPop { 0% { transform: scale(0); } 60% { transform: scale(1.14); } 100% { transform: scale(1); } }
.order-card h2 { font-size: 21px; font-weight: 800; margin-bottom: 6px; }
.order-sub { color: var(--text-mute); font-size: 14px; margin-bottom: 22px; }
.order-list-head { text-align: start; font-size: 14px; font-weight: 800; color: var(--text-soft); margin-bottom: 4px; }
.order-list { text-align: start; }
.order-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--border); }
.order-line-info { min-width: 0; }
.order-line-name { font-size: 14.5px; font-weight: 700; }
.order-line-qty { font-size: 12px; color: var(--text-mute); margin-top: 4px; }
.order-line-qty .oq-num { font-size: 16px; font-weight: 800; color: var(--primary-strong); }
.order-line-total { font-size: 14px; font-weight: 800; color: var(--primary-strong); white-space: nowrap; }
.order-total { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 15px; border-top: 1px dashed var(--border-strong); font-size: 17px; font-weight: 800; color: var(--text); }
.order-total b { color: var(--primary-strong); font-size: 22px; }
.order-done { width: 100%; margin-top: 22px; justify-content: center; }

/* ---------- 16. Animations & reveal ---------- */
@keyframes bump { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.35); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.06s; } .reveal-d2 { transition-delay: 0.12s; } .reveal-d3 { transition-delay: 0.18s; }
.reveal-d4 { transition-delay: 0.24s; } .reveal-d5 { transition-delay: 0.3s; } .reveal-d6 { transition-delay: 0.36s; }

/* ---------- 17. Responsive ---------- */
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; min-height: 240px; }
  .hero-cup { width: 200px; }
}
@media (max-width: 620px) {
  :root { --nav-h: 60px; }
  .brand-text .brand-latin { display: none; }
  .grid { grid-template-columns: 1fr; gap: 18px; }
  .hero-stats { gap: 18px; }
  .stat-sep { display: none; }
  .sec-count { display: none; }
  .fab { width: 56px; height: 56px; inset-block-end: 18px; inset-inline-start: 18px; }
  .to-top { inset-block-end: 18px; inset-inline-end: 18px; }
  .footer-top { flex-direction: column; }
}

/* ---------- 18. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 18b. Eco / kiosk mode (always-on display) ----------
   Enable once with ?kiosk=1 — it sticks. Kills every perpetual animation and
   the live backdrop blur so an idle screen costs ~0% GPU instead of
   compositing 60fps forever (the main cause of an all-in-one running hot). */
html.eco .blob,
html.eco .hero-disc,
html.eco .hero-cup,
html.eco .bean,
html.eco .hero-steam span,
html.eco .hero-badge .dot,
html.eco .pl-fill,
html.eco .pl-steam span,
html.eco .pl-bar i { animation: none !important; }

/* live blur behind sticky bars is the most expensive per-frame op — drop it */
html.eco .header,
html.eco .catnav { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--surface); }

/* animated filters → static (a still blur is rasterised once, an animated one every frame) */
html.eco .hero-disc { filter: none; opacity: 0.2; }
html.eco .hero-cup { filter: drop-shadow(0 18px 30px rgba(20, 28, 48, 0.22)); }
html.eco .card, html.eco .card:hover, html.eco .card.tilt { will-change: auto; }
html.eco .bg-grain { display: none; }

/* pause everything while the screen/tab isn't being shown */
html.paused *, html.paused *::before, html.paused *::after { animation-play-state: paused !important; }

/* ---------- 19. Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-soft); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 5px; border: 2px solid var(--bg-soft); }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* print: simple menu */
@media print {
  .header, .catnav, .fab, .to-top, .hero-visual, #preloader, .bg-decor, .bg-grain, .footer-socials, .add-btn, .stepper { display: none !important; }
  body { background: #fff; color: #000; }
  .card { break-inside: avoid; box-shadow: none; border: 1px solid #ccc; }
}
