/* ============================================================
   Amora — گل و کیک‌فروشی آنلاین شیراز
   سیستم طراحی موبایل‌محور با پالت سبز پاستیلی
   ============================================================ */

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

/* ---------- Design tokens ---------- */
:root {
  /* پالت سبز پاستیلی */
  --mint-50:  #f1f7f2;
  --mint-100: #e4f0e6;
  --mint-200: #cfe4d3;
  --sage-300: #aed3b6;
  --sage-400: #8cbf99;
  --sage-500: #6ba680;   /* رنگ اصلی */
  --sage-600: #548a67;
  --sage-700: #40694f;
  --leaf-900: #26382c;   /* عنوان‌ها */

  /* رنگ‌های مکمل */
  --blush:    #e9a7a2;
  --blush-dark: #d67f7a;
  --gold:     #d8b46a;
  --cream:    #f7f9f4;

  /* خنثی */
  --white: #ffffff;
  --ink:   #2c3a30;
  --muted: #7c8b80;
  --line:  #e6ede7;

  --danger: #d9534f;
  --success: #4c9a63;

  /* شعاع و سایه */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  --shadow-sm: 0 2px 8px rgba(38, 56, 44, .06);
  --shadow-md: 0 8px 24px rgba(38, 56, 44, .09);
  --shadow-lg: 0 16px 40px rgba(38, 56, 44, .14);
  --shadow-brand: 0 10px 24px rgba(107, 166, 128, .30);

  --nav-h: 66px;
  --header-h: 60px;
  --container: 1140px;

  --t-fast: .15s ease;
  --t: .25s cubic-bezier(.4, 0, .2, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

::selection { background: var(--sage-300); color: var(--leaf-900); }

/* ---------- Layout helpers ---------- */
/* فاصله واکنش‌گرا از لبه‌ها؛ در هر اندازه صفحه به‌اندازه‌ی خودش */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 16px; }
@media (min-width: 480px)  { .container { padding-inline: 22px; } }
@media (min-width: 768px)  { .container { padding-inline: 34px; } }
@media (min-width: 1024px) { .container { padding-inline: 48px; } }
@media (min-width: 1280px) { .container { padding-inline: 64px; } }

/* هدر با محتوای صفحه هم‌تراز بماند */
.app-header .container { max-width: var(--container); }

.app-main { padding-top: var(--header-h); padding-bottom: calc(var(--nav-h) + 20px); min-height: 100vh; }
@media (min-width: 900px) { .app-main { padding-bottom: 40px; } }

.section { padding-block: 26px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
.section-head h2 { font-size: 1.25rem; color: var(--leaf-900); font-weight: 700; }
.section-head .link { color: var(--sage-600); font-size: .9rem; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; flex: 0 0 auto; }
.section-head .link svg { width: 15px; height: 15px; flex: 0 0 auto; }

.hidden { display: none !important; }
.spacer { flex: 1; }

/* ============================================================
   Header
   ============================================================ */
.app-header {
  position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(247, 249, 244, .85);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center;
}
.app-header .container { display: flex; align-items: center; gap: 12px; }

.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; color: var(--leaf-900); font-size: 1.2rem; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 12px;
  background: linear-gradient(135deg, var(--sage-400), var(--sage-600));
  display: grid; place-items: center; color: #fff; font-size: 1.05rem;
  box-shadow: var(--shadow-brand);
}
.brand small { color: var(--muted); font-weight: 500; font-size: .68rem; display: block; margin-top: -4px; }

.header-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: var(--r-pill);
  display: grid; place-items: center; color: var(--sage-700);
  position: relative; transition: background var(--t-fast);
}
.icon-btn:hover { background: var(--mint-100); }
.icon-btn svg { width: 22px; height: 22px; }

.badge-count {
  position: absolute; inset-block-start: 2px; inset-inline-start: 2px;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--blush-dark); color: #fff; border-radius: var(--r-pill);
  font-size: .68rem; font-weight: 700; display: grid; place-items: center;
  border: 2px solid var(--cream);
}

/* ============================================================
   Bottom nav (mobile)
   ============================================================ */
/* ناوبری پایینِ شیشه‌ای با پیلِ فعالِ گسترش‌یابنده (سبک تلگرام) */
.bottom-nav {
  position: fixed; z-index: 100;
  inset-inline: 10px; inset-block-end: calc(8px + env(safe-area-inset-bottom));
  height: 60px;
  display: flex; align-items: center; justify-content: space-around;
  gap: 4px; padding: 0 8px;
  background: rgba(247, 249, 244, .72);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 26px;
  box-shadow: 0 10px 30px rgba(38, 56, 44, .16);
}
.bottom-nav a {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 11px; border-radius: 999px;
  color: var(--muted); text-decoration: none; white-space: nowrap;
  font-size: .82rem; font-weight: 700;
  -webkit-tap-highlight-color: transparent;
  transition: background .35s cubic-bezier(.34, 1.2, .64, 1), color .25s ease, padding .35s cubic-bezier(.34, 1.2, .64, 1);
}
.bottom-nav .nav-ico { position: relative; display: inline-flex; }
.bottom-nav a svg { width: 24px; height: 24px; }
.bottom-nav .nav-label {
  max-width: 0; overflow: hidden; opacity: 0; margin-inline-start: 0;
  transition: max-width .35s cubic-bezier(.34, 1.2, .64, 1), opacity .25s ease, margin .35s ease;
}
.bottom-nav a.active {
  background: var(--sage-500); color: #fff; padding: 0 16px;
  box-shadow: 0 6px 16px rgba(107, 166, 128, .45);
}
.bottom-nav a.active .nav-label { max-width: 90px; opacity: 1; margin-inline-start: 8px; }
.bottom-nav .nav-badge {
  position: absolute; top: -5px; right: -7px;
  min-width: 16px; height: 16px; padding: 0 4px; background: var(--blush-dark); color: #fff;
  border-radius: var(--r-pill); font-size: .6rem; font-weight: 700; display: grid; place-items: center;
}
/* انیمیشنِ سرزنده هنگام جابه‌جایی بین آیتم‌ها */
.bottom-nav a svg { transition: transform .3s cubic-bezier(.34, 1.4, .64, 1); }
.bottom-nav a.active .nav-ico svg { animation: navPop .5s cubic-bezier(.34, 1.5, .55, 1); }
.bottom-nav a.active .nav-label { animation: navLabelIn .42s cubic-bezier(.34, 1.3, .64, 1) both; }
@keyframes navPop {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.3) rotate(-5deg); }
  65%  { transform: scale(.9) rotate(2deg); }
  100% { transform: scale(1) rotate(0); }
}
@keyframes navLabelIn {
  0%   { transform: translateX(6px) scale(.85); opacity: 0; }
  100% { transform: translateX(0) scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .bottom-nav a.active .nav-ico svg,
  .bottom-nav a.active .nav-label { animation: none; }
}

@media (min-width: 900px) { .bottom-nav { display: none; } }

/* ---------- Desktop nav ---------- */
.desktop-nav { display: none; gap: 4px; margin-inline-start: 10px; }
.desktop-nav a, .desktop-nav .nav-link-btn { padding: 8px 14px; border-radius: var(--r-pill); font-weight: 600; color: var(--sage-700); font-size: .92rem; transition: background var(--t-fast); background: none; border: none; cursor: pointer; font-family: inherit; }
.desktop-nav a:hover, .desktop-nav a.active, .desktop-nav .nav-link-btn:hover { background: var(--mint-100); color: var(--sage-700); }
@media (min-width: 900px) { .desktop-nav { display: flex; } }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: var(--r-pill); font-weight: 600; font-size: .95rem;
  transition: transform var(--t-fast), box-shadow var(--t), background var(--t), opacity var(--t);
  white-space: nowrap; user-select: none;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 19px; height: 19px; }
.btn-primary { background: linear-gradient(135deg, var(--sage-500), var(--sage-600)); color: #fff; box-shadow: var(--shadow-brand); }
.btn-primary:hover { box-shadow: 0 12px 28px rgba(107, 166, 128, .40); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.btn-ghost { background: var(--mint-100); color: var(--sage-700); }
.btn-ghost:hover { background: var(--mint-200); }
.btn-outline { background: transparent; border: 1.5px solid var(--sage-400); color: var(--sage-700); }
.btn-outline:hover { background: var(--mint-50); }
.btn-danger { background: #fdeceb; color: var(--danger); }
.btn-danger:hover { background: #fbdad8; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: .85rem; }
.btn-lg { padding: 15px 26px; font-size: 1.02rem; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative; margin-top: 12px;
  border-radius: var(--r-xl); overflow: hidden;
  background: linear-gradient(135deg, #dff0e3 0%, #eaf5ec 55%, #f7ecec 100%);
  padding: 30px 24px;
}
.hero::after {
  content: '🌿'; position: absolute; font-size: 9rem; opacity: .12;
  inset-block-end: -30px; inset-inline-start: -14px; transform: rotate(-15deg);
}
.hero-content { position: relative; z-index: 1; max-width: 460px; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.7); color: var(--sage-700); padding: 6px 13px; border-radius: var(--r-pill); font-size: .78rem; font-weight: 600; margin-bottom: 14px; }
.hero h1 { font-size: 1.9rem; line-height: 1.35; color: var(--leaf-900); font-weight: 700; margin-bottom: 10px; }
.hero h1 span { color: var(--sage-600); }
.hero p { color: var(--sage-700); margin-bottom: 20px; font-size: .98rem; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (min-width: 720px) {
  .hero { padding: 52px 44px; display: flex; align-items: center; min-height: 300px; }
  .hero h1 { font-size: 2.7rem; }
  .hero::after { font-size: 15rem; inset-inline-start: auto; inset-inline-end: 40px; inset-block-end: -50px; }
}

/* ---------- Advanced search & filter ---------- */
.search-bar { position: relative; display: flex; align-items: center; margin-bottom: 14px; }
.search-bar .search-ic { position: absolute; inset-inline-start: 14px; width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.search-bar .search-ic svg { width: 100%; height: 100%; }
.search-bar input { width: 100%; padding: 13px 44px; border-radius: var(--r-pill); border: 1.5px solid var(--line); background: var(--white); outline: none; transition: border var(--t-fast); }
.search-bar input:focus { border-color: var(--sage-400); }
.search-clear { position: absolute; inset-inline-end: 12px; width: 26px; height: 26px; border-radius: 50%; background: var(--mint-100); color: var(--sage-700); display: grid; place-items: center; font-size: .8rem; }

.shop-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.filter-btn { display: inline-flex; align-items: center; gap: 6px; }
.filter-btn svg { width: 17px; height: 17px; }
.filter-btn.active { background: var(--sage-500); color: #fff; }
.filter-count { min-width: 18px; height: 18px; padding: 0 5px; background: var(--blush-dark); color: #fff; border-radius: var(--r-pill); font-size: .68rem; font-weight: 700; display: grid; place-items: center; }
.filter-btn.active .filter-count { background: #fff; color: var(--sage-600); }

.filter-panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; margin-top: 12px; animation: pageIn .25s ease; }
.filter-group { margin-bottom: 16px; }
.filter-group > label { display: block; font-size: .84rem; font-weight: 600; color: var(--sage-700); margin-bottom: 9px; }
.price-inputs { display: flex; align-items: center; gap: 10px; }
.price-inputs input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: var(--r-md); border: 1.5px solid var(--line); background: var(--cream); outline: none; }
.price-inputs input:focus { border-color: var(--sage-400); background: #fff; }
.price-inputs span { color: var(--muted); font-size: .85rem; }
.rating-chips, .toggle-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.rchip, .tchip { padding: 8px 14px; border-radius: var(--r-pill); border: 1.5px solid var(--line); background: var(--white); color: var(--sage-700); font-weight: 600; font-size: .85rem; transition: all var(--t-fast); }
.rchip:hover, .tchip:hover { border-color: var(--sage-300); }
.rchip.active, .tchip.active { background: var(--sage-500); border-color: var(--sage-500); color: #fff; box-shadow: var(--shadow-brand); }

.result-line { margin-top: 16px; margin-bottom: 12px; }

/* ---------- Infinite scroll ---------- */
.inf-sentinel { display: flex; justify-content: center; align-items: center; min-height: 8px; padding: 18px 0; }
.inf-sentinel .inf-spinner { display: none; }
.inf-sentinel.loading .inf-spinner { display: block; }
.inf-spinner { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--mint-200); border-top-color: var(--sage-500); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.inf-end { text-align: center; color: var(--muted); font-size: .85rem; padding: 16px 0 24px; }

/* ---------- Category chips ---------- */
.chip-row { display: flex; gap: 10px; overflow-x: auto; padding-block: 6px 4px; scrollbar-width: none; scroll-snap-type: x proximity; }
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: var(--r-pill); background: var(--white);
  border: 1.5px solid var(--line); color: var(--sage-700); font-weight: 600; font-size: .88rem;
  transition: all var(--t-fast); scroll-snap-align: start;
}
.chip .ic { font-size: 1.05rem; }
.chip:hover { border-color: var(--sage-300); }
.chip.active { background: var(--sage-500); border-color: var(--sage-500); color: #fff; box-shadow: var(--shadow-brand); }

/* ---------- Category cards grid ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 620px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .cat-grid { grid-template-columns: repeat(5, 1fr); } }
.cat-card {
  background: var(--white); border-radius: var(--r-md); padding: 18px 12px; text-align: center;
  border: 1px solid var(--line); transition: transform var(--t), box-shadow var(--t);
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.cat-card .ic { font-size: 2rem; margin-bottom: 8px; }
.cat-card h3 { font-size: .92rem; color: var(--leaf-900); font-weight: 600; }
.cat-card small { color: var(--muted); font-size: .74rem; }

/* ============================================================
   Product grid & cards
   ============================================================ */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 620px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px) { .product-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; } }

/* کارت بدون قابِ سفید؛ فقط تصویرِ گِردگوشهٔ جدا و متن زیرِ آن (مطابق تصویر مرجع) */
.product-card {
  position: relative;
  background: transparent; border: none; box-shadow: none;
  display: flex; flex-direction: column;
  transition: transform var(--t);
}
.product-card:hover { transform: translateY(-4px); }
.product-media {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(165deg, #f7f6f3 0%, #ebe9e4 100%);
  box-shadow: 0 4px 16px rgba(38, 56, 44, .07);
  transition: box-shadow var(--t);
}
.product-card:hover .product-media { box-shadow: 0 12px 26px rgba(38, 56, 44, .13); }
.product-media img, .product-media svg { width: 100%; height: 100%; object-fit: cover; transition: transform .45s cubic-bezier(.22,.61,.36,1); }
.product-card:hover .product-media img, .product-card:hover .product-media svg { transform: scale(1.06); }
.product-fav {
  position: absolute; inset-block-start: 12px; inset-inline-end: 12px; z-index: 2;
  width: 36px; height: 36px; border-radius: 12px; background: #fff;
  display: grid; place-items: center; color: #4a5a50;
  box-shadow: 0 2px 8px rgba(38,56,44,.12); cursor: pointer; border: none;
  transition: transform var(--t-fast), color var(--t), background var(--t);
}
.product-fav:hover { color: var(--blush-dark); background: #fff; }
.product-fav.is-fav { color: var(--blush-dark); }
.product-fav:active { transform: scale(.82); }
.product-fav svg { width: 18px; height: 18px; }

/* دکمه علاقه‌مندی در صفحه جزئیات */
.fav-detail { color: var(--muted); }
.fav-detail.is-fav { color: var(--blush-dark); border-color: var(--blush); background: #fdf1f0; }
/* برچسب «ویژه» — پیلِ سفیدِ تمیز مثل Featured در تصویر مرجع */
.tag {
  position: absolute; inset-block-start: 12px; inset-inline-start: 12px; z-index: 2;
  padding: 5px 12px; border-radius: var(--r-pill); font-size: .7rem; font-weight: 600; letter-spacing: .2px;
  background: #fff; color: var(--leaf-900);
  box-shadow: 0 2px 8px rgba(38, 56, 44, .12);
}
.tag-sale { background: var(--blush-dark); color: #fff; }

.product-body { padding: 13px 3px 4px; display: flex; flex-direction: column; flex: 1; }
.product-cat { font-size: .72rem; color: var(--sage-500); font-weight: 600; margin-bottom: 3px; display: inline-block; }
.product-name { font-size: .95rem; font-weight: 600; color: var(--leaf-900); margin-bottom: 7px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.85em; }
.product-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price { display: flex; flex-direction: column; }
.price .old { font-size: .72rem; color: var(--muted); text-decoration: line-through; }
.price .now { font-size: 1.22rem; font-weight: 800; color: var(--leaf-900); letter-spacing: -.3px; }
.price .now small { font-size: .66rem; font-weight: 500; color: var(--muted); }
.add-btn {
  width: 44px; height: 44px; border-radius: 13px;
  background: linear-gradient(135deg, var(--sage-500), var(--sage-600)); color: #fff;
  display: grid; place-items: center; box-shadow: 0 4px 12px rgba(107, 166, 128, .4);
  transition: transform var(--t-fast), filter var(--t), box-shadow var(--t);
  flex: 0 0 auto;
}
.add-btn:hover { filter: brightness(1.04); transform: translateY(-2px); box-shadow: 0 7px 16px rgba(107, 166, 128, .5); }
.add-btn:active { transform: scale(.88); }
.add-btn svg { width: 20px; height: 20px; }
.stock-out { font-size: .74rem; color: var(--danger); font-weight: 600; }

/* ============================================================
   Product detail
   ============================================================ */
.detail-wrap { display: grid; gap: 22px; }
@media (min-width: 820px) { .detail-wrap { grid-template-columns: 1fr 1fr; align-items: start; } }
.detail-media { border-radius: var(--r-xl); overflow: hidden; background: var(--mint-50); aspect-ratio: 1/1; }
.detail-media svg { width: 100%; height: 100%; }
.detail-info h1 { font-size: 1.5rem; color: var(--leaf-900); font-weight: 700; margin-bottom: 8px; }
.detail-price { display: flex; align-items: baseline; gap: 10px; margin-block: 14px; }
.detail-price .now { font-size: 1.6rem; font-weight: 700; color: var(--sage-700); }
.detail-price .old { font-size: 1rem; color: var(--muted); text-decoration: line-through; }
.detail-desc { color: var(--sage-700); margin-bottom: 20px; }
.qty-row { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.qty { display: inline-flex; align-items: center; background: var(--mint-50); border-radius: var(--r-pill); border: 1px solid var(--line); }
.qty button { width: 40px; height: 40px; display: grid; place-items: center; color: var(--sage-700); font-size: 1.3rem; font-weight: 700; }
.qty span { min-width: 32px; text-align: center; font-weight: 700; }

/* ============================================================
   Cart
   ============================================================ */
.cart-item { display: flex; gap: 12px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; margin-bottom: 12px; }
.cart-item .thumb { width: 78px; height: 78px; border-radius: var(--r-sm); overflow: hidden; background: var(--mint-50); flex: 0 0 auto; }
.cart-item .thumb svg { width: 100%; height: 100%; }
.cart-item .meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cart-item .meta h4 { font-size: .92rem; color: var(--leaf-900); font-weight: 600; margin-bottom: 4px; }
.cart-item .meta .u { font-size: .8rem; color: var(--muted); }
.cart-item .bottom { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cart-item .qty { transform: scale(.85); transform-origin: right; }
.cart-item .line-price { font-weight: 700; color: var(--sage-700); font-size: .95rem; }
.remove-btn { color: var(--muted); width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; }
.remove-btn:hover { color: var(--danger); background: #fdeceb; }

.summary { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; position: sticky; inset-block-start: calc(var(--header-h) + 12px); }
.summary h3 { font-size: 1.05rem; color: var(--leaf-900); margin-bottom: 14px; font-weight: 700; }
.summary-row { display: flex; justify-content: space-between; padding-block: 7px; color: var(--sage-700); font-size: .92rem; }
.summary-row.total { border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 14px; font-weight: 700; font-size: 1.1rem; color: var(--leaf-900); }
@media (min-width: 820px) { .cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; } }
/* اجازهٔ کوچک‌شدن ستون‌های گرید تا محتوای طولانی/اسکرول‌شونده از قاب بیرون نزند */
.cart-layout > * { min-width: 0; }
.day-row { min-width: 0; }

/* ============================================================
   Reviews & ratings (نظر و امتیاز)
   ============================================================ */
.stars { display: inline-flex; align-items: center; gap: 2px; color: var(--gold); }
.stars .star { width: var(--star-size, 15px); height: var(--star-size, 15px); display: inline-flex; }
.stars .star svg { width: 100%; height: 100%; }
.stars .star.empty { color: #d9d9d9; }

.card-rating { display: flex; align-items: center; gap: 5px; margin-bottom: 8px; }
.card-rating > span:not(.stars) { font-size: .72rem; color: var(--muted); font-weight: 600; }

.detail-rating { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.detail-rating span { font-size: .85rem; color: var(--sage-700); font-weight: 600; }

.reviews-section { margin-top: 30px; }
.reviews-title { font-size: 1.2rem; color: var(--leaf-900); font-weight: 700; margin-bottom: 16px; }

/* خلاصه امتیاز */
.rev-summary { display: flex; gap: 20px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; margin-bottom: 16px; align-items: center; }
.rev-avg { text-align: center; flex: 0 0 auto; }
.rev-avg-num { font-size: 2.4rem; font-weight: 700; color: var(--leaf-900); line-height: 1; margin-bottom: 4px; }
.rev-bars { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.rev-bar-row { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--sage-700); }
.rev-bar { flex: 1; height: 7px; background: var(--mint-100); border-radius: 99px; overflow: hidden; }
.rev-bar > div { height: 100%; background: var(--gold); border-radius: 99px; }

/* فرم ثبت نظر */
.rev-form { margin-bottom: 18px; }
.rev-form textarea { width: 100%; padding: 12px 14px; border-radius: var(--r-md); border: 1.5px solid var(--line); background: var(--cream); outline: none; resize: vertical; min-height: 80px; }
.rev-form textarea:focus { border-color: var(--sage-400); background: #fff; }
.star-input { display: flex; align-items: center; gap: 4px; margin-bottom: 12px; }
.star-btn { width: 34px; height: 34px; color: #d9d9d9; transition: transform var(--t-fast), color var(--t-fast); }
.star-btn svg { width: 100%; height: 100%; }
.star-btn.on, .star-btn.hover { color: var(--gold); }
.star-btn:active { transform: scale(.85); }
.star-hint { font-size: .82rem; color: var(--muted); margin-inline-start: 8px; }

/* لیست نظرات */
.rev-list { display: flex; flex-direction: column; gap: 12px; }
.rev-item { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; }
.rev-head { display: flex; align-items: center; gap: 10px; }
.rev-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--sage-400), var(--sage-600)); color: #fff; display: grid; place-items: center; font-weight: 700; flex: 0 0 auto; }
.rev-meta { flex: 1; min-width: 0; }
.rev-meta h5 { font-size: .92rem; color: var(--leaf-900); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.rev-you { font-size: .66rem; background: var(--mint-100); color: var(--sage-700); padding: 1px 7px; border-radius: 99px; font-weight: 600; }
.rev-comment { margin-top: 10px; color: var(--ink); font-size: .92rem; line-height: 1.8; }

/* پاسخ آمورا */
.rev-reply { margin-top: 12px; background: var(--mint-50); border-inline-start: 3px solid var(--sage-400); border-radius: var(--r-md); padding: 11px 14px; }
.rev-reply-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
.rev-reply-badge { font-size: .78rem; font-weight: 700; color: var(--sage-700); }
.rev-reply p { font-size: .88rem; color: var(--sage-700); line-height: 1.7; }

@media (max-width: 480px) {
  .rev-summary { flex-direction: column; gap: 14px; align-items: stretch; }
  .rev-avg { display: flex; align-items: center; gap: 12px; justify-content: center; }
  .rev-avg-num { margin-bottom: 0; }
}

/* ============================================================
   Order status timeline (رهگیری)
   ============================================================ */
.timeline { position: relative; padding-inline-start: 6px; }
.tl-step { position: relative; display: flex; gap: 14px; padding-bottom: 22px; }
.tl-step:last-child { padding-bottom: 0; }
/* خط عمودی بین دایره‌ها */
.tl-step::before {
  content: ''; position: absolute; inset-block-start: 22px; inset-block-end: -4px;
  inset-inline-start: 13px; width: 2px; background: var(--line);
  transition: background var(--t);
}
.tl-step:last-child::before { display: none; }

/* حبابِ نگه‌دارندهٔ دایرهٔ کوچک (بدون آیکون) */
.tl-marker {
  position: relative; z-index: 1; flex: 0 0 auto;
  width: 28px; height: 28px;
  display: grid; place-items: center;
}
.tl-dot {
  position: relative;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--white); border: 2px solid var(--sage-300);
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.tl-content { padding-top: 3px; }
.tl-content h4 { font-size: .95rem; color: var(--muted); font-weight: 600; transition: color var(--t); }
.tl-content .tl-hint { display: block; font-size: .78rem; color: var(--muted); opacity: .8; }
.tl-content .tl-time { display: block; font-size: .74rem; color: var(--sage-500); font-weight: 600; margin-top: 3px; }

/* مرحلهٔ انجام‌شده: دایرهٔ توپُر سبز با ظهور نرم */
.tl-step.done .tl-dot { background: var(--sage-500); border-color: var(--sage-500); animation: tlPop .45s cubic-bezier(.34, 1.56, .64, 1) both; }
.tl-step.done::before { background: var(--sage-400); }
.tl-step.done .tl-content h4 { color: var(--leaf-900); }
@keyframes tlPop { 0% { transform: scale(.1); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

/* مرحلهٔ جاری: دایرهٔ سبز با موجِ نرمِ تکرارشونده */
.tl-step.current .tl-dot {
  background: var(--sage-500); border-color: var(--sage-500);
  box-shadow: 0 0 0 4px rgba(107, 166, 128, .18);
}
.tl-step.current .tl-dot::before,
.tl-step.current .tl-dot::after {
  content: ''; position: absolute; inset: -2px; border-radius: 50%;
  border: 2px solid var(--sage-500);
  animation: tlRipple 2s cubic-bezier(.22, .61, .36, 1) infinite;
}
.tl-step.current .tl-dot::after { animation-delay: 1s; }
@keyframes tlRipple {
  0%   { transform: scale(1);   opacity: .55; }
  100% { transform: scale(3);   opacity: 0; }
}
.tl-step.current .tl-content h4 { color: var(--sage-700); font-weight: 700; }

/* مرحلهٔ لغو */
.tl-step.cancelled .tl-dot { background: var(--danger); border-color: var(--danger); }
.tl-step.cancelled::before { background: #f3c9c7; }
.tl-step.cancelled .tl-content h4 { color: var(--danger); }

@media (prefers-reduced-motion: reduce) {
  .tl-step.current .tl-dot::before, .tl-step.current .tl-dot::after { animation: none; opacity: 0; }
  .tl-step.done .tl-dot { animation: none; }
}

/* اطلاعات کلید-مقدار */
.info-row { display: flex; justify-content: space-between; gap: 12px; padding-block: 8px; border-bottom: 1px solid var(--line); font-size: .9rem; }
.info-row:last-child { border-bottom: none; }
.info-row .text-muted { flex: 0 0 auto; }
.info-row > span:last-child { text-align: left; color: var(--ink); }

/* کارت سفارش قابل‌کلیک */
.order-card-link { display: block; cursor: pointer; transition: transform var(--t), box-shadow var(--t); }
.order-card-link:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* ============================================================
   Forms & cards
   ============================================================ */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.field { margin-bottom: 15px; }
.field label { display: block; font-size: .85rem; font-weight: 600; color: var(--sage-700); margin-bottom: 7px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border-radius: var(--r-md); border: 1.5px solid var(--line);
  background: var(--cream); transition: border var(--t-fast), background var(--t-fast); outline: none;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--sage-400); background: #fff; }
.field textarea { resize: vertical; min-height: 90px; }
.field .hint { font-size: .76rem; color: var(--muted); margin-top: 5px; }
.form-row { display: grid; gap: 0; }
@media (min-width: 560px) { .form-row { grid-template-columns: 1fr 1fr; gap: 15px; } }

/* ---------- Delivery date & slot picker ---------- */
.day-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; scroll-snap-type: x proximity; }
.day-row::-webkit-scrollbar { display: none; }
.day-chip {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 3px;
  min-width: 74px; padding: 10px 8px; border-radius: var(--r-md); background: var(--white);
  border: 1.5px solid var(--line); cursor: pointer; transition: all var(--t-fast); scroll-snap-align: start;
}
.day-chip .dc-week { font-size: .82rem; font-weight: 600; color: var(--sage-700); }
.day-chip .dc-date { font-size: .72rem; color: var(--muted); }
.day-chip:hover:not(.disabled) { border-color: var(--sage-300); }
.day-chip.active { background: var(--sage-500); border-color: var(--sage-500); box-shadow: var(--shadow-brand); }
.day-chip.active .dc-week, .day-chip.active .dc-date { color: #fff; }
.day-chip.disabled { opacity: .4; cursor: not-allowed; }

.slot-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 560px) { .slot-grid { grid-template-columns: repeat(4, 1fr); } }
.slot-chip {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 11px 8px;
  border-radius: var(--r-md); background: var(--white); border: 1.5px solid var(--line);
  cursor: pointer; transition: all var(--t-fast);
}
.slot-chip .sc-name { font-size: .85rem; font-weight: 600; color: var(--sage-700); }
.slot-chip .sc-time { font-size: .72rem; color: var(--muted); }
.slot-chip:hover:not(.disabled) { border-color: var(--sage-300); }
.slot-chip.active { background: var(--sage-500); border-color: var(--sage-500); box-shadow: var(--shadow-brand); }
.slot-chip.active .sc-name, .slot-chip.active .sc-time { color: #fff; }
.slot-chip.disabled { opacity: .4; cursor: not-allowed; }

/* نمایش زمان تحویل در کارت سفارش */
.delivery-badge { display: inline-flex; align-items: center; gap: 5px; background: var(--mint-100); color: var(--sage-700); padding: 4px 11px; border-radius: var(--r-pill); font-size: .78rem; font-weight: 600; }

/* ---------- Auth ---------- */
.auth-wrap { max-width: 430px; margin-inline: auto; padding-top: 12px; }
.auth-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 28px 24px; box-shadow: var(--shadow-md); }
.auth-head { text-align: center; margin-bottom: 22px; }
.auth-head .logo-lg { width: 60px; height: 60px; border-radius: 20px; background: linear-gradient(135deg, var(--sage-400), var(--sage-600)); display: grid; place-items: center; margin: 0 auto 14px; font-size: 1.7rem; box-shadow: var(--shadow-brand); }
.auth-head h2 { font-size: 1.4rem; color: var(--leaf-900); font-weight: 700; }
.auth-head p { color: var(--muted); font-size: .9rem; margin-top: 4px; }
.auth-switch { text-align: center; margin-top: 18px; color: var(--muted); font-size: .9rem; }
.auth-switch a { color: var(--sage-600); font-weight: 600; }
.demo-note { background: var(--mint-50); border: 1px dashed var(--sage-300); border-radius: var(--r-md); padding: 11px 14px; font-size: .78rem; color: var(--sage-700); margin-top: 16px; line-height: 1.9; }

/* ============================================================
   Tabs (panels)
   ============================================================ */
.tabs { display: flex; gap: 6px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 5px; overflow-x: auto; scrollbar-width: none; margin-bottom: 18px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 0 0 auto; padding: 9px 16px; border-radius: var(--r-pill); font-weight: 600; font-size: .88rem; color: var(--muted); transition: all var(--t-fast); white-space: nowrap; }
.tabs button.active { background: var(--sage-500); color: #fff; box-shadow: var(--shadow-brand); }

/* ---------- Panel header ---------- */
.panel-hero { background: linear-gradient(135deg, var(--sage-500), var(--sage-700)); border-radius: var(--r-xl); padding: 22px 22px; color: #fff; margin-bottom: 18px; position: relative; overflow: hidden; }
.panel-hero::after { content: '🌸'; position: absolute; font-size: 7rem; opacity: .16; inset-block-start: -14px; inset-inline-end: -6px; }
.panel-hero h2 { font-size: 1.3rem; font-weight: 700; position: relative; }
.panel-hero p { opacity: .9; font-size: .9rem; position: relative; }

/* ---------- Stat cards ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 20px; }
@media (min-width: 720px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; }
.stat-card .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--mint-100); display: grid; place-items: center; font-size: 1.2rem; margin-bottom: 10px; }
.stat-card .num { font-size: 1.5rem; font-weight: 700; color: var(--leaf-900); line-height: 1.2; }
.stat-card .lbl { font-size: .8rem; color: var(--muted); }

/* ---------- Data table ---------- */
.table-wrap { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th, td { text-align: right; padding: 13px 14px; font-size: .87rem; }
th { background: var(--mint-50); color: var(--sage-700); font-weight: 600; white-space: nowrap; }
td { border-top: 1px solid var(--line); color: var(--ink); }
tr:hover td { background: var(--mint-50); }

/* ---------- Status pill ---------- */
.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: var(--r-pill); font-size: .76rem; font-weight: 600; }
.st-0 { background: #fff5e6; color: #b8860b; }       /* pending */
.st-1 { background: var(--mint-100); color: var(--sage-700); } /* confirmed */
.st-2 { background: #e6f0fb; color: #3b7bc4; }       /* preparing */
.st-3 { background: #eae6fb; color: #6b4fc4; }       /* shipped */
.st-4 { background: #e3f5e8; color: var(--success); }/* delivered */
.st-5 { background: #fdeceb; color: var(--danger); } /* cancelled */

/* ---------- Order card (mobile) ---------- */
.order-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow-sm); }
.order-card .oc-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 4px; }
.order-card .oc-id { font-weight: 700; color: var(--leaf-900); font-size: .98rem; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-card .oc-date { font-size: .78rem; color: var(--muted); }
.order-card .status-pill { flex: 0 0 auto; white-space: nowrap; }
.oc-delivery { margin-top: 10px; }
.order-items-mini { display: flex; gap: 6px; margin-block: 12px; flex-wrap: nowrap; overflow: hidden; }
.order-items-mini .mini { width: 46px; height: 46px; flex: 0 0 auto; border-radius: 12px; overflow: hidden; background: var(--mint-50); border: 1px solid var(--line); }
.order-items-mini .mini img, .order-items-mini .mini svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.order-items-mini .more { width: 46px; height: 46px; flex: 0 0 auto; border-radius: 12px; background: var(--mint-100); display: grid; place-items: center; font-size: .8rem; font-weight: 700; color: var(--sage-700); }
.oc-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px dashed var(--line); padding-top: 12px; margin-top: 4px; }
.oc-count { font-size: .82rem; color: var(--muted); flex: 0 0 auto; }
.oc-total { font-weight: 800; color: var(--sage-700); font-size: 1.02rem; white-space: nowrap; }
.oc-cta { margin-top: 12px; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: .84rem; font-weight: 600; color: var(--sage-600); background: var(--mint-50); border-radius: var(--r-md); padding: 9px; }
.oc-cta svg { width: 15px; height: 15px; }

/* ============================================================
   Chat
   ============================================================ */
.fab-chat {
  position: fixed; inset-block-end: calc(var(--nav-h) + 16px); inset-inline-end: 16px; z-index: 90;
  width: 56px; height: 56px; border-radius: var(--r-pill);
  background: linear-gradient(135deg, var(--sage-500), var(--sage-600)); color: #fff;
  display: grid; place-items: center; box-shadow: var(--shadow-lg);
  transition: transform var(--t);
}
.fab-chat:hover { transform: scale(1.06); }
.fab-chat:active { transform: scale(.94); }
.fab-chat svg { width: 26px; height: 26px; }
.fab-chat .badge-count { inset-block-start: -2px; inset-inline-start: -2px; border-color: var(--cream); }
@media (min-width: 900px) { .fab-chat { inset-block-end: 24px; inset-inline-end: 24px; } }

/* ---------- ویجت گفتگو (موبایل: تمام‌صفحه، دسکتاپ: باکس شناور) ---------- */
.cw-overlay { position: fixed; inset: 0; z-index: 400; display: flex; opacity: 0; transition: opacity .2s ease; }
.cw-overlay.show { opacity: 1; }
.cw-panel {
  display: flex; flex-direction: column; background: var(--white);
  width: 100%; height: 100%; min-height: 0;
  transform: translateY(18px); transition: transform .26s cubic-bezier(.4, 0, .2, 1);
}
.cw-overlay.show .cw-panel { transform: none; }
.cw-panel .chat-body { flex: 1 1 auto; min-height: 0; }
.cw-head .cw-id { display: flex; flex-direction: column; }
.cw-close {
  margin-inline-start: auto; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(38, 56, 44, .06); color: var(--muted); font-size: 1rem;
  border: none; cursor: pointer; display: grid; place-items: center; flex: 0 0 auto;
  transition: background var(--t-fast);
}
.cw-close:hover { background: rgba(38, 56, 44, .12); }
/* iOS: احترام به نواحی امن */
.cw-panel .cw-head { padding-top: max(14px, env(safe-area-inset-top)); }
.cw-panel .cw-form { padding-bottom: max(12px, env(safe-area-inset-bottom)); }

.cw-guest { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; padding: 30px 20px; color: var(--muted); }
.cw-guest .ic { font-size: 2.4rem; }
.cw-guest h3 { color: var(--leaf-900); font-size: 1.05rem; }

/* قفل اسکرول پس‌زمینه فقط روی موبایل (تمام‌صفحه) */
@media (max-width: 899px) { body.cw-open { overflow: hidden; } }

/* دسکتاپ: باکس شناور مثل چت‌بات، بدون مسدودکردن صفحه */
@media (min-width: 900px) {
  .cw-overlay { background: transparent; pointer-events: none; }
  .cw-panel {
    pointer-events: auto;
    position: fixed; inset-block-end: 92px; inset-inline-end: 24px;
    width: 380px; height: 560px; max-height: calc(100vh - 130px);
    border-radius: 22px; overflow: hidden;
    border: 1px solid var(--line); box-shadow: var(--shadow-lg);
    transform: translateY(24px) scale(.98);
  }
  .cw-overlay.show .cw-panel { transform: none; }
}

.chat-shell { display: flex; flex-direction: column; height: calc(100vh - var(--header-h) - var(--nav-h) - 20px); background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
@media (min-width: 900px) { .chat-shell { height: calc(100vh - var(--header-h) - 60px); } }
.chat-topbar { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; background: var(--mint-50); }
.chat-topbar .avatar { width: 40px; height: 40px; border-radius: var(--r-pill); background: linear-gradient(135deg, var(--sage-400), var(--sage-600)); display: grid; place-items: center; color: #fff; font-weight: 700; }
.chat-topbar h4 { font-size: .95rem; color: var(--leaf-900); }
.chat-topbar .status { font-size: .74rem; color: var(--success); display: flex; align-items: center; gap: 4px; }
.chat-topbar .status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--success); }

.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--cream); }
.msg { max-width: 78%; padding: 10px 14px; border-radius: 18px; font-size: .9rem; line-height: 1.6; position: relative; word-break: break-word; }
.msg .time { display: block; font-size: .66rem; opacity: .6; margin-top: 4px; }
.msg-in { background: var(--white); border: 1px solid var(--line); align-self: flex-start; border-end-start-radius: 6px; color: var(--ink); }
.msg-out { background: linear-gradient(135deg, var(--sage-500), var(--sage-600)); color: #fff; align-self: flex-end; border-end-end-radius: 6px; }
.chat-day { align-self: center; font-size: .72rem; color: var(--muted); background: var(--mint-100); padding: 3px 12px; border-radius: var(--r-pill); }

.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: var(--white); }
.chat-input input { flex: 1; padding: 12px 16px; border-radius: var(--r-pill); border: 1.5px solid var(--line); background: var(--cream); outline: none; }
.chat-input input:focus { border-color: var(--sage-400); }
.chat-input button { width: 46px; height: 46px; border-radius: var(--r-pill); background: var(--sage-500); color: #fff; display: grid; place-items: center; flex: 0 0 auto; }
.chat-input button svg { width: 20px; height: 20px; }

/* ---------- Admin chat two-pane ---------- */
.chat-admin { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 820px) { .chat-admin { grid-template-columns: 300px 1fr; } }
.convo-list { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; max-height: 70vh; overflow-y: auto; }
.convo-item { display: flex; gap: 10px; padding: 13px 14px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background var(--t-fast); align-items: center; }
.convo-item:hover { background: var(--mint-50); }
.convo-item.active { background: var(--mint-100); }
.convo-item .avatar { width: 40px; height: 40px; border-radius: var(--r-pill); background: var(--sage-400); color: #fff; display: grid; place-items: center; font-weight: 700; flex: 0 0 auto; }
.convo-item .ci-main { flex: 1; min-width: 0; }
.convo-item .ci-main h5 { font-size: .88rem; color: var(--leaf-900); font-weight: 600; }
.convo-item .ci-main p { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convo-item .ci-badge { min-width: 20px; height: 20px; padding: 0 6px; background: var(--blush-dark); color: #fff; border-radius: var(--r-pill); font-size: .68rem; font-weight: 700; display: grid; place-items: center; }

/* ============================================================
   Misc — toast, modal, empty, skeleton
   ============================================================ */
.toast-wrap { position: fixed; inset-block-start: calc(var(--header-h) + 10px); inset-inline: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; background: var(--leaf-900); color: #fff; padding: 11px 20px; border-radius: var(--r-pill); font-size: .88rem; font-weight: 500; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 8px; animation: toastIn .3s ease, toastOut .3s ease 2.4s forwards; max-width: 90%; }
.toast.success { background: var(--sage-600); }
.toast.error { background: var(--danger); }
.toast svg { width: 18px; height: 18px; }
@keyframes toastIn { from { transform: translateY(-16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes toastOut { to { transform: translateY(-16px); opacity: 0; } }

.modal-back { position: fixed; inset: 0; z-index: 300; background: rgba(38, 56, 44, .45); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal { background: var(--white); border-radius: var(--r-xl); padding: 24px; max-width: 480px; width: 100%; max-height: 88vh; overflow-y: auto; animation: pop .25s cubic-bezier(.4,0,.2,1); }
@keyframes pop { from { transform: scale(.94) translateY(10px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }
.modal h3 { font-size: 1.15rem; color: var(--leaf-900); margin-bottom: 16px; font-weight: 700; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }

.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty .ic { font-size: 3.5rem; margin-bottom: 12px; opacity: .8; }
.empty h3 { color: var(--sage-700); font-size: 1.1rem; margin-bottom: 6px; }
.empty p { font-size: .9rem; margin-bottom: 18px; }

.skeleton { background: linear-gradient(90deg, var(--mint-50) 25%, var(--mint-100) 37%, var(--mint-50) 63%); background-size: 400% 100%; animation: shimmer 1.4s infinite; border-radius: var(--r-md); }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.sk-card { aspect-ratio: 3/4; border-radius: var(--r-lg); }

/* ---------- Fade page transitions ---------- */
.page-enter { animation: pageIn .35s ease; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Scrollbar (desktop) ---------- */
@media (min-width: 900px) {
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-thumb { background: var(--sage-300); border-radius: 10px; border: 2px solid var(--cream); }
  ::-webkit-scrollbar-track { background: transparent; }
}

/* ============================================================
   Image picker (admin)
   ============================================================ */
.img-picker-row { display: flex; gap: 14px; align-items: stretch; }
.img-preview { width: 92px; height: 92px; border-radius: var(--r-md); overflow: hidden; background: var(--mint-50); border: 1px solid var(--line); flex: 0 0 auto; }
.img-preview img, .img-preview svg { width: 100%; height: 100%; object-fit: cover; }
.img-picker-controls { flex: 1; display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.img-upload-btn { position: relative; overflow: hidden; text-align: center; }
.img-picker-controls .hint { margin: 0; }

/* نوار پیشرفت آپلود */
.upload-progress { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.upload-progress .up-bar { flex: 1; height: 8px; background: var(--mint-100); border-radius: 99px; overflow: hidden; }
.upload-progress .up-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--sage-400), var(--sage-600)); border-radius: 99px; transition: width .2s ease; }
.upload-progress .up-pct { font-size: .78rem; font-weight: 700; color: var(--sage-700); min-width: 42px; text-align: left; }

/* چند تصویر (گالری محصول در پنل) */
.multi-thumbs { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.mthumb { position: relative; width: 72px; height: 72px; border-radius: var(--r-md); overflow: hidden; border: 2px solid var(--line); flex: 0 0 auto; }
.mthumb.is-cover { border-color: var(--sage-500); }
.mthumb img, .mthumb svg { width: 100%; height: 100%; object-fit: cover; }
.mthumb .cover-badge { position: absolute; inset-block-end: 0; inset-inline: 0; background: var(--sage-500); color: #fff; font-size: .62rem; text-align: center; padding: 1px; font-weight: 600; }
.mthumb .rm-thumb { position: absolute; inset-block-start: 2px; inset-inline-end: 2px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: .7rem; display: grid; place-items: center; }
.mthumb .mk-cover { position: absolute; inset-block-start: 2px; inset-inline-start: 2px; width: 20px; height: 20px; border-radius: 50%; background: rgba(255,255,255,.85); color: var(--gold); font-size: .72rem; display: grid; place-items: center; }

/* ============================================================
   Product detail gallery
   ============================================================ */
.detail-gallery { position: sticky; top: calc(var(--header-h) + 12px); }
@media (max-width: 819px) { .detail-gallery { position: static; } }
.detail-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.detail-thumbs::-webkit-scrollbar { display: none; }
.detail-thumb { width: 66px; height: 66px; border-radius: var(--r-md); overflow: hidden; border: 2px solid transparent; flex: 0 0 auto; cursor: pointer; background: var(--mint-50); transition: border var(--t-fast); padding: 0; }
.detail-thumb img, .detail-thumb svg { width: 100%; height: 100%; object-fit: cover; }
.detail-thumb.active { border-color: var(--sage-500); }

/* ============================================================
   Explore gallery (سبک اکسپلور اینستاگرام)
   ============================================================ */
.explore-head { margin-bottom: 16px; }
.explore-head h2 { font-size: 1.4rem; color: var(--leaf-900); font-weight: 700; }
.explore-head p { color: var(--muted); font-size: .9rem; }
.explore-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; grid-auto-flow: dense; }
@media (min-width: 768px) { .explore-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; } }
@media (min-width: 1100px) { .explore-grid { grid-template-columns: repeat(5, 1fr); gap: 8px; } }
.explore-tile {
  position: relative; aspect-ratio: 1; overflow: hidden; cursor: pointer; border: none;
  background: var(--mint-50); border-radius: 6px;
}
.explore-tile.big { grid-column: span 2; grid-row: span 2; }
.explore-tile img, .explore-tile video, .explore-tile svg { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.explore-tile:hover img, .explore-tile:hover video, .explore-tile:hover svg { transform: scale(1.06); }
.explore-tile .explore-cap {
  position: absolute; inset-inline: 0; inset-block-end: 0; padding: 16px 8px 6px;
  background: linear-gradient(to top, rgba(38,56,44,.7), transparent);
  color: #fff; font-size: .74rem; font-weight: 500; text-align: right;
  opacity: 0; transition: opacity var(--t); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.explore-tile:hover .explore-cap { opacity: 1; }
.play-badge {
  position: absolute; inset-block-start: 7px; inset-inline-end: 7px;
  width: 24px; height: 24px; border-radius: 50%; background: rgba(0,0,0,.5); backdrop-filter: blur(3px);
  display: grid; place-items: center; color: #fff; pointer-events: none;
}
.play-badge svg { width: 13px; height: 13px; transform: none !important; }
.explore-tile.skeleton { border-radius: 6px; }

/* آمار روی تایل (لایک/کامنت) */
.tile-stats {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 16px;
  background: rgba(38,56,44,.42); color: #fff; opacity: 0; transition: opacity var(--t); font-weight: 700; font-size: .9rem;
}
.tile-stats span { display: inline-flex; align-items: center; gap: 5px; }
.tile-stats svg { width: 18px; height: 18px; }
.explore-tile:hover .tile-stats { opacity: 1; }
@media (hover: none) { .tile-stats { display: none; } }

/* ============================================================
   Lightbox (نمای پست اینستاگرامی: رسانه + لایک/کامنت/شیر)
   ============================================================ */
.lightbox {
  position: fixed; inset: 0; z-index: 400; background: #000;
  display: grid; place-items: center; animation: fade .2s ease;
}

/* قاب رسانه: موبایل تمام‌صفحه، دسکتاپ ستون عمودی وسط (مثل ریلز) */
.lb-frame {
  position: relative; overflow: hidden; background: #000;
  width: 100vw; height: 100dvh;
}
@media (min-width: 900px) {
  .lb-frame { width: min(480px, 96vw); height: min(92vh, 880px); border-radius: 20px; box-shadow: var(--shadow-lg); }
}

/* رسانه تمام‌قاب */
.lb-stage { position: absolute; inset: 0; background: #000; display: grid; place-items: center; overflow: hidden; }
.lb-full { width: 100%; height: 100%; object-fit: contain; display: block; }

/* ویدیو + دکمه پخش/توقف کاملاً مرکزی */
.lb-video { position: absolute; inset: 0; }
.lb-video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; cursor: pointer; }
.lb-pp {
  position: absolute; inset: 0; margin: auto;               /* دقیقاً وسط قاب */
  width: 76px; height: 76px; border-radius: 50%;
  background: rgba(20, 28, 22, .5); backdrop-filter: blur(4px);
  color: #fff; display: grid; place-items: center; border: none; cursor: pointer;
  z-index: 3; transition: opacity var(--t), transform var(--t-fast);
}
.lb-pp svg { width: 34px; height: 34px; }
/* مثلث «پخش» به‌طور بصری کمی به راست جابه‌جا می‌شود تا در مرکز دیده شود */
.lb-video:not(.playing) .lb-pp svg { transform: translateX(3px); }
.lb-pp:active { transform: scale(.92); }
.lb-video.hide-btn .lb-pp { opacity: 0; pointer-events: none; }

/* پرده‌ی گرادیانی پایین برای خوانایی کنترل‌ها روی رسانه */
.lb-scrim {
  position: absolute; inset-inline: 0; inset-block-end: 0; height: 44%;
  background: linear-gradient(to top, rgba(0,0,0,.6), rgba(0,0,0,.12) 60%, transparent);
  pointer-events: none; z-index: 2;
}

/* لایه‌ی کنترل‌ها روی رسانه (کپشن + ریل اکشن) */
.lb-overlay {
  position: absolute; inset-inline: 0; inset-block-end: 0; z-index: 3;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  pointer-events: none;
}
.lb-info { flex: 1; min-width: 0; color: #fff; pointer-events: auto; }
.lb-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 6px; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.lb-avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--sage-400), var(--sage-600)); display: grid; place-items: center; font-size: .9rem; }
.lb-caption { font-size: .9rem; line-height: 1.7; text-shadow: 0 1px 3px rgba(0,0,0,.55); max-height: 5.4em; overflow-y: auto; }

/* ریل اکشن عمودی (لایک/کامنت/شیر) — استایل ریلز */
.lb-rail { display: flex; flex-direction: column; align-items: center; gap: 16px; pointer-events: auto; }
.lb-act {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; cursor: pointer; color: #fff; font-weight: 700; font-size: .78rem;
  transition: transform var(--t-fast);
}
.lb-act svg { width: 30px; height: 30px; filter: drop-shadow(0 2px 5px rgba(0,0,0,.5)); }
.lb-act:active { transform: scale(.88); }
.lb-like.on { color: var(--blush); }

/* پس‌زمینه‌ی تیره هنگام باز بودن شیت نظرات */
.lb-sheet-back { position: absolute; inset: 0; z-index: 4; background: rgba(0,0,0,.4); opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.lb-sheet-back.show { opacity: 1; pointer-events: auto; }

/* شیت نظرات کشویی از پایین */
.lb-sheet {
  position: absolute; inset-inline: 0; inset-block-end: 0; z-index: 5;
  height: 70%; display: flex; flex-direction: column;
  background: var(--white); border-radius: 22px 22px 0 0;
  box-shadow: 0 -10px 30px rgba(0,0,0,.28);
  transform: translateY(101%); transition: transform .3s cubic-bezier(.4, 0, .2, 1);
}
.lb-sheet.open { transform: none; }
.lb-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.lb-sheet-title { font-weight: 700; color: var(--leaf-900); }
.lb-sheet-close { width: 32px; height: 32px; border-radius: 50%; background: rgba(38,56,44,.06); color: var(--muted); border: none; cursor: pointer; display: grid; place-items: center; }
.lb-sheet-close:hover { background: rgba(38,56,44,.12); }

.lb-comments { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 12px; }
.lb-c-loading, .lb-c-empty { color: var(--muted); font-size: .85rem; text-align: center; padding: 20px 0; }
.lb-comment { display: flex; gap: 10px; align-items: flex-start; }
.lb-c-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--sage-400); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .8rem; flex: 0 0 auto; }
.lb-c-body { flex: 1; min-width: 0; }
.lb-c-top { display: flex; align-items: center; gap: 8px; }
.lb-c-top b { font-size: .85rem; color: var(--leaf-900); }
.lb-c-top span { font-size: .72rem; color: var(--muted); }
.lb-c-body p { font-size: .88rem; color: var(--ink); line-height: 1.7; margin-top: 2px; word-break: break-word; }
.lb-c-del { color: var(--muted); width: 24px; height: 24px; border-radius: 6px; flex: 0 0 auto; background: none; border: none; cursor: pointer; }
.lb-c-del:hover { color: var(--danger); background: #fdeceb; }

.lb-comment-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
.lb-comment-form input { flex: 1; padding: 10px 14px; border-radius: var(--r-pill); border: 1.5px solid var(--line); background: var(--cream); outline: none; }
.lb-comment-form input:focus { border-color: var(--sage-400); }
.lb-comment-form button { width: 42px; height: 42px; border-radius: 50%; background: var(--sage-500); color: #fff; border: none; cursor: pointer; display: grid; place-items: center; flex: 0 0 auto; }
.lb-comment-form button svg { width: 18px; height: 18px; }

.lb-close {
  position: fixed; inset-block-start: max(14px, env(safe-area-inset-top)); inset-inline-end: 14px; z-index: 8;
  width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.16); color: #fff;
  font-size: 1.3rem; border: none; cursor: pointer; display: grid; place-items: center; transition: background var(--t);
}
.lb-close:hover { background: rgba(255,255,255,.3); }
.lb-nav {
  position: fixed; inset-block-start: 50%; transform: translateY(-50%); z-index: 7;
  width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff;
  font-size: 1.9rem; line-height: 1; border: none; cursor: pointer; display: grid; place-items: center; transition: background var(--t);
}
.lb-nav:hover { background: rgba(255,255,255,.28); }
.lb-prev { inset-inline-start: 14px; }
.lb-next { inset-inline-end: 14px; }
/* روی موبایل به‌جای فلش، سوایپ افقی استفاده می‌شود */
@media (max-width: 899px) { .lb-nav { display: none; } }

/* ============================================================
   Category banner cards (home)
   ============================================================ */
/* کارت کاور تمام‌صفحه با متن روی هاور */
.cat-card.cat-cover { position: relative; padding: 0; overflow: hidden; aspect-ratio: 1 / 1; border: none; display: block; }
.cat-card.cat-cover > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform var(--t); }
.cat-card.cat-cover:hover > img { transform: scale(1.07); }
.cat-cover-info {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; text-align: center; padding: 12px; color: #fff;
  background: linear-gradient(to top, rgba(38,56,44,.6), rgba(38,56,44,.2));
  opacity: 0; transition: opacity var(--t);
}
.cat-card.cat-cover:hover .cat-cover-info { opacity: 1; }
.cat-cover-info h3 { color: #fff; font-size: 1.02rem; font-weight: 700; }
.cat-cover-info small { color: rgba(255,255,255,.9); font-size: .78rem; }
/* روی دستگاه‌های لمسی (بدون هاور): هیچ پرده‌ای روی عکس نیست تا کامل دیده شود؛
   عنوان به‌صورت یک نوار تمیز زیر عکس نمایش داده می‌شود */
@media (hover: none) {
  .cat-card.cat-cover {
    aspect-ratio: auto;
    display: flex; flex-direction: column;
    background: var(--white); border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
  }
  .cat-card.cat-cover > img {
    position: static;
    aspect-ratio: 1 / 1; height: auto;
  }
  .cat-cover-info {
    position: static; inset: auto; opacity: 1;
    background: none;
    flex-direction: row; flex-wrap: wrap;
    align-items: baseline; justify-content: center;
    gap: 3px 6px; padding: 9px 8px 10px;
  }
  .cat-cover-info h3 { color: var(--leaf-900); font-size: .9rem; }
  .cat-cover-info small { color: var(--muted); }
}

/* ============================================================
   Flash sale — پیشنهاد شگفت‌انگیز (فروش ویژه روزانه)
   ============================================================ */
.flash-sale {
  position: relative;
  border-radius: var(--r-xl);
  padding: 22px 20px 24px;
  overflow: hidden;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(255,255,255,.28), transparent 55%),
    linear-gradient(135deg, #ff6e7f 0%, #d67f7a 45%, #b8556a 100%);
  box-shadow: 0 18px 44px rgba(184, 85, 106, .32);
  isolation: isolate;
}
/* درخشش نرم پس‌زمینه */
.flash-sale::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(60% 80% at 8% 120%, rgba(255,255,255,.16), transparent 60%);
  pointer-events: none;
}
.flash-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 16px;
}
.flash-title { display: flex; align-items: center; gap: 12px; }
.flash-fire {
  font-size: 1.9rem; line-height: 1;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,.22));
  animation: flashPulse 1.6s ease-in-out infinite;
}
@keyframes flashPulse { 0%,100% { transform: scale(1) rotate(-3deg); } 50% { transform: scale(1.14) rotate(3deg); } }
.flash-title h2 { color: #fff; font-size: 1.28rem; font-weight: 800; letter-spacing: -.01em; }
.flash-sub { display: block; color: rgba(255,255,255,.9); font-size: .8rem; margin-top: 2px; }

/* لینک «مشاهده همه» در هدر سکشن */
.flash-all-top {
  margin-top: 0; padding: 7px 14px;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px; backdrop-filter: blur(4px);
}
.flash-all-top:hover { background: rgba(255,255,255,.28); }

/* نوار افقی محصولات */
.flash-strip {
  display: flex; gap: 12px; overflow-x: auto; overflow-y: hidden; padding: 6px 2px 10px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.5) transparent;
}
.flash-strip::-webkit-scrollbar { height: 6px; }
.flash-strip::-webkit-scrollbar-thumb { background: rgba(255,255,255,.45); border-radius: 999px; }

.sale-card {
  scroll-snap-align: start;
  flex: 0 0 clamp(150px, 44%, 190px);
  background: var(--white); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  transition: transform var(--t), box-shadow var(--t);
}
.sale-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.sale-media { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; }
.sale-media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t); }
.sale-card:hover .sale-media img { transform: scale(1.06); }
.sale-badge {
  position: absolute; top: 8px; inset-inline-start: 8px;
  background: linear-gradient(135deg, #ff5470, #d6285a);
  color: #fff; font-size: .78rem; font-weight: 800;
  padding: 3px 8px; border-radius: 999px; direction: ltr;
  box-shadow: 0 4px 10px rgba(214,40,90,.4);
}
.sale-body { padding: 10px 11px 12px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.sale-name {
  font-size: .86rem; font-weight: 600; color: var(--leaf-900); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.4em;
}
.sale-prices { display: flex; flex-direction: column; gap: 1px; margin-top: auto; }
.sale-old { color: var(--muted); font-size: .74rem; text-decoration: line-through; }
.sale-now { color: var(--blush-dark); font-weight: 800; font-size: 1rem; }
.sale-now small { font-weight: 500; font-size: .68rem; color: var(--muted); }
.sale-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sale-add {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 11px;
  background: linear-gradient(135deg, #ff6e7f, #d67f7a); color: #fff;
  border: none; display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 6px 14px rgba(214,127,122,.4); transition: transform var(--t-fast);
}
.sale-add:hover { transform: scale(1.08); }
.sale-add svg { width: 18px; height: 18px; }

/* شمارنده‌ی اختصاصی هر محصول — جعبه‌های جدا برای روز/ساعت/دقیقه/ثانیه */
.sale-timer { display: flex; gap: 4px; width: 100%; direction: ltr; }
.sale-timer .stb {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 3px 2px 2px; border-radius: 9px;
  background: linear-gradient(150deg, #fff, #fff2f4);
  border: 1px solid rgba(214,40,90,.16);
  box-shadow: 0 1px 3px rgba(214,40,90,.08);
}
.sale-timer .stb b {
  font-size: .9rem; font-weight: 800; color: #c02657; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.sale-timer .stb i { font-style: normal; font-size: .54rem; color: var(--muted); margin-top: 1px; }
.sale-timer.ended { padding: 3px 0; justify-content: center; }
.sale-timer .st-end { font-size: .78rem; font-weight: 800; color: var(--muted); }
.sale-card.sale-ended { opacity: .6; }
.sale-card.sale-ended .sale-add { pointer-events: none; filter: grayscale(1); opacity: .7; }

/* انتخابگر شمسیِ «پایان تخفیف» در پنل ادمین */
.sale-end-picker {
  border: 1.5px solid var(--line); background: var(--cream);
  border-radius: var(--r-md); padding: 12px;
  display: flex; flex-direction: column; gap: 11px;
}
.sep-presets { display: flex; flex-wrap: wrap; gap: 7px; }
.sep-chip {
  padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--line);
  background: #fff; color: var(--sage-700); font-family: inherit;
  font-size: .82rem; font-weight: 700; cursor: pointer; transition: all var(--t-fast);
}
.sep-chip:hover { border-color: var(--sage-400); }
.sep-chip.active { background: var(--sage-500); border-color: var(--sage-500); color: #fff; }
.sep-chip.sep-clear { margin-inline-start: auto; color: var(--danger); }
.sep-chip.sep-clear.active { background: var(--danger); border-color: var(--danger); color: #fff; }
.sep-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sep-grid select {
  width: auto; flex: 0 0 auto; padding: 8px 9px; border-radius: 10px;
  border: 1.5px solid var(--line); background: #fff; font-family: inherit; font-size: .85rem;
}
.sep-grid .sep-sep { font-size: .8rem; color: var(--muted); margin-inline-start: 4px; }
.sep-grid .sep-colon { font-weight: 800; color: var(--muted); }
.sep-preview {
  font-size: .84rem; color: var(--muted); background: #fff;
  border: 1px dashed var(--line); border-radius: 10px; padding: 8px 11px; text-align: center;
}
.sep-preview.active { border-style: solid; border-color: var(--sage-300); color: var(--leaf-900); }
.sep-preview b { color: var(--blush-dark); font-weight: 800; }

.flash-all {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 4px;
  color: #fff; font-weight: 700; font-size: .9rem; text-decoration: none;
  opacity: .95; transition: opacity var(--t-fast);
}
.flash-all:hover { opacity: 1; }
.flash-all svg { width: 16px; height: 16px; }

@media (max-width: 480px) {
  .flash-sale { padding: 18px 14px 20px; }
  .flash-title h2 { font-size: 1.12rem; }
  .flash-fire { font-size: 1.6rem; }
  .flash-all-top { padding: 6px 11px; font-size: .82rem; }
}

/* ============================================================
   Category admin cards
   ============================================================ */
.cat-admin-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 560px) { .cat-admin-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .cat-admin-grid { grid-template-columns: repeat(3, 1fr); } }
.cat-admin-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.cat-admin-banner { aspect-ratio: 16 / 8; background: linear-gradient(135deg, var(--mint-100), var(--mint-200)); display: grid; place-items: center; overflow: hidden; }
.cat-admin-banner img { width: 100%; height: 100%; object-fit: cover; }
.cat-admin-emoji { font-size: 2.6rem; }
.cat-admin-body { padding: 14px; }
.cat-admin-body h4 { font-size: .98rem; color: var(--leaf-900); font-weight: 600; }

/* ============================================================
   PWA install banner
   ============================================================ */
.install-banner {
  position: fixed; z-index: 150; inset-inline: 12px;
  inset-block-end: calc(var(--nav-h) + 12px + env(safe-area-inset-bottom));
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); padding: 12px 14px; display: flex; align-items: center; gap: 12px;
  transform: translateY(140%); opacity: 0; transition: transform .35s cubic-bezier(.4,0,.2,1), opacity .35s;
  max-width: 460px; margin-inline: auto;
}
.install-banner.show { transform: translateY(0); opacity: 1; }
@media (min-width: 900px) { .install-banner { inset-inline: auto; inset-inline-end: 24px; inset-block-end: 24px; width: 380px; } }
.install-banner .ib-icon { width: 46px; height: 46px; border-radius: 12px; overflow: hidden; flex: 0 0 auto; box-shadow: var(--shadow-sm); }
.install-banner .ib-icon img { width: 100%; height: 100%; }
.install-banner .ib-text { flex: 1; min-width: 0; }
.install-banner .ib-text b { display: block; color: var(--leaf-900); font-size: .92rem; }
.install-banner .ib-text span { display: block; color: var(--muted); font-size: .76rem; line-height: 1.6; }
.install-banner .ib-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.install-banner .ib-close { width: 30px; height: 30px; border-radius: 50%; color: var(--muted); display: grid; place-items: center; font-size: .8rem; }
.install-banner .ib-close:hover { background: var(--mint-50); color: var(--ink); }

/* ---------- utility ---------- */
.text-muted { color: var(--muted); }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 14px; } .mt-4 { margin-top: 20px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 14px; }
.flex { display: flex; } .items-center { align-items: center; } .gap-2 { gap: 8px; } .gap-3 { gap: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ============================================================
   ظهور نرم هنگام اسکرول (Reveal on scroll)
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s cubic-bezier(.22, .61, .36, 1),
              transform .7s cubic-bezier(.22, .61, .36, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal.reveal-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   کیف پول (Wallet)
   ============================================================ */
.wallet-hero {
  background: linear-gradient(135deg, var(--sage-500), var(--sage-700));
  color: #fff;
  border-radius: var(--r-lg);
  padding: 22px 20px;
  box-shadow: var(--shadow-brand);
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}
.wallet-hero::after {
  content: '🌿';
  position: absolute;
  inset-inline-end: -8px;
  bottom: -18px;
  font-size: 88px;
  opacity: .16;
  transform: rotate(-12deg);
}
.wallet-hero .wh-label { font-size: .82rem; opacity: .9; }
.wallet-hero .wh-balance { font-size: 2rem; font-weight: 800; margin-top: 4px; letter-spacing: -.5px; }
.wallet-hero .wh-actions { margin-top: 16px; position: relative; z-index: 1; }
.wallet-hero .wh-actions .btn {
  background: rgba(255, 255, 255, .18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .35);
  backdrop-filter: blur(4px);
}
.wallet-hero .wh-actions .btn:hover { background: rgba(255, 255, 255, .28); }

.wtxn-list { display: flex; flex-direction: column; }
.wtxn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--line);
}
.wtxn:last-child { border-bottom: none; }
.wtxn-ic {
  width: 38px; height: 38px; flex: 0 0 auto;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 1.1rem; font-weight: 700;
}
.wtxn-ic.in { background: var(--mint-100); color: var(--sage-600); }
.wtxn-ic.out { background: #fdeceb; color: var(--blush-dark); }
.wtxn-main { flex: 1; min-width: 0; }
.wtxn-main h5 { font-size: .9rem; color: var(--leaf-900); font-weight: 600; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wtxn-main span { font-size: .74rem; color: var(--muted); }
.wtxn-amt { font-weight: 700; font-size: .95rem; white-space: nowrap; }
.wtxn-amt.in { color: var(--success); }
.wtxn-amt.out { color: var(--blush-dark); }

/* کارت کد معرف */
.referral-card {
  background: linear-gradient(135deg, #fff, var(--mint-50));
  border: 1px solid var(--mint-200);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
}
.referral-card .ref-head h4 { color: var(--leaf-900); font-size: 1.05rem; margin-bottom: 6px; }
.referral-card .ref-head p { color: var(--sage-700); font-size: .84rem; line-height: 1.7; }
.ref-code {
  display: flex; align-items: center; gap: 10px;
  margin: 14px 0 10px;
  background: #fff;
  border: 1.5px dashed var(--sage-400);
  border-radius: var(--r-md);
  padding: 8px 8px 8px 14px;
}
.ref-code code {
  flex: 1;
  font-family: inherit;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 2px;
  color: var(--sage-700);
  direction: ltr;
  text-align: center;
}
.ref-stats {
  display: flex; flex-wrap: wrap; gap: 8px 16px;
  font-size: .8rem; color: var(--muted);
}
.ref-stats b { color: var(--leaf-900); }

/* ============================================================
   کد تخفیف و کیف پول در تسویه‌حساب
   ============================================================ */
.promo-box {
  border-top: 1px dashed var(--line);
  padding-top: 12px;
  margin-top: 4px;
}
.promo-input-row { display: flex; gap: 8px; }
.promo-input-row input {
  flex: 1;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  font-family: inherit;
  font-size: .9rem;
  background: var(--cream);
}
.promo-input-row input:focus { outline: none; border-color: var(--sage-400); background: #fff; }
.promo-input-row .btn { flex: 0 0 auto; }
.promo-msg { font-size: .78rem; margin-top: 8px; min-height: 0; }
.promo-msg.ok { color: var(--success); }
.promo-msg.err { color: var(--danger); }

.summary-row.discount-row { color: var(--success); font-weight: 600; }
.summary-row.discount-row b { font-weight: 700; letter-spacing: .5px; }
.promo-remove {
  border: none; background: none; cursor: pointer;
  color: var(--danger); font-size: .8rem; padding: 0 2px; line-height: 1;
}

.wallet-toggle {
  display: flex; align-items: center; gap: 10px;
  margin-top: 10px;
  padding: 12px;
  background: var(--mint-50);
  border: 1px solid var(--mint-200);
  border-radius: var(--r-md);
  cursor: pointer;
  font-size: .88rem;
  color: var(--leaf-900);
}
.wallet-toggle input { width: 20px; height: 20px; accent-color: var(--sage-500); flex: 0 0 auto; }
.wallet-toggle .wt-text b { color: var(--sage-700); font-weight: 700; }
.summary-row.wallet-row { color: var(--sage-700); font-weight: 600; }

/* کد در جدول مدیریت تخفیف‌ها */
.dc-code {
  font-family: inherit;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--sage-700);
  background: var(--mint-50);
  padding: 3px 8px;
  border-radius: 6px;
  direction: ltr;
  display: inline-block;
}

/* ============================================================
   فرم احراز هویت: نمایش/مخفی رمز، خطای فیلد، یادداشت هدیه
   ============================================================ */
.pw-wrap { position: relative; }
.pw-wrap input { padding-inline-end: 44px; }
.pw-toggle {
  position: absolute;
  inset-inline-end: 8px;
  inset-block-start: 50%;
  transform: translateY(-50%);
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: none; background: none; cursor: pointer;
  color: var(--muted);
  border-radius: 8px;
  transition: color var(--t-fast), background var(--t-fast);
}
.pw-toggle:hover { color: var(--sage-600); background: var(--mint-50); }
.pw-toggle.on { color: var(--sage-600); }
.pw-toggle svg { width: 20px; height: 20px; }

.field-err { color: var(--danger); min-height: 0; }
.field input.invalid { border-color: var(--danger); background: #fdf3f2; }

.wallet-gift-note {
  margin-top: 12px;
  background: var(--mint-50);
  border: 1px solid var(--mint-200);
  border-radius: var(--r-md);
  padding: 10px 12px;
  font-size: .82rem;
  color: var(--sage-700);
  line-height: 1.6;
}

/* ============================================================
   بنر اسلایدر صفحهٔ اصلی
   ============================================================ */
.hero-slider { position: relative; margin-bottom: 12px; }
/* کمی فاصله از هدرِ چسبان روی دسکتاپ تا بنر زیر هدر نرود */
@media (min-width: 900px) { .hero-slider { margin-top: 14px; } }
.hs-viewport {
  display: flex; gap: 0;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.hs-viewport::-webkit-scrollbar { display: none; }
.hs-slide {
  flex: 0 0 100%;           /* یک بنر در هر نما */
  scroll-snap-align: center;
  aspect-ratio: 16 / 9;
  background: var(--mint-100);
  overflow: hidden;
  display: block;
}
.hs-slide img, .hs-slide svg { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (min-width: 700px) { .hs-slide { aspect-ratio: 3 / 1; } }

/* دکمه‌های قبلی/بعدیِ شیشه‌ای */
.hs-arrow {
  position: absolute; inset-block-start: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%; z-index: 3;
  display: grid; place-items: center; cursor: pointer;
  color: var(--leaf-900);
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(8px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, .6);
  box-shadow: var(--shadow-sm);
  transition: background var(--t-fast), transform var(--t-fast);
}
.hs-arrow:hover { background: #fff; }
.hs-arrow:active { transform: translateY(-50%) scale(.92); }
.hs-arrow svg { width: 20px; height: 20px; }
.hs-prev { right: 10px; }   /* بازگشت — سمت راست */
.hs-next { left: 10px; }    /* بعدی — سمت چپ */
@media (max-width: 480px) { .hs-arrow { width: 34px; height: 34px; } .hs-arrow svg { width: 17px; height: 17px; } }

.hs-dots { display: flex; justify-content: center; gap: 7px; margin-top: 11px; }
.hs-dot {
  width: 8px; height: 8px; padding: 0;
  border: none; border-radius: 50%;
  background: var(--mint-200); cursor: pointer;
  transition: width var(--t), background var(--t), border-radius var(--t);
}
.hs-dot.active { background: var(--sage-500); width: 24px; border-radius: 99px; }

/* ============================================================
   روزهای بستهٔ ارسال (تسویه‌حساب + پنل تنظیمات)
   ============================================================ */
.day-chip.closed {
  background: #fdf3f2; border-color: var(--danger);
  opacity: 1; cursor: not-allowed;
}
.day-chip.closed:hover { border-color: var(--danger); }
.day-chip.closed .dc-week { color: var(--danger); }
.day-chip.closed .dc-date { color: var(--blush-dark); }
.day-chip.closed .dc-closed {
  font-size: .62rem; color: #fff; background: var(--danger);
  padding: 1px 7px; border-radius: 99px; margin-top: 2px; font-weight: 600;
}

.weekday-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 560px) { .weekday-grid { grid-template-columns: repeat(4, 1fr); } }
.wd-chip {
  padding: 12px 8px; border-radius: var(--r-md);
  border: 1.5px solid var(--line); background: var(--white);
  font-size: .9rem; font-weight: 600; color: var(--sage-700);
  cursor: pointer; transition: all var(--t-fast);
}
.wd-chip:hover { border-color: var(--sage-300); }
.wd-chip.closed {
  background: #fdeceb; border-color: var(--danger); color: var(--danger);
}
.wd-chip.closed::after { content: ' • بسته'; font-size: .7rem; }

/* ============================================================
   تقویم شمسیِ روزهای بستهٔ ارسال (پنل مدیریت)
   ============================================================ */
.jcal {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px;
  background: var(--cream);
}
.jc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.jc-title { font-weight: 700; color: var(--leaf-900); font-size: .98rem; }
.jc-nav {
  width: 34px; height: 34px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--white);
  color: var(--sage-700); font-size: 1.2rem; line-height: 1; cursor: pointer;
  transition: all var(--t-fast);
}
.jc-nav:hover { background: var(--mint-100); border-color: var(--sage-300); }
.jc-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 4px; }
.jc-week span { text-align: center; font-size: .74rem; font-weight: 600; color: var(--muted); }
.jc-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.jc-cell {
  aspect-ratio: 1; display: grid; place-items: center;
  border: 1px solid transparent; border-radius: 10px;
  background: var(--white); color: var(--ink);
  font-size: .86rem; font-weight: 600; cursor: pointer;
  transition: all var(--t-fast);
}
.jc-cell.empty { background: transparent; cursor: default; }
.jc-cell:not(.empty):not(.past):hover { border-color: var(--sage-300); }
.jc-cell.past { color: var(--muted); opacity: .38; cursor: not-allowed; background: transparent; }
.jc-cell.closed { background: var(--danger); color: #fff; border-color: var(--danger); box-shadow: var(--shadow-sm); }

.closed-dates-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.cdl-title { flex: 1 0 100%; font-size: .82rem; font-weight: 600; color: var(--sage-700); margin-bottom: 2px; }
.closed-date-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fdeceb; color: var(--danger);
  border: 1px solid var(--danger); border-radius: var(--r-pill);
  padding: 4px 6px 4px 12px; font-size: .8rem; font-weight: 600;
}
.closed-date-chip button {
  border: none; background: rgba(217, 83, 79, .18); color: var(--danger);
  width: 18px; height: 18px; border-radius: 50%; cursor: pointer;
  font-size: .7rem; line-height: 1; display: grid; place-items: center;
}

/* ============================================================
   سکشن «تازه‌ترین‌ها» در صفحهٔ اصلی
   ============================================================ */
.latest-sec .section-head { margin-bottom: 2px; }
.latest-sub { color: var(--muted); font-size: .86rem; margin-bottom: 14px; }

/* یک ردیف افقیِ قابل‌اسکرول از تازه‌ترین محصولات (با کشیدن ماوس هم اسکرول می‌شود) */
.latest-row {
  display: flex; gap: 12px;
  overflow-x: auto; overflow-y: hidden;   /* فقط اسکرول افقی؛ جلوگیری از اسکرول عمودیِ ناخواسته */
  scroll-snap-type: x proximity;
  scrollbar-width: none; padding: 8px 0 10px;
  cursor: grab;
}
.latest-row::-webkit-scrollbar { display: none; }
.latest-row.dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; user-select: none; }
.latest-row.dragging a, .latest-row.dragging img, .latest-row.dragging svg { pointer-events: none; }
.latest-row a, .latest-row img { -webkit-user-drag: none; user-select: none; }
.latest-row .product-card {
  flex: 0 0 clamp(150px, 44vw, 190px);
  scroll-snap-align: start;
  transition: transform .35s cubic-bezier(.22, .61, .36, 1), box-shadow .35s ease;
}
@media (min-width: 600px) { .latest-row .product-card { flex-basis: 210px; } }
/* ستاره‌های امتیاز در سکشن «تازه‌ترین‌ها» نمایش داده نشوند */
.latest-row .card-rating { display: none; }
.latest-row .product-card:hover { transform: translateY(-6px); }
.latest-row .product-media { overflow: hidden; }
.latest-row .product-media img, .latest-row .product-media svg { transition: transform .55s cubic-bezier(.22, .61, .36, 1); }
.latest-row .product-card:hover .product-media img,
.latest-row .product-card:hover .product-media svg { transform: scale(1.07); }
@media (prefers-reduced-motion: reduce) {
  .latest-row .product-media img, .latest-row .product-media svg { transition: none; }
}

/* ============================================================
   فوتر سایت
   ============================================================ */
.site-footer {
  background: var(--leaf-900);
  color: rgba(255, 255, 255, .82);
  margin-top: 30px;
  padding: 34px 0 calc(var(--nav-h) + 24px);
}
@media (min-width: 900px) { .site-footer { padding-bottom: 30px; } }
.footer-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 22px 16px;
  padding-bottom: 22px; border-bottom: 1px solid rgba(255, 255, 255, .12);
}
@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.4fr; } }
.footer-brand { grid-column: 1 / -1; }
@media (min-width: 720px) { .footer-brand { grid-column: auto; } }
.footer-logo { display: inline-flex; align-items: center; gap: 6px; font-size: 1.3rem; font-weight: 800; color: #fff; margin-bottom: 10px; text-decoration: none; }
.footer-brand p { font-size: .84rem; line-height: 1.95; color: rgba(255, 255, 255, .7); max-width: 340px; }
.footer-col h4 { color: #fff; font-size: .95rem; margin-bottom: 10px; font-weight: 700; }
.footer-col a, .footer-contact span { display: block; color: rgba(255, 255, 255, .72); font-size: .86rem; padding: 5px 0; text-decoration: none; transition: color var(--t-fast); }
.footer-col a:hover { color: #fff; }

/* آیکون‌های شبکه‌های اجتماعی/تماس با بوردرِ رنگِ اختصاصی هرکدام */
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a {
  width: 42px; height: 42px; padding: 0; border-radius: var(--r-pill);
  display: grid; place-items: center; background: transparent;
  border: 1.6px solid currentColor;
  transition: transform var(--t-fast), background var(--t), color var(--t), border-color var(--t);
}
.footer-social a svg { width: 19px; height: 19px; }
.footer-social a:hover { transform: translateY(-3px); color: #fff; }
.fs-insta { color: #ff6aa0; }
.fs-insta:hover { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); border-color: transparent; }
.fs-wa { color: #3ddc7f; }
.fs-wa:hover { background: #25d366; border-color: #25d366; }
.fs-call { color: #8fd0a5; }
.fs-call:hover { background: var(--sage-500); border-color: var(--sage-500); }
.fs-mail { color: #e8c880; }
.fs-mail:hover { background: var(--gold); border-color: var(--gold); }

.footer-seo { padding: 18px 0; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.footer-seo h2 { font-size: .96rem; color: rgba(255, 255, 255, .9); margin-bottom: 8px; }
.footer-seo p { font-size: .8rem; line-height: 2.1; color: rgba(255, 255, 255, .58); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; padding: 15px 0; font-size: .78rem; color: rgba(255, 255, 255, .6); }

/* ============================================================
   صفحات اطلاعاتی (درباره، قوانین، سوالات، تماس)
   ============================================================ */
.info-page { padding-top: 14px; max-width: 780px; margin-inline: auto; }
.info-hero { text-align: center; padding: 18px 0 22px; }
.info-hero-emoji { font-size: 2.6rem; margin-bottom: 8px; }
.info-hero h1 { font-size: 1.55rem; color: var(--leaf-900); font-weight: 800; margin-bottom: 6px; }
.info-hero p { color: var(--muted); font-size: .92rem; }
.info-card p { line-height: 2; color: var(--ink); margin-bottom: 10px; }
.info-card p:last-child { margin-bottom: 0; }
.info-values { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 16px 0; }
@media (min-width: 600px) { .info-values { grid-template-columns: repeat(3, 1fr); } }
.value-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; text-align: center; box-shadow: var(--shadow-sm); }
.value-card .vc-ic { font-size: 1.9rem; margin-bottom: 8px; }
.value-card h4 { color: var(--leaf-900); margin-bottom: 6px; }
.value-card p { font-size: .82rem; color: var(--muted); line-height: 1.8; }
.info-cta { text-align: center; margin-top: 16px; }
.info-cta h3 { color: var(--leaf-900); margin-bottom: 4px; }

.terms-list { display: flex; flex-direction: column; gap: 12px; }
.terms-item .ti-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.terms-item .ti-ic { font-size: 1.3rem; }
.terms-item h3 { color: var(--leaf-900); font-size: 1.02rem; }
.terms-item p { color: var(--ink); line-height: 2; font-size: .9rem; }

.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.faq-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 15px; background: none; border: none; cursor: pointer; font-family: inherit; font-size: .94rem; font-weight: 600; color: var(--leaf-900); text-align: start; }
.faq-toggle { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; background: var(--mint-100); color: var(--sage-600); display: grid; place-items: center; font-size: 1.1rem; transition: transform var(--t); }
.faq-item.open .faq-toggle { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-item.open .faq-a { max-height: 340px; }
.faq-a p { padding: 0 15px 15px; color: var(--muted); line-height: 1.9; font-size: .87rem; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.contact-item { text-align: center; text-decoration: none; padding: 18px 12px; }
.contact-item .ci-ic { font-size: 1.7rem; margin-bottom: 6px; }
.contact-item h4 { color: var(--leaf-900); font-size: .92rem; margin-bottom: 4px; }
.contact-item span { color: var(--sage-700); font-size: .84rem; }

/* فوتر: بخش سئوی جمع‌شوندهٔ (details) */
.footer-seo summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.footer-seo summary::-webkit-details-marker { display: none; }
.footer-seo summary h2 { margin: 0; }
.footer-seo summary::after {
  content: 'بیشتر بخوانید ▾';
  flex: 0 0 auto; font-size: .76rem; font-weight: 600; color: var(--sage-300); white-space: nowrap;
}
.footer-seo[open] summary::after { content: 'بستن ▴'; }
.footer-seo .seo-body { padding-top: 12px; }
.footer-seo .seo-body p { font-size: .8rem; line-height: 2.1; color: rgba(255, 255, 255, .58); margin-bottom: 10px; }
.footer-seo .seo-body p:last-child { margin-bottom: 0; }

/* اسکرول با کشیدنِ ماوس روی نوار «شگفت‌انگیز» */
.flash-strip { cursor: grab; }
.flash-strip.dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; user-select: none; }
.flash-strip.dragging a, .flash-strip.dragging img, .flash-strip.dragging svg { pointer-events: none; }
.flash-strip a, .flash-strip img { -webkit-user-drag: none; user-select: none; }

/* ============================================================
   سوییچ آی‌اواس‌مانند + انتخابگر تاریخ شمسی (پنل‌ها)
   ============================================================ */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0 4px; }
.switch-label { font-size: .9rem; font-weight: 600; color: var(--sage-700); }
.ios-switch { position: relative; display: inline-block; width: 50px; height: 30px; flex: 0 0 auto; }
.ios-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.ios-switch .ios-slider { position: absolute; inset: 0; background: #d3dcd6; border-radius: 999px; cursor: pointer; transition: background .25s ease; }
.ios-switch .ios-slider::before {
  content: ''; position: absolute; width: 26px; height: 26px;
  inset-block-start: 2px; inset-inline-start: 2px;
  background: #fff; border-radius: 50%; box-shadow: 0 2px 5px rgba(0, 0, 0, .2);
  transition: transform .25s cubic-bezier(.4, 0, .2, 1);
}
.ios-switch input:checked + .ios-slider { background: var(--sage-500); }
.ios-switch input:checked + .ios-slider::before { transform: translateX(-20px); }
.ref-input-wrap { margin-top: 6px; }

.jdt-enable { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--sage-700); cursor: pointer; margin-bottom: 8px; }
.jdt-enable input { width: auto; }
.jdt-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.jdt-row select { width: auto; padding: 8px 6px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--cream); font-family: inherit; font-size: .85rem; }
.jdt-sep { font-size: .82rem; color: var(--muted); margin-inline-start: 4px; }
.jdt-colon { color: var(--muted); }

/* یادداشتِ فصلی‌بودن روی کارت جزئیات محصول */
.product-note {
  display: flex; gap: 10px; align-items: flex-start;
  margin-top: 16px; padding: 12px 14px;
  background: var(--mint-50); border: 1px solid var(--mint-200);
  border-radius: var(--r-md);
}
.product-note .pn-ic { font-size: 1.1rem; flex: 0 0 auto; margin-top: 1px; }
.product-note p { font-size: .82rem; line-height: 1.95; color: var(--sage-700); margin: 0; }

/* ============================================================
   لوگوی برند (هدر، فوتر، صفحات ورود/ثبت‌نام)
   ============================================================ */
.brand .logo svg { width: 20px; height: 20px; }
.footer-logo-img { height: 40px; width: auto; display: block; filter: brightness(0) invert(1); opacity: .95; }
.auth-logo { height: 58px; width: auto; display: block; margin: 0 auto 14px; }
