/* ==========================================================================
   UI — طراحی جدید فروشگاه
   اصل‌ها: بدون سایه، بدون خط‌کشی؛ جداسازی فقط با لایه‌های رنگی (tonal layers)،
   گوشه‌های نرم، رنگ برند از تنظیمات فروشگاه (--primary) و دو تم روز/شب.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --on-brand: #fff;

  --r-xs: 10px;
  --r-sm: 16px;
  --r-md: 22px;
  --r-lg: 30px;
  --r-pill: 999px;

  --ease: cubic-bezier(.2, .8, .2, 1);
  --t: .22s var(--ease);

  --header-h: 72px;
  --tabbar-h: 68px;

  color-scheme: light;

  --bg: #f2f0ea;
  --surface: #fffefb;
  --surface-2: #eae7df;
  --surface-3: #ddd9ce;
  --text: #1b1e1a;
  --muted: #6a6e66;

  --brand: var(--primary);
  --accent: color-mix(in srgb, var(--primary) 92%, #000);
  --brand-hover: color-mix(in srgb, var(--primary) 86%, #000);
  --tint: color-mix(in srgb, var(--brand) 10%, var(--surface));
  --tint-2: color-mix(in srgb, var(--brand) 17%, var(--surface));

  --ok: #15803d;
  --warn: #b45309;
  --info: #0369a1;
  --danger: #b91c1c;

  /* نام‌های قدیمی که قالب‌ها / فایل‌های دیگر هنوز استفاده می‌کنند */
  --card-bg: var(--surface-2);
  --border: var(--surface-2);
  --toast-warning: var(--warn);
  --toast-error: var(--danger);
  --toast-success: var(--ok);
  --toast-info: var(--info);
  --swiper-theme-color: var(--brand);
}

[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0d100e;
  --surface: #151915;
  --surface-2: #1e231f;
  --surface-3: #2a312b;
  --text: #e9ece6;
  --muted: #98a095;

  --brand: color-mix(in srgb, var(--primary) 78%, #fff);
  --accent: color-mix(in srgb, var(--primary) 42%, #fff);
  --brand-hover: color-mix(in srgb, var(--primary) 66%, #fff);
  --tint: color-mix(in srgb, var(--brand) 14%, var(--surface));
  --tint-2: color-mix(in srgb, var(--brand) 22%, var(--surface));

  --ok: #4ade80;
  --warn: #fbbf24;
  --info: #38bdf8;
  --danger: #f87171;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  direction: rtl;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-width: thin;
  scrollbar-color: var(--surface-3) transparent;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: 'font', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.9;
  background: var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
  transition: background-color .3s, color .3s;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote { margin: 0; }
h1, h2, h3, h4, h5, h6 { line-height: 1.5; font-weight: 700; }
a { color: inherit; text-decoration: none; cursor: pointer; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
small { font-size: .82em; }
del { opacity: .65; }
[hidden] { display: none !important; }

::selection { background: color-mix(in srgb, var(--brand) 30%, transparent); }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--brand) 70%, transparent);
  outline-offset: 2px;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: var(--r-pill); }

.container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 20px; }
.page { min-height: 100dvh; display: flex; flex-direction: column; }
.page-main { flex: 1; padding-block: 12px 56px; }
.page-main > .container { padding-block: 0; }

.hidden-w { display: none !important; }
@media (max-width: 860px) {
  .hidden-m { display: none !important; }
  .hidden-w { display: inline-flex !important; }
  .container { padding-inline: 14px; }
  body:not(.no-tabbar) { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
}

/* ---------- Reveal on scroll ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js [data-reveal].in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- Buttons ---------- */
.btn, .btn-submit {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 24px;
  border-radius: var(--r-pill);
  background: var(--surface-2); color: var(--text);
  font-size: 14.5px; white-space: nowrap;
  transition: background var(--t), color var(--t), transform .12s;
}
.btn:hover { background: var(--surface-3); }
.btn:active, .btn-submit:active { transform: scale(.97); }
.btn[disabled], .btn-submit[disabled] { opacity: .5; pointer-events: none; }

.btn-primary, .btn-submit { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover, .btn-submit:hover { background: var(--brand-hover); }
.btn-soft { background: var(--tint-2); color: var(--accent); }
.btn-soft:hover { background: color-mix(in srgb, var(--brand) 26%, var(--surface)); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-block, .btn-submit { width: 100%; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 13px; }
.btn .bx { font-size: 1.25em; }

.icon-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: var(--r-pill);
  font-size: 22px;
  transition: background var(--t), transform .12s;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(.92); }
.icon-btn .badge {
  position: absolute; top: 3px; inset-inline-start: 2px;
  min-width: 19px; height: 19px; padding: 0 5px;
  display: grid; place-items: center;
  border-radius: var(--r-pill);
  background: var(--brand); color: var(--on-brand);
  font-size: 11px; line-height: 1;
  transform: scale(0); transition: transform .3s var(--ease);
}
.icon-btn .badge.show { transform: scale(1); }
.icon-btn .badge.bump { animation: bump .4s var(--ease); }
@keyframes bump { 50% { transform: scale(1.45); } }

/* ---------- Forms ---------- */
input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 16px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--text);
  transition: background var(--t), outline-color var(--t);
}
textarea { min-height: 110px; resize: vertical; line-height: 1.9; }
select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  padding-inline-end: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 14px center;
}
select option { background: var(--surface); color: var(--text); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input:not([type=checkbox]):not([type=radio]):focus, select:focus, textarea:focus {
  background: var(--surface);
  outline: 2px solid color-mix(in srgb, var(--brand) 55%, transparent);
}
input[type=checkbox], input[type=radio] { accent-color: var(--brand); width: 18px; height: 18px; }
input[type=number] { -moz-appearance: textfield; }

.form-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.form-group label, .form-label { font-size: 13.5px; color: var(--muted); }
.form-group small { color: var(--muted); font-size: 12px; }
.errorlist { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.errorlist li {
  font-size: 12.5px; color: var(--danger);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  padding: 4px 12px; border-radius: var(--r-xs);
}

/* ---------- Toast (Toastify) ---------- */
.toastify {
  padding: 12px 22px !important;
  border: 0 !important; box-shadow: none !important;
  background: var(--text) !important; color: var(--bg) !important;
  border-radius: var(--r-pill) !important;
  font-size: 14px; max-width: min(92vw, 460px) !important;
  line-height: 1.7;
}
@media (max-width: 860px) {
  .toastify.toastify-bottom { margin-bottom: calc(var(--tabbar-h) - 6px); }
}

/* ---------- Loader ---------- */
.loading-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: grid; place-items: center;
  background: var(--bg);
  transition: opacity .45s ease, visibility .45s;
}
.loading-overlay.loaded { opacity: 0; visibility: hidden; pointer-events: none; }
.loading-overlay > div { display: grid; justify-items: center; gap: 18px; user-select: none; }
.loading-overlay h3 { font-size: 20px; color: var(--accent); }
.loader-dots { display: flex; gap: 8px; }
.loader-dots span {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--brand);
  animation: dot 1.2s infinite ease-in-out both;
}
.loader-dots span:nth-child(1) { animation-delay: -.3s; }
.loader-dots span:nth-child(2) { animation-delay: -.15s; }
@keyframes dot { 0%, 80%, 100% { transform: scale(.5); opacity: .35; } 40% { transform: scale(1); opacity: 1; } }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 900;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  backdrop-filter: blur(20px) saturate(1.5);
}
.hdr-main {
  display: flex; align-items: center; gap: 14px;
  min-height: var(--header-h);
  padding-block: 10px;
}
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand img { width: 46px; height: 46px; border-radius: 16px; object-fit: cover; background: var(--surface-2); }
.brand-name { font-size: 18px; font-weight: 700; white-space: nowrap; }

.hdr-search {
  flex: 1; max-width: 560px; margin-inline: auto;
  display: flex; align-items: center; gap: 4px;
  height: 48px; padding-inline: 18px 6px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  transition: background var(--t), outline-color var(--t);
}
.hdr-search:focus-within { background: var(--surface); outline: 2px solid color-mix(in srgb, var(--brand) 50%, transparent); }
.hdr-search > .bx { font-size: 20px; color: var(--muted); }
.hdr-search input {
  flex: 1; min-width: 0; min-height: 0; height: 100%;
  padding: 0 8px; background: transparent !important; outline: none !important; border-radius: 0;
}
.hdr-search button {
  height: 36px; padding: 0 18px;
  border-radius: var(--r-pill);
  background: var(--brand); color: var(--on-brand); font-size: 13px;
}
.hdr-search button:hover { background: var(--brand-hover); }

.hdr-actions { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.hdr-actions .account-link {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding-inline: 8px 16px;
  border-radius: var(--r-pill);
  background: var(--tint-2); color: var(--accent); font-size: 14px;
  transition: background var(--t);
}
.hdr-actions .account-link:hover { background: color-mix(in srgb, var(--brand) 28%, var(--surface)); }
.hdr-actions .account-link .bx {
  width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 50%; background: var(--brand); color: var(--on-brand); font-size: 18px;
}
.hdr-actions .account-link.guest { padding-inline: 18px; background: var(--brand); color: var(--on-brand); }
.hdr-actions .account-link.guest:hover { background: var(--brand-hover); }
.hdr-actions .account-link.guest .bx { width: auto; height: auto; background: none; font-size: 19px; }

/* nav strip */
.hdr-nav { padding-bottom: 10px; }
.mega-menu-container { position: relative; display: flex; align-items: center; gap: 6px; }
.nav-first { display: flex; align-items: center; gap: 4px; flex: 1; }
.mega-menu-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding-inline: 18px;
  border-radius: var(--r-pill);
  background: var(--text); color: var(--bg);
  font-size: 14px; user-select: none;
  transition: background var(--t), opacity var(--t);
}
.mega-menu-trigger:hover { opacity: .88; }
.mega-menu-trigger .bx-chevron-down { transition: transform var(--t); }
.mega-menu-container.active .mega-menu-trigger .bx-chevron-down { transform: rotate(180deg); }
.divider_menu { display: flex; align-items: center; gap: 2px; margin-inline-start: 8px; }
.divider_menu a {
  height: 42px; padding-inline: 16px; display: inline-flex; align-items: center;
  border-radius: var(--r-pill); font-size: 14px; color: var(--muted);
  transition: background var(--t), color var(--t);
}
.divider_menu a:hover, .divider_menu a.active { background: var(--surface-2); color: var(--text); }
.hdr-phone {
  display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding-inline: 16px;
  border-radius: var(--r-pill);
  background: var(--surface-2); font-size: 14px;
  transition: background var(--t);
}
.hdr-phone:hover { background: var(--tint-2); color: var(--accent); }
.hdr-phone .bx { color: var(--accent); font-size: 18px; }

.mega-menu {
  position: absolute; top: calc(100% + 10px); inset-inline-start: 0;
  width: min(780px, 92vw);
  background: var(--surface);
  border-radius: var(--r-lg);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity var(--t), transform var(--t), visibility var(--t);
  z-index: 950; overflow: hidden;
}
.mega-menu-container.active .mega-menu { opacity: 1; visibility: visible; transform: none; }
.mega-menu-layout { display: grid; grid-template-columns: 230px 1fr; min-height: 280px; }
.categories-sidebar { padding: 12px; background: var(--surface-2); display: flex; flex-direction: column; gap: 2px; max-height: 380px; overflow-y: auto; }
.category-item {
  padding: 10px 16px; border-radius: var(--r-sm); font-size: 14px; color: var(--muted);
  transition: background .12s, color .12s;
}
.category-item:hover { color: var(--text); background: var(--surface-3); }
.category-item.active { background: var(--surface); color: var(--accent); }
.brands-sidebar { padding: 20px 24px; }
.brands-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.brands-header h4 { font-size: 16px; color: var(--accent); }
.brands-header a { font-size: 13px; padding: 4px 16px; border-radius: var(--r-pill); background: var(--tint-2); color: var(--accent); }
.brands-group ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 4px; max-height: 280px; overflow-y: auto; }
.brands-group ul a { display: block; padding: 6px 12px; border-radius: var(--r-xs); font-size: 14px; color: var(--muted); }
.brands-group ul a:hover { background: var(--surface-2); color: var(--text); }

/* compact on scroll (mobile) */
@media (max-width: 860px) {
  .hdr-main { flex-wrap: wrap; gap: 6px 8px; min-height: 0; padding-block: 8px; }
  .brand img { width: 40px; height: 40px; border-radius: 14px; }
  .brand-name { font-size: 16px; }
  .brand { flex: 1; }
  .hdr-actions { margin-inline-start: 0; }
  .hdr-search { order: 5; flex: 1 0 100%; max-width: none; height: 44px; margin: 0; transition: height .25s var(--ease), opacity .2s, margin .25s; }
  .site-header.is-compact .hdr-search { height: 0; opacity: 0; margin-top: -6px; overflow: hidden; pointer-events: none; }
  .hdr-search button { display: none; }
  .hdr-actions .account-link span.label { display: none; }
  .hdr-actions .account-link { padding: 0; width: 44px; justify-content: center; background: none; }
  .hdr-actions .account-link .bx { background: none; color: inherit; font-size: 22px; width: auto; height: auto; }
  .hdr-actions .account-link.guest { background: none; color: inherit; padding: 0; }
  .hdr-actions .account-link.guest:hover { background: var(--surface-2); }
}

/* ---------- Mobile drawer menu ---------- */
.scrim {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(8, 12, 9, .5);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.scrim.active { opacity: 1; visibility: visible; }

#mobileMenu {
  position: fixed; top: 0; bottom: 0; right: 0; z-index: 1010;
  width: min(86vw, 340px);
  background: var(--surface);
  border-radius: var(--r-lg) 0 0 var(--r-lg);
  transform: translateX(104%); transition: transform .35s var(--ease);
  display: flex; flex-direction: column; overflow: hidden;
}
#mobileMenu.active { transform: none; }
.mm-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px 12px; }
.mm-head strong { font-size: 17px; }
#mobileMenu .search { display: flex; align-items: center; gap: 6px; margin: 8px 16px 12px; padding-inline: 16px 6px; height: 46px; border-radius: var(--r-pill); background: var(--surface-2); }
#mobileMenu .search input { flex: 1; min-height: 0; height: 100%; padding: 0; background: transparent !important; outline: none !important; }
#mobileMenu .search button { width: 36px; height: 36px; display: grid; place-items: center; color: var(--muted); font-size: 20px; }
.tabs-container { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.tabs-header { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0 16px 8px; padding: 5px; border-radius: var(--r-pill); background: var(--surface-2); }
.tab-btn { height: 40px; border-radius: var(--r-pill); font-size: 14px; color: var(--muted); transition: background var(--t), color var(--t); }
.tab-btn.active { background: var(--surface); color: var(--text); }
.tabs-body { position: relative; flex: 1; overflow: hidden auto; }
.tab-content { display: none; flex-direction: column; padding: 4px 12px 16px; }
.tab-content.active { display: flex; }
#mobileMenu .tab-content > a, .mobile-categories > a, .nested-pane > a {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 50px; padding: 8px 14px; border-radius: var(--r-sm);
  font-size: 15px;
}
#mobileMenu a:active { background: var(--surface-2); }
.nested-pane {
  position: absolute; inset: 0; z-index: 5; background: var(--surface);
  transform: translateX(100%); transition: transform .3s var(--ease);
  padding: 4px 12px 16px; overflow-y: auto;
}
.nested-pane.active { transform: none; }
.nested-pane .back-btn { justify-content: flex-start !important; gap: 8px; color: var(--accent); }
.overflow-y-auto { overflow: auto !important; }

/* ---------- Bottom tab bar (mobile) ---------- */
.tabbar {
  position: fixed; inset-inline: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 950;
  height: calc(var(--tabbar-h) - 12px);
  display: none; align-items: center; justify-content: space-around;
  padding-inline: 6px;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: blur(22px) saturate(1.6); backdrop-filter: blur(22px) saturate(1.6);
}
@media (max-width: 860px) { .tabbar { display: flex; } body.no-tabbar .tabbar { display: none; } }
.tabbar a, .tabbar button {
  position: relative; flex: 1; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  font-size: 11px; line-height: 1.4; color: var(--muted);
  border-radius: var(--r-pill); transition: color var(--t);
}
.tabbar .bx { font-size: 23px; transition: transform .25s var(--ease); }
.tabbar .active { color: var(--accent); }
.tabbar .active .bx { transform: translateY(-1px) scale(1.1); }
.tabbar .active::before {
  content: ''; position: absolute; inset: 6px 8px; z-index: -1; border-radius: var(--r-pill); background: var(--tint-2);
}
.tabbar .badge {
  position: absolute; top: 6px; inset-inline-start: 50%; margin-inline-start: 4px;
  min-width: 17px; height: 17px; padding: 0 4px; display: none; place-items: center;
  border-radius: var(--r-pill); background: var(--brand); color: var(--on-brand); font-size: 10px; line-height: 1;
}
.tabbar .badge.show { display: grid; }

/* ---------- Cart drawer ---------- */
.drawer-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(8, 12, 9, .5);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.drawer-overlay.active { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 1010;
  width: min(100%, 420px);
  background: var(--surface);
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
  transform: translateX(-104%); transition: transform .35s var(--ease);
  display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.drawer-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 10px; }
.drawer-title { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.drawer-title small { color: var(--muted); font-weight: 400; }
.drawer-close-btn { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; color: var(--text); }
.drawer-close-btn:hover { background: var(--surface-2); }
.drawer-content { flex: 1; overflow-y: auto; padding: 6px 14px; }

.ci { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 6px; border-radius: var(--r-sm); transition: background var(--t); }
.ci:hover { background: var(--surface-2); }
.ci-img img, .ci-img { width: 54px; height: 54px; border-radius: 14px; object-fit: cover; background: var(--surface-2); display: block; }
.ci-b { min-width: 0; display: grid; gap: 4px; }
.ci-t { font-size: 13px; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-t:hover { color: var(--accent); }
.ci-r { display: flex; align-items: center; gap: 8px; }
.ci-p { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.ci-tot { font-size: 13px; font-weight: 700; color: var(--text); text-align: end; line-height: 1.4; }
.ci-tot small { display: block; font-size: 10.5px; font-weight: 400; color: var(--muted); }
.drawer-content { padding: 4px 10px; }
.cart-mini { width: min(100%, 380px); }
.cart-mini .drawer-header { padding: 14px 18px 6px; }
.cart-mini .drawer-title { font-size: 16px; }
.cart-mini .drawer-close-btn { width: 36px; height: 36px; }
.stepper {
  display: inline-flex; align-items: center; gap: 2px; padding: 3px;
  border-radius: var(--r-pill); background: var(--surface);
}
.stepper button {
  width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%;
  font-size: 17px; color: var(--text); transition: background var(--t), transform .12s;
}
.stepper button:hover { background: var(--tint-2); color: var(--accent); }
.stepper button.del { color: var(--danger); } .stepper button.del:hover { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.stepper { padding: 2px; } .stepper span { min-width: 22px; font-size: 13px; }
.stepper button:active { transform: scale(.88); }
.stepper span, .stepper input { min-width: 28px; text-align: center; font-size: 14px; }
.stepper input { width: 52px; min-height: 32px !important; padding: 0 !important; background: transparent !important; outline: none !important; border-radius: 0 !important; }

.empty-state {
  display: grid; justify-items: center; gap: 10px; text-align: center;
  padding: 48px 20px; border-radius: var(--r-lg);
  background: var(--surface); color: var(--muted);
}
.empty-state .es-icon { width: 76px; height: 76px; display: grid; place-items: center; border-radius: 50%; background: var(--tint-2); color: var(--accent); font-size: 36px; margin-bottom: 6px; }
.empty-state h2 { font-size: 18px; color: var(--text); }
.empty-state p { font-size: 14px; max-width: 360px; }
.drawer-content .empty-state { background: transparent; padding-block: 70px; }

.checkout { padding: 10px 14px calc(14px + env(safe-area-inset-bottom)); background: var(--surface-2); border-radius: var(--r-lg) var(--r-lg) 0 0; display: none; gap: 8px; }
.checkout.show { display: grid; }
.sum { display: grid; gap: 2px; }
.sum p { display: flex; align-items: baseline; justify-content: space-between; font-size: 13.5px; color: var(--muted); }
.sum p span { color: var(--text); }
.sum .disc span { color: var(--ok); }
.sum .tot { margin-top: 4px; padding-top: 8px; font-size: 14px; color: var(--text); }
.sum .tot span { font-size: 19px; font-weight: 700; }
.checkout .btn { width: 100%; min-height: 46px; }
.drawer-note { font-size: 12px; color: var(--muted); text-align: center; }

/* ==========================================================================
   Sections / headings
   ========================================================================== */
.section { margin-top: 44px; }
.section-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.section-header h2, .section-title h2, .section-title h3 { font-size: 20px; display: flex; align-items: center; gap: 12px; }
.section-header h2::before, .section-title h2::before, .section-title h3::before {
  content: ''; width: 8px; height: 26px; border-radius: 6px; background: var(--brand);
}
.section-title { margin-bottom: 18px; }
.more-link, .section-header > a {
  display: inline-flex; align-items: center; gap: 4px; height: 38px; padding-inline: 16px 10px;
  border-radius: var(--r-pill); background: var(--tint-2); color: var(--accent); font-size: 13.5px;
  transition: background var(--t);
}
.more-link:hover, .section-header > a:hover { background: color-mix(in srgb, var(--brand) 26%, var(--surface)); }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 12px 0 22px; }
.page-head h1 { font-size: 26px; }
.page-head p { color: var(--muted); font-size: 14px; }

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin: 10px 0 16px; }
.crumbs a:hover { color: var(--accent); }
.crumbs .bx { font-size: 14px; }

/* ==========================================================================
   Home
   ========================================================================== */
.hero { padding: 6px 0 0; }
.hero-slider { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--surface-2); }
.hero-slider .swiper-slide { cursor: pointer; height: auto; background: none; border: 0; }
.hero-slide {
  position: relative; display: block;
  height: clamp(230px, 36vw, 450px);
  background-color: var(--surface-2); background-size: cover; background-position: center;
}
.hero-slide::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8, 12, 9, .62), rgba(8, 12, 9, 0) 55%);
}
.hero-content { position: absolute; inset: 0; padding: clamp(14px, 3vw, 34px); display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.hero-badge {
  position: absolute; top: clamp(14px, 3vw, 28px); inset-inline-start: clamp(14px, 3vw, 28px);
  padding: 2px 16px; border-radius: var(--r-pill); font-size: 12.5px;
  background: color-mix(in srgb, #fff 82%, transparent); color: #111;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.hero-btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 12px 0 24px; border-radius: var(--r-pill);
  background: #fff; color: #111; font-size: 14.5px; max-width: 100%;
  transition: transform .2s var(--ease);
}
.hero-btn::after { content: '\ea5a'; font-family: 'boxicons'; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--brand); color: #fff; font-size: 18px; flex-shrink: 0; }
.hero-slide:hover .hero-btn { transform: translateX(-4px); }
.hero-pagination.swiper-pagination { position: absolute; bottom: clamp(14px, 3vw, 32px) !important; left: 50%; right: auto; transform: translateX(-50%); width: auto; display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: var(--r-pill); background: rgba(8, 12, 9, .35); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); z-index: 5; }
.hero-pagination .swiper-pagination-bullet { width: 7px; height: 7px; margin: 0 !important; border-radius: 6px; background: #fff; opacity: .55; transition: width .3s var(--ease), opacity .3s; }
.hero-pagination .swiper-pagination-bullet-active { width: 22px; opacity: 1; }
@media (max-width: 860px) { .hero-pagination.swiper-pagination { display: none; } }

.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }
.trust > div { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface); font-size: 13.5px; line-height: 1.6; }
.trust .bx { flex-shrink: 0; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 15px; background: var(--tint-2); color: var(--accent); font-size: 22px; }
@media (max-width: 860px) {
  .trust { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -14px; padding-inline: 14px; scrollbar-width: none; }
  .trust::-webkit-scrollbar { display: none; }
  .trust > div { flex: 0 0 auto; scroll-snap-align: start; padding: 10px 16px 10px 20px; }
  .trust .bx { width: 38px; height: 38px; font-size: 19px; }
}

/* categories */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.cat-tile {
  display: grid; justify-items: center; align-content: start; gap: 10px;
  padding: 18px 12px 16px; border-radius: var(--r-md); background: var(--surface);
  text-align: center; font-size: 14px; line-height: 1.6;
  transition: background var(--t), transform .25s var(--ease);
}
.cat-tile:hover { background: var(--tint); transform: translateY(-3px); }
.cat-tile .cat-img { width: 84px; height: 84px; border-radius: 50%; background: var(--surface-2); overflow: hidden; display: grid; place-items: center; color: var(--accent); font-size: 34px; transition: background var(--t); }
.cat-tile:hover .cat-img { background: var(--surface); }
.cat-tile .cat-img img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) {
  .cat-grid { display: flex; overflow-x: auto; scroll-snap-type: x proximity; margin-inline: -14px; padding-inline: 14px; scrollbar-width: none; }
  .cat-grid::-webkit-scrollbar { display: none; }
  .cat-tile { flex: 0 0 112px; scroll-snap-align: start; padding: 14px 8px 12px; font-size: 13px; }
  .cat-tile .cat-img { width: 66px; height: 66px; font-size: 28px; }
}

/* rails (product carousels) */
.rail { position: relative; }
.rail.is-featured { padding: 22px 22px 24px; border-radius: var(--r-lg); background: var(--tint); }
.rail-controls { display: flex; gap: 8px; }
.rail-controls button {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%;
  background: var(--surface); color: var(--text); font-size: 20px;
  transition: background var(--t), color var(--t), opacity var(--t), transform .12s;
}
.rail.is-featured .rail-controls button { background: var(--surface); }
.rail-controls button:hover { background: var(--brand); color: var(--on-brand); }
.rail-controls button:active { transform: scale(.9); }
.rail-controls button.swiper-button-disabled { opacity: .35; pointer-events: none; }
.rail-header-r { display: flex; align-items: center; gap: 10px; }
@media (max-width: 860px) { .rail-controls { display: none; } .rail.is-featured { padding: 16px 12px 18px; margin-inline: -4px; } }
.productSwiper { overflow: hidden; border-radius: var(--r-md); }
.productSwiper .swiper-slide { height: auto; background: none; border: 0; cursor: auto; }
.productSwiper .swiper-slide > .product-card { height: 100%; }
.rail-intro {
  height: 100%; min-height: 280px; padding: 22px 14px; border-radius: var(--r-md);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: var(--surface); text-align: center;
}
.rail-intro img { width: 160px; max-width: 80%; border-radius: var(--r-sm); }
[data-theme="dark"] .rail-intro img { filter: invert(1) hue-rotate(180deg); }

/* category blocks */
.cat-blocks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cat-block { padding: 18px 16px 16px; border-radius: var(--r-lg); background: var(--surface); }
.cat-block .section-header { margin-bottom: 12px; padding-inline: 4px; }
.cat-block .section-header h2 { font-size: 17px; }
.cat-block .section-header h2::before { height: 20px; width: 6px; }
.cat-block-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cat-block-grid .product-card { background: var(--surface-2); }
.cat-block-grid .product-card .pc-body { padding: 10px 8px 8px; }
.cat-block-grid .pc-title { font-size: 13px; }
.cat-block-grid .pc-price strong { font-size: 13.5px; }
@media (max-width: 1060px) { .cat-blocks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .cat-blocks { grid-template-columns: 1fr; } }

/* banners */
.banner-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.banner-grid a { display: block; border-radius: var(--r-md); overflow: hidden; background: var(--surface-2); }
.banner-grid img { width: 100%; height: auto; transition: transform .6s var(--ease); }
.banner-grid a:hover img { transform: scale(1.04); }
@media (max-width: 860px) {
  .banner-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -14px; padding-inline: 14px; scrollbar-width: none; }
  .banner-grid::-webkit-scrollbar { display: none; }
  .banner-grid a { flex: 0 0 82%; scroll-snap-align: center; }
}

/* ==========================================================================
   Product card
   ========================================================================== */
.product-card {
  position: relative; display: flex; flex-direction: column;
  padding: 8px; border-radius: var(--r-md);
  background: var(--surface);
  transition: transform .3s var(--ease), background var(--t);
}
.product-card:hover { transform: translateY(-4px); }
.pc-media-wrap { position: relative; }
.pc-media { position: relative; display: block; aspect-ratio: 1; border-radius: calc(var(--r-md) - 6px); overflow: hidden; background: var(--surface-2); }
.pc-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.product-card:hover .pc-media img { transform: scale(1.06); }
.pc-ph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); font-size: 12.5px; }
.pc-badge {
  position: absolute; top: 10px; inset-inline-start: 10px;
  min-width: 42px; height: 26px; padding: 0 10px; display: grid; place-items: center;
  border-radius: var(--r-pill); background: var(--danger); color: #fff; font-size: 12px; line-height: 1;
}
[data-theme="dark"] .pc-badge { background: color-mix(in srgb, var(--danger) 70%, #000); color: #fff; }
.add_to_cart {
  position: absolute; bottom: 10px; inset-inline-end: 10px;
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 50%; background: var(--brand); color: var(--on-brand); font-size: 22px;
  transition: transform .25s var(--ease), background var(--t);
}
.add_to_cart:hover { background: var(--brand-hover); transform: scale(1.08); }
.add_to_cart:active { transform: scale(.9); }
.add_to_cart.added { animation: added .5s var(--ease); }
.add_to_cart.busy { pointer-events: none; opacity: .65; }
@keyframes added { 40% { transform: scale(1.25) rotate(-10deg); } }
@media (hover: hover) and (min-width: 861px) {
  .add_to_cart { opacity: 0; transform: translateY(8px) scale(.9); }
  .product-card:hover .add_to_cart, .add_to_cart:focus-visible { opacity: 1; transform: none; }
  .product-card:hover .add_to_cart:hover { transform: scale(1.08); }
}
.pc-body { display: flex; flex-direction: column; gap: 8px; padding: 12px 8px 8px; flex: 1; }
.pc-title { font-size: 14px; font-weight: 600; line-height: 1.7; }
.pc-title a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 3.4em; }
.pc-title a:hover { color: var(--accent); }
.pc-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.pc-price { display: flex; flex-direction: column; line-height: 1.5; }
.pc-old { font-size: 12px; color: var(--muted); }
.pc-price strong { font-size: 15.5px; color: var(--accent); }
.pc-price strong small { font-weight: 400; color: var(--muted); font-size: 11.5px; }
.pc-unit { font-size: 11.5px; color: var(--muted); padding: 1px 10px; border-radius: var(--r-pill); background: var(--surface-2); white-space: nowrap; }
@media (max-width: 520px) {
  .pc-title { font-size: 13px; }
  .pc-price strong { font-size: 14px; }
  .pc-foot { flex-direction: column; align-items: flex-start; gap: 4px; }
  .add_to_cart { width: 40px; height: 40px; font-size: 20px; }
}

/* ==========================================================================
   Products listing
   ========================================================================== */
.shop { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 22px; align-items: start; }
.filters { position: sticky; top: calc(var(--header-h) + 66px); padding: 20px; border-radius: var(--r-lg); background: var(--surface); }
.filters-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.filters-head h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.filters-head h3 .bx { color: var(--accent); font-size: 20px; }
.filters-close { display: none; }
.filter-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.filter-group label { font-size: 13px; color: var(--muted); }
.filter-actions { display: grid; gap: 8px; margin-top: 6px; }
.reset-btn { display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: var(--r-pill); background: var(--surface-2); font-size: 14px; }
.reset-btn:hover { background: var(--surface-3); }
.filter-toggle { display: none; }

.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.list-toolbar .count { font-size: 14px; color: var(--muted); }
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-badge {
  display: inline-flex; align-items: center; gap: 4px; height: 36px; padding-inline: 14px 6px;
  border-radius: var(--r-pill); background: var(--tint-2); color: var(--accent); font-size: 13px;
}
.filter-badge a { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: 16px; }
.filter-badge a:hover { background: var(--brand); color: var(--on-brand); }

.product-grid, .products_list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.shop .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .product-grid, .shop .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 960px) {
  .shop { grid-template-columns: 1fr; }
  .shop .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) { .product-grid, .shop .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

/* filters as bottom sheet on small screens */
@media (max-width: 960px) {
  .filter-toggle {
    display: inline-flex; align-items: center; gap: 8px; height: 44px; padding-inline: 20px;
    border-radius: var(--r-pill); background: var(--text); color: var(--bg); font-size: 14px;
  }
  .filter-toggle .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
  .filters {
    position: fixed; inset-inline: 0; bottom: 0; top: auto; z-index: 1020; max-height: 86dvh; overflow-y: auto;
    border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 22px 20px calc(24px + env(safe-area-inset-bottom));
    transform: translateY(105%); transition: transform .38s var(--ease);
  }
  .filters.open { transform: none; }
  .filters-close { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); font-size: 20px; }
  .filters::before { content: ''; display: block; width: 44px; height: 5px; border-radius: 4px; background: var(--surface-3); margin: -8px auto 14px; }
}

.pagination {
  display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px;
  margin: 34px 0 0; padding: 0; list-style: none;
}
.pagination li { list-style: none; }
.pagination a, .pagination span:not(.page-info), .pagination .page-link {
  min-width: 44px; height: 44px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-pill); background: var(--surface); font-size: 14px; color: var(--text);
  transition: background var(--t), color var(--t);
}
.pagination a:hover, .pagination a.page-link:hover { background: var(--tint-2); color: var(--accent); }
.pagination .active, .pagination .current { background: var(--brand); color: var(--on-brand); }
.pagination .page-info, .pagination-info { font-size: 13px; color: var(--muted); padding: 0 12px; background: none !important; }
.pagination-container { margin-top: 28px; }
.pagination-container .pagination { margin-top: 0; }
.pagination-info { text-align: center; margin-top: 12px; }

/* ==========================================================================
   Product detail
   ========================================================================== */
.pd { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.pd-gallery { position: sticky; top: calc(var(--header-h) + 66px); display: grid; gap: 12px; }
.pd-main { position: relative; display: block; aspect-ratio: 1; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.pd-main img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.pd-main:hover img { transform: scale(1.04); }
.pd-main .zoom { position: absolute; bottom: 14px; inset-inline-end: 14px; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--surface) 85%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-size: 12.5px; }
.pd-ph { aspect-ratio: 1; display: grid; place-items: center; border-radius: var(--r-lg); background: var(--surface); color: var(--muted); }
.pd-thumbs { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.pd-thumbs::-webkit-scrollbar { display: none; }
.pd-thumbs a { flex: 0 0 76px; height: 76px; border-radius: var(--r-sm); overflow: hidden; background: var(--surface); opacity: .75; transition: opacity var(--t), transform .25s var(--ease); }
.pd-thumbs a:hover { opacity: 1; transform: translateY(-2px); }
.pd-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.pd-info { display: grid; gap: 16px; }
.pd-title { font-size: clamp(22px, 3vw, 30px); line-height: 1.6; }
.pd-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.pd-tags a { padding: 2px 14px; border-radius: var(--r-pill); background: var(--surface); color: var(--muted); font-size: 12.5px; transition: background var(--t), color var(--t); }
.pd-tags a:hover { background: var(--tint-2); color: var(--accent); }

.buy-box { display: grid; gap: 16px; padding: 22px; border-radius: var(--r-lg); background: var(--surface); }
.price-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; }
.price-row .unit { font-size: 13px; color: var(--muted); padding: 1px 12px; border-radius: var(--r-pill); background: var(--surface-2); }
.price-row .old-price { font-size: 15px; color: var(--muted); }
.price-row .price { font-size: clamp(24px, 3.4vw, 30px); font-weight: 700; color: var(--accent); margin-inline-start: auto; }
.price-row .price small { font-size: 14px; font-weight: 400; color: var(--muted); }
.price-row .discount { padding: 1px 12px; border-radius: var(--r-pill); background: var(--danger); color: #fff; font-size: 12.5px; }
.stock { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; }
.stock::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.stock.in { color: var(--ok); }
.stock.out { color: var(--danger); }
.stock.low { color: var(--warn); }

.add-cart-form { display: flex; align-items: center; gap: 12px; }
.add-cart-form .btn-primary { flex: 1; min-height: 54px; font-size: 15.5px; }
.qty-box { display: inline-flex; align-items: center; padding: 4px; border-radius: var(--r-pill); background: var(--surface-2); }
.qty-box button { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; font-size: 20px; transition: background var(--t), transform .12s; }
.qty-box button:hover { background: var(--surface); }
.qty-box button:active { transform: scale(.88); }
.qty-box input { width: 54px !important; min-height: 44px !important; padding: 0 !important; text-align: center; background: transparent !important; outline: none !important; border-radius: 0 !important; }

.perks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.perks div { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface); font-size: 13px; line-height: 1.6; }
.perks .bx { font-size: 22px; color: var(--accent); }

.pd-section { margin-top: 26px; padding: 26px; border-radius: var(--r-lg); background: var(--surface); }
.pd-section h3 { font-size: 18px; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.pd-section h3::before { content: ''; width: 6px; height: 22px; border-radius: 5px; background: var(--brand); }
.product-page-desc { white-space: pre-line; line-height: 2.4; color: color-mix(in srgb, var(--text) 86%, var(--muted)); }
.attrs { margin: 24px 0 0; display: grid; gap: 6px; }
.attrs > div { display: grid; grid-template-columns: minmax(110px, 1fr) 2fr; gap: 16px; padding: 10px 18px; border-radius: var(--r-sm); background: var(--surface-2); font-size: 14px; }
.attrs > div:nth-child(even) { background: transparent; }
.attrs dt { color: var(--muted); margin: 0; }
.attrs dd { margin: 0; }

.sticky-buy { display: none; }

@media (max-width: 860px) {
  .pd { grid-template-columns: 1fr; gap: 18px; }
  .pd-gallery { position: static; }
  .pd-main, .pd-ph { border-radius: var(--r-md); }
  .buy-box { padding: 18px; }
  .pd-section { padding: 20px 18px; }
  .perks { grid-template-columns: 1fr; }
  .attrs > div { grid-template-columns: 1fr 1.6fr; gap: 10px; padding: 10px 14px; }
  .add-cart-form.is-inline { display: none; }
  .sticky-buy {
    position: fixed; inset-inline: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 960;
    display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 8px; padding-inline-start: 20px;
    border-radius: var(--r-pill); background: color-mix(in srgb, var(--surface) 90%, transparent);
    -webkit-backdrop-filter: blur(22px) saturate(1.6); backdrop-filter: blur(22px) saturate(1.6);
  }
  .sticky-buy .sb-price { flex: 1; line-height: 1.5; }
  .sticky-buy .sb-price small { display: block; font-size: 11.5px; color: var(--muted); }
  .sticky-buy .sb-price strong { font-size: 17px; color: var(--accent); }
  .sticky-buy .btn { min-height: 52px; padding-inline: 26px; }
  body.has-sticky-buy { padding-bottom: 96px; }
  body.has-sticky-buy .back-top { bottom: calc(var(--tabbar-h) + 22px); }
}

/* search page */
.search-hero { display: flex; flex-direction: column; gap: 14px; margin: 10px 0 24px; }
.search-hero h1 { font-size: 24px; }
.search-hero h1 em { font-style: normal; color: var(--accent); }
.search-page-form { display: flex; align-items: center; gap: 8px; height: 56px; padding-inline: 22px 8px; border-radius: var(--r-pill); background: var(--surface); max-width: 640px; }
.search-page-form > .bx { font-size: 22px; color: var(--muted); }
.search-page-form input { flex: 1; min-height: 0; height: 100%; padding: 0 6px; background: transparent !important; outline: none !important; }
.search-page-form button { height: 42px; padding: 0 24px; border-radius: var(--r-pill); background: var(--brand); color: var(--on-brand); }

/* ==========================================================================
   Blog
   ========================================================================== */
.posts, .post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 960px) { .posts, .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .posts, .post-grid { grid-template-columns: 1fr; } }
.post-card { display: flex; flex-direction: column; border-radius: var(--r-lg); background: var(--surface); padding: 8px; transition: transform .3s var(--ease); }
.post-card:hover { transform: translateY(-4px); }
.post-card .one { aspect-ratio: 16 / 10; border-radius: calc(var(--r-lg) - 8px); overflow: hidden; background: var(--surface-2); }
.post-card .one a { display: block; height: 100%; }
.post-card .one img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.post-card:hover .one img { transform: scale(1.06); }
.post-card .two { display: flex; flex-direction: column; gap: 8px; padding: 14px 14px 10px; flex: 1; }
.post-card h2 { font-size: 16.5px; line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color var(--t); }
.post-card:hover h2 { color: var(--accent); }
.post-card time { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; margin-top: auto; }
.post-card time::before { content: '\eb3b'; font-family: 'boxicons'; }

.article { max-width: 820px; margin-inline: auto; }
.article-cover { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; border-radius: var(--r-lg); background: var(--surface-2); }
.article-body { margin-top: -44px; position: relative; padding: clamp(22px, 4vw, 44px); border-radius: var(--r-lg); background: var(--surface); margin-inline: clamp(8px, 4vw, 40px); }
.article-body h1 { font-size: clamp(22px, 3.4vw, 32px); line-height: 1.7; }
.article-meta { display: flex; align-items: center; gap: 14px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.article-meta .bx { color: var(--accent); }
.post_main { margin-top: 24px; }
.markdown-body { background: transparent !important; color: var(--text) !important; font-family: inherit !important; font-size: 16.5px !important; line-height: 2.3 !important; }
.markdown-body * { font-family: inherit; }
.markdown-body img { border-radius: var(--r-md); margin-block: 8px; }
.markdown-body h1, .markdown-body h2, .markdown-body h3 { border-bottom: 0 !important; line-height: 1.8 !important; }
.markdown-body a { color: var(--accent); }
.markdown-body pre, .markdown-body code, .markdown-body blockquote, .markdown-body table th, .markdown-body table td, .markdown-body hr { border: 0 !important; }
.markdown-body pre, .markdown-body code { background: var(--surface-2) !important; border-radius: var(--r-sm); }
.markdown-body blockquote { background: var(--tint); border-radius: var(--r-sm); padding: 6px 20px !important; color: var(--text) !important; }
.markdown-body table tr { background: transparent !important; }
.markdown-body table tr:nth-child(2n) { background: var(--surface-2) !important; }
@media (max-width: 860px) { .article-cover { aspect-ratio: 16 / 10; border-radius: var(--r-md); } .article-body { margin-top: -28px; margin-inline: 6px; } }

/* ==========================================================================
   Account
   ========================================================================== */
.account { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 22px; align-items: start; margin-top: 12px; }
.account-nav { position: sticky; top: calc(var(--header-h) + 66px); display: grid; gap: 12px; }
.an-card { padding: 18px; border-radius: var(--r-lg); background: var(--surface); }
.an-user { display: flex; align-items: center; gap: 14px; }
.an-avatar { width: 54px; height: 54px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: var(--tint-2); color: var(--accent); font-size: 28px; }
.an-user strong { display: block; font-size: 15.5px; line-height: 1.6; }
.an-user small { color: var(--muted); }
.an-wallet { display: grid; gap: 2px; padding: 16px 18px; border-radius: var(--r-lg); background: var(--brand); color: var(--on-brand); position: relative; overflow: hidden; transition: background var(--t); }
.an-wallet:hover { background: var(--brand-hover); }
.an-wallet::after { content: ''; position: absolute; width: 150px; height: 150px; border-radius: 50%; background: rgba(255, 255, 255, .1); inset-inline-start: -50px; top: -60px; }
.an-wallet span { font-size: 12.5px; opacity: .85; }
.an-wallet strong { font-size: 22px; line-height: 1.7; }
.an-wallet strong small { font-size: 12px; font-weight: 400; opacity: .85; }
.an-wallet .cta { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; opacity: 1; font-size: 12.5px; }
.an-links { display: grid; gap: 2px; padding: 8px; border-radius: var(--r-lg); background: var(--surface); }
.an-links a { display: flex; align-items: center; gap: 12px; height: 48px; padding-inline: 14px; border-radius: var(--r-md); font-size: 14.5px; color: var(--muted); transition: background var(--t), color var(--t); }
.an-links a .bx { font-size: 21px; }
.an-links a:hover { background: var(--surface-2); color: var(--text); }
.an-links a.active { background: var(--tint-2); color: var(--accent); }
.an-links a.danger:hover { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.account-main { display: grid; gap: 16px; min-width: 0; }
.account-main > h4, .account-main .am-title { font-size: 22px; color: var(--text); margin-bottom: 2px; }
.panel-card { padding: 24px; border-radius: var(--r-lg); background: var(--surface); }
.panel-card h5 { font-size: 16.5px; margin-bottom: 14px; }
.panel-note { color: var(--muted); font-size: 13.5px; }

@media (max-width: 960px) {
  .account { grid-template-columns: 1fr; gap: 14px; }
  .account-nav { position: static; }
  .an-user.an-card { display: none; }
  .an-links { display: flex; overflow-x: auto; gap: 6px; padding: 6px; scrollbar-width: none; border-radius: var(--r-pill); }
  .an-links::-webkit-scrollbar { display: none; }
  .an-links a { flex: 0 0 auto; height: 44px; border-radius: var(--r-pill); padding-inline: 16px; font-size: 14px; white-space: nowrap; }
  .an-wallet { padding: 14px 18px; grid-template-columns: 1fr auto; align-items: center; }
  .an-wallet .cta { grid-row: 1 / span 2; grid-column: 2; margin: 0; height: 38px; padding: 0 14px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .2); }
  .panel-card { padding: 18px; }
}

/* dashboard */
.dash-hello { display: flex; align-items: center; gap: 18px; padding: 26px; border-radius: var(--r-lg); background: var(--tint); }
.dash-hello .big-avatar { width: 72px; height: 72px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-size: 36px; }
.dash-hello h2 { font-size: 22px; }
.dash-hello p { color: var(--muted); font-size: 14px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat { display: grid; gap: 6px; padding: 18px; border-radius: var(--r-md); background: var(--surface); transition: background var(--t), transform .25s var(--ease); }
a.stat:hover { background: var(--tint); transform: translateY(-3px); }
.stat .bx { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: var(--tint-2); color: var(--accent); font-size: 22px; }
.stat span.l { font-size: 13px; color: var(--muted); }
.stat strong { font-size: 20px; line-height: 1.5; }
.stat strong small { font-size: 12px; font-weight: 400; color: var(--muted); }
.quick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.quick { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--r-md); background: var(--surface); transition: background var(--t); }
.quick:hover { background: var(--tint); }
.quick .bx { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 15px; background: var(--surface-2); font-size: 23px; color: var(--accent); }
.quick b { display: block; font-weight: 600; font-size: 14.5px; line-height: 1.6; }
.quick small { color: var(--muted); }
.quick > .bx-chevron-left { margin-inline-start: auto; background: none; width: auto; height: auto; color: var(--muted); }
.recent { display: grid; gap: 8px; }
.recent a { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--r-sm); background: var(--surface-2); font-size: 14px; transition: background var(--t); }
.recent a:hover { background: var(--surface-3); }
.recent .sp { margin-inline-start: auto; }
@media (max-width: 600px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat-grid .stat:first-child { grid-column: 1 / -1; }
  .quick-grid { grid-template-columns: 1fr; }
  .dash-hello { padding: 20px; }
  .dash-hello .big-avatar { width: 58px; height: 58px; font-size: 28px; }
}

/* wallet */
.balance-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 26px; border-radius: var(--r-lg); background: var(--brand); color: var(--on-brand); position: relative; overflow: hidden; }
.balance-card::before, .balance-card::after { content: ''; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.balance-card::before { width: 220px; height: 220px; inset-inline-end: -60px; top: -110px; }
.balance-card::after { width: 140px; height: 140px; inset-inline-end: 90px; bottom: -80px; }
.balance-card span { font-size: 13.5px; opacity: .85; }
.balance-card strong { display: block; font-size: clamp(26px, 5vw, 36px); line-height: 1.6; }
.balance-card strong small { font-size: 14px; font-weight: 400; opacity: .85; }
.balance-card .bx { font-size: 54px; opacity: .35; position: relative; z-index: 1; }
.amount-presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-block: 14px 20px; }
.preset-btn { min-height: 52px; padding: 6px 10px; border-radius: var(--r-sm); background: var(--surface-2); font-size: 14.5px; transition: background var(--t), color var(--t), transform .12s; }
.preset-btn small { color: var(--muted); }
.preset-btn:hover { background: var(--surface-3); }
.preset-btn:active { transform: scale(.96); }
.preset-btn.active { background: var(--brand); color: var(--on-brand); }
.preset-btn.active small { color: inherit; opacity: .85; }
.amount-hint { min-height: 24px; font-size: 13.5px; color: var(--accent); }
@media (max-width: 480px) { .amount-presets { grid-template-columns: repeat(2, 1fr); } }

/* password */
.pw-wrap { position: relative; }
.pw-wrap input { padding-inline-start: 50px; }
.pw-toggle { position: absolute; inset-inline-start: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); font-size: 20px; }
.pw-toggle:hover { background: var(--surface-3); color: var(--text); }
.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 4px; }
.pw-meter i { height: 5px; border-radius: 4px; background: var(--surface-3); transition: background var(--t); }
.pw-meter[data-s="1"] i:nth-child(-n+1) { background: var(--danger); }
.pw-meter[data-s="2"] i:nth-child(-n+2) { background: var(--warn); }
.pw-meter[data-s="3"] i:nth-child(-n+3) { background: var(--info); }
.pw-meter[data-s="4"] i { background: var(--ok); }
.pw-label { font-size: 12px; color: var(--muted); min-height: 20px; }

/* tables → soft rows (cards on mobile) */
.table-responsive { overflow-x: auto; }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0 6px; font-size: 14px; }
.data-table th { padding: 6px 16px; text-align: start; font-weight: 400; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.data-table td { padding: 12px 16px; background: var(--surface-2); vertical-align: middle; }
.data-table td:first-child { border-start-start-radius: var(--r-sm); border-end-start-radius: var(--r-sm); }
.data-table td:last-child { border-start-end-radius: var(--r-sm); border-end-end-radius: var(--r-sm); }
.data-table tbody tr { transition: transform .2s var(--ease); }
.data-table tbody tr:hover td { background: var(--surface-3); }
.data-table tfoot td { background: var(--tint-2); }
.data-table .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table .go { width: 38px; height: 38px; min-height: 0; padding: 0; border-radius: 50%; background: var(--surface); }
.data-table .go:hover { background: var(--brand); color: var(--on-brand); }
.sum-bar { display: flex; flex-wrap: wrap; gap: 10px; }
.sum-bar span { padding: 4px 16px; border-radius: var(--r-pill); background: var(--surface-2); font-size: 13px; color: var(--muted); }
.sum-bar b { color: var(--text); font-weight: 600; }

.badge-s { display: inline-flex; align-items: center; gap: 6px; padding: 1px 14px; border-radius: var(--r-pill); font-size: 12.5px; white-space: nowrap; background: color-mix(in srgb, currentColor 14%, transparent); }
.badge-s::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-pending { color: var(--warn); }
.status-paid { color: var(--info); }
.status-sent { color: var(--ok); }
.status-cancel { color: var(--danger); }
.badge-deposit, .amount-deposit { color: var(--ok); }
.badge-withdraw, .amount-withdraw { color: var(--danger); }
.amount-deposit, .amount-withdraw { direction: ltr; text-align: end; font-weight: 600; white-space: nowrap; }

@media (max-width: 720px) {
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table thead { display: none; }
  .data-table tbody tr { margin-bottom: 10px; padding: 8px 6px; border-radius: var(--r-md); background: var(--surface-2); }
  .data-table td { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 14px; background: transparent !important; border-radius: 0 !important; text-align: end; }
  .data-table td::before { content: attr(data-label); color: var(--muted); font-size: 12.5px; flex-shrink: 0; }
  .data-table td[data-label=""]::before, .data-table td:not([data-label])::before { display: none; }
  .data-table .go { margin-inline-start: auto; }
  .data-table tfoot tr { padding: 4px 6px; background: var(--tint-2); }
}

/* order detail */
.back-link { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding-inline: 14px 18px; border-radius: var(--r-pill); background: var(--surface); font-size: 13.5px; color: var(--muted); width: fit-content; transition: background var(--t), color var(--t); }
.back-link:hover { background: var(--tint-2); color: var(--accent); }
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.info-card { display: grid; gap: 4px; padding: 20px 22px; border-radius: var(--r-md); background: var(--surface); }
.info-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 7px 0; font-size: 14px; }
.info-row .l { color: var(--muted); flex-shrink: 0; }
.info-row .v { text-align: end; }
.info-row .v.total { color: var(--accent); font-size: 17px; font-weight: 700; }
.item-cell { display: flex; align-items: center; gap: 12px; text-align: start; }
.item-cell img, .item-cell .no-image { width: 54px; height: 54px; border-radius: 14px; object-fit: cover; flex-shrink: 0; background: var(--surface); }
.item-cell .no-image { display: grid; place-items: center; font-size: 10px; color: var(--muted); text-align: center; line-height: 1.3; }
@media (max-width: 720px) { .info-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { margin-top: 30px; padding: 30px 0 0; background: var(--surface); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr; gap: 34px; padding-bottom: 28px; }
.footer .brand { margin-bottom: 14px; }
.footer-text { color: var(--muted); font-size: 14px; line-height: 2.1; max-width: 460px; }
.footer h4 { font-size: 15px; margin-bottom: 12px; }
.footer-links { display: grid; gap: 2px; }
.footer-links a { display: inline-flex; align-items: center; gap: 8px; width: fit-content; padding: 3px 0; color: var(--muted); font-size: 14px; transition: color var(--t), transform .2s var(--ease); }
.footer-links a:hover { color: var(--accent); transform: translateX(-4px); }
.footer-links .bx { color: var(--accent); font-size: 18px; }
.footer-social { display: flex; gap: 8px; margin-top: 14px; }
.footer-social a { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); font-size: 19px; transition: background var(--t), color var(--t); }
.footer-social a:hover { background: var(--brand); color: var(--on-brand); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-block: 16px; background: var(--surface-2); color: var(--muted); font-size: 12.5px; border-radius: var(--r-lg) var(--r-lg) 0 0; }
.footer-bottom-wrap { background: var(--surface); }
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .footer-bottom { padding-bottom: 20px; }
}

/* ==========================================================================
   Floating
   ========================================================================== */
.back-top { position: fixed; bottom: 92px; right: 31px; z-index: 910; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); font-size: 22px; opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .3s, transform .3s var(--ease), background var(--t); }
.back-top.show { opacity: 1; transform: none; pointer-events: auto; }
.back-top:hover { background: var(--brand); color: var(--on-brand); }
@media (max-width: 860px) { .back-top { display: none; } }

/* lightbox */
.fslightbox-toolbar { background: rgba(0, 0, 0, .55) !important; border-radius: var(--r-pill) !important; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Engagement: stars, likes, comments, price chart, share, tabs, TOC ...
   ========================================================================== */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 0 12px; height: 26px; border-radius: var(--r-pill); font-size: 12px; line-height: 1; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.chip.ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.chip.info { background: var(--tint-2); color: var(--accent); }
.chip.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.muted { color: var(--muted); font-size: 13px; }
.hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0; }
.f-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 600px) { .f-grid2 { grid-template-columns: 1fr; } }

/* stars */
.stars { position: relative; display: inline-block; font-size: 17px; letter-spacing: 2px; line-height: 1; color: var(--surface-3); vertical-align: middle; }
.stars::before { content: '★★★★★'; }
.stars i { position: absolute; top: 0; bottom: 0; left: 0; overflow: hidden; white-space: nowrap; color: #f5b301; direction: ltr; }
.stars i::before { content: '★★★★★'; }
.stars { direction: ltr; }
.stars.sm { font-size: 13px; letter-spacing: 1px; }
.stars-n { margin-inline-start: 6px; font-size: 13px; color: var(--text); }
.stars-n small { color: var(--muted); }
.pc-rate { line-height: 1; margin-top: -2px; }
.pc-rate .stars-n { font-size: 12px; }

/* like buttons */
.pc-like { position: absolute; top: 10px; inset-inline-end: 10px; z-index: 2; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--surface) 82%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: 19px; color: var(--text); transition: transform .2s var(--ease), background var(--t); }
.pc-like:hover { transform: scale(1.1); }
.pc-like .bxs-heart, .like-btn .bxs-heart { display: none; }
.pc-like.on .bx-heart, .like-btn.on .bx-heart { display: none; }
.pc-like.on .bxs-heart, .like-btn.on .bxs-heart { display: inline-block; color: #ef4444; }
.pc-like.pop, .like-btn.pop { animation: pop .45s var(--ease); }
@keyframes pop { 40% { transform: scale(1.35); } }
.like-btn { display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 16px; border-radius: var(--r-pill); background: var(--surface); font-size: 18px; color: var(--text); flex-shrink: 0; transition: background var(--t), transform .12s; }
.like-btn b { font-weight: 400; font-size: 13.5px; }
.like-btn:hover { background: var(--surface-2); }
.like-btn.sm { height: 34px; padding: 0 12px; font-size: 16px; background: var(--surface-2); }
.pc-badge.lg { height: 32px; padding: 0 14px; font-size: 13px; top: 16px; inset-inline-start: 16px; }

/* product header extras */
.pd-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pd-stats { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; font-size: 13.5px; color: var(--muted); }
.pd-stats > span { display: inline-flex; align-items: center; gap: 5px; }
.pd-stats .bx { font-size: 17px; color: var(--accent); }
.pd-rate { display: inline-flex; align-items: center; }
.share-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13.5px; color: var(--muted); }
.sh-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--surface); font-size: 19px; color: var(--text); transition: background var(--t), color var(--t), transform .12s; }
.sh-btn:hover { background: var(--brand); color: var(--on-brand); }
.sh-btn:active { transform: scale(.9); }

/* section tabs */
.tabs-nav { position: sticky; top: 8px; z-index: 40; display: flex; gap: 4px; margin: 22px 0 0; padding: 6px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--surface) 90%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); overflow-x: auto; scrollbar-width: none; }
.tabs-nav::-webkit-scrollbar { display: none; }
.tabs-nav a { flex: 0 0 auto; height: 42px; padding: 0 20px; display: inline-flex; align-items: center; gap: 4px; border-radius: var(--r-pill); font-size: 14px; color: var(--muted); transition: background var(--t), color var(--t); }
.tabs-nav a:hover { color: var(--text); background: var(--surface-2); }
.tabs-nav a.on { background: var(--tint-2); color: var(--accent); }
.tabs-nav small { color: inherit; opacity: .8; }
.pd-section { scroll-margin-top: 76px; }
@media (min-width: 861px) { .site-header + * .tabs-nav { top: calc(var(--header-h) + 62px); } .tabs-nav { top: 130px; } }

/* price chart */
.pc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.pc-stats > div { display: grid; gap: 0; padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface-2); line-height: 1.7; }
.pc-stats span { font-size: 12px; color: var(--muted); }
.pc-stats strong { font-size: 16px; }
.pc-stats small { font-size: 11.5px; color: var(--muted); }
.pc-stats .trend.up strong { color: var(--danger); } .pc-stats .trend.down strong { color: var(--ok); }
.pc-range { display: flex; gap: 6px; margin-bottom: 8px; }
.pc-range button { height: 34px; padding: 0 16px; border-radius: var(--r-pill); background: var(--surface-2); font-size: 13px; color: var(--muted); transition: background var(--t), color var(--t); }
.pc-range button.on { background: var(--brand); color: var(--on-brand); }
.pc-canvas { position: relative; height: 270px; border-radius: var(--r-md); background: var(--surface-2); overflow: hidden; touch-action: pan-y; }
.pc-canvas svg { width: 100%; height: 100%; display: block; }
.pc-canvas .ax { stroke: var(--surface-3); stroke-width: 1; }
.pc-canvas text { fill: var(--muted); font-size: 11px; font-family: inherit; }
.pc-canvas .ln { fill: none; stroke: var(--brand); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.pc-canvas .ar { fill: color-mix(in srgb, var(--brand) 18%, transparent); }
.pc-canvas .dot { fill: var(--brand); stroke: var(--surface-2); stroke-width: 3; }
.pc-tip { position: absolute; top: 10px; pointer-events: none; padding: 6px 12px; border-radius: var(--r-sm); background: var(--text); color: var(--bg); font-size: 12.5px; line-height: 1.6; white-space: nowrap; opacity: 0; transition: opacity .15s; z-index: 2; }
.pc-tip.show { opacity: 1; }
@media (max-width: 700px) { .pc-stats { grid-template-columns: 1fr 1fr; } .pc-canvas { height: 220px; } }

/* rating summary + comments */
.rsum { display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: center; padding: 18px 20px; margin-bottom: 20px; border-radius: var(--r-md); background: var(--surface-2); }
.rsum-main { display: grid; justify-items: center; gap: 2px; text-align: center; }
.rsum-main strong { font-size: 44px; line-height: 1.2; }
.rsum-main small { color: var(--muted); font-size: 12.5px; }
.rsum-bars { display: grid; gap: 6px; }
.rbar { display: grid; grid-template-columns: 44px 1fr 36px; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); }
.rbar span { display: inline-flex; align-items: center; gap: 2px; justify-content: flex-end; direction: ltr; }
.rbar .bx { color: #f5b301; }
.rbar > div { height: 8px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.rbar > div i { display: block; height: 100%; border-radius: 6px; background: #f5b301; }
@media (max-width: 640px) { .rsum { grid-template-columns: 1fr; gap: 14px; } }

.cm-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.cm-top h3 { font-size: 18px; }
.cm-top h3 small { color: var(--muted); font-weight: 400; }
.cm-form { padding: 18px; margin-bottom: 16px; border-radius: var(--r-md); background: var(--surface-2); animation: rise .35s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.cm-form input:not([type=radio]), .cm-form textarea { background: var(--surface); }
.cm-form-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.cm-login { display: grid; justify-items: center; gap: 8px; padding: 12px; text-align: center; }
.cm-login .bx { font-size: 30px; color: var(--accent); }
.rate-in { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; direction: ltr; }
.rate-in input { position: absolute; opacity: 0; pointer-events: none; }
.rate-in label { font-size: 30px; cursor: pointer; color: var(--surface-3); transition: color .12s, transform .12s; line-height: 1; }
.rate-in label:hover, .rate-in label:hover ~ label, .rate-in input:checked ~ label { color: #f5b301; }
.rate-in label:active { transform: scale(.85); }

.cm { padding: 16px 4px; }
.cm + .cm { margin-top: 2px; }
.cm-list > .cm { padding: 18px 18px; border-radius: var(--r-md); background: var(--surface-2); margin-bottom: 10px; }
.cm-head { display: flex; align-items: center; gap: 12px; }
.cm-av { width: 42px; height: 42px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: var(--tint-2); color: var(--accent); font-size: 21px; }
.cm-who { flex: 1; min-width: 0; line-height: 1.6; }
.cm-who strong { display: block; font-size: 14.5px; }
.cm-who small { color: var(--muted); font-size: 12px; }
.cm-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.cm-rate { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.cm-body { margin-top: 6px; line-height: 2.1; font-size: 14.5px; word-break: break-word; }
.cm-pc { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 13px; }
.cm-pc .pro { color: var(--ok); } .cm-pc .con { color: var(--danger); }
.cm-pc span { display: inline-flex; align-items: center; gap: 4px; }
.cm-foot { display: flex; gap: 6px; margin-top: 10px; }
.cm-act { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 14px; border-radius: var(--r-pill); background: var(--surface); font-size: 13px; color: var(--muted); transition: background var(--t), color var(--t); }
.cm-act:hover { color: var(--text); background: var(--surface-3); }
.cm-act.on { background: var(--tint-2); color: var(--accent); }
.cm-act b { font-weight: 400; }
.cm-replies { margin-top: 10px; display: grid; gap: 8px; }
.cm-replies > .cm { margin-inline-start: 22px; padding: 14px; border-radius: var(--r-sm); background: var(--surface); }
.cm-replies .cm-av { width: 34px; height: 34px; font-size: 17px; }
.cm-reply-form { display: grid; gap: 8px; margin-top: 10px; margin-inline-start: 22px; }
.cm-reply-form textarea { min-height: 80px; background: var(--surface); }
.cm-more { width: 100%; margin-top: 6px; }
.cm-empty { background: var(--surface-2); padding: 30px 16px; }
.cm.flash { animation: flash 1.6s; }
@keyframes flash { 0%, 60% { outline: 2px solid var(--brand); } 100% { outline: 2px solid transparent; } }

/* recently viewed */
.rv-row { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.rv-row::-webkit-scrollbar { display: none; }
.rv-item { flex: 0 0 150px; display: grid; gap: 6px; padding: 8px; border-radius: var(--r-md); background: var(--surface); transition: transform .25s var(--ease); }
.rv-item:hover { transform: translateY(-3px); }
.rv-item img { width: 100%; aspect-ratio: 1; border-radius: calc(var(--r-md) - 6px); object-fit: cover; background: var(--surface-2); }
.rv-item b { font-weight: 400; font-size: 12.5px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding-inline: 4px; }
.rv-item span { font-size: 12.5px; color: var(--accent); padding-inline: 4px; padding-bottom: 4px; }
.more-link[data-clear-recent] { cursor: pointer; }

/* blog extras */
.read-progress { position: fixed; top: 0; inset-inline: 0; height: 4px; z-index: 1100; transform-origin: right; transform: scaleX(0); background: var(--brand); }
.article-meta { flex-wrap: wrap; row-gap: 6px; }
.article-lead { margin-top: 14px; padding: 14px 18px; border-radius: var(--r-md); background: var(--tint); font-size: 15.5px; line-height: 2.1; }
.toc { margin-top: 18px; padding: 14px 18px; border-radius: var(--r-md); background: var(--surface-2); }
.toc strong { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 14.5px; }
.toc ol { margin: 0; padding-inline-start: 22px; display: grid; gap: 2px; font-size: 14px; }
.toc a { color: var(--muted); } .toc a:hover, .toc a.on { color: var(--accent); }
.toc li.l3 { margin-inline-start: 16px; list-style: circle; }
.article-share { margin-top: 26px; padding-top: 18px; }
.pn { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px clamp(8px, 4vw, 40px) 0; }
.pn a { display: grid; gap: 2px; padding: 14px 18px; border-radius: var(--r-md); background: var(--surface); transition: background var(--t); }
.pn a:hover { background: var(--tint); }
.pn a.end { text-align: end; }
.pn small { color: var(--muted); font-size: 12px; } .pn b { font-weight: 400; font-size: 14px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article .pd-section { margin-inline: clamp(8px, 4vw, 40px); }
@media (max-width: 600px) { .pn { grid-template-columns: 1fr; } }
.post-ex { font-size: 13.5px; color: var(--muted); line-height: 1.9; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 12.5px; color: var(--muted); margin-top: auto; }
.post-meta span { display: inline-flex; align-items: center; gap: 4px; } .post-meta .bx { color: var(--accent); font-size: 15px; }
.post-card time::before { content: none; }
.blog-search { display: flex; align-items: center; gap: 8px; height: 46px; padding-inline: 18px; border-radius: var(--r-pill); background: var(--surface); min-width: min(100%, 300px); }
.blog-search input { flex: 1; min-height: 0 !important; height: 100%; padding: 0 !important; background: transparent !important; outline: none !important; }
.blog-search .bx { color: var(--muted); font-size: 20px; }
.sort-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.sort-chips a { display: inline-flex; align-items: center; gap: 5px; height: 40px; padding: 0 18px; border-radius: var(--r-pill); background: var(--surface); font-size: 14px; color: var(--muted); transition: background var(--t), color var(--t); }
.sort-chips a:hover { color: var(--text); background: var(--surface-2); }
.sort-chips a.on { background: var(--brand); color: var(--on-brand); }

/* info pages */
.info-page { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; align-items: start; }
.info-nav { position: sticky; top: 140px; display: grid; gap: 2px; padding: 12px; border-radius: var(--r-lg); background: var(--surface); }
.info-nav strong { padding: 6px 12px; font-size: 13px; color: var(--muted); font-weight: 400; }
.info-nav a { padding: 8px 14px; border-radius: var(--r-md); font-size: 14.5px; color: var(--muted); transition: background var(--t), color var(--t); }
.info-nav a:hover { background: var(--surface-2); color: var(--text); } .info-nav a.on { background: var(--tint-2); color: var(--accent); }
.info-body h1 { font-size: 26px; margin-bottom: 4px; }
.info-body .markdown-body { margin-top: 14px; }
.info-body .markdown-body h2 { font-size: 19px !important; margin-top: 22px !important; }
@media (max-width: 860px) { .info-page { grid-template-columns: 1fr; } .info-nav { position: static; display: flex; overflow-x: auto; border-radius: var(--r-pill); padding: 6px; scrollbar-width: none; } .info-nav strong { display: none; } .info-nav a { flex: 0 0 auto; white-space: nowrap; border-radius: var(--r-pill); } }
.about-hero { display: grid; grid-template-columns: 1fr auto; gap: 26px; align-items: center; padding: clamp(22px, 4vw, 44px); border-radius: var(--r-lg); background: var(--tint); }
.about-hero h1 { font-size: clamp(24px, 3.6vw, 36px); margin: 12px 0 8px; }
.about-hero p { color: var(--muted); max-width: 640px; line-height: 2.1; }
.about-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; justify-content: inherit; }
.about-logo img { width: clamp(110px, 18vw, 190px); aspect-ratio: 1; border-radius: 34%; object-fit: cover; background: var(--surface); }
@media (max-width: 700px) { .about-hero { grid-template-columns: 1fr; } .about-logo { display: none; } }
.about-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }
.about-stats > div { display: grid; justify-items: center; gap: 0; padding: 20px 10px; border-radius: var(--r-md); background: var(--surface); text-align: center; }
.about-stats .bx { font-size: 28px; color: var(--accent); margin-bottom: 4px; }
.about-stats strong { font-size: 26px; line-height: 1.5; } .about-stats small { color: var(--muted); }
.about-values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }
.about-values > div { padding: 22px 18px; border-radius: var(--r-md); background: var(--surface); transition: background var(--t), transform .25s var(--ease); }
.about-values > div:hover { background: var(--tint); transform: translateY(-3px); }
.about-values .bx { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 16px; background: var(--tint-2); color: var(--accent); font-size: 26px; margin-bottom: 10px; }
.about-values h3 { font-size: 16px; margin-bottom: 4px; } .about-values p { font-size: 13.5px; color: var(--muted); line-height: 2; }
.about-text { margin-top: 14px; }
@media (max-width: 860px) { .about-stats, .about-values { grid-template-columns: 1fr 1fr; } }
.faq-group { margin-top: 18px; } .faq-group h2 { font-size: 17px; margin-bottom: 10px; }
.faq-list { display: grid; gap: 8px; }
.faq { border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; cursor: pointer; list-style: none; font-size: 15px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .bx { font-size: 22px; color: var(--accent); transition: transform var(--t); }
.faq[open] summary .bx { transform: rotate(180deg); } .faq[open] summary { color: var(--accent); }
.faq > div { padding: 0 20px 18px; color: var(--muted); line-height: 2.2; font-size: 14.5px; }
.faq-more { display: flex; align-items: center; gap: 14px; margin-top: 22px; flex-wrap: wrap; }
.faq-more .bx { font-size: 32px; color: var(--accent); } .faq-more > div { flex: 1; min-width: 180px; }
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 16px; align-items: start; }
.contact-cards { display: grid; gap: 10px; }
.contact-form h5 { margin-bottom: 14px; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }
.err-page { padding: 70px 20px; } .err-code { font-size: clamp(60px, 14vw, 120px); font-weight: 700; color: var(--accent); line-height: 1.1; }

/* payment result */
.pay-result { max-width: 520px; margin: 24px auto; display: grid; justify-items: center; gap: 10px; text-align: center; }
.pr-icon { width: 86px; height: 86px; display: grid; place-items: center; border-radius: 50%; font-size: 46px; animation: pop .6s var(--ease); }
.pr-icon.ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.pr-icon.bad { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.pr-icon.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.pay-result h1 { font-size: 24px; } .pay-result p { color: var(--muted); }
.pr-card { width: 100%; padding: 12px 22px; border-radius: var(--r-lg); background: var(--surface); margin-top: 8px; text-align: start; }
.pay-result .about-cta { justify-content: center; }
.pay-note { display: flex; align-items: center; gap: 6px; margin-top: 12px; justify-content: center; }
.fav-grid { margin-top: 4px; }


/* ==========================================================================
   Notifications: typed toasts, bell, list
   ========================================================================== */
.toasts { position: fixed; z-index: 2000; inset-inline: 0; bottom: 22px; display: flex; flex-direction: column-reverse; align-items: center; gap: 10px; pointer-events: none; padding-inline: 12px; }
@media (max-width: 860px) { .toasts { bottom: calc(var(--tabbar-h) + 4px); } body.no-tabbar .toasts { bottom: 90px; } }
.toast { position: relative; pointer-events: auto; display: flex; align-items: center; gap: 12px; width: min(100%, 440px); padding: 12px 14px 14px; border-radius: var(--r-md); background: var(--surface); color: var(--text); overflow: hidden; opacity: 0; transform: translateY(16px) scale(.97); transition: opacity .3s var(--ease), transform .35s var(--ease); }
.toast.in { opacity: 1; transform: none; }
.toast.out { opacity: 0; transform: translateY(10px) scale(.97); }
.t-ic { flex-shrink: 0; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; font-size: 22px; background: var(--c-soft); color: var(--c); }
.t-tx { flex: 1; min-width: 0; line-height: 1.7; display: grid; }
.t-tx b { font-size: 14px; }
.t-msg { font-size: 13.5px; color: var(--muted); word-break: break-word; }
.t-tx b + .t-msg { margin-top: -2px; }
.t-act { flex-shrink: 0; height: 34px; padding: 0 14px; border-radius: var(--r-pill); background: var(--c-soft); color: var(--c); font-size: 13px; white-space: nowrap; transition: background var(--t); }
.t-act:hover { background: color-mix(in srgb, var(--c) 28%, transparent); }
.t-x { flex-shrink: 0; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); font-size: 18px; }
.t-x:hover { background: var(--surface-2); color: var(--text); }
.t-bar { position: absolute; inset-inline: 0; bottom: 0; height: 3px; background: var(--c); transform-origin: right; animation: tbar linear forwards; opacity: .75; }
.toast.hold .t-bar { animation-play-state: paused; }
@keyframes tbar { to { transform: scaleX(0); } }
.t-success { --c: var(--ok); --c-soft: color-mix(in srgb, var(--ok) 15%, transparent); }
.t-error { --c: var(--danger); --c-soft: color-mix(in srgb, var(--danger) 14%, transparent); }
.t-warning { --c: var(--warn); --c-soft: color-mix(in srgb, var(--warn) 16%, transparent); }
.t-info, .t-loading { --c: var(--info); --c-soft: color-mix(in srgb, var(--info) 14%, transparent); }
.t-success, .t-error, .t-warning, .t-info, .t-loading { background: color-mix(in srgb, var(--c) 7%, var(--surface)); }

/* bell */
.notif { position: relative; }
.notif-pop { position: absolute; top: calc(100% + 10px); inset-inline-end: 0; width: min(380px, 92vw); border-radius: var(--r-lg); background: var(--surface); z-index: 960; overflow: hidden; animation: rise .25s var(--ease); }
@media (max-width: 860px) { .notif { position: static; } .notif-pop { position: fixed; top: 64px; inset-inline: 10px; width: auto; } }
.np-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 8px; }
.np-link { font-size: 12.5px; color: var(--accent); padding: 4px 10px; border-radius: var(--r-pill); }
.np-link:hover { background: var(--tint-2); }
.np-list { max-height: min(420px, 60vh); overflow-y: auto; padding: 4px 8px; }
.np-foot { display: flex; align-items: center; justify-content: center; gap: 4px; height: 48px; margin: 6px; border-radius: var(--r-md); background: var(--surface-2); font-size: 13.5px; color: var(--accent); }
.np-foot:hover { background: var(--tint-2); }
.n-empty { display: grid; justify-items: center; gap: 6px; padding: 34px 10px; color: var(--muted); font-size: 14px; }
.n-empty .bx { font-size: 34px; color: var(--surface-3); }
.nlist { display: grid; gap: 8px; }
.nitem { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); transition: background var(--t); }
.np-list .nitem:hover { background: var(--surface-2); }
.nlist .nitem { background: var(--surface); } .nlist .nitem:hover { background: var(--surface-2); }
.nitem.unread { background: var(--tint); }
.nic { flex-shrink: 0; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; font-size: 21px; background: var(--c-soft); color: var(--c); }
.nbody { flex: 1; min-width: 0; display: grid; line-height: 1.7; }
.nbody b { font-size: 14px; font-weight: 600; }
.nbody small { font-size: 12.5px; color: var(--muted); }
.nbody time { font-size: 11.5px; color: var(--muted); opacity: .8; }
.ndot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); margin-top: 8px; flex-shrink: 0; }
.k-success { --c: var(--ok); --c-soft: color-mix(in srgb, var(--ok) 15%, transparent); }
.k-error { --c: var(--danger); --c-soft: color-mix(in srgb, var(--danger) 14%, transparent); }
.k-warning { --c: var(--warn); --c-soft: color-mix(in srgb, var(--warn) 16%, transparent); }
.k-info { --c: var(--info); --c-soft: color-mix(in srgb, var(--info) 14%, transparent); }
.pg-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.nbadge { margin-inline-start: auto; min-width: 22px; height: 22px; padding: 0 6px; display: grid; place-items: center; border-radius: var(--r-pill); background: var(--brand); color: var(--on-brand); font-size: 11.5px; font-weight: 400; line-height: 1; }

/* coupon box in the cart drawer */
.coupon form { display: flex; align-items: center; gap: 6px; height: 46px; padding-inline: 14px 5px; border-radius: var(--r-pill); background: var(--surface); }
.coupon form .bx { color: var(--accent); font-size: 20px; }
.coupon form input { flex: 1; min-width: 0; min-height: 0 !important; height: 100%; padding: 0 6px !important; background: transparent !important; outline: none !important; text-transform: uppercase; letter-spacing: 1px; }
.coupon form button { height: 36px; padding: 0 18px; border-radius: var(--r-pill); background: var(--tint-2); color: var(--accent); font-size: 13px; }
.coupon form button:hover { background: var(--brand); color: var(--on-brand); }
.coupon-on { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--ok) 13%, var(--surface)); color: var(--ok); }
.coupon-on > .bx { font-size: 22px; }
.coupon-on div { flex: 1; min-width: 0; display: grid; line-height: 1.5; }
.coupon-on b { letter-spacing: 1px; direction: ltr; text-align: start; font-size: 14px; }
.coupon-on small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coupon-on button { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; font-size: 18px; }
.coupon-on button:hover { background: color-mix(in srgb, var(--ok) 20%, transparent); }


/* ---- minimal cart footer ---- */
.cp summary { display: flex; align-items: center; gap: 8px; height: 38px; padding-inline: 12px; border-radius: var(--r-pill); cursor: pointer; list-style: none; font-size: 13px; color: var(--accent); width: fit-content; }
.cp summary::-webkit-details-marker { display: none; }
.cp summary:hover { background: var(--tint-2); }
.cp summary .bx:last-child { transition: transform var(--t); font-size: 16px; } .cp[open] summary .bx:last-child { transform: rotate(180deg); }
.coupon form { height: 42px; margin-top: 4px; padding-inline: 14px 4px; }
.coupon form input { padding: 0 !important; }
.sum p { font-size: 13px; }
.sum .tot span { font-size: 17px; }
.wal { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--surface); font-size: 12.5px; color: var(--muted); }
.wal .bx { font-size: 18px; color: var(--accent); } .wal b { font-weight: 600; color: var(--text); }
.wal-st { margin-inline-start: auto; font-size: 12px; }
.wal.ok .wal-st { color: var(--ok); } .wal.low { background: color-mix(in srgb, var(--warn) 12%, var(--surface)); } .wal.low .wal-st { color: var(--warn); font-weight: 600; }
.topup2 p { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.topup2 > div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.topup2 .btn { min-height: 44px !important; padding-inline: 10px; font-size: 13px; }

/* ---- wallet: payment methods ---- */
.need-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-radius: var(--r-md); background: color-mix(in srgb, var(--warn) 13%, var(--surface)); color: var(--text); font-size: 14px; }
.need-banner > .bx { font-size: 24px; color: var(--warn); } .need-banner div { flex: 1; min-width: 200px; }
.pm-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.pm { display: grid; justify-items: start; gap: 0; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface-2); text-align: start; transition: background var(--t), transform .12s; position: relative; }
.pm .bx { font-size: 26px; color: var(--accent); margin-bottom: 2px; }
.pm b { font-size: 14.5px; } .pm small { font-size: 12px; color: var(--muted); line-height: 1.6; }
.pm.on { background: var(--tint-2); } .pm.on::after { content: '\ea41'; font-family: 'boxicons'; position: absolute; top: 12px; inset-inline-end: 12px; color: var(--brand); font-size: 20px; }
.pm:active { transform: scale(.98); }
@media (max-width: 520px) { .pm-tabs { grid-template-columns: 1fr; } }
.card-box { padding: 18px 20px; border-radius: var(--r-lg); background: var(--brand); color: var(--on-brand); position: relative; overflow: hidden; margin-bottom: 14px; display: grid; gap: 10px; }
.card-box::before, .card-box::after { content: ''; position: absolute; border-radius: 50%; background: rgba(255,255,255,.09); }
.card-box::before { width: 200px; height: 200px; inset-inline-end: -60px; top: -90px; } .card-box::after { width: 130px; height: 130px; inset-inline-start: -30px; bottom: -70px; }
.cb-top { display: flex; align-items: center; gap: 8px; position: relative; z-index: 1; font-size: 14px; } .cb-top .bx { font-size: 24px; }
.cb-num { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; font-size: clamp(18px, 4.6vw, 24px); letter-spacing: 2px; text-align: start; width: fit-content; direction: ltr; }
.cb-num .bx { font-size: 18px; opacity: .8; }
.cb-bot { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.cb-sheba { font-size: 11.5px; opacity: .85; letter-spacing: .5px; }
.steps { margin: 0 0 12px; padding-inline-start: 22px; display: grid; gap: 2px; font-size: 13.5px; color: var(--muted); }
.drop { display: grid; place-items: center; gap: 6px; min-height: 150px; padding: 14px; border-radius: var(--r-md); background: var(--surface-2); cursor: pointer; text-align: center; transition: background var(--t); position: relative; overflow: hidden; }
.drop:hover, .drop.drag { background: var(--tint-2); }
.drop-t { display: grid; justify-items: center; gap: 2px; color: var(--muted); font-size: 13px; } .drop-t .bx { font-size: 34px; color: var(--accent); } .drop-t b { color: var(--text); font-weight: 600; }
.drop img { max-height: 210px; max-width: 100%; border-radius: var(--r-sm); object-fit: contain; }
.drop.has .drop-t { display: none; }
.rc-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface-2); }
.rc-thumb img { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; background: var(--surface); }
.rc-tx { flex: 1; min-width: 0; display: grid; line-height: 1.6; font-size: 14px; } .rc-tx small { color: var(--muted); font-size: 12px; }

[data-theme="dark"] .brand img, [data-theme="dark"] .auth-logo img, [data-theme="dark"] .about-logo img { filter: invert(1); background: transparent; }
