/* ==========================================================================
   Hilma Style — storefront stylesheet (mobile first, RTL)
   ========================================================================== */

@font-face { font-family: 'Vazirmatn'; src: url('/fonts/Vazirmatn-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('/fonts/Vazirmatn-SemiBold.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('/fonts/Vazirmatn-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --primary: #e0457b;
  --primary-600: #c7336a;
  --primary-50: #fdeef4;
  --primary-100: #fbd9e6;
  --violet: #7c5cff;
  --violet-50: #f1edff;
  --gold: #f5a524;
  --grad: linear-gradient(135deg, #ff6a9a 0%, #e0457b 45%, #7c5cff 100%);

  --ink: #221a33;
  --ink-2: #4a4260;
  --muted: #7a7390;
  --line: #eee7f1;
  --bg: #fbf8fc;
  --card: #ffffff;

  --ok: #11a36a;
  --ok-bg: #e3f7ee;
  --warn: #c77700;
  --warn-bg: #fff3dc;
  --danger: #e5484d;
  --danger-bg: #ffe9ea;
  --info: #2f6bff;
  --info-bg: #e8efff;

  --field: #ffffff;
  --soft: #f5f0f7;
  --media: #f7f1f6;
  --track: #f1ebf3;
  --switch-off: #e3dbe8;
  --star-off: #e6dde9;
  --header-bg: rgba(255, 255, 255, .86);
  --tabbar-bg: rgba(255, 255, 255, .94);
  --glass: rgba(255, 255, 255, .9);
  --on-ink: #ffffff;
  --cat-from: #ffffff;
  --ring: #ffffff;
  --footer-bg: #1d1529;
  --scrim: rgba(255, 255, 255, .6);
  color-scheme: light;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(34, 26, 51, .05), 0 2px 8px rgba(34, 26, 51, .04);
  --shadow: 0 6px 24px rgba(71, 35, 90, .08);
  --shadow-lg: 0 18px 50px rgba(71, 35, 90, .16);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --header-h: 64px;
  --tabbar-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  direction: rtl;
  overflow-x: hidden;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
  animation: page-in .5s var(--ease);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { line-height: 1.4; margin: 0; }
p { margin: 0 0 .6em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.link { color: var(--primary-600); font-weight: 600; }
.link:hover { text-decoration: underline; }

.ic { width: 1.25em; height: 1.25em; flex-shrink: 0; vertical-align: -.25em; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.page-main { position: relative; z-index: 1; padding-top: 16px; padding-bottom: 32px; min-height: 55vh; }

.skip-link { position: absolute; top: -80px; right: 8px; background: var(--ink); color: var(--on-ink); padding: 8px 12px; border-radius: 8px; z-index: 200; }
.skip-link:focus { top: 8px; }
:focus-visible { outline: 3px solid rgba(224, 69, 123, .45); outline-offset: 2px; border-radius: 6px; }

.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; }
.only-desktop { display: none !important; }
@media (min-width: 900px) {
  .only-desktop { display: inline-flex !important; }
  .only-mobile { display: none !important; }
}

/* ---------- animated background ---------- */
.bg-decor { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .45; animation: blob 22s ease-in-out infinite alternate; }
.blob.b1 { width: 420px; height: 420px; background: #ffc2d8; top: -140px; right: -120px; }
.blob.b2 { width: 380px; height: 380px; background: #d9ceff; top: 40%; left: -160px; animation-delay: -7s; }
.blob.b3 { width: 300px; height: 300px; background: #ffe3b8; bottom: -120px; right: 20%; animation-delay: -14s; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 600; font-size: 14px; line-height: 1.4; white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s, color .2s, border-color .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--grad); background-size: 160% 160%; color: #fff; box-shadow: 0 6px 18px rgba(224, 69, 123, .3); }
.btn-primary:hover { background-position: 100% 0; box-shadow: 0 10px 26px rgba(224, 69, 123, .38); transform: translateY(-1px); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn-ghost { background: var(--card); border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--primary-100); color: var(--primary-600); background: var(--primary-50); }
.btn-light { background: #fff; color: #c7336a; box-shadow: 0 8px 22px rgba(0, 0, 0, .12); }
.btn-light:hover { transform: translateY(-2px); }
.btn-glass { background: rgba(255, 255, 255, .18); color: #fff; border-color: rgba(255, 255, 255, .45); backdrop-filter: blur(6px); }
.btn-glass:hover { background: rgba(255, 255, 255, .28); }
.btn-block { width: 100%; }
.btn-lg { padding: 13px 22px; font-size: 15px; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2);
  transition: background .2s, color .2s, transform .2s;
}
.icon-btn:hover { background: var(--primary-50); color: var(--primary-600); }
.icon-btn:active { transform: scale(.92); }
.icon-btn.danger:hover { background: var(--danger-bg); color: var(--danger); }
.icon-btn .ic { width: 22px; height: 22px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--header-bg);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid rgba(238, 231, 241, .9);
  transition: box-shadow .3s, transform .35s var(--ease);
}
.site-header.scrolled { box-shadow: 0 6px 24px rgba(71, 35, 90, .08); }
.header-top { display: flex; align-items: center; gap: 10px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }

.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; color: var(--ink); white-space: nowrap; }
.logo-mark img { width: 38px; height: 38px; border-radius: 12px; box-shadow: 0 6px 16px rgba(124, 92, 255, .3); transition: transform .5s var(--ease); }
.logo:hover .logo-mark img { transform: rotate(-8deg) scale(1.06); }
.logo-img { height: 40px; width: auto; max-width: 160px; object-fit: contain; }
.logo-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.search-form {
  order: 10; flex: 1 1 100%;
  display: flex; align-items: center; gap: 6px;
  background: var(--soft); border: 1.5px solid transparent; border-radius: 16px;
  padding: 4px 6px 4px 4px; transition: border-color .2s, background .2s, box-shadow .2s;
}
.search-form:focus-within { background: var(--field); border-color: var(--primary-100); box-shadow: 0 0 0 4px rgba(224, 69, 123, .08); }
.search-ic { display: grid; place-items: center; color: var(--muted); padding-right: 8px; }
.search-form input[type=search] { flex: 1; box-shadow: none; min-width: 0; border: 0; background: transparent; outline: none; padding: 8px 4px; font-size: 14px; }
.search-form input::-webkit-search-cancel-button { display: none; }
.search-btn { border: 0; background: var(--ink); color: var(--on-ink); border-radius: 12px; padding: 7px 14px; font-weight: 600; font-size: 13px; }
.search-btn:hover { background: var(--primary-600); }

.header-actions { margin-right: auto; display: flex; align-items: center; gap: 8px; }

.cart-link {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 11px; border-radius: 14px; background: var(--primary-50); color: var(--primary-600); font-weight: 600; font-size: 14px;
  transition: background .2s, transform .2s;
}
.cart-link:hover { background: var(--primary-100); }
.cart-ic .ic { width: 22px; height: 22px; }
.cart-badge {
  position: absolute; top: -6px; left: -6px; min-width: 21px; height: 21px; padding: 0 5px;
  display: grid; place-items: center; border-radius: 999px; background: var(--primary); color: #fff;
  font-size: 11px; font-weight: 700; border: 2px solid var(--ring); transition: transform .3s var(--ease), opacity .2s;
}
.cart-badge.is-empty { transform: scale(0); opacity: 0; }
.cart-badge.bump { animation: bump .6s var(--ease); }

.account-btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 6px 0 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: 14px; }
.account-btn .chev .ic { width: 16px; height: 16px; transition: transform .25s; }
.dropdown.open .account-btn .chev .ic { transform: rotate(180deg); }
.account-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 11px; background: var(--grad); color: #fff; font-weight: 700; font-size: 14px; flex-shrink: 0; }

.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 10px); left: 0; min-width: 230px; z-index: 70;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg);
  padding: 8px; opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.98); transform-origin: top left;
  transition: opacity .2s, transform .25s var(--ease), visibility .2s;
}
.dropdown.open .dropdown-menu { opacity: 1; visibility: visible; transform: none; }
.dropdown-head { display: flex; flex-direction: column; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.dropdown-head small { color: var(--muted); font-size: 12px; }
.dropdown-menu a, .dropdown-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border-radius: 10px;
  font-size: 14px; background: none; border: 0; text-align: right; color: var(--ink-2);
}
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--primary-50); color: var(--primary-600); }
.dropdown-menu .danger:hover { background: var(--danger-bg); color: var(--danger); }

.header-nav { border-top: 1px solid var(--line); display: none; }
.nav-scroll { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-top: 6px; padding-bottom: 6px; }
.nav-scroll::-webkit-scrollbar { display: none; }
.nav-link {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px;
  font-size: 14px; color: var(--ink-2); white-space: nowrap; transition: background .2s, color .2s;
}
.nav-link .ic { width: 18px; height: 18px; color: var(--muted); transition: color .2s, transform .3s var(--ease); }
.nav-link:hover, .nav-link.active { background: var(--primary-50); color: var(--primary-600); }
.nav-link:hover .ic, .nav-link.active .ic { color: var(--primary); transform: translateY(-1px) rotate(-6deg); }
.nav-link.hot .ic { color: #ff6b2c; }

@media (min-width: 900px) {
  .header-top { flex-wrap: nowrap; gap: 24px; padding-top: 14px; padding-bottom: 14px; }
  .search-form { order: 0; flex: 1 1 auto; max-width: 620px; }
  .header-nav { display: block; }
}

/* ---------- drawer ---------- */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(28, 16, 40, .45); backdrop-filter: blur(2px); z-index: 90; opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(86vw, 340px); z-index: 100;
  background: var(--card); box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
  transform: translateX(105%); transition: transform .38s var(--ease); overflow-y: auto;
  padding-bottom: env(safe-area-inset-bottom);
}
body.drawer-open { overflow: hidden; }
body.drawer-open .drawer { transform: none; }
body.drawer-open .drawer-backdrop { opacity: 1; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.drawer-user { display: flex; align-items: center; gap: 12px; margin: 14px 16px 4px; padding: 12px; border-radius: var(--r); background: var(--primary-50); }
.drawer-user div { display: flex; flex-direction: column; min-width: 0; }
.drawer-user small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.drawer-auth { padding: 14px 16px 4px; }
.drawer-nav { display: flex; flex-direction: column; padding: 8px 10px 20px; }
.drawer-nav a, .drawer-logout button {
  display: flex; align-items: center; gap: 12px; padding: 11px 10px; border-radius: 12px; font-size: 15px; color: var(--ink-2);
  background: none; border: 0; width: 100%; text-align: right;
  opacity: 0; transform: translateX(16px); transition: background .2s, color .2s, opacity .35s, transform .35s var(--ease);
}
body.drawer-open .drawer-nav a, body.drawer-open .drawer-logout button { opacity: 1; transform: none; }
.drawer-nav a:nth-child(2) { transition-delay: .03s; } .drawer-nav a:nth-child(3) { transition-delay: .06s; }
.drawer-nav a:nth-child(4) { transition-delay: .09s; } .drawer-nav a:nth-child(n+5) { transition-delay: .12s; }
.drawer-nav a:hover, .drawer-nav a.active { background: var(--primary-50); color: var(--primary-600); }
.drawer-logout button:hover { background: var(--danger-bg); color: var(--danger); }
.drawer-title { font-size: 12px; font-weight: 700; color: var(--muted); padding: 14px 10px 6px; }
.cat-dot { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--violet-50); color: var(--violet); }
.cat-dot .ic { width: 18px; height: 18px; }

/* ---------- bottom tab bar (mobile) ---------- */
.tabbar {
  position: fixed; bottom: 0; right: 0; left: 0; z-index: 80;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--tabbar-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); box-shadow: 0 -6px 24px rgba(71, 35, 90, .06);
}
.tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; color: var(--muted); -webkit-tap-highlight-color: transparent; }
.tabbar a .ic { width: 23px; height: 23px; transition: transform .3s var(--ease); }
.tabbar a.active { color: var(--primary); font-weight: 700; }
.tabbar a.active::before { content: ''; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 4px 4px; background: var(--grad); animation: tab-in .35s var(--ease); }
.tabbar a.active .ic { transform: translateY(-2px); }
.tabbar a:active .ic { transform: scale(.85); }
.tab-cart { position: relative; }
.cart-badge.sm { top: -6px; left: -10px; min-width: 18px; height: 18px; font-size: 10px; }
@media (min-width: 900px) {
  .tabbar { display: none; }
  body { padding-bottom: 0; }
}

/* ---------- toasts ---------- */
.toast-stack { position: fixed; z-index: 120; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; width: min(92vw, 380px); pointer-events: none; }
@media (min-width: 900px) { .toast-stack { bottom: 24px; } }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--ink); color: #fff; font-size: 14px; box-shadow: var(--shadow-lg); animation: toast-in .4s var(--ease); pointer-events: auto; }
.toast .ic { width: 22px; height: 22px; }
.toast.ok .ic { color: #5ee0a8; }
.toast.error { background: #3a1216; }
.toast.error .ic { color: #ff8a8f; }
.toast a { margin-right: auto; color: #ffb0cb; font-weight: 700; }
.toast.out { animation: toast-out .3s var(--ease) forwards; }

/* ---------- alerts ---------- */
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 14px; font-size: 14px; margin-bottom: 16px; animation: fade-up .4s var(--ease); }
.alert .ic { margin-top: 3px; }
.alert-ok { background: var(--ok-bg); color: #0b6b45; }
.alert-error { background: var(--danger-bg); color: #a3242a; }

/* ---------- cards & common blocks ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow-sm); }
.card-title { font-size: 18px; display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin: 6px 0 16px; }
.page-head h1 { font-size: 21px; display: flex; align-items: center; gap: 10px; }
.page-head h1 .ic { color: var(--primary); }
.page-head p { width: 100%; margin: 0; }

.section { margin: 30px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { font-size: 18px; display: flex; align-items: center; gap: 10px; }
.sh-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--primary-50); color: var(--primary); }
.sh-ic.hot { background: #fff0e8; color: #ff6b2c; }
.sh-ic.gold { background: #fff6e0; color: var(--gold); }
.sh-ic .ic { width: 20px; height: 20px; }
.see-all { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: var(--primary-600); padding: 6px 10px; border-radius: 999px; transition: background .2s; }
.see-all:hover { background: var(--primary-50); }
.see-all .ic { transition: transform .25s var(--ease); }
.see-all:hover .ic { transform: translateX(-4px); }

.empty-state { text-align: center; padding: 42px 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--ink-2); }
.empty-state.compact { padding: 26px 10px; }
.empty-state.big { padding: 70px 16px; }
.empty-ic { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 28px; background: var(--primary-50); color: var(--primary); animation: float 4s ease-in-out infinite; }
.empty-ic .ic { width: 40px; height: 40px; }
.empty-ic.sm { width: 56px; height: 56px; border-radius: 18px; }
.empty-ic.sm .ic { width: 28px; height: 28px; }

.pill { display: inline-flex; align-items: center; padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.tone-ok { background: var(--ok-bg); color: #0b7a4d; }
.tone-warn { background: var(--warn-bg); color: var(--warn); }
.tone-danger { background: var(--danger-bg); color: #c0282e; }
.tone-info { background: var(--info-bg); color: var(--info); }
.tone-accent { background: var(--violet-50); color: var(--violet); }
.tone-muted { background: var(--track); color: var(--muted); }

.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 13px; color: var(--muted); margin: 4px 0 14px; }
.breadcrumb .ic { width: 14px; height: 14px; }
.breadcrumb a:hover { color: var(--primary-600); }
.breadcrumb span { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }

/* ---------- welcome hero (no active festival) ---------- */
.welcome-hero {
  position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 30px 22px; color: #fff;
  background: var(--grad); background-size: 200% 200%; animation: grad-move 12s ease infinite;
  display: grid; gap: 16px; box-shadow: var(--shadow-lg);
}
.wh-text h1 { font-size: 28px; margin: 10px 0 6px; }
.wh-text p { opacity: .92; font-size: 15px; }
.wh-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.wh-art { position: relative; height: 130px; }
.float-card { position: absolute; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .35); backdrop-filter: blur(8px); animation: float 5s ease-in-out infinite; }
.float-card .ic { width: 30px; height: 30px; }
.float-card.c1 { right: 6%; top: 10px; }
.float-card.c2 { right: 36%; top: 50px; animation-delay: -1.2s; width: 54px; height: 54px; }
.float-card.c3 { left: 30%; top: 0; animation-delay: -2.4s; }
.float-card.c4 { left: 6%; top: 56px; animation-delay: -3.6s; width: 58px; height: 58px; }
@media (min-width: 900px) {
  .welcome-hero { grid-template-columns: 1.2fr 1fr; align-items: center; padding: 48px 44px; min-height: 320px; }
  .wh-text h1 { font-size: 40px; }
  .wh-art { height: 220px; }
  .float-card { width: 86px; height: 86px; border-radius: 26px; }
  .float-card .ic { width: 38px; height: 38px; }
}

/* ---------- festival banner ---------- */
.fb-chip, .fs-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .35); backdrop-filter: blur(6px); }
.fb-chip .ic, .fs-chip .ic { width: 16px; height: 16px; animation: twinkle 2.4s ease-in-out infinite; }
.festival-banner {
  --f1: #e0457b; --f2: #7c5cff; --fo: transparent;
  position: relative; overflow: hidden; border-radius: var(--r-lg); min-height: 230px; color: #fff;
  display: flex; align-items: flex-end; isolation: isolate;
}
.fb-bg { position: absolute; inset: 0; z-index: -3; background: linear-gradient(125deg, var(--f1), var(--f2), var(--f1)); background-size: 220% 220%; animation: grad-move 10s ease infinite; }
.festival-banner.has-image .fb-bg { background: var(--fimg) center / cover no-repeat; animation: kenburns 18s ease-in-out infinite alternate; }
.fb-overlay { position: absolute; inset: 0; z-index: -2; background: linear-gradient(0deg, var(--fo), var(--fo)); }
.festival-banner.has-image .fb-overlay::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--f2) 45%, transparent), transparent 70%); mix-blend-mode: soft-light; }
.fb-shapes { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.fb-shapes i { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .14); animation: float 7s ease-in-out infinite; }
.fb-shapes i:nth-child(1) { width: 180px; height: 180px; top: -60px; left: -40px; }
.fb-shapes i:nth-child(2) { width: 90px; height: 90px; bottom: 20px; left: 22%; animation-delay: -2s; }
.fb-shapes i:nth-child(3) { width: 26px; height: 26px; top: 30%; left: 40%; animation-delay: -4s; background: rgba(255, 255, 255, .3); }
.fb-shapes i:nth-child(4) { width: 14px; height: 14px; top: 18%; right: 30%; animation-delay: -1s; background: rgba(255, 255, 255, .4); }
.festival-banner.has-image .fb-shapes { display: none; }
.fb-content { position: relative; padding: 24px 20px; width: 100%; }
.fb-title { font-size: 26px; font-weight: 700; margin: 10px 0 4px; text-shadow: 0 2px 16px rgba(0, 0, 0, .18); }
.fb-sub { font-size: 14px; opacity: .95; max-width: 560px; }
.fb-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 14px; }
.fb-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; background: #fff; color: var(--f1); font-weight: 700; font-size: 14px; box-shadow: 0 8px 22px rgba(0, 0, 0, .15); transition: transform .25s var(--ease), box-shadow .25s; }
.fb-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0, 0, 0, .2); }
.fb-btn .ic { transition: transform .25s var(--ease); }
.fb-btn:hover .ic { transform: translateX(-4px); }
.theme-dark { color: #1c1326; }
.theme-dark .fb-chip { background: rgba(255, 255, 255, .55); border-color: rgba(0, 0, 0, .06); }
.theme-dark .fb-btn { background: #1c1326; color: #fff; }
.theme-dark .countdown span { background: rgba(255, 255, 255, .6); }
.countdown { display: flex; gap: 6px; direction: rtl; }
.countdown span { display: flex; flex-direction: column; align-items: center; min-width: 50px; padding: 5px 6px; border-radius: 12px; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .3); backdrop-filter: blur(6px); }
.countdown b { font-size: 18px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.countdown b.tick { animation: tick .45s var(--ease); }
.countdown small { font-size: 10px; opacity: .85; }
@media (min-width: 900px) {
  .festival-banner { min-height: 340px; align-items: center; }
  .fb-content { padding: 40px 48px; }
  .fb-title { font-size: 40px; }
  .fb-sub { font-size: 16px; }
}

/* ---------- hero carousel ---------- */
.hero-carousel { position: relative; }
.carousel-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide { flex: 0 0 100%; scroll-snap-align: start; }
.carousel-slide .festival-banner { border-radius: 0; height: 100%; }
.carousel-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--glass); color: var(--ink); display: none; place-items: center; box-shadow: var(--shadow); transition: transform .2s, background .2s; }
.carousel-arrow:hover { background: var(--card); transform: translateY(-50%) scale(1.08); }
.carousel-arrow.prev { right: 14px; }
.carousel-arrow.next { left: 14px; }
@media (min-width: 900px) { .carousel-arrow { display: grid; } }
.carousel-dots, .gallery-dots { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.carousel-dots button, .gallery-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .55); transition: width .35s var(--ease), background .3s; }
.carousel-dots button.active, .gallery-dots button.active { width: 24px; background: #fff; }

/* ---------- category rail & grid ---------- */
.cat-rail { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px 10px; scroll-snap-type: x proximity; }
.cat-rail::-webkit-scrollbar { display: none; }
.cat-tile { flex: 0 0 auto; width: 84px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; scroll-snap-align: start; }
.cat-ic {
  display: grid; place-items: center; width: 66px; height: 66px; border-radius: 22px; color: var(--primary-600);
  background: linear-gradient(145deg, var(--cat-from), var(--primary-50)); border: 1px solid var(--primary-100);
  box-shadow: 0 6px 16px rgba(224, 69, 123, .1); transition: transform .35s var(--ease), box-shadow .35s, background .35s, color .35s;
}
.cat-ic .ic { width: 30px; height: 30px; }
.cat-tile:nth-child(3n+2) .cat-ic, .cat-card:nth-child(3n+2) .cat-ic { color: var(--violet); background: linear-gradient(145deg, var(--cat-from), var(--violet-50)); border-color: #e1d9ff; }
.cat-tile:nth-child(3n) .cat-ic, .cat-card:nth-child(3n) .cat-ic { color: #e08a00; background: linear-gradient(145deg, var(--cat-from), var(--amber-50, #fff4dc)); border-color: var(--amber-100, #ffe6b3); }
.cat-tile:hover .cat-ic, .cat-card:hover .cat-ic { transform: translateY(-4px) rotate(-4deg); box-shadow: 0 12px 24px rgba(124, 92, 255, .18); }
.cat-name { font-size: 13px; font-weight: 600; line-height: 1.5; color: var(--ink-2); }
@media (min-width: 900px) {
  .cat-rail { flex-wrap: wrap; overflow: visible; gap: 18px; }
  .cat-tile { width: 100px; }
  .cat-ic { width: 78px; height: 78px; border-radius: 26px; }
}
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.cat-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); text-align: center; transition: transform .3s var(--ease), box-shadow .3s; }
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cat-card small { color: var(--muted); }
@media (min-width: 600px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .cat-grid { grid-template-columns: repeat(5, 1fr); gap: 18px; } }

/* ---------- festival strip on home ---------- */
.festival-strip { position: relative; padding: 18px 0 8px; border-radius: var(--r-lg); background: linear-gradient(125deg, var(--f1), var(--f2)); overflow: hidden; }
.festival-strip::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 10% 10%, rgba(255, 255, 255, .25), transparent 40%); pointer-events: none; }
.fs-head { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 0 16px 12px; color: #fff; }
.fs-head h2 { font-size: 20px; margin-top: 6px; }
.fs-more { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .95); color: #221a33; font-size: 13px; font-weight: 700; }
.festival-strip .product-rail { padding: 4px 16px 14px; }

/* ---------- product grid / rail ---------- */
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1000px) { .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }
.product-rail { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 2px 12px; }
.product-rail::-webkit-scrollbar { display: none; }
.product-rail .product-card { flex: 0 0 min(46vw, 220px); scroll-snap-align: start; }
@media (min-width: 900px) { .product-rail .product-card { flex-basis: 232px; } }

.product-card {
  position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary-100); }
.pc-media { position: relative; display: block; aspect-ratio: 1; background: var(--media); overflow: hidden; }
.pc-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.product-card:hover .pc-media img { transform: scale(1.07); }
.pc-badge { position: absolute; top: 10px; right: 10px; padding: 3px 9px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; box-shadow: 0 4px 12px rgba(224, 69, 123, .35); }
.pc-badge.lg { top: 14px; right: 14px; font-size: 13px; padding: 5px 12px; z-index: 2; }
.buy-box .pc-badge { position: static; }
.pc-festival { position: absolute; bottom: 8px; right: 8px; left: 8px; display: flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: linear-gradient(90deg, var(--f1), var(--f2)); color: #fff; font-size: 11px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: fit-content; max-width: calc(100% - 16px); }
.pc-festival .ic { width: 14px; height: 14px; }
.pc-out { position: absolute; inset: 0; display: grid; place-items: center; background: var(--scrim); backdrop-filter: grayscale(1); font-weight: 700; color: var(--ink-2); }
.pc-body { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 12px; flex: 1; }
.pc-title { font-size: 14px; font-weight: 600; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 3.3em; }
.pc-title:hover { color: var(--primary-600); }
.pc-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 12px; }
.pc-rating { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; }
.pc-rating .ic { width: 15px; height: 15px; color: var(--gold); fill: var(--gold); }
.pc-rating.muted .ic { fill: none; color: #cfc6d6; }
.pc-rating small { color: var(--muted); font-weight: 400; }
.pc-low { color: var(--danger); font-weight: 600; }
.pc-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; margin-top: auto; }
.pc-price { display: flex; flex-direction: column; min-width: 0; }
.pc-price del { font-size: 12px; color: var(--muted); }
.pc-price strong { font-size: 15px; white-space: nowrap; }
.pc-price small { font-size: 11px; font-weight: 400; color: var(--muted); }
.pc-add {
  position: relative; flex-shrink: 0; width: 38px; height: 38px; border-radius: 13px; border: 0;
  background: var(--primary-50); color: var(--primary-600); display: grid; place-items: center;
  transition: background .25s, color .25s, transform .25s var(--ease);
}
.pc-add:hover:not(:disabled) { background: var(--grad); color: #fff; transform: rotate(90deg); }
.pc-add:disabled { opacity: .4; cursor: not-allowed; }
.pc-add .i-plus, .pc-add .i-check { grid-area: 1 / 1; display: grid; transition: transform .35s var(--ease), opacity .25s; }
.pc-add .i-check { opacity: 0; transform: scale(.3); }
.pc-add.added { background: var(--ok); color: #fff; transform: none !important; }
.pc-add.added .i-plus { opacity: 0; transform: scale(.3); }
.pc-add.added .i-check { opacity: 1; transform: none; }
@media (max-width: 380px) {
  .pc-price strong { font-size: 13.5px; }
  .pc-add { width: 34px; height: 34px; border-radius: 11px; }
}

/* ---------- chips / filters / pagination ---------- */
.chip-rail { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 12px; }
.chip-rail::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; padding: 7px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--ink-2); transition: all .2s; }
.chip .ic { width: 16px; height: 16px; }
.chip:hover { border-color: var(--primary-100); color: var(--primary-600); }
.chip.active { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }

.filters { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 18px; overflow: hidden; }
.filters summary { display: flex; align-items: center; gap: 8px; padding: 12px 16px; font-weight: 600; cursor: pointer; list-style: none; }
.filters summary::-webkit-details-marker { display: none; }
.filters summary .chev { margin-right: auto; transition: transform .3s var(--ease); }
.filters[open] summary .chev { transform: rotate(180deg); }
.filters-form { display: grid; gap: 12px; padding: 0 16px 16px; animation: fade-up .3s var(--ease); }
.filter-checks { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.filter-actions { display: flex; gap: 8px; }
@media (min-width: 900px) {
  .filters-form { grid-template-columns: 2fr 1fr 1fr; align-items: end; }
  .filter-checks { grid-column: 1 / 3; }
  .filter-actions { justify-content: flex-end; }
}

.toolbar-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 0 14px; }
.chip-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.chip-tabs a { flex-shrink: 0; padding: 6px 12px; border-radius: 999px; font-size: 13px; background: var(--card); border: 1px solid var(--line); }
.chip-tabs a.active { background: linear-gradient(90deg, var(--f1, var(--primary)), var(--f2, var(--violet))); color: #fff; border-color: transparent; }

.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 28px 0 6px; }
.pagination a, .pagination .dots { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-weight: 600; }
.pagination a:hover { border-color: var(--primary-100); color: var(--primary-600); }
.pagination a.active { background: var(--grad); color: #fff; border-color: transparent; }
.pagination .dots { border: 0; background: none; }

/* ---------- forms ---------- */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; font-size: 14px; }
.field > span { font-weight: 600; color: var(--ink-2); }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=search], select, textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--field); outline: none;
  font-size: 15px; transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(224, 69, 123, .1); }
textarea { resize: vertical; min-height: 90px; }
.input-ic { position: relative; display: flex; align-items: center; }
.input-ic > .ic { position: absolute; right: 13px; color: var(--muted); pointer-events: none; }
.input-ic input { padding-right: 42px; }
.pw-toggle { position: absolute; left: 8px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; padding: 6px; border-radius: 8px; }
.pw-toggle:hover { color: var(--primary-600); }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .sw { position: relative; width: 42px; height: 24px; border-radius: 999px; background: var(--switch-off); transition: background .25s; flex-shrink: 0; }
.switch .sw::after { content: ''; position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .15); transition: transform .3s var(--ease); }
.switch input:checked + .sw { background: var(--primary); }
.switch input:checked + .sw::after { transform: translateX(-18px); }
.switch input:focus-visible + .sw { outline: 3px solid rgba(224, 69, 123, .4); }

.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 14px; background: var(--field); overflow: hidden; }
.stepper button { width: 40px; height: 44px; border: 0; background: none; color: var(--primary-600); display: grid; place-items: center; transition: background .2s; }
.stepper button:hover:not(:disabled) { background: var(--primary-50); }
.stepper button:disabled { color: #cfc6d6; cursor: not-allowed; }
.stepper input { width: 46px; border: 0 !important; box-shadow: none !important; text-align: center; padding: 0; font-weight: 700; -moz-appearance: textfield; background: transparent; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper.sm button { width: 34px; height: 36px; }
.stepper.sm input { width: 34px; font-size: 14px; }

/* ---------- auth ---------- */
.auth-wrap { display: grid; place-items: center; padding: 10px 0 20px; }
.auth-card { width: 100%; max-width: 440px; padding: 26px 20px; animation: pop-in .5s var(--ease); }
.auth-card h1 { font-size: 21px; text-align: center; margin-top: 6px; }
.auth-art { display: grid; place-items: center; margin: -4px auto 4px; width: 72px; height: 72px; border-radius: 24px; background: var(--grad); color: #fff; box-shadow: 0 12px 28px rgba(224, 69, 123, .35); animation: float 4s ease-in-out infinite; }
.auth-art .ic { width: 34px; height: 34px; }
.auth-switch { text-align: center; margin: 16px 0 0; font-size: 14px; }

/* ---------- product detail ---------- */
.product-detail { display: grid; gap: 20px; }
@media (min-width: 900px) { .product-detail { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; align-items: start; } }
.gallery { position: relative; min-width: 0; }
@media (min-width: 900px) { .gallery { position: sticky; top: 140px; } }
.gallery-main { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--media); box-shadow: var(--shadow); }
.gallery-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-slide { flex: 0 0 100%; margin: 0; aspect-ratio: 1; scroll-snap-align: start; cursor: zoom-in; }
.gallery-slide img { width: 100%; height: 100%; object-fit: cover; }
.gallery-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--glass); color: var(--ink); display: grid; place-items: center; box-shadow: var(--shadow); transition: transform .2s; }
.gallery-arrow:hover { transform: translateY(-50%) scale(1.08); }
.gallery-arrow.prev { right: 12px; }
.gallery-arrow.next { left: 12px; }
.gallery-dots button { background: rgba(0, 0, 0, .25); }
.gallery-dots button.active { background: var(--primary); }
.gallery-zoom { position: absolute; top: 12px; left: 12px; width: 38px; height: 38px; border-radius: 12px; border: 0; background: var(--glass); color: var(--ink); display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.gallery-thumbs button { flex: 0 0 64px; height: 64px; padding: 0; border-radius: 14px; overflow: hidden; border: 2px solid transparent; background: var(--media); opacity: .6; transition: opacity .25s, border-color .25s, transform .25s var(--ease); }
.gallery-thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs button:hover { opacity: .9; }
.gallery-thumbs button.active { opacity: 1; border-color: var(--primary); transform: translateY(-2px); }

.pd-info h1 { font-size: 22px; margin: 6px 0 10px; }
@media (min-width: 900px) { .pd-info h1 { font-size: 26px; } }
.pd-festival { display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #fff; background: linear-gradient(90deg, var(--f1), var(--f2)); background-size: 200% 100%; animation: grad-move 6s ease infinite; }
.pd-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; font-size: 13px; color: var(--ink-2); }
.pd-rating { display: inline-flex; align-items: center; gap: 8px; }
.pd-cat { display: inline-flex; align-items: center; gap: 4px; }

.stars { display: inline-flex; gap: 1px; direction: ltr; }
.stars .star { display: inline-grid; color: var(--star-off); }
.stars .star .ic { width: 17px; height: 17px; fill: currentColor; stroke-width: 1.2; }
.stars .star.full { color: var(--gold); }
.stars .star.half { color: var(--gold); }
.stars .star.half .ic { fill: #fbdca6; }
.stars.lg .star .ic { width: 24px; height: 24px; }
.stars.sm .star .ic { width: 14px; height: 14px; }

.buy-box { margin: 18px 0; padding: 18px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.bb-price { margin-bottom: 8px; }
.bb-old { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.bb-new { font-size: 26px; font-weight: 700; }
.bb-new small { font-size: 14px; color: var(--muted); font-weight: 400; }
.stock { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; margin: 8px 0 14px; }
.stock.ok { color: var(--ok); }
.stock.out { color: var(--danger); }
.bb-form { display: flex; gap: 10px; flex-wrap: wrap; }
.bb-add { flex: 1; min-width: 180px; }
.bb-perks { list-style: none; padding: 14px 0 0; margin: 14px 0 0; border-top: 1px dashed var(--line); display: grid; gap: 8px; font-size: 13px; color: var(--ink-2); }
.bb-perks li { display: flex; align-items: center; gap: 8px; }
.bb-perks .ic { color: var(--violet); }
.pd-desc h2 { font-size: 17px; margin-bottom: 8px; }
.pd-desc p { color: var(--ink-2); white-space: pre-line; }

/* ---------- reviews ---------- */
.reviews { margin: 36px 0; scroll-margin-top: 130px; }
.reviews-layout { display: grid; gap: 16px; }
@media (min-width: 900px) { .reviews-layout { grid-template-columns: 300px minmax(0, 1fr); align-items: start; gap: 24px; } .rv-summary { position: sticky; top: 140px; } }
.rv-summary { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rv-score { display: flex; align-items: baseline; gap: 6px; }
.rv-score strong { font-size: 44px; line-height: 1.1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rv-bars { width: 100%; display: grid; gap: 6px; margin-top: 6px; }
.rv-bar { display: grid; grid-template-columns: 14px 16px 1fr 28px; align-items: center; gap: 6px; font-size: 13px; }
.rv-bar .ic { width: 14px; height: 14px; color: var(--gold); fill: var(--gold); }
.rv-bar .bar { height: 8px; border-radius: 999px; background: var(--track); overflow: hidden; }
.rv-bar .bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--gold), #ffcf6b); transition: width 1.1s var(--ease); }
.rv-bars.in .bar i { width: var(--w); }
.rv-bar small { color: var(--muted); text-align: left; }
.rv-main { display: grid; gap: 16px; min-width: 0; }
.rv-form-card h3 { font-size: 16px; margin-bottom: 10px; }
.rv-form { display: grid; gap: 12px; }
.rv-login { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 6px 0; }
.rv-note { display: flex; align-items: center; gap: 6px; font-size: 13px; padding: 8px 12px; border-radius: 12px; background: var(--info-bg); color: var(--info); }
.rv-note.warn { background: var(--warn-bg); color: var(--warn); }

.star-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: 4px; }
.star-input input { position: absolute; opacity: 0; pointer-events: none; }
.star-input label { cursor: pointer; color: var(--star-off); transition: transform .2s var(--ease), color .15s; }
.star-input label .ic { width: 34px; height: 34px; fill: currentColor; stroke-width: 1.2; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color: var(--gold); }
.star-input label:hover { transform: scale(1.18) rotate(-8deg); }
.star-input input:checked + label { animation: star-pop .45s var(--ease); }
.star-input input:focus-visible + label { outline: 3px solid rgba(245, 165, 36, .45); border-radius: 8px; }
.star-hint { order: -1; margin-right: 10px; font-size: 14px; font-weight: 700; color: var(--ink-2); min-width: 70px; }

.rv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.rv-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; }
.rv-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.rv-head > div { display: flex; flex-direction: column; line-height: 1.4; margin-left: auto; }
.rv-head small { font-size: 12px; }
.rv-verified { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); }
.rv-verified .ic { width: 14px; height: 14px; }
.rv-text { margin: 10px 0 0; color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; }
.rv-reply { margin-top: 10px; padding: 10px 12px; border-radius: 14px; background: var(--violet-50); border-right: 3px solid var(--violet); font-size: 14px; }
.rv-reply strong { display: flex; align-items: center; gap: 6px; color: var(--violet); font-size: 13px; }
.rv-reply p { margin: 4px 0 0; white-space: pre-line; }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 150; background: rgba(16, 10, 24, .92); display: grid; place-items: center; opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img { max-width: 94vw; max-height: 84vh; border-radius: 16px; object-fit: contain; transform: scale(.92); transition: transform .4s var(--ease), opacity .2s; }
.lightbox.open img { transform: none; }
.lightbox img.swap { opacity: 0; }
.lb-close, .lb-arrow { position: absolute; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; display: grid; place-items: center; transition: background .2s; }
.lb-close:hover, .lb-arrow:hover { background: rgba(255, 255, 255, .26); }
.lb-close { top: 16px; left: 16px; }
.lb-arrow { top: 50%; transform: translateY(-50%); }
.lb-arrow.prev { right: 12px; }
.lb-arrow.next { left: 12px; }
.lb-count { position: absolute; bottom: 20px; color: #fff; font-size: 14px; opacity: .8; }

/* ---------- cart / checkout ---------- */
.cart-layout, .checkout-layout { display: grid; gap: 16px; }
@media (min-width: 900px) {
  .cart-layout, .checkout-layout { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; gap: 24px; }
  .summary { position: sticky; top: 140px; }
}
.cart-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.cart-item { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); transition: box-shadow .3s; }
.cart-item:hover { box-shadow: var(--shadow); }
.ci-img img { width: 84px; height: 84px; border-radius: 16px; object-fit: cover; background: var(--media); }
.ci-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ci-title { font-weight: 600; font-size: 14px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ci-fest { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--violet); }
.ci-fest .ic { width: 13px; height: 13px; }
.ci-unit { font-size: 13px; display: flex; gap: 8px; align-items: center; color: var(--ink-2); }
.ci-unit del { color: var(--muted); font-size: 12px; }
.ci-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.ci-total { grid-column: 1 / -1; text-align: left; font-weight: 700; border-top: 1px dashed var(--line); padding-top: 8px; }
@media (min-width: 640px) {
  .cart-item { grid-template-columns: 100px minmax(0, 1fr) auto; align-items: center; }
  .ci-img img { width: 100px; height: 100px; }
  .ci-total { grid-column: auto; border: 0; padding: 0; }
}
.summary h2 { font-size: 17px; margin-bottom: 12px; }
.sum-row { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; font-size: 14px; color: var(--ink-2); }
.sum-row.save { color: var(--ok); font-weight: 600; }
.sum-row.total { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 12px; font-weight: 700; font-size: 16px; color: var(--ink); }
.summary .btn { margin-top: 10px; }
.mobile-checkout-bar { position: fixed; right: 0; left: 0; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); z-index: 70; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(71, 35, 90, .08); animation: slide-up .4s var(--ease); }
.mobile-checkout-bar div { display: flex; flex-direction: column; line-height: 1.4; }
.mobile-checkout-bar small { color: var(--muted); font-size: 12px; }
@media (min-width: 900px) { .mobile-checkout-bar { display: none; } }
@media (max-width: 899px) { body:has(.mobile-checkout-bar) .page-main { padding-bottom: 90px; } .cart-layout .summary > .btn { display: none; } }

.mini-items { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 10px; }
.mini-items li { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 13px; }
.mini-items img { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; }
.mi-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mi-title small { color: var(--muted); }

.steps { display: flex; align-items: center; gap: 6px; margin: 4px 0 18px; font-size: 12px; color: var(--muted); overflow-x: auto; }
.steps span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; padding: 6px 10px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.steps span.done { color: var(--ok); border-color: #c7eedb; }
.steps span.current { color: #fff; background: var(--grad); border-color: transparent; }
.steps i { flex: 1; min-width: 12px; height: 2px; background: var(--line); border-radius: 2px; }

/* ---------- orders ---------- */
.order-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
@media (min-width: 700px) { .order-list { grid-template-columns: repeat(2, 1fr); } }
.order-card { display: grid; gap: 10px; }
.oc-head, .oc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.order-card .btn { justify-self: start; }
.info-list { display: grid; gap: 0; margin-bottom: 16px; }
.info-list > div { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.info-list > div:last-child { border-bottom: 0; }
.info-list > div > span:first-child { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
.info-list > div > span:last-child { text-align: left; overflow-wrap: anywhere; }
.line-items { list-style: none; margin: 0 0 16px; display: grid; gap: 0; }
.line-items li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.line-items li .muted { grid-row: 2; font-size: 13px; }
.line-items li strong { grid-row: 1 / 3; grid-column: 2; align-self: center; }
.line-items .li-total { border-bottom: 0; font-size: 16px; }
.line-items .li-total strong { grid-row: auto; }
.track { display: flex; align-items: center; margin: 4px 0 18px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.track-step { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); text-align: center; }
.track-step span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 14px; background: var(--track); transition: background .4s; }
.track-step.done { color: var(--ink); font-weight: 600; }
.track-step.done span { background: var(--grad); color: #fff; animation: pop-in .5s var(--ease) both; }
.track-line { flex: 1; height: 3px; margin: 0 6px 18px; border-radius: 3px; background: var(--track); position: relative; overflow: hidden; }
.track-line.done::after { content: ''; position: absolute; inset: 0; background: var(--grad); animation: grow-x .8s var(--ease) both; transform-origin: right; }

.result-card { max-width: 520px; margin: 20px auto; text-align: center; padding: 30px 20px; animation: pop-in .5s var(--ease); }
.result-card h1 { font-size: 21px; margin: 12px 0 6px; }
.result-ic { display: grid; place-items: center; width: 88px; height: 88px; margin: 0 auto; border-radius: 30px; }
.result-ic .ic { width: 46px; height: 46px; }
.result-card.ok .result-ic { background: var(--ok-bg); color: var(--ok); animation: pop-in .6s var(--ease) .1s both; }
.result-card.fail .result-ic { background: var(--danger-bg); color: var(--danger); animation: shake .6s .2s; }
.result-card .info-list { text-align: right; margin: 16px 0; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* ---------- trust strip & footer ---------- */
.trust-strip { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 10px; margin-bottom: 24px; }
@media (min-width: 900px) { .trust-strip { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
.trust-item { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); }
.trust-item div { display: flex; flex-direction: column; line-height: 1.5; min-width: 0; }
.trust-item strong { font-size: 14px; }
.trust-item small { font-size: 12px; color: var(--muted); }
.trust-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: var(--violet-50); color: var(--violet); flex-shrink: 0; transition: transform .4s var(--ease); }
.trust-item:hover .trust-ic { transform: rotate(-10deg) scale(1.08); }

.site-footer { position: relative; z-index: 1; background: var(--footer-bg); color: #d9d0e2; border-radius: 28px 28px 0 0; overflow: hidden; }
.site-footer::before { content: ''; position: absolute; top: -120px; left: -80px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(224, 69, 123, .35), transparent 70%); pointer-events: none; }
.footer-grid { position: relative; display: grid; gap: 26px; padding-top: 32px; padding-bottom: 26px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1.4fr auto; gap: 36px; } }
.site-footer h3 { font-size: 15px; color: #fff; margin-bottom: 12px; }
.logo-light .logo-text { background: linear-gradient(90deg, #fff, #ffc2d8); -webkit-background-clip: text; background-clip: text; }
.footer-about { margin-top: 12px; font-size: 14px; line-height: 1.9; color: #b9aec6; white-space: pre-line; }
.socials { display: flex; gap: 8px; margin-top: 12px; }
.socials a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; background: rgba(255, 255, 255, .08); color: #fff; transition: background .25s, transform .25s var(--ease); }
.socials a:hover { background: var(--grad); transform: translateY(-3px); }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; font-size: 14px; }
@media (min-width: 800px) { .footer-links { grid-template-columns: 1fr; } }
.footer-links a { color: #b9aec6; transition: color .2s, padding .2s; }
.footer-links a:hover { color: #fff; padding-right: 4px; }
.footer-contact ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; font-size: 14px; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.8; }
.footer-contact a:hover { color: #fff; }
.fc-ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: rgba(255, 255, 255, .08); color: #ffb0cb; flex-shrink: 0; }
.fc-ic .ic { width: 18px; height: 18px; }
.enamad-box { background: #fff; border-radius: 16px; padding: 8px; width: fit-content; height: fit-content; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding: 14px 0; font-size: 13px; color: #8e83a0; text-align: center; }

/* ---------- theme toggle ---------- */
.theme-btn { position: relative; overflow: hidden; }
.theme-btn .t-moon, .theme-btn .t-sun { position: absolute; inset: 0; display: grid; place-items: center; transition: transform .45s var(--ease), opacity .3s; }
.theme-btn .t-sun { transform: translateY(120%) rotate(-90deg); opacity: 0; }
[data-theme="dark"] .theme-btn .t-moon { transform: translateY(-120%) rotate(90deg); opacity: 0; }
[data-theme="dark"] .theme-btn .t-sun { transform: none; opacity: 1; color: var(--gold); }
@media (max-width: 599px) { .header-actions .theme-btn { display: none; } }
.drawer-theme { display: flex; align-items: center; gap: 12px; padding: 11px 10px; border-radius: 12px; font-size: 15px; color: var(--ink-2); background: none; border: 0; width: 100%; text-align: right; }
.drawer-theme:hover { background: var(--primary-50); color: var(--primary-600); }
.theme-anim, .theme-anim *, .theme-anim *::before, .theme-anim *::after { transition: background-color .4s ease, color .4s ease, border-color .4s ease, fill .4s ease !important; }

/* ---------- wallet ---------- */
.dd-wallet b { margin-right: auto; font-size: 12px; color: var(--ok); }
.drawer-user { color: inherit; }
.drawer-wallet { display: flex; align-items: center; gap: 10px; margin: 8px 16px 0; padding: 10px 12px; border-radius: 14px; background: linear-gradient(120deg, #2b1d42, #5b3aa8); color: #fff; font-size: 14px; }
.drawer-wallet b { margin-right: auto; font-size: 13px; }
.wallet-layout { display: grid; gap: 16px; align-items: start; }
@media (min-width: 900px) { .wallet-layout { grid-template-columns: 380px minmax(0, 1fr); gap: 24px; } }
.wallet-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: var(--r-lg); color: #fff; margin-bottom: 16px;
  background: linear-gradient(125deg, #2b1d42, #7c5cff 55%, #e0457b); background-size: 200% 200%; animation: grad-move 12s ease infinite; box-shadow: 0 16px 40px rgba(124, 92, 255, .35);
}
.wallet-card.mini { transition: transform .3s var(--ease); }
.wallet-card.mini:hover { transform: translateY(-3px); }
.wc-top { display: flex; align-items: center; gap: 10px; font-size: 14px; opacity: .92; }
.wc-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 14px; background: rgba(255, 255, 255, .18); }
.wc-balance { font-size: 30px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.wc-balance small { font-size: 14px; font-weight: 400; opacity: .85; }
.wc-sub { font-size: 12px; opacity: .8; }
.wc-cta { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .2); font-size: 13px; font-weight: 600; }
.wc-shapes i { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .12); animation: float 6s ease-in-out infinite; }
.wc-shapes i:first-child { width: 160px; height: 160px; left: -50px; top: -60px; }
.wc-shapes i:last-child { width: 80px; height: 80px; left: 30%; bottom: -30px; animation-delay: -3s; }
.quick-amounts { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-amounts .chip { cursor: pointer; }
.quick-amounts .chip.active { background: var(--grad); border-color: transparent; color: #fff; }
.tx-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.tx-list li { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px dashed var(--line); }
.tx-list li:last-child { border-bottom: 0; }
.tx-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; flex-shrink: 0; }
.tx-ic.in { background: var(--ok-bg); color: var(--ok); }
.tx-ic.out { background: var(--danger-bg); color: var(--danger); }
.tx-info { display: flex; flex-direction: column; min-width: 0; line-height: 1.6; flex: 1; }
.tx-info small { font-size: 12px; overflow-wrap: anywhere; }
.tx-amount { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.6; flex-shrink: 0; }
.tx-amount strong { font-variant-numeric: tabular-nums; }
.tx-amount.in strong { color: var(--ok); }
.tx-amount.out strong { color: var(--danger); }
.tx-amount small { font-size: 11px; }

/* ---------- account ---------- */
.account-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; animation: fade-up .5s var(--ease); }
.avatar.xl { width: 64px; height: 64px; border-radius: 22px; font-size: 26px; }
.ah-info h1 { font-size: 20px; }
.ah-info p { margin: 0; font-size: 13px; }
.account-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.account-stats .card { display: flex; flex-direction: column; align-items: center; padding: 14px 8px; text-align: center; }
.account-stats strong { font-size: 22px; }
.account-stats small { font-size: 12px; color: var(--muted); }
.account-links { padding: 6px; display: grid; }
.account-links a, .account-links button { display: flex; align-items: center; gap: 12px; padding: 12px 10px; border-radius: 14px; border: 0; background: none; width: 100%; text-align: right; font-size: 15px; color: var(--ink); transition: background .2s; }
.account-links a:hover, .account-links button:hover { background: var(--primary-50); }
.account-links a > .ic:last-child, .account-links > button > .ic:last-child { margin-right: auto; color: var(--muted); }
.account-links .danger { color: var(--danger); }
.al-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--primary-50); color: var(--primary-600); }
@media (min-width: 900px) { .account-hero, .account-stats, .account-links, .wallet-card.mini { max-width: 720px; margin-left: auto; margin-right: auto; } .wallet-card.mini { display: flex; } }

/* ---------- discount code / payment options ---------- */
.coupon-box { margin: 12px 0 4px; }
.coupon-form { display: flex; gap: 8px; }
.coupon-form .input-ic { flex: 1; }
.coupon-form input { text-transform: uppercase; letter-spacing: .5px; }
.coupon-applied { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 1.5px dashed var(--ok); background: var(--ok-bg); animation: pop-in .45s var(--ease); }
.coupon-applied div { display: flex; flex-direction: column; line-height: 1.5; flex: 1; min-width: 0; }
.coupon-applied strong { letter-spacing: 1px; direction: ltr; text-align: right; }
.coupon-applied small { font-size: 12px; color: var(--ok); }
.coupon-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--ok); color: #fff; flex-shrink: 0; }
.code-tag { display: inline-block; padding: 0 8px; border-radius: 6px; background: var(--ok-bg); color: var(--ok); font-size: 12px; letter-spacing: .5px; direction: ltr; }
.checkout-main { display: grid; gap: 16px; min-width: 0; }
.pay-option { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; border: 1.5px solid var(--line); margin-bottom: 10px; cursor: pointer; transition: border-color .2s, background .2s; }
.pay-option:last-child { margin-bottom: 0; }
.pay-option:has(input:checked) { border-color: var(--primary); background: var(--primary-50); }
.pay-option.disabled { opacity: .6; cursor: default; }
.pay-option.static { cursor: default; }
.po-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: var(--violet-50); color: var(--violet); flex-shrink: 0; }
.po-ic.zp { background: var(--info-bg); color: var(--info); }
.po-text { display: flex; flex-direction: column; line-height: 1.5; flex: 1; min-width: 0; }
.po-text small { color: var(--muted); font-size: 12px; }
.sum-row .bump, [data-gateway-part].bump { animation: bump .5s var(--ease); display: inline-block; }
.line-items .li-sub { font-size: 14px; }
.line-items .li-sub strong { grid-row: auto; }
.save { color: var(--ok); }

/* ==========================================================================
   Dark mode
   ========================================================================== */
[data-theme="dark"] {
  color-scheme: dark;
  --primary-600: #ff7ea9;
  --primary-50: rgba(224, 69, 123, .14);
  --primary-100: rgba(224, 69, 123, .32);
  --violet: #a28bff;
  --violet-50: rgba(124, 92, 255, .16);
  --ink: #f3eef8;
  --ink-2: #d3cadf;
  --muted: #9c93ae;
  --line: #2f2739;
  --bg: #110d17;
  --card: #1a1522;
  --ok: #3fd49a; --ok-bg: rgba(17, 163, 106, .16);
  --warn: #ffb547; --warn-bg: rgba(199, 119, 0, .18);
  --danger: #ff6b70; --danger-bg: rgba(229, 72, 77, .16);
  --info: #7aa2ff; --info-bg: rgba(47, 107, 255, .16);
  --field: #211a2b;
  --soft: #211a2b;
  --media: #231c2d;
  --track: #2f2739;
  --switch-off: #3b3247;
  --star-off: #3b3247;
  --header-bg: rgba(20, 15, 27, .86);
  --tabbar-bg: rgba(20, 15, 27, .94);
  --glass: rgba(34, 27, 44, .9);
  --on-ink: #16111e;
  --cat-from: #1f1829;
  --ring: #1a1522;
  --footer-bg: #0c0910;
  --scrim: rgba(17, 13, 23, .65);
  --amber-50: rgba(245, 165, 36, .14);
  --amber-100: rgba(245, 165, 36, .3);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 6px 24px rgba(0, 0, 0, .35);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, .5);
}
[data-theme="dark"] .blob { opacity: .14; }
[data-theme="dark"] .site-header.scrolled { box-shadow: 0 6px 24px rgba(0, 0, 0, .4); }
[data-theme="dark"] .toast { background: #2a2136; color: #fff; }
[data-theme="dark"] .tone-ok { color: #3fd49a; }
[data-theme="dark"] .tone-warn { color: #ffb547; }
[data-theme="dark"] .tone-danger { color: #ff7c80; }
[data-theme="dark"] .tone-info { color: #8fb0ff; }
[data-theme="dark"] .alert-ok { color: #6fe3b3; }
[data-theme="dark"] .alert-error { color: #ff9ca0; }
[data-theme="dark"] .sh-ic.hot { background: rgba(255, 107, 44, .15); }
[data-theme="dark"] .sh-ic.gold { background: rgba(245, 165, 36, .15); }
[data-theme="dark"] .cat-tile:nth-child(3n) .cat-ic, [data-theme="dark"] .cat-card:nth-child(3n) .cat-ic { color: #ffb547; }
[data-theme="dark"] .pc-badge { box-shadow: none; }
[data-theme="dark"] .product-card:hover { border-color: rgba(224, 69, 123, .4); }
[data-theme="dark"] .rv-reply { background: rgba(124, 92, 255, .12); }
[data-theme="dark"] .steps span.done { border-color: rgba(63, 212, 154, .3); }
[data-theme="dark"] img[src$="placeholder.svg"] { filter: invert(.9) hue-rotate(180deg) brightness(.9); }
[data-theme="dark"] .mobile-checkout-bar { box-shadow: 0 -8px 24px rgba(0, 0, 0, .4); }
[data-theme="dark"] .pd-desc p, [data-theme="dark"] .rv-text { color: var(--ink-2); }

/* ---------- scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: calc(min(var(--i, 0), 8) * 40ms); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- keyframes ---------- */
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pop-in { 0% { opacity: 0; transform: scale(.85); } 70% { transform: scale(1.03); } 100% { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes blob { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(40px, 30px) scale(1.12); } 100% { transform: translate(-30px, 50px) scale(.95); } }
@keyframes grad-move { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.12) translate(-2%, 1%); } }
@keyframes twinkle { 0%, 100% { transform: scale(1) rotate(0); opacity: 1; } 50% { transform: scale(1.25) rotate(15deg); opacity: .75; } }
@keyframes bump { 0% { transform: scale(1); } 30% { transform: scale(1.5); } 60% { transform: scale(.9); } 100% { transform: scale(1); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(20px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(12px) scale(.96); } }
@keyframes tab-in { from { width: 0; } to { width: 28px; } }
@keyframes tick { 0% { transform: translateY(-40%); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes star-pop { 0% { transform: scale(1); } 40% { transform: scale(1.45) rotate(-12deg); } 100% { transform: scale(1); } }
@keyframes slide-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes fly { 0% { opacity: 1; transform: translate(0, 0) scale(1); } 100% { opacity: .2; transform: translate(var(--dx), var(--dy)) scale(.3); } }
.fly-dot { position: fixed; z-index: 200; width: 16px; height: 16px; border-radius: 50%; background: var(--grad); box-shadow: 0 4px 12px rgba(224, 69, 123, .5); pointer-events: none; animation: fly .7s cubic-bezier(.5, -.3, .7, .9) forwards; }

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

/* ---------- favorites ---------- */
.product-card { position: relative; }
.pc-fav-form { position: absolute; top: 8px; left: 8px; z-index: 3; }
.fav-btn { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 12px; border: 0; background: var(--glass); color: var(--muted); box-shadow: var(--shadow-sm); backdrop-filter: blur(6px); transition: color .2s, transform .25s var(--ease), background .2s; }
.fav-btn .ic { width: 20px; height: 20px; transition: fill .2s; }
.fav-btn:hover { color: var(--primary); transform: scale(1.08); }
.fav-btn.is-fav { color: var(--primary); }
.fav-btn.is-fav .ic { fill: currentColor; }
.fav-btn.pop { animation: heart-pop .5s var(--ease); }
.fav-btn.lg { width: 44px; height: 44px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.fav-btn.lg .ic { width: 22px; height: 22px; }
@keyframes heart-pop { 0% { transform: scale(1); } 35% { transform: scale(1.35); } 60% { transform: scale(.9); } 100% { transform: scale(1); } }
.fav-link { position: relative; color: var(--primary-600); }
.fav-link .cart-badge { top: -6px; left: -6px; }
.dd-count { margin-right: auto; font-size: 12px; color: var(--primary-600); }
.product-card.removing { animation: card-out .35s var(--ease) forwards; }
@keyframes card-out { to { opacity: 0; transform: scale(.9); } }

/* ---------- product title row + share ---------- */
.pd-title-row { display: flex; align-items: flex-start; gap: 12px; margin: 6px 0 10px; }
.pd-title-row h1 { flex: 1; margin: 0; }
.pd-tools { display: flex; gap: 8px; flex-shrink: 0; }
.share { position: relative; }
.share .icon-btn { width: 44px; height: 44px; }
.share-menu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 40; min-width: 210px; padding: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.98); transform-origin: top left; transition: opacity .2s, transform .25s var(--ease), visibility .2s;
}
.share.open .share-menu { opacity: 1; visibility: visible; transform: none; }
.share-title { display: block; font-size: 13px; padding: 4px 8px 8px; color: var(--muted); }
.share-menu a, .share-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border-radius: 10px; border: 0; background: none; font-size: 14px; text-align: right; color: var(--ink); }
.share-menu a:hover, .share-menu button:hover { background: var(--primary-50); }
.sh-i { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; color: #fff; flex-shrink: 0; }
.sh-i .ic { width: 18px; height: 18px; }
.sh-i.copy { background: var(--violet); }
.sh-i.tg { background: #2aa3df; }
.sh-i.wa { background: #25b865; }
.sh-i.x { background: #1a1a1a; }
.sh-i.mail { background: #e0457b; }
[data-theme="dark"] .sh-i.x { background: #3a3a3a; }

/* ---------- payment gateway choice ---------- */
.gateway-list { display: grid; gap: 8px; margin-top: 12px; }
.gateway-list[hidden] { display: none; }
.gateway-list.compact { margin-top: 0; }
.gl-title { display: flex; align-items: center; gap: 6px; margin: 0 0 2px; font-size: 13px; color: var(--muted); }
.gateway-option { margin-bottom: 0; }
.gateway-option input { position: absolute; opacity: 0; pointer-events: none; }
.po-radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); flex-shrink: 0; position: relative; transition: border-color .2s; }
.po-radio::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--primary); transform: scale(0); transition: transform .25s var(--ease); }
.gateway-option:has(input:checked) { border-color: var(--primary); background: var(--primary-50); }
.gateway-option:has(input:checked) .po-radio { border-color: var(--primary); }
.gateway-option:has(input:checked) .po-radio::after { transform: scale(1); }
.gateway-option:has(input:focus-visible) { outline: 3px solid rgba(224, 69, 123, .35); }
.po-ic.gw-snapppay { background: rgba(0, 200, 83, .12); color: #0fa958; }
.po-ic.gw-digipay { background: rgba(47, 107, 255, .12); color: var(--info); }
.po-ic.gw-sep { background: rgba(0, 87, 184, .12); color: #2f6bff; }

/* ---------- product tags ---------- */
.pd-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.tag-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; border-radius: 999px; background: var(--violet-50); color: var(--violet); font-size: 13px; font-weight: 600; transition: background .2s, color .2s, transform .2s var(--ease); }
.tag-chip .ic { width: 15px; height: 15px; }
.tag-chip:hover { background: var(--violet); color: #fff; transform: translateY(-2px); }

/* ---------- quick search suggestions ---------- */
.search-form { position: relative; }
.suggest { position: absolute; top: calc(100% + 8px); right: 0; left: 0; z-index: 75; max-height: min(70vh, 520px); overflow-y: auto; padding: 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg); animation: fade-up .2s var(--ease); }
.suggest[hidden] { display: none; }
.sg-title { font-size: 12px; font-weight: 700; color: var(--muted); padding: 6px 8px 4px; }
.sg-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; color: var(--ink); }
.sg-item:hover, .sg-item.active { background: var(--primary-50); }
.sg-item img { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; background: var(--media); flex-shrink: 0; }
.sg-item .sg-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.5; }
.sg-item .sg-text strong { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-item .sg-text small { font-size: 12px; color: var(--muted); }
.sg-item mark { background: none; color: var(--primary-600); font-weight: 700; }
.sg-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 6px 6px; }
.sg-chips a { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: var(--violet-50); color: var(--violet); font-size: 13px; font-weight: 600; }
.sg-chips a.active, .sg-chips a:hover { background: var(--violet); color: #fff; }
.sg-chips a small { opacity: .75; }
.sg-all { display: block; text-align: center; padding: 10px; margin-top: 4px; border-top: 1px dashed var(--line); font-size: 13px; font-weight: 700; color: var(--primary-600); }
.sg-empty { padding: 14px; text-align: center; color: var(--muted); font-size: 14px; }
.forgot-link { justify-self: start; margin-top: -6px; font-size: 13px; font-weight: 600; color: var(--primary-600); }
.forgot-link:hover { text-decoration: underline; }
