@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap');

/* ══════════════════════════════════════════════════════
   CSS Variables — همه رنگ‌ها از _Layout.cshtml inject میشن
   این fallback فقط برای حالتی است که CSS مستقیم لود بشه
   ══════════════════════════════════════════════════════ */
:root {
  --brand:        #17324d;
  --brand-dark:   #10263a;
  --brand-soft:   #eaf1f6;
  --accent:       #d6a84f;
  --accent-soft:  #f8f1df;
  --text:         #1f2937;
  --muted:        #667085;
  --bg:           #f6f8fa;
  --surface:      #fff;
  --line:         #e6e9ee;
  --shadow-sm:    0 2px 10px rgba(16,24,40,.05);
  --shadow:       0 10px 30px rgba(16,24,40,.08);
  --radius:       16px;
}

/* ══════════════════════════════════════════════════════
   Base
   ══════════════════════════════════════════════════════ */
* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
  overflow-x: hidden; /* جلوگیری از horizontal scroll */
}
@media (max-width: 768px) {
  html { scroll-padding-top: 148px; }
}
body {
  margin: 0;
  font-family: Vazirmatn, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 15px;
  overflow-x: hidden; /* جلوگیری از horizontal scroll */
  max-width: 100vw;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
.container { width: min(1200px, calc(100% - 40px)); margin: auto; }

/* ══════════════════════════════════════════════════════
   Header
   ══════════════════════════════════════════════════════ */
.header {
  position: sticky;
  top: 0;
  z-index: 1001;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 14px rgba(16,24,40,.05);
  padding: 10px 0;
}
.header-content {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 20px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--brand);
  font-size: 21px;
  font-weight: 800;
  white-space: nowrap;
}
.logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 22px;
}
.logo-img { height: 44px; max-width: 120px; object-fit: contain; border-radius: 10px; }
.logo-en { font-size: 10px; color: var(--muted); font-weight: 600; letter-spacing: 1.8px; margin-top: -3px; }
.search-bar { flex: 1; max-width: 420px; margin: 0 1rem; }
.search-bar input {
  border: none !important;
  outline: none;
  box-shadow: none;
  background: transparent;
  -webkit-appearance: none;
}
.search-bar input:focus {
  border: none !important;
  box-shadow: none;
}
.header-icons { display: flex; gap: 8px; align-items: center; }
.header-icons a {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  display: grid;
  place-items: center;
  transition: background .15s, color .15s, border-color .15s;
  position: relative;
  flex-shrink: 0;
}
.header-icons a:hover {
  background: var(--brand-soft);
  color: var(--brand);
  border-color: var(--brand);
}

/* ══════════════════════════════════════════════════════
   User Menu Dropdown
   ══════════════════════════════════════════════════════ */
.user-menu {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

/* ── Trigger button ── */
.user-menu__trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  font-size: .84rem;
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
  line-height: 1;
}
.user-menu__trigger:hover { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); }
.user-menu.is-logged .user-menu__trigger { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); }

.user-menu__avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  overflow: hidden;
}

.user-menu__initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  flex-shrink: 0;
}

.user-menu__name {
  font-size: .82rem;
  font-weight: 600;
  color: var(--brand);
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu__arrow {
  font-size: .6rem;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform .2s ease;
  margin-right: 2px;
}

/* ── Dropdown panel ── */
.user-menu__dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: auto;
  right: 0;
  min-width: auto;
  background: #fff;
  background: var(--surface, #fff);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 14px;
  box-shadow: 0 10px 36px rgba(0,0,0,.15);
  z-index: 2000;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity .17s ease, transform .17s ease;
  overflow: visible;
  direction: rtl;
}
.user-menu__dropdown.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ── هدر dropdown ── */
.user-menu__head {
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--line, #e5e7eb);
  background: #f3f6f9;
  display: flex;
  align-items: center;
  gap: 10px;
  direction: rtl;
}
.um-head-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand, #17324d);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.um-head-avatar img { width: 100%; height: 100%; object-fit: cover; }
.um-head-initial { color: #fff; font-weight: 700; font-size: .9rem; }
.um-head-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.um-head-name {
  font-size: .86rem;
  font-weight: 700;
  color: var(--text, #1f2937);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.um-head-role {
  font-size: .73rem;
  color: var(--muted, #667085);
  display: flex;
  align-items: center;
  gap: 4px;
}
.um-head-guest {
  display: flex;
  align-items: center;
  gap: 10px;
}
.um-head-guest i { font-size: 1.5rem; color: var(--brand, #17324d); }

/* ── Items ── */
/* ── آیتم‌های dropdown — فقط آیکون + tooltip در hover ── */
.user-menu__items {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 6px;
}

.user-menu__divider {
  border-top: none;
  border-right: 1px solid var(--line, #e5e7eb);
  margin: 0 2px;
  padding: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2px;
}

.user-menu__item {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
  font-family: inherit;
  color: var(--muted, #667085);
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  box-sizing: border-box;
  transition: background .15s, color .15s;
  flex-shrink: 0;
}

/* متن پنهان — فقط در hover tooltip نمایش داده می‌شود */
.user-menu__item span.um-item-text,
.user-menu__item > *:not(i):not(#um-cart-count) {
  display: none;
}

.user-menu__item i {
  font-size: 1rem;
  color: inherit;
  pointer-events: none;
}

/* tooltip — فقط دسکتاپ */
@media (min-width: 769px) {
  .user-menu__item::after {
    content: attr(data-label);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #1f2937;
    color: #fff;
    font-size: .72rem;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 6px;
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s, transform .15s;
    z-index: 9999;
  }
  .user-menu__item:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.user-menu__item:hover {
  background: var(--brand-soft, #17324d18);
  color: var(--brand, #17324d);
}

.user-menu__item--accent { color: var(--brand, #17324d); }
.user-menu__item--accent:hover { background: var(--brand-soft, #17324d18); }

.user-menu__item--danger { color: #dc2626; }
.user-menu__item--danger:hover { background: #fee2e2; color: #b91c1c; }

/* ── موبایل: tooltip پنهان + dropdown سمت چپ ── */
@media (max-width: 768px) {
  .user-menu__item::after { display: none !important; }
  .user-menu__dropdown {
    right: auto;
    left: 0;
  }
}

/* ── badge تعداد سبد داخل منو ── */
#um-cart-count {
  position: absolute;
  top: 4px;
  left: 4px;
  background: var(--accent, #d6a84f);
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  border-radius: 10px;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
  pointer-events: none;
}

/* ── موبایل (≤768px) ── */
@media (max-width: 768px) {
  .user-menu__name    { display: none; }
  .user-menu__trigger { height: 40px; padding: 0 10px; }
}

/* ── دکمه افزودن سریع به سبد ── */
.btn-quick-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 14px;
  background: var(--brand);
  color: #fff;
  border: 1.5px solid var(--brand);
  border-radius: 8px;
  font-family: inherit;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .1s;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-quick-add:hover { background: var(--brand-dark, #10263a); }
.btn-quick-add:active { transform: scale(.94); }
.btn-quick-add:disabled { opacity: .6; cursor: not-allowed; }

/* موبایل: user-menu کامل نمایش داده می‌شه (جای ایکون‌های مخفی‌شده) */
/* ══════════════════════════════════════════════════════
   Nav — Nested Dropdown + Hamburger Mobile
   ══════════════════════════════════════════════════════ */
.nav { background: var(--brand); position: sticky; top: 64px; z-index: 999; transition: box-shadow .25s; }
.nav--scrolled { box-shadow: 0 4px 18px rgba(0,0,0,.22); }

.nav-container {
  display: flex;
  align-items: center;
  min-height: 48px;
  position: relative;
}

/* ── لیست اصلی ── */
.nav-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
}

/* ── آیتم ── */
.nav-item {
  position: relative;
}

/* ── لینک اصلی ── */
.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 9px;
  color: rgba(255,255,255,.82);
  font-size: 14px;
  white-space: nowrap;
  transition: background .15s, color .15s;
  cursor: pointer;
  text-decoration: none;
  user-select: none;
}
.nav-link:hover,
.nav-item:hover > .nav-link {
  color: #fff;
  background: rgba(255,255,255,.13);
}
.nav-link.active {
  color: #fff;
  background: rgba(255,255,255,.16);
  font-weight: 600;
}

/* ── آیکون و فلش ── */
.nav-icon  { font-size: 13px; opacity: .85; flex-shrink: 0; }
.nav-arrow { font-size: 10px; opacity: .7; transition: transform .22s; margin-right: 2px; flex-shrink: 0; }
.nav-arrow-sub { font-size: 10px; opacity: .7; margin-right: auto; margin-left: 0; flex-shrink: 0; }

.nav-item:hover > .nav-link .nav-arrow,
.nav-item.open  > .nav-link .nav-arrow { transform: rotate(-180deg); }

/* ── Dropdown ── */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 210px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,.14);
  padding: 6px;
  list-style: none;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .2s, transform .2s, visibility .2s;
  z-index: 1100;
}

.nav-item:hover > .nav-dropdown,
.nav-dropdown-item:hover > .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ── لینک Dropdown ── */
.nav-dropdown-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--text);
  font-size: 13.5px;
  white-space: nowrap;
  transition: background .14s, color .14s;
  text-decoration: none;
  position: relative;
}
.nav-dropdown-link:hover {
  background: var(--primary-soft);
  color: var(--primary);
}
.nav-dropdown-link .nav-icon { color: var(--primary); opacity: 1; }

/* ── Sub-dropdown (عمق ۳) — باز شدن به چپ برای RTL ── */
.nav-dropdown-item {
  position: relative;
}
.nav-dropdown-sub {
  top: -6px;
  right: calc(100% + 6px);
  left: auto;
}

/* ── Divider ── */
.nav-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 5px 8px;
}

/* ── Hamburger Button ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  padding: 0;
  color: var(--muted);
  transition: background .15s, border-color .15s;
  flex-shrink: 0;
}
.nav-hamburger:hover { background: var(--brand-soft); border-color: var(--brand); }
.ham-line {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
  transition: transform .3s, opacity .3s, width .3s;
}
.nav-hamburger.is-open .ham-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.is-open .ham-line:nth-child(2) { opacity: 0; width: 0; }
.nav-hamburger.is-open .ham-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Overlay موبایل ── */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 1001;
  opacity: 0;
  transition: opacity .3s;
}
.nav-overlay.active { opacity: 1; }

/* ── جلوگیری از overflow افقی هنگام باز بودن drawer ── */
body.nav-open {
  overflow: hidden;
}

/* ══ MOBILE ══════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* hamburger در header نشان داده می‌شود */
  .nav-hamburger { display: flex; }

  /* آیکون‌های اضافی header پنهان */
  .header-icons > a { display: none; }

  /* nav در موبایل هیچ ارتفاعی ندارد — فقط container برای drawer */
  .nav {
    position: static;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
  }
  .nav-container { min-height: 0; padding: 0; }

  /* ── Drawer از سمت راست ── */
  .nav-list {
    position: fixed;
    top: 0;
    right: -300px;
    left: auto;
    width: 280px;
    height: 100vh;
    background: var(--brand-dark, #10263A);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    /* padding-top کم: دکمه hamburger در header است نه drawer */
    padding: 20px 12px 32px;
    gap: 2px;
    overflow-y: auto;
    z-index: 1002;
    transition: right .3s cubic-bezier(.4,0,.2,1);
    box-shadow: none;
  }

  /* عنوان بالای drawer */
  .nav-list::before {
    content: "منو";
    display: block;
    color: rgba(255,255,255,.45);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 0 6px 12px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    margin-bottom: 8px;
  }

  /* منو باز */
  .nav-list.is-open {
    right: 0;
    box-shadow: 6px 0 32px rgba(0,0,0,.4);
  }

  /* overlay فعال شود */
  .nav-list.is-open ~ .nav-overlay,
  .nav-overlay.active { display: block; }

  /* لینک‌های موبایل */
  .nav-link {
    width: 100%;
    padding: 11px 14px;
    border-radius: 9px;
    justify-content: flex-start;
    font-size: 14.5px;
  }

  /* فلش در موبایل */
  .nav-arrow { margin-right: auto; transition: transform .25s; }
  .nav-item.open > .nav-link .nav-arrow { transform: rotate(-180deg); }

  /* Dropdown در موبایل — accordion (نه hover) */
  .nav-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: rgba(0,0,0,.18);
    border-radius: 9px;
    padding: 4px 0 4px 12px;
    margin-top: 2px;
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease, padding .3s ease;
  }
  .nav-item.open > .nav-dropdown,
  .nav-dropdown-item.open > .nav-dropdown {
    max-height: 600px;
  }

  /* لینک dropdown موبایل */
  .nav-dropdown-link {
    color: rgba(255,255,255,.8);
    padding: 9px 10px;
    border-radius: 7px;
    font-size: 13.5px;
  }
  .nav-dropdown-link:hover {
    background: rgba(255,255,255,.1);
    color: #fff;
  }
  .nav-dropdown-link .nav-icon { color: rgba(255,255,255,.7); }

  /* sub-dropdown موبایل */
  .nav-dropdown-sub {
    position: static;
    padding-right: 14px;
  }

  .nav-arrow-sub { margin-right: auto; margin-left: 0; }
  .nav-dropdown-item.open > .nav-dropdown-link .nav-arrow-sub { transform: rotate(-90deg); }
}

/* ══════════════════════════════════════════════════════
   Hero
   ══════════════════════════════════════════════════════ */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  color: #fff;
  padding: 78px 0 82px;
}
.hero::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 50%;
  left: -250px;
  top: -280px;
  box-shadow: 0 0 0 70px rgba(255,255,255,.025), 0 0 0 140px rgba(255,255,255,.018);
}
.hero::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  right: -180px;
  bottom: -230px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.hero-content { position: relative; z-index: 1; max-width: 850px; }
.hero h1 { font-size: 44px; line-height: 1.35; font-weight: 900; letter-spacing: -.8px; margin: 0 0 18px; }
.hero h1 span { color: var(--accent); }
.hero p { font-size: 18px; color: rgba(255,255,255,.85); margin: 0 0 7px; }
.hero-subtitle { font-size: 14px !important; color: rgba(255,255,255,.65) !important; margin-bottom: 28px !important; }
.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 25px;
  border-radius: 11px;
  background: var(--accent);
  color: var(--brand-dark);
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 35%, transparent);
  transition: transform .15s, box-shadow .15s;
}
.hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--accent) 45%, transparent);
}

/* ══════════════════════════════════════════════════════
   Features Strip
   ══════════════════════════════════════════════════════ */
.features {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 26px 0;
}
.features-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.feature-item {
  display: grid;
  grid-template-columns: 52px 1fr;
  grid-template-rows: auto auto;
  column-gap: 13px;
  text-align: right;
  padding: 14px;
  border-radius: 13px;
  transition: background .15s;
}
.feature-item:hover { background: var(--brand-soft); }
.feature-icon {
  grid-row: 1/3;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  font-size: 20px;
}
.feature-item h3 { align-self: end; font-size: 14px; margin: 0; color: var(--text); }
.feature-item p { color: var(--muted); font-size: 11px; margin: 0; }

/* ══════════════════════════════════════════════════════
   Section Titles
   ══════════════════════════════════════════════════════ */
.products-section, .categories { margin: 58px 0; }
.section-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.section-title h2 {
  position: relative;
  color: var(--text);
  font-size: 27px;
  font-weight: 800;
  padding-right: 15px;
  margin: 0;
}
.section-title h2::before {
  content: "";
  position: absolute;
  right: 0;
  top: 7px;
  width: 4px;
  height: 25px;
  border-radius: 3px;
  background: var(--accent);
}
.view-all { color: var(--brand); font-size: 13px; font-weight: 600; transition: color .15s; }
.view-all:hover { color: var(--accent); }

/* ══════════════════════════════════════════════════════
   Products Grid
   ══════════════════════════════════════════════════════ */
.products-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.product-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.product-card:hover { transform: translateY(-5px); border-color: var(--brand); box-shadow: var(--shadow); }
.product-image {
  height: 245px;
  background: var(--brand-soft);
  display: grid;
  place-items: center;
  position: relative;
  color: var(--brand);
  font-size: 58px;
}
.product-image::after {
  content: "";
  position: absolute;
  inset: 14px;
  /*border: 1px solid color-mix(in srgb, var(--brand) 10%, transparent);*/
  border-radius: 12px;
  pointer-events: none;
}
.product-image img { width: 100%; height: 100%; object-fit: cover; }
.product-badge {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 14px;
  background: var(--surface);
  color: var(--brand);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 9px;
  font-size: 10px;
  font-weight: 800;
}
.product-info { padding: 17px; }
.product-title { min-height: 50px; color: var(--text); font-size: 14px; line-height: 1.8; font-weight: 600; margin: 0 0 9px; }
.product-price { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.price { color: var(--brand); font-size: 17px; font-weight: 800; }
.old-price { color: var(--muted); font-size: 13px; text-decoration: line-through; }
.add-to-cart {
  min-width: 76px;
  height: 37px;
  padding: 0 13px;
  border: 0;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  transition: background .15s, transform .1s;
}
.add-to-cart:hover { background: var(--brand-dark); transform: scale(1.04); }

/* ══════════════════════════════════════════════════════
   Categories Grid
   ══════════════════════════════════════════════════════ */
.categories-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 16px; }
.category-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 15px;
  text-align: center;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.category-card:hover { transform: translateY(-4px); border-color: var(--brand); box-shadow: var(--shadow); }
.category-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 13px;
  border-radius: 16px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  font-size: 23px;
  transition: background .15s;
}
.category-card:hover .category-icon { background: var(--brand); color: #fff; }
.category-card h3 { font-size: 14px; font-weight: 700; margin: 0; color: var(--text); }

/* ══════════════════════════════════════════════════════
   About Section
   ══════════════════════════════════════════════════════ */
.about-section {
  background: var(--surface);
  margin: 58px 0;
  padding: 42px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.about-content { display: grid; grid-template-columns: 1.05fr .95fr; gap: 50px; align-items: center; }
.about-text h2 { color: var(--text); font-size: 30px; font-weight: 800; margin: 0 0 16px; }
.about-text p { color: var(--muted); font-size: 15px; line-height: 2; margin: 0 0 10px; }
.about-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-top: 25px; }
.stat-item {
  padding: 15px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  text-align: center;
  transition: border-color .15s;
}
.stat-item:hover { border-color: var(--brand); }
.stat-number { color: var(--brand); font-size: 24px; font-weight: 900; }
.stat-label { color: var(--muted); font-size: 11px; }
.about-image {
  min-height: 300px;
  border-radius: 20px;
  background: linear-gradient(145deg, var(--brand-dark), var(--brand));
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px;
  position: relative;
  overflow: hidden;
}
.about-image::before {
  content: "";
  position: absolute;
  width: 250px;
  height: 250px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 50%;
}
.about-image i { position: relative; font-size: 72px; color: var(--accent); margin-bottom: 18px; }
.about-image h3, .about-image p { position: relative; }
.about-image h3 { font-size: 18px; margin-bottom: 5px; }
.about-image p { color: rgba(255,255,255,.7); font-size: 13px; }

/* ══════════════════════════════════════════════════════
   Installment Banner
   ══════════════════════════════════════════════════════ */
.installment-banner {
  margin: 58px 0;
  padding: 38px 30px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line));
  border-radius: 20px;
  background: color-mix(in srgb, var(--accent-soft) 60%, var(--surface));
  color: var(--text);
  text-align: center;
}
.installment-banner h2 { font-size: 28px; margin: 0 0 8px; color: var(--brand); }
.installment-banner p { color: var(--muted); font-size: 15px; margin: 0 0 20px; }
.installment-banner .hero-btn { background: var(--brand); color: #fff; box-shadow: 0 8px 20px color-mix(in srgb, var(--brand) 22%, transparent); }

/* ══════════════════════════════════════════════════════
   Info Pages (Guide / Shipping / FAQ)
   ══════════════════════════════════════════════════════ */
.info-page-section {
  background: var(--surface);
  margin: 45px 0;
  padding: 48px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-header { display: flex; align-items: center; gap: 16px; margin-bottom: 25px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.section-header > i {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 22px;
  flex-shrink: 0;
}
.section-header h2 { color: var(--text); font-size: 27px; font-weight: 800; margin: 0; }
.section-header p { color: var(--muted); font-size: 12px; margin: 2px 0 0; }
.page-content { color: var(--muted); font-size: 14px; line-height: 2; }
.steps { display: grid; gap: 12px; margin: 20px 0; }
.step {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--bg);
  border-right: 3px solid var(--accent);
  transition: border-color .15s, box-shadow .15s;
}
.step:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.step-number {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 11px;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 800;
}
.step-content h4 { color: var(--text); font-size: 15px; margin: 0 0 4px; }
.step-content p { color: var(--muted); font-size: 13px; margin: 0; }
.info-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin: 20px 0; }
.info-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, transform .15s;
}
.info-card:hover { border-color: var(--brand); transform: translateY(-3px); }
.info-card i { color: var(--brand); font-size: 24px; margin-bottom: 12px; }
.info-card h4 { color: var(--text); font-size: 15px; margin: 0 0 7px; }
.info-card p { color: var(--muted); font-size: 13px; margin: 0; }

/* ══════════════════════════════════════════════════════
   FAQ
   ══════════════════════════════════════════════════════ */
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color .2s;
}
.faq-item:hover { border-color: var(--brand); }
.faq-item.open { border-color: var(--brand); }
.faq-question {
  min-height: 56px;
  padding: 15px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.faq-question i { color: var(--brand); transition: transform .25s; }
.faq-item.open .faq-question i { transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 18px;
  color: var(--muted);
  font-size: 13px;
  transition: max-height .3s ease, padding .3s ease;
}
.faq-item.open .faq-answer { max-height: 500px; padding: 0 18px 18px; }
.alert-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px 17px;
  border-radius: 12px;
  margin: 16px 0;
  font-size: 13px;
}
.alert-box i { font-size: 19px; margin-top: 2px; flex-shrink: 0; }
.alert-info {
  background: color-mix(in srgb, var(--brand) 8%, var(--surface));
  color: var(--brand);
  border-right: 3px solid var(--brand);
}
.alert-success {
  background: #ecfdf3;
  color: #166534;
  border-right: 3px solid #4ade80;
}

/* ══════════════════════════════════════════════════════
   Contact Section
   ══════════════════════════════════════════════════════ */
.contact-section {
  margin: 55px 0 0;
  padding: 52px 0;
  background: var(--brand-dark);
  color: #fff;
}
.contact-section h2 { text-align: center; font-size: 29px; margin: 0 0 34px; }
.contact-section h2 span { color: var(--accent); }
.contact-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }
.contact-card {
  padding: 24px 18px;
  text-align: center;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 15px;
  background: rgba(255,255,255,.045);
  transition: background .2s, transform .2s, border-color .2s;
  text-decoration: none;
  display: block;
  color: inherit;
}
.contact-card:hover { background: rgba(255,255,255,.08); transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.contact-card i { color: var(--accent); font-size: 27px; margin-bottom: 12px; }
.contact-card h4 { font-size: 15px; margin: 0 0 7px; }
.contact-card p { color: rgba(255,255,255,.65); font-size: 12px; margin: 3px; }
.contact-card.tel:hover, .contact-card.email:hover { cursor: pointer; }

/* ══════════════════════════════════════════════════════
   Footer
   ══════════════════════════════════════════════════════ */
.footer {
  background: var(--brand-dark);
  color: #fff;
  padding: 48px 0 18px;
  margin-top: 0;
}
.footer-content { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 35px; margin-bottom: 28px; }
.footer-section h3 { color: #fff; font-size: 15px; margin: 0 0 15px; border-bottom: 1px solid rgba(255,255,255,.08); padding-bottom: 10px; }
.footer-section p,
.footer-section a,
.footer-section li { color: rgba(255,255,255,.6); font-size: 12px; line-height: 1.9; }
.footer-section ul { list-style: none; padding: 0; margin: 0; }
.footer-section ul li { margin-bottom: 6px; }
.footer-section a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.45);
  font-size: 11px;
}
.footer-social { display: flex; align-items: center; gap: 10px; }
.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.65);
  font-size: 15px;
  transition: background .2s, color .2s, transform .15s;
  text-decoration: none;
}
.footer-social-link:hover { background: var(--accent); color: var(--brand-dark); transform: translateY(-2px); }

/* ══════════════════════════════════════════════════════
   Page View (SitePage)
   ══════════════════════════════════════════════════════ */
.page-hero {
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  color: #fff;
  padding: 50px 0 44px;
  text-align: center;
}
.page-title { font-size: 36px; font-weight: 900; margin: 0; letter-spacing: -.5px; }
.page-body { padding: 52px 0 72px; }
.page-content-wrapper {
  max-width: 860px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 48px;
  box-shadow: var(--shadow-sm);
}
.page-cover { margin: -40px -48px 36px; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; max-height: 420px; }
.page-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.page-content { font-size: 16px; line-height: 2.1; color: var(--text); }
.page-content h1,
.page-content h2,
.page-content h3 { color: var(--brand); font-weight: 800; margin-top: 1.8em; }
.page-content p { margin: 0 0 1.2em; }
.page-content img { max-width: 100%; border-radius: 12px; margin: 16px 0; }
.page-content a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.page-content ul,
.page-content ol { padding-right: 24px; margin: 0 0 1.2em; }
.page-content blockquote {
  border-right: 4px solid var(--accent);
  padding: 12px 20px;
  margin: 1.5em 0;
  background: color-mix(in srgb, var(--accent-soft) 60%, var(--surface));
  border-radius: 0 10px 10px 0;
  color: var(--muted);
  font-style: italic;
}

/* ══════════════════════════════════════════════════════
   Product Detail Page
   ══════════════════════════════════════════════════════ */
.product-detail-page { padding: 40px 0 70px; background: var(--bg); }
.product-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.product-main-image {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--brand-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  position: relative;
}
.product-main-image img { width: 100%; height: 100%; object-fit: cover; }
.product-detail-info { display: flex; flex-direction: column; gap: 16px; }
.product-detail-title { font-size: 26px; font-weight: 800; color: var(--text); margin: 0; }
.product-detail-code { font-size: 12px; color: var(--muted); }
.product-detail-price { font-size: 28px; font-weight: 900; color: var(--brand); }
.product-detail-old-price { font-size: 16px; color: var(--muted); text-decoration: line-through; margin-right: 8px; }
.product-detail-stock { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 20px; font-size: 13px; font-weight: 600; }
.stock-ok { background: color-mix(in srgb, #16a34a 10%, var(--surface)); color: #16a34a; }
.stock-low { background: color-mix(in srgb, #f59e0b 10%, var(--surface)); color: #b45309; }
.stock-out { background: color-mix(in srgb, #dc2626 10%, var(--surface)); color: #dc2626; }
.product-add-btn {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 13px;
  background: var(--brand);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background .15s, transform .1s;
}
.product-add-btn:hover { background: var(--brand-dark); transform: scale(1.01); }
.product-add-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.product-tabs { margin-top: 24px; }
.product-tab-list { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 20px; }
.product-tab-btn {
  padding: 10px 20px;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .15s, border-color .15s;
}
.product-tab-btn.active { color: var(--brand); border-bottom-color: var(--accent); }

/* Review Stars */
.stars { color: var(--accent); }

/* ══════════════════════════════════════════════════════
   Breadcrumb
   ══════════════════════════════════════════════════════ */
.breadcrumb-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  font-size: 12px;
  color: var(--muted);
}
.breadcrumb-bar a { color: var(--brand); }
.breadcrumb-bar span { margin: 0 6px; }

/* ══════════════════════════════════════════════════════
   Pagination
   ══════════════════════════════════════════════════════ */
.pagination { display: flex; gap: 6px; justify-content: center; margin: 30px 0; flex-wrap: wrap; }
.page-btn {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  display: grid;
  place-items: center;
  transition: background .15s, color .15s, border-color .15s;
}
.page-btn:hover { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); }
.page-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ══════════════════════════════════════════════════════
   Misc Utilities
   ══════════════════════════════════════════════════════ */
.badge-new { background: color-mix(in srgb, var(--brand) 10%, var(--surface)); color: var(--brand); border: 1px solid color-mix(in srgb, var(--brand) 20%, transparent); padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.badge-sale { background: color-mix(in srgb, #dc2626 10%, var(--surface)); color: #dc2626; border: 1px solid color-mix(in srgb, #dc2626 20%, transparent); padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.badge-featured { background: color-mix(in srgb, var(--accent) 15%, var(--surface)); color: var(--brand-dark); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }

/* ══════════════════════════════════════════════════════
   Responsive
   ══════════════════════════════════════════════════════ */
@media (max-width: 1000px) {
  .header-content { grid-template-columns: auto 1fr auto; gap: 16px; }
  .products-grid { grid-template-columns: repeat(2,1fr); }
  .categories-grid { grid-template-columns: repeat(3,1fr); }
  .features-grid { grid-template-columns: repeat(2,1fr); }
  .about-content { grid-template-columns: 1fr; }
  .info-cards { grid-template-columns: repeat(2,1fr); }
  .contact-grid { grid-template-columns: repeat(2,1fr); }
  .footer-content { grid-template-columns: repeat(2,1fr); }
  .product-detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  body { font-size: 14px; }
  .container { width: calc(100% - 24px); }

  /* ── Header ── */
  .header { padding: 8px 0; }
  /* 2-column grid: logo | icons — search bar goes to row 2 */
  .header-content {
    grid-template-columns: 1fr auto;
    gap: 8px;
  }
  .search-bar {
    grid-column: 1 / -1;
    grid-row: 2;
    max-width: none;
    margin: 2px 0 0;
  }
  .logo { font-size: 17px; gap: 8px; }
  .logo-icon { width: 38px; height: 38px; font-size: 18px; }
  .logo-img  { height: 38px; }
  .logo-en   { display: none; }

  /* nav در موبایل فقط یک نقطه اتصال برای drawer است — ارتفاع صفر */
  .nav { top: 0; min-height: 0; padding: 0; background: transparent; }

  /* ── Hero ── */
  .hero { padding: 48px 0 52px; }
  .hero h1 { font-size: 28px; line-height: 1.4; }
  .hero p  { font-size: 14px; }

  /* ── Features ── */
  .features { padding: 18px 0; }
  .features-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .feature-item { padding: 10px 8px; column-gap: 10px; }
  .feature-icon { width: 44px; height: 44px; font-size: 17px; border-radius: 11px; }
  .feature-item h3 { font-size: 12px; }
  .feature-item p  { font-size: 10px; }

  /* ── Section titles ── */
  .products-section, .categories { margin: 32px 0; }
  .section-title { margin-bottom: 14px; }
  .section-title h2 { font-size: 19px; padding-right: 12px; }
  .section-title h2::before { height: 20px; top: 5px; }

  /* ── Products ── */
  .products-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .product-image { height: 175px; font-size: 44px; }
  .product-image::after { inset: 8px; }
  .product-info { padding: 10px; }
  .product-title { font-size: 12px; min-height: 40px; margin-bottom: 6px; }
  .product-price { gap: 4px; }
  .price { font-size: 12px; }
  /* دکمه افزودن به سبد — فقط آیکون در موبایل */
  .btn-quick-add { font-size: .72rem; padding: 8px; gap: 0; justify-content: center; width: 36px !important; border-radius: 10px; }
  .btn-quick-add span { display: none; }
  .btn-quick-add i { font-size: .95rem; margin: 0; }

  /* ── Categories ── */
  .categories-grid { grid-template-columns: repeat(2,1fr); gap: 10px; }
  .category-card { padding: 16px 10px; border-radius: 12px; }
  .category-icon { width: 48px; height: 48px; font-size: 19px; border-radius: 13px; margin-bottom: 10px; }
  .category-card h3 { font-size: 12px; }

  /* ── About ── */
  .about-section { padding: 28px 0; margin: 32px 0; }
  .about-content { grid-template-columns: 1fr; gap: 24px; }
  .about-text h2 { font-size: 21px; }
  .about-text p  { font-size: 13px; }
  .about-image { min-height: 160px; padding: 20px; }
  .about-image i { font-size: 48px; margin-bottom: 10px; }
  .about-image h3 { font-size: 15px; }
  .about-stats { grid-template-columns: repeat(2,1fr); gap: 8px; margin-top: 18px; }
  .stat-item { padding: 12px 8px; border-radius: 10px; }
  .stat-number { font-size: 20px; }
  .stat-label  { font-size: 10px; }

  /* ── Wholesale banner ── */
  .installment-banner { padding: 24px 14px; margin: 32px 0; border-radius: 14px; }
  .installment-banner h2 { font-size: 20px; }
  .installment-banner p  { font-size: 13px; }

  /* ── Guide / Shipping ── */
  .info-page-section { padding: 28px 0; margin: 24px 0; }
  .section-header { gap: 10px; margin-bottom: 16px; padding-bottom: 14px; }
  .section-header > i { width: 44px; height: 44px; font-size: 17px; border-radius: 11px; }
  .section-header h2 { font-size: 19px; }
  .step { padding: 12px; gap: 10px; }
  .step-number { width: 34px; height: 34px; flex: 0 0 34px; font-size: 14px; border-radius: 9px; }
  .step-content h4 { font-size: 13px; }
  .step-content p  { font-size: 12px; }
  .info-cards { grid-template-columns: 1fr; gap: 10px; }
  .info-card { padding: 16px; border-radius: 12px; }
  .info-card i  { font-size: 20px; margin-bottom: 8px; }
  .info-card h4 { font-size: 13px; }
  .info-card p  { font-size: 12px; }

  /* ── Contact ── */
  .contact-section { padding: 36px 0; margin: 0; }
  .contact-section h2 { font-size: 22px; margin-bottom: 20px; }
  .contact-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .contact-card { padding: 16px 10px; border-radius: 12px; }
  .contact-card i  { font-size: 22px; margin-bottom: 8px; }
  .contact-card h4 { font-size: 13px; }
  .contact-card p  { font-size: 11px; }

  /* ── Footer ── */
  .footer { padding: 36px 0 14px; }
  .footer-content { grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
  .footer-section h3 { font-size: 13px; margin-bottom: 10px; }
  .footer-section p,
  .footer-section a,
  .footer-section li { font-size: 11px; }

  /* ── Page / Detail ── */
  .page-content-wrapper { padding: 20px 16px; }
  .page-title { font-size: 26px; }
  .page-hero  { padding: 36px 0 30px; }
}

@media (max-width: 430px) {
  .container { width: calc(100% - 20px); }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .products-grid { gap: 8px; }
  .product-image { height: 155px; }
  .categories-grid { grid-template-columns: repeat(2,1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-content { grid-template-columns: 1fr; gap: 16px; }
  .section-title h2 { font-size: 17px; }
  .hero h1 { font-size: 24px; }
  .installment-banner h2 { font-size: 18px; }
  .about-image { display: none; }
}

/* ══════════════════════════════════════════════════════
   Back-to-top button
   ══════════════════════════════════════════════════════ */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--brand);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.22);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .28s, visibility .28s, transform .28s, background .2s;
  z-index: 9999;
}
#back-to-top.btt--visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
#back-to-top:hover {
  background: var(--brand-dark);
  transform: translateY(-3px);
}
#back-to-top:active {
  transform: scale(.92);
}

/* ══ Tag Chips — نمایش تگ در صفحه کالا و CMS ══════════════════════════════ */
.site-tags-section { padding: 1.25rem 0 0; }

.site-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 14px 0 20px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 24px;
}

.site-tags-label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted, #888);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}
.site-tags-label i { font-size: .75rem; }

.site-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 500;
  color: var(--brand, #17324d);
  background: rgba(23, 50, 77, .07);
  border: 1px solid rgba(23, 50, 77, .15);
  text-decoration: none;
  transition: background .15s, border-color .15s;
  line-height: 1.5;
}
.site-tag-chip:hover {
  background: rgba(23, 50, 77, .14);
  border-color: rgba(23, 50, 77, .3);
  color: var(--brand, #17324d);
}
.site-tag-chip::before { content: '#'; opacity: .5; font-size: .72rem; }

/* ══ Related Pages Section ════════════════════════════════════════════════ */
.related-pages-section {
  padding: 2.5rem 0 2rem;
  background: #f8fafc;
  border-top: 1px solid #eef1f5;
}

.related-pages-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--brand-dark, #17324d);
  margin: 0 0 1.25rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.related-pages-title i {
  color: var(--brand, #17324d);
  font-size: 1rem;
  opacity: .7;
}

/* grid */
.related-pages-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
@media (max-width: 900px)  { .related-pages-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px)  { .related-pages-grid { grid-template-columns: 1fr 1fr; gap: 12px; } }

/* hidden items (show more) */
.rp-hidden { display: none !important; }

/* card */
.related-page-card {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 12px rgba(23,50,77,.07);
  text-decoration: none;
  color: inherit;
  transition: transform .18s, box-shadow .18s;
}
.related-page-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(23,50,77,.13);
}

/* image */
.rp-img-wrap {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #eef1f5;
}
.rp-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}
.related-page-card:hover .rp-img-wrap img { transform: scale(1.04); }

.rp-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c5cdd8;
  font-size: 2rem;
}

/* body */
.rp-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.rp-title {
  font-size: .88rem;
  font-weight: 600;
  color: var(--brand-dark, #17324d);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rp-badge {
  display: inline-block;
  font-size: .72rem;
  color: var(--brand, #17324d);
  background: rgba(23,50,77,.08);
  border-radius: 20px;
  padding: 2px 9px;
  align-self: flex-start;
}

/* show more button */
.rp-more-wrap { margin-top: 20px; text-align: center; }
.rp-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 24px;
  border: 1.5px solid rgba(23,50,77,.2);
  border-radius: 24px;
  background: #fff;
  color: var(--brand-dark, #17324d);
  font-size: .85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.rp-more-btn:hover { background: rgba(23,50,77,.06); border-color: rgba(23,50,77,.35); }
.rp-more-count { font-weight: 400; opacity: .65; font-size: .8rem; }

/* ── Leaflet Map ── */
.leaflet-popup-content {
  text-align: right;
}


/* ══════════════════════════════════════════════════════
   Mobile Fixes — اصلاحات ریسپانسیو موبایل
   ══════════════════════════════════════════════════════ */

/* ── 1. Header موبایل ──────────────────────────────── */
@media (max-width: 768px) {

  /* ── هدر: دو ردیف — ردیف اول: لوگو + آیکون‌ها، ردیف دوم: جستجو ── */
  .header {
    padding: 8px 0;
    position: sticky;
    top: 0;
    z-index: 1001;
  }

  .header-content {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 6px 8px;
    padding-bottom: 6px;
  }

  /* لوگو — ردیف ۱، ستون ۱ */
  .logo {
    grid-column: 1;
    grid-row: 1;
    font-size: 16px;
    gap: 7px;
    min-width: 0;
  }
  .logo > div { min-width: 0; overflow: hidden; }
  .logo-icon { width: 36px; height: 36px; font-size: 17px; border-radius: 10px; flex-shrink: 0; }
  .logo-img  { height: 36px; max-width: 100px; }
  .logo-en   { display: none; }

  /* آیکون‌های header — ردیف ۱، ستون ۲ */
  .header-icons {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  /* همه آیکون‌های header مخفی بجز hamburger و user-menu */
  .header-icons > a { display: none !important; }
  .header-icons > .nav-hamburger,
  .header-icons > .user-menu { display: flex; }

  /* hamburger */
  .nav-hamburger {
    display: flex;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    flex-shrink: 0;
    order: 1;
  }

  /* user-menu */
  .user-menu {
    order: 2;
    flex-shrink: 0;
  }
  .user-menu__trigger {
    height: 38px;
    padding: 0 9px;
  }
  .user-menu__name { display: none; }

  /* جستجو — ردیف ۲، کل عرض */
  .search-bar {
    grid-column: 1 / -1;
    grid-row: 2;
    max-width: none;
    margin: 0;
    width: 100%;
  }

  /* ── Nav: بدون ارتفاع در موبایل — فقط wrapper برای drawer ── */
  .nav {
    position: static !important;
    top: auto !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    min-height: 0 !important;
  }
  .nav-container {
    min-height: 0 !important;
    padding: 0 !important;
  }

  /* ── Drawer از سمت راست ── */
  .nav-list {
    position: fixed !important;
    top: 0 !important;
    right: -300px !important;
    left: auto !important;
    width: 280px !important;
    height: 100dvh !important;
    height: 100vh !important;
    background: var(--brand-dark, #10263a) !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    padding: 20px 12px 32px !important;
    gap: 2px !important;
    overflow-y: auto !important;
    z-index: 1002 !important;
    transition: right .3s cubic-bezier(.4,0,.2,1) !important;
    box-shadow: none;
  }
  .nav-list.is-open {
    right: 0 !important;
    box-shadow: -6px 0 32px rgba(0,0,0,.4) !important;
  }
  .nav-overlay.active { display: block; opacity: 1; }
}

/* ── 2. Hero Slider موبایل ─────────────────────────── */
@media (max-width: 768px) {
  .hero-slider { height: 400px !important; }

  .slide-content {
    padding: 0 20px !important;
    max-width: 100% !important;
  }

  .slide-title {
    font-size: 26px !important;
    line-height: 1.45 !important;
    margin-bottom: 12px !important;
  }

  .slide-subtitle {
    font-size: 13px !important;
    margin-bottom: 18px !important;
    line-height: 1.7 !important;
  }

  .hero-btn {
    font-size: 13px !important;
    padding: 10px 20px !important;
  }

  .slider-arrow {
    width: 36px !important;
    height: 36px !important;
    font-size: 12px !important;
  }
  .slider-prev { right: 12px !important; }
  .slider-next { left: 12px !important; }
}

@media (max-width: 480px) {
  .hero-slider { height: 320px !important; }

  .slide-title {
    font-size: 20px !important;
    line-height: 1.5 !important;
  }

  .slide-subtitle { display: none !important; }
  .slider-arrow { display: none !important; }

  .hero-btn {
    font-size: 12px !important;
    padding: 9px 16px !important;
    gap: 7px !important;
  }
}

/* ── 3. دکمه افزودن به سبد در کارت محصول ─────────── */
@media (max-width: 768px) {

  /* کل ردیف قیمت + دکمه */
  .product-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    flex-wrap: nowrap;
  }

  .price {
    font-size: 12px !important;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* wrapper دکمه در پایین کارت */
  .product-card > div[style*="padding: 0 12px"] {
    padding: 0 8px 8px !important;
  }

  /* دکمه افزودن به سبد — فقط آیکون */
  .btn-quick-add {
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    border-radius: 9px !important;
    font-size: .8rem !important;
    flex-shrink: 0;
    justify-content: center !important;
    gap: 0 !important;
  }
  .btn-quick-add span { display: none !important; }
  .btn-quick-add i    { margin: 0 !important; font-size: .9rem !important; }
}

/* ── 4. Contact Form موبایل ────────────────────────── */
@media (max-width: 768px) {

  .contact-form-wrap {
    padding: 1.25rem 1rem 1.5rem !important;
    border-radius: 14px !important;
    margin-top: 1.75rem !important;
  }

  .contact-form-header {
    gap: .75rem !important;
    margin-bottom: 1.25rem !important;
  }
  .contact-form-header > i { font-size: 1.3rem !important; }
  .contact-form-header h3  { font-size: 1rem !important; }
  .contact-form-header p   { font-size: .78rem !important; }

  .cf-submit {
    width: 100% !important;
    justify-content: center !important;
  }
}

/* ── 5. کلی ≤480px ─────────────────────────────────── */
@media (max-width: 480px) {

  .container { width: calc(100% - 20px) !important; }

  /* بخش محصولات */
  .products-grid  { grid-template-columns: 1fr 1fr !important; gap: 8px !important; }
  .product-image  { height: 148px !important; }
  .product-info   { padding: 8px !important; }
  .product-title  { font-size: 11px !important; min-height: 36px !important; }

  /* دسته‌بندی */
  .categories-grid { grid-template-columns: 1fr 1fr !important; gap: 8px !important; }
  .category-card   { padding: 14px 8px !important; border-radius: 10px !important; }
  .category-icon   { width: 44px !important; height: 44px !important; font-size: 17px !important; margin-bottom: 8px !important; }
  .category-card h3 { font-size: 11px !important; }

  /* تماس */
  .contact-grid { grid-template-columns: 1fr !important; gap: 8px !important; }
  .contact-section h2 { font-size: 20px !important; }
  .contact-card { padding: 14px 10px !important; }

  /* فوتر */
  .footer-content { grid-template-columns: 1fr !important; gap: 16px !important; }

  /* عنوان بخش‌ها */
  .section-title h2 { font-size: 16px !important; }

  /* درباره ما */
  .about-stats { grid-template-columns: 1fr 1fr !important; gap: 8px !important; }
  .about-image { display: none !important; }

  /* بنر عمده‌فروشی */
  .installment-banner { padding: 20px 12px !important; border-radius: 12px !important; }
  .installment-banner h2 { font-size: 17px !important; }
  .installment-banner p  { font-size: 12px !important; }

  /* info-cards: ستون تکی */
  .info-cards { grid-template-columns: 1fr !important; }

  /* scroll padding */
  html { scroll-padding-top: 70px !important; }
}

.product-image {
    overflow: hidden;
}