/* ===== فونت یکان ===== */
@font-face {
  font-family: 'Yekan';
  src: url('/yekan-font/Yekan.eot');
  src: url('/yekan-font/Yekan.eot?#iefix') format('embedded-opentype'),
       url('/yekan-font/Yekan.woff') format('woff'),
       url('/yekan-font/Yekan.ttf') format('truetype'),
       url('/yekan-font/Yekan.svg#Yekan') format('svg');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Yekan';
  src: url('/yekan-font/yekan-regular.eot');
  src: url('/yekan-font/yekan-regular.eot?#iefix') format('embedded-opentype'),
       url('/yekan-font/yekan-regular.woff') format('woff'),
       url('/yekan-font/yekan-regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-bg: #FBF3E7;
  --color-surface: #FFFDF9;
  --color-primary: #C1502E;
  --color-primary-dark: #A23F22;
  --color-primary-light: #E07A52;
  --color-honey: #F0B429;
  --color-honey-dark: #D89A18;
  --color-moss: #7A9B6E;
  --color-text: #3D2B24;
  --color-muted: #8A7568;
  --color-border: #EEDFC9;
  --color-border-strong: #E0C9AC;

  /* State Colors */
  --color-success: #4CAF50;
  --color-warning: #FF9800;
  --color-error: #E53935;
  --color-info: #0288D1;
  --color-disabled: #A0A0A0;

  --font-display: "Yekan", "Vazirmatn", sans-serif;
  --font-body: "Yekan", "Vazirmatn", sans-serif;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 26px;

  --shadow-sm: 0 3px 10px rgba(193, 80, 46, 0.08);
  --shadow-md: 0 14px 36px rgba(61, 43, 36, 0.12);
  --shadow-lift: 0 8px 24px rgba(193, 80, 46, 0.16);
  --shadow-lg: 0 20px 40px rgba(193, 80, 46, 0.12);
  --shadow-xl: 0 25px 50px rgba(193, 80, 46, 0.15);

  /* Spacing Scale */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;

  /* Z-index Scale */
  --z-sticky: 40;
  --z-header: 50;
  --z-dropdown: 60;
  --z-modal: 100;
  --z-tooltip: 110;

  /* Transition Durations */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  transition: transform var(--transition-fast), 
              box-shadow var(--transition-fast), 
              background var(--transition-fast),
              opacity var(--transition-fast);
}
.btn-xs { padding: 8px 16px; font-size: 0.85rem; }
.btn-sm { padding: 12px 22px; font-size: 0.88rem; }
.btn-lg { padding: 20px 40px; font-size: 1.1rem; }
.btn-block { width: 100%; }

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(193, 80, 46, 0.20);
}
.btn-primary:hover { 
  background: var(--color-primary-dark); 
  transform: translateY(-2px); 
  box-shadow: 0 6px 20px rgba(193, 80, 46, 0.25); 
}
.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}
.btn-primary:disabled,
.btn-primary.disabled {
  background: var(--color-disabled);
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

.btn-secondary {
  background: var(--color-honey);
  color: var(--color-text);
}
.btn-secondary:hover {
  background: var(--color-honey-dark);
  transform: translateY(-2px);
}

.btn-success {
  background: var(--color-success);
  color: #fff;
}
.btn-success:hover {
  background: #45a049;
  transform: translateY(-2px);
}

.btn-danger {
  background: var(--color-error);
  color: #fff;
}
.btn-danger:hover {
  background: #da2c2c;
  transform: translateY(-2px);
}

.btn-ghost {
  background: var(--color-surface);
  color: var(--color-primary);
  border: 1.5px solid var(--color-border-strong);
}
.btn-ghost:hover { 
  border-color: var(--color-primary); 
  background: #fff; 
  box-shadow: var(--shadow-sm);
}

.btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}


/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 243, 231, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 96px;
  gap: 32px;
}
.logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.logo-img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
}
.logo-icon {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transform: rotate(-6deg);
}
.logo-mark { color: var(--color-primary); }
.logo-text { color: var(--color-text); }

.main-nav {
  display: flex;
  gap: 8px;
  align-items: center;
}
.nav-link {
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-text);
  padding: 12px 20px;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-link:hover, .nav-link.active {
  background: var(--color-primary);
  color: #fff;
}

/* Search bar */
.header-search {
  flex: 1;
  max-width: 640px;
  position: relative;
}
.header-search input {
  width: 100%;
  font-family: var(--font-body);
  border: 1.5px solid var(--color-border-strong);
  background: var(--color-surface);
  border-radius: 999px;
  padding: 14px 52px 14px 22px;
  font-size: 0.98rem;
  color: var(--color-text);
  outline: none;
  transition: border-color 0.15s ease;
}
.header-search input:focus { border-color: var(--color-primary); }
.header-search input::placeholder { color: var(--color-muted); }
.header-search .search-icon {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  color: var(--color-muted);
  pointer-events: none;
}
.search-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0; left: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  max-height: 360px;
  overflow-y: auto;
  z-index: 60;
  display: none;
}
.search-results.show { display: block; }
.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
  transition: background 0.12s ease;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--color-bg); }
.search-result-img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--color-bg);
}
.search-result-info { flex: 1; min-width: 0; }
.search-result-name {
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-result-price {
  font-size: 0.75rem;
  color: var(--color-muted);
}
.search-empty {
  padding: 16px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-muted);
}
.search-view-all {
  display: block;
  text-align: center;
  padding: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-primary);
  border-top: 1px solid var(--color-border);
}
.search-view-all:hover { background: var(--color-bg); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.cart-btn {
  position: relative;
  background: var(--color-honey);
  color: var(--color-text);
  border: none;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.cart-btn:hover { transform: translateY(-2px) rotate(-4deg); }
.cart-count {
  position: absolute;
  top: -6px;
  left: -6px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-bg);
}

/* ---------- Nav Dropdown ---------- */
.nav-dropdown {
  position: relative;
}
.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.nav-dropdown-trigger .dd-arrow {
  transition: transform var(--transition-fast);
}
.nav-dropdown:hover .nav-dropdown-trigger .dd-arrow {
  transform: rotate(180deg);
}
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 280px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 40px rgba(61,43,36,0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--transition-fast), visibility var(--transition-fast), transform var(--transition-fast);
  z-index: var(--z-dropdown);
  padding: 8px;
  pointer-events: none;
}
/* پل نامرئی بین trigger و منو - از بسته شدن ناگهانی منو جلوگیری می‌کند */
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
  background: transparent;
}
.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.nav-dropdown-header {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 6px;
  margin-bottom: 6px;
}
.nav-dd-view-all {
  font-weight: 800 !important;
  color: var(--color-primary) !important;
}
.nav-dd-group {
  margin-bottom: 6px;
}
.nav-dd-group:not(:last-child) {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 6px;
}
.nav-dd-group-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-muted);
  padding: 6px 12px 4px;
  letter-spacing: 1px;
}
.nav-dd-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  transition: background var(--transition-fast);
}
.nav-dd-link:hover {
  background: var(--color-bg);
  color: var(--color-primary);
}
.nav-dd-link.active {
  background: rgba(193, 80, 46, 0.08);
  color: var(--color-primary);
  font-weight: 700;
}
.nav-dd-plan-months {
  font-weight: 800;
  font-size: 0.82rem;
  min-width: 50px;
  color: var(--color-primary);
}
.nav-dd-plan-name {
  color: var(--color-muted);
  font-size: 0.78rem;
}
.nav-dropdown-footer {
  border-top: 1px solid var(--color-border);
  padding-top: 6px;
  margin-top: 6px;
}

/* Touch support for mobile: click to toggle */
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
  transform-origin: center;
}

/* Hamburger to X animation */
.nav-toggle.active span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* ---------- Page header (for non-home pages) ---------- */
.page-header {
  padding: 56px 0 44px;
  background: linear-gradient(180deg, #F6E4CE 0%, var(--color-bg) 100%);
  border-bottom: 1px solid var(--color-border);
}
.breadcrumbs {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-bottom: 12px;
}
.breadcrumbs a:hover { color: var(--color-primary); }
.breadcrumbs .sep { margin: 0 6px; }
.page-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  font-weight: 900;
  margin: 0 0 8px;
}
.page-subtitle {
  color: var(--color-muted);
  margin: 0;
  max-width: 680px;
  font-size: 1.05rem;
}

/* ---------- Hero (home) ---------- */
.hero {
  padding: 64px 0 72px;
  overflow: hidden;
  background: linear-gradient(160deg, #EC2F24 0%, #D21A1A 40%, #A50E0E 100%);
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  /* نقش گره‌چینی ایرانی — ستاره هشت‌پر (Girih tiling) */
  background:
    url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='120'%20height='120'%20viewBox='0%200%20120%20120'%3E%3Cg%20fill='none'%20stroke='%23ffffff'%20stroke-width='1'%20opacity='0.15'%3E%3Crect%20x='29'%20y='29'%20width='62'%20height='62'/%3E%3Crect%20x='29'%20y='29'%20width='62'%20height='62'%20transform='rotate(45%2060%2060)'/%3E%3Ccircle%20cx='60'%20cy='60'%20r='17'/%3E%3Cpath%20d='M0%200L16.16%2016.16M120%200L103.84%2016.16M0%20120L16.16%20103.84M120%20120L103.84%20103.84M60%200L60%2029M60%20120L60%2091M0%2060L29%2060M120%2060L91%2060'/%3E%3C/g%3E%3C/svg%3E"),
    radial-gradient(ellipse 80% 60% at 100% 0%, rgba(255, 215, 90, 0.14), transparent 70%),
    radial-gradient(ellipse 60% 80% at 0% 100%, rgba(255, 255, 255, 0.06), transparent 60%);
  background-size: 120px 120px, cover, cover;
  pointer-events: none;
}
/* نوار حاشیه‌ای ایرانی در پایین بنر (نقش خاتم/کتیبه) */
.hero::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 22px;
  background: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='96'%20height='22'%20viewBox='0%200%2096%2022'%3E%3Cg%20fill='none'%20stroke='%23ffffff'%20stroke-width='0.9'%20opacity='0.45'%3E%3Cpath%20d='M48%203L58%2011L48%2019L38%2011Z'/%3E%3Cpath%20d='M48%207L52%2011L48%2015L44%2011Z'/%3E%3Ccircle%20cx='12'%20cy='11'%20r='3.5'/%3E%3Ccircle%20cx='84'%20cy='11'%20r='3.5'/%3E%3Cline%20x1='15.5'%20y1='11'%20x2='38'%20y2='11'/%3E%3Cline%20x1='58'%20y1='11'%20x2='80.5'%20y2='11'/%3E%3Cline%20x1='12'%20y1='3.5'%20x2='12'%20y2='0'/%3E%3Cline%20x1='12'%20y1='22'%20x2='12'%20y2='18.5'/%3E%3Cline%20x1='84'%20y1='3.5'%20x2='84'%20y2='0'/%3E%3Cline%20x1='84'%20y1='22'%20x2='84'%20y2='18.5'/%3E%3C/g%3E%3C/svg%3E") repeat-x center/auto 100%;
  pointer-events: none;
  z-index: 0;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 56px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.14);
  backdrop-filter: blur(4px);
  border: 1.5px solid rgba(255,255,255,0.28);
  color: #FFF3E4;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 8px 18px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.eyebrow::before {
  content: "●";
  color: #FFD97A;
  opacity: 0.9;
  font-size: 0.7rem;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 900;
  line-height: 1.32;
  margin: 0 0 22px;
  letter-spacing: -0.5px;
  color: #FFFDF8;
}
.hero-title .hl {
  color: #FFD97A;
  position: relative;
  display: inline-block;
}
.hero-title .hl::after {
  content: "";
  position: absolute;
  right: 0; left: 0;
  bottom: 6px;
  height: 0.35em;
  background: rgba(255,255,255,0.28);
  z-index: -1;
  opacity: 0.8;
  border-radius: 4px;
}
.hero-desc {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.85);
  max-width: 580px;
  margin: 0 0 32px;
  line-height: 1.85;
}
.hero-actions { display: flex; gap: 14px; margin-bottom: 44px; flex-wrap: wrap; }
.hero-actions .btn-primary {
  background: var(--color-honey);
  color: var(--color-text);
  box-shadow: 0 4px 14px rgba(240, 180, 41, 0.35);
  display: inline-flex;
  width: auto;
  padding: 7px 6px;
  font-size: 1rem;
}
.hero-actions .btn-primary:hover {
  background: #fff;
  color: var(--color-primary-dark);
  box-shadow: 0 6px 20px rgba(240, 180, 41, 0.45);
}
.hero-actions .btn-ghost {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-color: rgba(255,255,255,0.35);
  backdrop-filter: blur(4px);
  display: inline-flex;
  width: auto;
  padding: 7px 6px;
  font-size: 1rem;
}
.hero-actions .btn-ghost:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.55);
}

.hero-stats {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: rgba(255,255,255,0.92);
  margin-bottom: 2px;
}
.stat span {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.72);
}

/* Hero visual: product stickers */
.hero-visual {
  position: relative;
  height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* شمسه (خورشید) تزئینی پشت تصاویر محصول */
.hero-visual-bg {
  position: absolute;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='120'%20height='120'%20viewBox='0%200%20120%20120'%3E%3Cg%20fill='none'%20stroke='%23ffffff'%20stroke-width='1'%20opacity='0.14'%3E%3Crect%20x='29'%20y='29'%20width='62'%20height='62'/%3E%3Crect%20x='29'%20y='29'%20width='62'%20height='62'%20transform='rotate(45%2060%2060)'/%3E%3Ccircle%20cx='60'%20cy='60'%20r='17'/%3E%3Cpath%20d='M0%200L16.16%2016.16M120%200L103.84%2016.16M0%20120L16.16%20103.84M120%20120L103.84%20103.84M60%200L60%2029M60%20120L60%2091M0%2060L29%2060M120%2060L91%2060'/%3E%3C/g%3E%3C/svg%3E") 0 0/120px 120px,
    repeating-conic-gradient(from 0deg, rgba(255,255,255,0.06) 0deg 11.25deg, transparent 11.25deg 22.5deg),
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.10), rgba(255, 215, 90, 0.05), transparent 70%);
  top: 10px;
  right: -60px;
  pointer-events: none;
}
/* حلقه چرخان شمسه */
.hero-visual-bg::before {
  content: '';
  position: absolute;
  inset: 26px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 215, 90, 0.55);
  animation: spin-slow 60s linear infinite;
}

/* Stickers: large decorative product circles */
.sticker {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  text-decoration: none;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  cursor: pointer;
}
.sticker:hover {
  transform: scale(1.08) !important;
}

.sticker-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 3px dashed;
  opacity: 0.3;
  animation: spin-slow 20s linear infinite;
}
@keyframes spin-slow {
  to { transform: rotate(360deg); }
}

.sticker-ring-1 { border-color: var(--color-primary); }
.sticker-ring-2 { border-color: var(--color-honey); }
.sticker-ring-3 { border-color: var(--color-moss); }

.sticker-img-wrap {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  box-shadow: 0 4px 20px rgba(61, 43, 36, 0.08);
}
.sticker-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.sticker:hover .sticker-img {
  transform: scale(1.12);
}

/* Sticker sizes & positions - well spaced apart */
.sticker-1 {
  width: 210px;
  height: 210px;
  top: -50px;
  right: 20px;
  transform: rotate(-8deg);
  z-index: 3;
}
.sticker-2 {
  width: 190px;
  height: 190px;
  top: 130px;
  right: 220px;
  transform: rotate(10deg);
  z-index: 2;
}
.sticker-3 {
  width: 175px;
  height: 175px;
  top: 260px;
  right: 35px;
  transform: rotate(-4deg);
  z-index: 1;
}

/* ---------- Trust strip ---------- */
.trust-strip {
  background: var(--color-text);
  color: #fff;
  padding: 22px 0;
}
.trust-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: center;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 700;
}
.trust-item svg { color: var(--color-honey); flex-shrink: 0; }

/* ---------- Section heads ---------- */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  font-weight: 900;
  margin: 0 0 6px;
}
.section-head p {
  color: var(--color-muted);
  margin: 0;
}
.section-head.center { text-align: center; justify-content: center; flex-direction: column; align-items: center; }

/* ---------- Category cards (home) ---------- */
.categories { padding: 72px 0; }
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.cat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary-light);
}
.cat-icon {
  font-size: 2.4rem;
  margin-bottom: 12px;
  display: block;
}
.cat-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  margin: 0 0 4px;
}
.cat-card span {
  font-size: 0.8rem;
  color: var(--color-muted);
}

/* ---------- Products section / grid ---------- */
.products-section { padding: 72px 0; }

.filter-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.filter-chip {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: 999px;
  padding: 10px 22px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  color: var(--color-muted);
  font-family: var(--font-body);
  transition: all 0.15s ease;
}
.filter-chip:hover { border-color: var(--color-primary); color: var(--color-primary); }
.filter-chip.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}

.product-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-normal),
              box-shadow var(--transition-normal),
              border-color var(--transition-fast);
  cursor: pointer;
  height: 100%;
}
.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
}
.product-link { display: block; }
.product-img {
  aspect-ratio: 4 / 3;
  background: #ffffff;
  position: relative;
  overflow: hidden;
}
.product-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform var(--transition-normal);
}
.product-card:hover .product-img img { transform: scale(1.08); }

/* Stock badge */
.product-stock-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-text);
  text-transform: uppercase;
  box-shadow: var(--shadow-sm);
  z-index: 5;
}
.product-stock-badge.in-stock {
  background: rgba(76, 175, 80, 0.9);
  color: #fff;
}
.product-stock-badge.low-stock {
  background: rgba(255, 152, 0, 0.9);
  color: #fff;
}
.product-stock-badge.out-of-stock {
  background: rgba(229, 57, 53, 0.9);
  color: #fff;
}
.product-brand {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255,255,255,0.85);
  color: var(--color-text);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  z-index: 2;
}
.product-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1;
}
.product-cat {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-moss);
}
.product-name {
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 800;
  margin: 0;
  line-height: 1.5;
}

/* Price tag motif inside product card */
.price-tag {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--color-border-strong);
  position: relative;
}
.price-tag-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}
.price-total {
  font-size: 0.78rem;
  color: var(--color-muted);
}
.price-total strong {
  display: block;
  font-size: 0.92rem;
  color: var(--color-text);
  font-weight: 700;
  margin-top: 2px;
}


.add-btn {
  margin-top: 14px;
  width: 100%;
  background: var(--color-text);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.15s ease;
}
.add-btn:hover { background: var(--color-primary); }
.add-btn.added { background: var(--color-moss); }

/* ---------- How it works ---------- */
.how { padding: 76px 0; background: var(--color-surface); }
.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}
.how-card {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  border: 1px solid var(--color-border);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.how-card::before {
  content: '';
  position: absolute;
  top: -40px;
  left: -40px;
  width: 100px;
  height: 100px;
  background: var(--color-primary);
  opacity: 0.04;
  border-radius: 50%;
}
.how-step {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  background: var(--color-primary);
  padding: 3px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
  letter-spacing: 1px;
}
.how-step-icon {
  display: block;
  font-size: 2.8rem;
  margin-bottom: 14px;
}
.how-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0 0 8px;
}
.how-card p {
  font-size: 0.88rem;
  color: var(--color-muted);
  margin: 0;
  line-height: 1.8;
}

@media (max-width: 720px) {
  .how-card { padding: 22px 18px; }
  .how-step-icon { font-size: 2.2rem; }
}

/* ---------- CTA band ---------- */
.cta-band {
  padding: 76px 0;
}
.cta-box {
  background: linear-gradient(135deg, #EC2F24 0%, #D21A1A 45%, #A50E0E 100%);
  border-radius: var(--radius-lg);
  padding: 64px 48px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.cta-box-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  /* نقوش اصیل ایرانی: نوار حاشیه پایین + گره‌چینی + پرتوهای شمسه */
  background:
    url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='96'%20height='22'%20viewBox='0%200%2096%2022'%3E%3Cg%20fill='none'%20stroke='%23ffffff'%20stroke-width='0.9'%20opacity='0.35'%3E%3Cpath%20d='M48%203L58%2011L48%2019L38%2011Z'/%3E%3Cpath%20d='M48%207L52%2011L48%2015L44%2011Z'/%3E%3Ccircle%20cx='12'%20cy='11'%20r='3.5'/%3E%3Ccircle%20cx='84'%20cy='11'%20r='3.5'/%3E%3Cline%20x1='15.5'%20y1='11'%20x2='38'%20y2='11'/%3E%3Cline%20x1='58'%20y1='11'%20x2='80.5'%20y2='11'/%3E%3Cline%20x1='12'%20y1='3.5'%20x2='12'%20y2='0'/%3E%3Cline%20x1='12'%20y1='22'%20x2='12'%20y2='18.5'/%3E%3Cline%20x1='84'%20y1='3.5'%20x2='84'%20y2='0'/%3E%3Cline%20x1='84'%20y1='22'%20x2='84'%20y2='18.5'/%3E%3C/g%3E%3C/svg%3E") center bottom/auto 22px repeat-x,
    url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='120'%20height='120'%20viewBox='0%200%20120%20120'%3E%3Cg%20fill='none'%20stroke='%23ffffff'%20stroke-width='1'%20opacity='0.13'%3E%3Crect%20x='29'%20y='29'%20width='62'%20height='62'/%3E%3Crect%20x='29'%20y='29'%20width='62'%20height='62'%20transform='rotate(45%2060%2060)'/%3E%3Ccircle%20cx='60'%20cy='60'%20r='17'/%3E%3Cpath%20d='M0%200L16.16%2016.16M120%200L103.84%2016.16M0%20120L16.16%20103.84M120%20120L103.84%20103.84M60%200L60%2029M60%20120L60%2091M0%2060L29%2060M120%2060L91%2060'/%3E%3C/g%3E%3C/svg%3E") 0 0/120px 120px,
    repeating-conic-gradient(from 0deg, rgba(255,255,255,0.045) 0deg 11.25deg, transparent 11.25deg 22.5deg);
}
.cta-box-bg::before {
  content: "";
  position: absolute;
  top: -80px;
  left: -80px;
  width: 280px;
  height: 280px;
  background: var(--color-honey);
  opacity: 0.10;
  border-radius: 50%;
}
.cta-box-bg::after {
  content: "";
  position: absolute;
  bottom: -100px;
  right: -60px;
  width: 320px;
  height: 320px;
  background: #FFD97A;
  opacity: 0.10;
  border-radius: 50%;
}

.cta-content {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}

.cta-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(4px);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 6px 18px;
  border-radius: 999px;
  margin-bottom: 20px;
  border: 1px solid rgba(255,255,255,0.15);
}

.cta-content h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 900;
  margin: 0 0 14px;
  line-height: 1.35;
  color: #FFFDF8;
}

.cta-content p {
  margin: 0 0 32px;
  opacity: 0.85;
  font-size: 1.05rem;
  line-height: 1.7;
}
.cta-content p strong {
  color: #FFD97A;
}

.cta-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 1rem;
  font-family: var(--font-body);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.cta-btn:hover {
  transform: translateY(-2px);
}

.cta-btn-primary {
  background: var(--color-honey);
  color: var(--color-text);
  box-shadow: 0 8px 24px rgba(240, 180, 41, 0.3);
}
.cta-btn-primary:hover {
  background: #fff;
  box-shadow: 0 12px 32px rgba(240, 180, 41, 0.4);
}

.cta-btn-secondary {
  background: rgba(255,255,255,0.10);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.20);
  backdrop-filter: blur(4px);
}
.cta-btn-secondary:hover {
  background: rgba(255,255,255,0.20);
  border-color: rgba(255,255,255,0.40);
}

.cta-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.10);
}

.cta-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.cta-stat-num {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  color: #FFD97A;
}

.cta-stat-label {
  font-size: 0.78rem;
  opacity: 0.7;
  font-weight: 600;
}

@media (max-width: 560px) {
  .cta-box { padding: 40px 24px; }
  .cta-stats { gap: 24px; }
  .cta-stat-num { font-size: 1.1rem; }
}

/* ---------- FAQ ---------- */
.faq { padding: 76px 0; }
.faq-list {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}
.faq-item summary {
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--color-primary);
  font-weight: 900;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p {
  margin: 12px 0 0;
  color: var(--color-muted);
  font-size: 0.92rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-text);
  color: rgba(255,255,255,0.8);
  padding: 32px 0 16px;
  margin-top: 48px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-brand .logo { gap: 8px; }
.footer-brand .logo-icon { width: 36px; height: 36px; font-size: 1.1rem; }
.footer-brand .logo-mark { font-size: 1.3rem; }
.footer-brand .logo-text { color: #fff; font-size: 1.3rem; }
.footer-brand .logo-mark { color: var(--color-primary); }
.footer-brand .logo-icon { background: var(--color-honey); color: var(--color-text); }
.footer-brand p {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.6);
  max-width: 260px;
  margin: 8px 0 0;
  line-height: 1.7;
}
.footer-namad { display: flex; gap: 6px; margin: 10px 0; }
.footer-social { display: flex; gap: 6px; }
.social-btn { width: 30px; height: 30px; }
.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.82rem;
  margin: 0 0 8px;
  color: #fff;
}
.footer-col a, .footer-col span {
  display: block;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.65);
  margin-bottom: 6px;
  line-height: 1.5;
}
.footer-col a:hover { color: var(--color-honey); }
.footer-bottom {
  padding-top: 12px;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  text-align: center;
}

@media (max-width: 1100px) {
  .footer-inner { grid-template-columns: 1.5fr 1fr 1fr; gap: 24px; }
}
@media (max-width: 720px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 20px; }
}
@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
}

/* ---------- Wishlist Heart Button ---------- */
.wishlist-heart {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  backdrop-filter: blur(4px);
}
.wishlist-heart:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 16px rgba(233, 30, 99, 0.25);
}
.wishlist-heart:active {
  transform: scale(0.9);
}
.wishlist-heart svg {
  transition: fill 0.2s, stroke 0.2s;
}
.wishlist-heart.in-wishlist {
  background: rgba(233, 30, 99, 0.12);
}
.wishlist-heart.in-wishlist:hover {
  background: rgba(233, 30, 99, 0.2);
}
.wishlist-heart.wishlist-loading {
  pointer-events: none;
  opacity: 0.6;
}
.wishlist-heart.wishlist-loading::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid #E91E63;
  border-top-color: transparent;
  border-radius: 50%;
  animation: wishlist-spin 0.6s linear infinite;
}
@keyframes wishlist-spin {
  to { transform: rotate(360deg); }
}

/* Wishlist badge in header */
.wishlist-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--color-muted);
  transition: all 0.15s ease;
  text-decoration: none;
}
.wishlist-btn:hover {
  background: var(--color-surface);
  color: #E91E63;
}
.wishlist-count-badge {
  animation: wishlist-badge-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes wishlist-badge-pop {
  0% { transform: scale(0); }
  70% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* ---------- Cart drawer ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(61, 43, 36, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
  z-index: 90;
}
.overlay.show { opacity: 1; visibility: visible; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: min(420px, 100%);
  height: 100%;
  background: var(--color-bg);
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease;
  box-shadow: -10px 0 40px rgba(0,0,0,0.12);
}
.cart-drawer.open { right: 0; }

.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 24px;
  border-bottom: 1px solid var(--color-border);
}
.drawer-head h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0;
}
.close-btn {
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--color-muted);
  line-height: 1;
  padding: 4px;
}
.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.empty-cart {
  text-align: center;
  color: var(--color-muted);
  padding: 60px 0;
  font-size: 0.95rem;
}
.cart-item {
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}
.cart-item-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #F6E4CE, #FBF3E7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  overflow: hidden;
}
.cart-item-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name {
  font-weight: 700;
  font-size: 0.92rem;
  margin: 0 0 4px;
}
.cart-item-price {
  font-size: 0.82rem;
  color: var(--color-muted);
}
.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}
.qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--color-border-strong);
  background: var(--color-bg);
  cursor: pointer;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  font-family: var(--font-body);
}
.qty-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
.cart-item-remove {
  background: none;
  border: none;
  color: var(--color-muted);
  cursor: pointer;
  font-size: 0.8rem;
  text-decoration: underline;
  padding: 0;
  font-family: var(--font-body);
}
.cart-item-remove:hover { color: var(--color-primary); }

.drawer-foot {
  padding: 18px 24px 24px;
  border-top: 1px solid var(--color-border);
}
.drawer-summary { margin-bottom: 16px; }
.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: var(--color-muted);
}
.summary-row strong { color: var(--color-text); font-weight: 700; }
.summary-row.highlight {
  background: #F6E4CE;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--color-text);
}
.summary-row.highlight strong { color: var(--color-primary); font-family: var(--font-display); font-size: 1.05rem; }

/* ---------- Toast Notification System ---------- */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: var(--z-tooltip);
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  animation: slideInLeft 300ms ease forwards;
  pointer-events: all;
  position: relative;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ==================== Custom Confirm Modal ==================== */
.confirm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(61, 43, 36, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.confirm-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.confirm-modal {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px rgba(61, 43, 36, 0.25);
  max-width: 420px;
  width: 100%;
  padding: 32px 28px 24px;
  text-align: center;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.confirm-modal-overlay.show .confirm-modal {
  transform: scale(1) translateY(0);
}

.confirm-modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #FFF3E0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--color-primary);
}

.confirm-modal-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 900;
  margin: 0 0 8px;
  color: var(--color-text);
}

.confirm-modal-message {
  font-size: 0.92rem;
  color: var(--color-muted);
  margin: 0 0 24px;
  line-height: 1.7;
}

.confirm-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.confirm-modal-actions .btn {
  min-width: 120px;
  padding: 11px 20px;
  font-size: 0.88rem;
}

@media (max-width: 480px) {
  .confirm-modal {
    padding: 24px 20px 20px;
  }
  .confirm-modal-actions {
    flex-direction: column-reverse;
  }
  .confirm-modal-actions .btn {
    width: 100%;
  }
}

/* ===== Toast notification system ===== */
.toast.exit {
  animation: slideOutLeft 300ms ease forwards;
}

@keyframes slideOutLeft {
  to {
    opacity: 0;
    transform: translateX(-24px);
  }
}

.toast-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  min-width: 24px;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-text);
}

.toast-message {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-top: 2px;
}

.toast-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-muted);
  font-size: 1.2rem;
  padding: 4px;
  transition: color var(--transition-fast);
  flex-shrink: 0;
}

.toast-close:hover {
  color: var(--color-text);
}

.toast.success {
  border-left: 4px solid var(--color-success);
}
.toast.success .toast-icon {
  color: var(--color-success);
}

.toast.error {
  border-left: 4px solid var(--color-error);
}
.toast.error .toast-icon {
  color: var(--color-error);
}

.toast.warning {
  border-left: 4px solid var(--color-warning);
}
.toast.warning .toast-icon {
  color: var(--color-warning);
}

.toast.info {
  border-left: 4px solid var(--color-info);
}
.toast.info .toast-icon {
  color: var(--color-info);
}

/* (legacy toast removed - use toast-container system instead) */

/* ---------- Form Validation States (merged with existing form-group) ---------- */

/* Error state */
.form-group.has-error input,
.form-group.has-error textarea,
.form-group.has-error select {
  border-color: var(--color-error);
  box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.08);
}

.form-error-message {
  display: block;
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--color-error);
  font-weight: 500;
}

/* Success state */
.form-group.has-success input,
.form-group.has-success textarea,
.form-group.has-success select {
  border-color: var(--color-success);
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.08);
}

.form-success-message {
  display: block;
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--color-success);
  font-weight: 500;
}

/* Password toggle */
.password-toggle {
  position: relative;
}

.password-toggle .toggle-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-muted);
  padding: 8px;
  font-size: 1.1rem;
}

.password-toggle .toggle-btn:hover {
  color: var(--color-primary);
}

.password-toggle input {
  padding-right: 48px;
}

/* ---------- Bottom Navigation (Mobile) ---------- */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  z-index: var(--z-header);
  padding: 8px 0;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
}

.bottom-nav-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 500px;
  margin: 0 auto;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--color-muted);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 12px;
  transition: color var(--transition-fast), background var(--transition-fast);
  min-width: 56px;
  min-height: 48px;
  justify-content: center;
  position: relative;
}

.bottom-nav-item svg {
  width: 22px;
  height: 22px;
  transition: transform var(--transition-fast);
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
  color: var(--color-primary);
}

.bottom-nav-item.active {
  background: rgba(193, 80, 46, 0.08);
}

.bottom-nav-item.active svg {
  transform: scale(1.1);
}

.bottom-nav-badge {
  position: absolute;
  top: 2px;
  right: 8px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* Mobile Drawer Menu */
.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(61, 43, 36, 0.5);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
  backdrop-filter: blur(4px);
}

.mobile-drawer-overlay.show {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: min(320px, 85vw);
  height: 100%;
  background: var(--color-bg);
  z-index: 10000;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  transition: right var(--transition-normal);
  box-shadow: -10px 0 40px rgba(0,0,0,0.15);
  overflow-y: auto;
}

.mobile-drawer.open {
  right: 0;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-border);
}

.mobile-drawer-header .logo {
  font-size: 1.2rem;
}

.mobile-drawer-close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--color-surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--color-muted);
  transition: background var(--transition-fast);
}

.mobile-drawer-close:hover {
  background: var(--color-border);
}

.mobile-drawer-nav {
  flex: 1;
  padding: 16px 0;
  display: flex;
  flex-direction: column;
}

.mobile-drawer-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-text);
  text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast);
  min-height: 48px;
}

.mobile-drawer-nav a:hover,
.mobile-drawer-nav a.active {
  background: rgba(193, 80, 46, 0.08);
  color: var(--color-primary);
}

.mobile-drawer-nav a svg {
  width: 20px;
  height: 20px;
  color: var(--color-primary);
  flex-shrink: 0;
}

/* Mobile Drawer Section (grouped items) */
.mobile-drawer-section {
  display: flex;
  flex-direction: column;
}

.mobile-drawer-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px 6px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--color-muted);
  letter-spacing: 0.5px;
  min-height: 36px;
}

.mobile-drawer-section-header.active {
  color: var(--color-primary);
}

.mobile-drawer-sub-link {
  padding-right: 44px !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
}

.mobile-drawer-sub-link.active {
  background: rgba(193, 80, 46, 0.06) !important;
  color: var(--color-primary) !important;
}

/* Body scroll lock when drawer is open */
body.drawer-open {
  overflow: hidden;
  touch-action: none;
  -webkit-overflow-scrolling: none;
}

/* Touch-friendly utilities */
.touch-target {
  min-width: 48px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== اجبار به نمایش نوار جستجو در موبایل (حتی وقتی لاگین هستید) ===== */
@media (max-width: 720px) {
  .site-header .header-search {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    order: 3 !important;
    flex: 1 1 100% !important;
    max-width: none !important;
    min-height: 36px !important;
  }
  .site-header .header-inner {
    height: auto !important;
    min-height: 60px !important;
    flex-wrap: wrap !important;
  }
}

/* ---------- Checkout Steps ---------- */
.checkout-progress-bar {
  width: 100%;
  height: 3px;
  background: var(--color-border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: var(--spacing-lg);
}

.checkout-progress-fill {
  height: 100%;
  background: var(--color-primary);
  transition: width var(--transition-normal);
}

.checkout-steps {
  display: flex;
  gap: 0;
  margin-bottom: var(--spacing-xl);
  padding-bottom: var(--spacing-lg);
}

.checkout-step {
  flex: 1;
  position: relative;
  text-align: center;
}

.checkout-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 24px;
  left: 50%;
  right: -50%;
  height: 2px;
  background: var(--color-border);
  z-index: 0;
}

.checkout-step.active:not(:last-child)::after,
.checkout-step.completed:not(:last-child)::after {
  background: var(--color-primary);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  border-radius: 50%;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-muted);
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
  transition: all var(--transition-fast);
}

.checkout-step.active .step-number {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 6px rgba(193, 80, 46, 0.1);
}

.checkout-step.completed .step-number {
  background: var(--color-success);
  color: #fff;
  border-color: var(--color-success);
}

.step-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-muted);
}

.checkout-step.active .step-label {
  color: var(--color-primary);
}

.checkout-step.completed .step-label {
  color: var(--color-success);
}

/* ---------- Responsive: Checkout Steps ---------- */
@media (max-width: 560px) {
  .checkout-steps {
    gap: 0;
    margin-bottom: var(--spacing-lg);
  }
  .checkout-step:not(:last-child)::after {
    top: 16px;
  }
  .step-number {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
    margin-bottom: 8px;
  }
  .step-label {
    font-size: 0.75rem;
  }
}

/* ---------- Focus visibility ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ---------- Credit plans page ---------- */
.plans-section { padding: 56px 0 72px; }
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
  margin-bottom: 56px;
}
.plan-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.plan-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.plan-card.featured {
  border-color: var(--color-primary);
  background: linear-gradient(160deg, #FFFDF9 0%, #FBEFE4 100%);
}
.plan-badge {
  position: absolute;
  top: -12px;
  left: 24px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 999px;
}
.plan-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 900;
  margin: 0;
}
.plan-months {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--color-primary);
  line-height: 1;
}
.plan-months span {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-muted);
  margin-right: 4px;
}
.plan-rate {
  display: inline-block;
  background: var(--color-bg);
  border: 1px solid var(--color-border-strong);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  align-self: flex-start;
}
.plan-card p.plan-desc {
  font-size: 0.88rem;
  color: var(--color-muted);
  margin: 0;
}
.plan-max {
  font-size: 0.82rem;
  color: var(--color-muted);
  border-top: 1px dashed var(--color-border-strong);
  padding-top: 12px;
}
.plan-max strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--color-text);
  margin-top: 2px;
}
.plan-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.85rem;
}
.plan-features li::before {
  content: "✓ ";
  color: var(--color-moss);
  font-weight: 800;
}

/* Calculator widget */
.calc-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 36px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;
  margin-bottom: 64px;
}
.calc-form { display: flex; flex-direction: column; gap: 16px; }
.calc-form h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 900;
  margin: 0;
}
.calc-field { display: flex; flex-direction: column; gap: 6px; font-size: 0.88rem; font-weight: 700; }
.calc-field input, .calc-field select {
  font-family: var(--font-body);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 0.95rem;
  background: var(--color-bg);
  color: var(--color-text);
  outline: none;
}
.calc-field input:focus, .calc-field select:focus { border-color: var(--color-primary); }
.calc-result {
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
}
.calc-result .label { font-size: 0.85rem; opacity: 0.85; margin-bottom: 8px; }
.calc-result .amount {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 900;
  margin-bottom: 4px;
}
.calc-result .sub { font-size: 0.85rem; opacity: 0.85; }
.calc-breakdown {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.2);
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}
.calc-breakdown strong { display: block; font-family: var(--font-display); font-size: 1.05rem; margin-top: 2px; }

@media (max-width: 800px) {
  .calc-box { grid-template-columns: 1fr; }
}


@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; height: 420px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .main-nav {
    display: none;
    position: absolute;
    top: 96px;
    right: 0; left: 0;
    background: var(--color-surface);
    flex-direction: column;
    align-items: stretch;
    padding: 14px 28px;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
  }
  .main-nav.open { display: flex; }
  .nav-link { text-align: center; }
  .nav-toggle { display: flex; }
  .header-search { max-width: none; order: 3; flex-basis: 100%; }
  .header-inner { flex-wrap: wrap; height: auto; padding: 14px 24px; gap: 12px; }
  .header-inner .logo { order: 1; }
  .header-actions { order: 2; margin-right: auto; }
  .bottom-nav { display: block; }
  body { padding-bottom: 80px; }
}

body.drawer-open { overflow: hidden; }
@media (max-width: 900px) {
  .hero { padding: 40px 0 56px; }
}

@media (max-width: 720px) {
  .sticker-1 { width: 175px; height: 175px; top: -25px; right: 10px; }
  .sticker-2 { width: 155px; height: 155px; top: 95px; right: 150px; }
  .sticker-3 { width: 140px; height: 140px; top: 195px; right: 20px; }
  .hero-visual-bg { width: 360px; height: 360px; top: 20px; }
}

@media (max-width: 560px) {
  .cat-grid { grid-template-columns: 1fr 1fr; }
  .sticker-1 { width: 145px; height: 145px; top: -10px; right: 8px; }
  .sticker-2 { width: 130px; height: 130px; top: 70px; right: 110px; }
  .sticker-3 { width: 115px; height: 115px; top: 150px; right: 15px; }
  .hero-visual-bg { width: 300px; height: 300px; top: 30px; }
}

@media (max-width: 380px) {
  .sticker-1 { width: 115px; height: 115px; top: -5px; right: 2px; }
  .sticker-2 { width: 100px; height: 100px; top: 55px; right: 75px; }
  .sticker-3 { width: 90px; height: 90px; top: 125px; right: 8px; }
  .hero-visual-bg { width: 220px; height: 220px; top: 50px; }
}


/* ============================================================
 * EXTENSIONS — auth, cart, checkout, admin, etc.
 * (added on top of base samgostar styles)
 * ============================================================ */

/* ---------- Header additions ---------- */
.header-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-text);
  transition: background 0.15s;
  text-decoration: none;
}
.header-action:hover { background: var(--color-surface); color: var(--color-primary); }
.header-action svg { color: var(--color-primary); }
.header-action span { display: none; }
@media (min-width: 720px) { .header-action span { display: inline; } }


/* Cart badge bump animation */
.cart-count.bump { animation: bump 0.3s ease; }

/* جلوگیری از نصف شدن سبد خرید در هدر */
.cart-btn { overflow: visible !important; }
.header-actions { overflow: visible !important; }
.site-header { overflow: visible !important; }
@keyframes bump {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.4); }
}

/* ---------- Flash message ---------- */
.flash-message {
  position: fixed;
  top: 90px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.9rem;
  z-index: 1000;
  max-width: 90%;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: opacity 0.3s;
}
.flash-message button {
  background: transparent;
  border: none;
  color: inherit;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0.7;
}
.flash-success { background: #E8F5E9; color: #2E7D32; border: 1px solid #A5D6A7; }
.flash-error   { background: #FFEBEE; color: #C62828; border: 1px solid #EF9A9A; }
.flash-info    { background: #E3F2FD; color: #1565C0; border: 1px solid #90CAF9; }

/* ---------- Page card (forms) ---------- */
.page-card {
  max-width: 580px;
  margin: 60px auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
}
.page-container {
  max-width: 1800px;
  margin: 0 auto;
  padding: 40px 32px 80px;
}
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--color-text);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--color-bg);
  color: var(--color-text);
  outline: none;
  transition: border-color 0.15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--color-primary);
}
.btn-primary {
  display: inline-block;
  width: 100%;
  padding: 16px 28px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(193, 80, 46, 0.25); }
.btn-secondary {
  display: inline-block;
  width: 100%;
  padding: 14px 28px;
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.btn-secondary:hover { background: var(--color-surface); }

/* ---------- Scroll to top ---------- */
.scroll-to-top {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}
.scroll-to-top.visible { opacity: 1; pointer-events: auto; }
.scroll-to-top:hover { transform: translateY(-2px); }

/* ---------- Live search results ---------- */
.search-results {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  margin-top: 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  max-height: 400px;
  overflow-y: auto;
  z-index: 100;
  padding: 8px;
}
.live-search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--color-text);
  transition: background 0.15s;
}
.live-search-result-item:hover { background: var(--color-bg); }
.live-search-result-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.live-search-result-info { flex: 1; min-width: 0; }
.live-search-result-name {
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-search-result-brand {
  font-size: 0.75rem;
  color: var(--color-muted);
}
.live-search-result-price {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--color-primary);
  flex-shrink: 0;
}
.live-search-loading,
.live-search-no-result {
  padding: 16px;
  text-align: center;
  font-size: 0.88rem;
  color: var(--color-muted);
}
.live-search-no-result { color: var(--color-primary); }

/* ---------- Categories stories (home) ---------- */
.categories-stories {
  padding: 24px 0 4px;
}

.stories-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  width: 100%;
}

.stories-scroll {
  display: flex;
  gap: 36px;
  overflow-x: auto;
  padding: 8px 0 20px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  width: 100%;
  justify-content: center;
}
.stories-scroll::before,
.stories-scroll::after {
  content: '';
  flex-shrink: 0;
  width: 12px;
}
.stories-scroll::-webkit-scrollbar {
  display: none;
}

.story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--color-text);
  scroll-snap-align: start;
  min-width: 90px;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.2s;
}
.story-item:hover {
  transform: translateY(-4px);
}
.story-item:hover .story-label {
  color: var(--color-primary);
}

.story-avatar {
  position: relative;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  box-shadow: 0 4px 16px rgba(61, 43, 36, 0.10);
  border: 3px solid var(--color-border);
}
.story-item:hover .story-avatar {
  box-shadow: 0 8px 28px rgba(193, 80, 46, 0.22);
  transform: scale(1.05);
  border-color: var(--color-primary-light);
}

.story-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  padding: 4px;
  background: conic-gradient(
    var(--color-primary) 0deg,
    var(--color-honey) 120deg,
    var(--color-moss) 240deg,
    var(--color-primary-light) 300deg,
    var(--color-primary) 360deg
  );
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #fff calc(100% - 4px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #fff calc(100% - 4px));
  animation: story-spin 3s linear infinite;
  pointer-events: none;
}
@keyframes story-spin {
  to { transform: rotate(360deg); }
}

.story-avatar img {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--color-surface);
  border: 3px solid var(--color-bg);
  position: absolute;
  z-index: 2;
  display: block;
  transition: transform 0.3s ease, opacity 0.3s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.story-item:hover .story-avatar img {
  transform: scale(1.06);
}

.story-emoji {
  font-size: 2.6rem;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.85);
  border: 3px solid var(--color-bg);
  position: absolute;
  z-index: 3;
  backdrop-filter: blur(2px);
  opacity: 1;
  transition: opacity 0.3s;
}
.story-emoji-fallback {
  opacity: 0;
  pointer-events: none;
}
.story-img-broken .story-emoji-fallback {
  opacity: 1;
}



.story-label {
  font-size: 0.85rem;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
  color: var(--color-text);
  transition: color 0.2s;
  line-height: 1.4;
}

/* Responsive for stories */
@media (max-width: 720px) {
  .stories-scroll {
    gap: 24px;
    padding: 4px 0 16px;
  }
  .stories-scroll::before,
  .stories-scroll::after {
    width: 20px;
  }
  .story-avatar {
    width: 84px;
    height: 84px;
    border-width: 2px;
  }
  .story-avatar img {
    width: 78px;
    height: 78px;
    border-width: 2px;
  }
  .story-emoji {
    width: 78px;
    height: 78px;
    font-size: 1.8rem;
    border-width: 2px;
  }
  .story-label {
    font-size: 0.75rem;
    max-width: 84px;
  }
  .story-item {
    gap: 8px;
    min-width: 70px;
  }
  .story-ring {
    inset: -3px;
    padding: 3px;
  }
}

@media (max-width: 380px) {
  .story-avatar {
    width: 70px;
    height: 70px;
  }
  .story-avatar img {
    width: 64px;
    height: 64px;
  }
  .story-emoji {
    width: 64px;
    height: 64px;
    font-size: 1.4rem;
  }
  .stories-scroll {
    gap: 16px;
  }
}

/* ---------- Trust bar ---------- */
.trust-bar {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin: 40px auto;
  max-width: 1800px;
}
.trust-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  text-align: center;
}
.trust-item { display: flex; flex-direction: column; gap: 4px; }
.trust-num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--color-primary);
}
.trust-label {
  font-size: 0.85rem;
  color: var(--color-muted);
  font-weight: 600;
}

/* ---------- Flash deals / Special offers ---------- */
.flash-section {
  padding: 32px 0;
}

.flash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.flash-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.flash-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--color-honey), var(--color-honey-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 6px 20px rgba(240, 180, 41, 0.3);
  flex-shrink: 0;
}

.flash-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 900;
  margin: 0 0 2px;
  color: var(--color-text);
}

.flash-subtitle {
  font-size: 0.82rem;
  color: var(--color-muted);
  margin: 0;
}

.countdown {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  direction: ltr;
}

.countdown-label-text {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-muted);
  margin-left: 4px;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #3D2B24;
  color: #fff;
  padding: 6px 10px;
  border-radius: 10px;
  min-width: 44px;
}

.countdown-num {
  font-size: 1.1rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
}

.countdown-label {
  font-size: 0.58rem;
  color: rgba(255,255,255,0.6);
  font-weight: 600;
  margin-top: 1px;
}

.countdown-sep {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-muted);
}

/* Flash products grid */
.flash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.flash-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  color: var(--color-text);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}
.flash-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary-light);
}

.flash-card-img {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #ffffff;
  overflow: hidden;
}
.flash-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.flash-card:hover .flash-card-img img {
  transform: scale(1.06);
}

.flash-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flash-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  font-family: var(--font-display);
  padding: 4px 12px;
  border-radius: 999px;
  box-shadow: 0 4px 12px var(--shadow-lift);
  z-index: 2;
}

.flash-card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.flash-card-brand {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-moss);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.flash-card-name {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.flash-card-prices {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 4px;
}

.flash-price {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--color-primary);
}

.flash-old-price {
  font-size: 0.78rem;
  color: var(--color-muted);
  text-decoration: line-through;
}

/* ---------- Section title ---------- */
.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.section-title-bar {
  width: 4px; height: 24px;
  background: var(--color-primary);
  border-radius: 2px;
}
.section-title h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 900;
  margin: 0;
  color: var(--color-text);
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}
.see-all {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
}
.see-all:hover { text-decoration: underline; }

/* ---------- Reviews grid ---------- */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.review-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 18px;
}
.review-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.review-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
}
.review-meta strong { display: block; font-size: 0.92rem; }
.review-meta span { font-size: 0.78rem; color: var(--color-muted); }
.review-stars { color: #F0B429; margin-bottom: 8px; }
.review-text {
  font-size: 0.88rem;
  color: var(--color-text);
  line-height: 1.7;
  margin: 0;
}

/* ---------- Brands section (home) ---------- */
.brands-home { padding: 56px 0; }

/* ---------- Brands grid ---------- */
.brands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.brand-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 18px 14px;
  text-align: center;
  font-weight: 800;
  color: var(--color-text);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.brand-card:hover {
  background: var(--color-bg);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
  border-color: var(--color-primary-light);
}
.brand-card-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--color-text);
}
.brand-card-en {
  font-size: 0.65rem;
  color: var(--color-muted);
  font-weight: 600;
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
/* ---------- Newsletter ---------- */
.newsletter {
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 40px;
  margin: 40px auto;
  max-width: 1800px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}
.newsletter-text h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  margin: 0 0 6px;
}
.newsletter-text p { margin: 0; opacity: 0.9; font-size: 0.92rem; }
.newsletter-form {
  display: flex;
  gap: 8px;
}
.newsletter-form input {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.92rem;
  outline: none;
}
.newsletter-btn {
  padding: 12px 24px;
  background: var(--color-honey);
  color: var(--color-text);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 800;
  cursor: pointer;
}
@media (max-width: 720px) {
  .newsletter { grid-template-columns: 1fr; }
}

/* ---------- Footer namad ---------- */
.footer-namad { display: flex; gap: 8px; margin: 16px 0; }
.namad-badge { text-decoration: none; }
.namad-placeholder {
  width: 62px; height: 62px;
  border-radius: 8px;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}
.footer-social { display: flex; gap: 8px; }
.social-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  text-decoration: none;
}
.social-btn:hover { background: var(--color-primary); }

/* ---------- Data table (admin) ---------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.data-table thead th {
  background: var(--color-bg);
  color: var(--color-muted);
  font-weight: 700;
  text-align: right;
  padding: 12px 16px;
  border-bottom: 2px solid var(--color-border);
  white-space: nowrap;
}
.data-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

/* ---------- Admin layout ---------- */
.admin-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  max-width: 1920px;
  margin: 32px auto;
  padding: 0 32px 80px;
}
.admin-sidebar {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  height: fit-content;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  position: sticky;
  top: 110px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}
.admin-sidebar::-webkit-scrollbar {
  width: 4px;
}
.admin-sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.admin-sidebar::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}
.admin-sidebar a {
  display: block;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  transition: background 0.15s;
}
.admin-sidebar a:hover { background: var(--color-bg); }
.admin-sidebar a.active {
  background: var(--color-primary);
  color: #fff;
}
.admin-content { min-width: 0; }

.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
  border-right: 4px solid var(--color-primary);
}
.stat-label {
  font-size: 0.82rem;
  color: var(--color-muted);
  font-weight: 600;
  margin-bottom: 6px;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--color-primary);
}

@media (max-width: 900px) {
  .admin-layout {
    grid-template-columns: 1fr;
    padding: 0 16px 80px;
    margin: 16px auto;
  }
  .admin-sidebar {
    position: static;
    padding: 8px 10px;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    border-radius: var(--radius-sm);
    scrollbar-width: thin;
    scrollbar-color: var(--color-border-strong) transparent;
  }
  .admin-sidebar::-webkit-scrollbar {
    height: 3px;
  }
  .admin-sidebar::-webkit-scrollbar-thumb {
    background: var(--color-border-strong);
    border-radius: 3px;
  }
  /* پروفایل کاربر در سایدبار → compact در موبایل */
  .admin-sidebar > div:first-child {
    display: none;
  }
  /* لینک‌های سایدبار → چیپ‌های کوچک در یک ردیف اسکرول‌شونده */
  .admin-sidebar a {
    padding: 5px 12px;
    font-size: 0.76rem;
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-block;
    border: 1px solid var(--color-border);
    border-radius: 999px;
  }
  .admin-sidebar a.active {
    border-color: var(--color-primary);
  }
  /* بخش‌های دسته‌بندی‌شده → گروه‌های افقی در همان ردیف */
  .admin-sidebar > div[style*="border-top"],
  .admin-sidebar > div[style*="padding:8px 0;border-top"] {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    align-items: center;
    border-top: none !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  .admin-sidebar > div[style*="border-top"] > div {
    flex: 0 0 auto;
    padding: 0 4px !important;
    margin-bottom: 0 !important;
    white-space: nowrap;
    font-size: 0.68rem !important;
  }
  .admin-sidebar > a[style*="margin-top"] {
    margin-top: 0 !important;
  }
  .admin-sidebar > a[style*="color:#C62828"] {
    color: var(--color-error) !important;
    margin-right: auto;
  }
  .admin-content {
    padding: 0;
    overflow-x: hidden;
    width: 100%;
  }
  /* جلوگیری از overflow محتوا */
  .admin-layout {
    max-width: 100%;
  }
  .admin-content > div {
    max-width: 100%;
  }
  .admin-content canvas {
    max-width: 100% !important;
  }

  /* فرم‌های ۲ ستونی → تک ستون */
  .admin-content form[style*="grid-template-columns:1fr 1fr"],
  .admin-content [style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* فرم‌های ۳-۴ ستونی → ۲ ستون روی تبلت */
  .admin-content [style*="grid-template-columns:1fr 1fr 1fr"],
  .admin-content [style*="grid-template-columns:repeat(3,1fr)"] {
    grid-template-columns: 1fr 1fr !important;
  }
  .admin-content [style*="grid-template-columns:repeat(4,1fr)"] {
    grid-template-columns: 1fr 1fr !important;
  }

  /* فرم‌های ۴+۱ ستونی → ۲ ستون */
  .admin-content [style*="grid-template-columns:1fr 1fr 1fr 1fr auto"] {
    grid-template-columns: 1fr 1fr !important;
  }

  /* المنت‌های grid-column:span 2 → normal */
  .admin-content [style*="grid-column: span 2"],
  .admin-content [style*="grid-column:span 2"] {
    grid-column: 1 !important;
  }

  /* چارت‌های کنار هم → زیر هم */
  .admin-content [style*="grid-template-columns:1fr 1fr;gap:20px;"] {
    grid-template-columns: 1fr !important;
  }

  /* کارت‌های آماری ۳ ستونه → ۲ ستون */
  .admin-content [style*="grid-template-columns:repeat(3,1fr)"] {
    grid-template-columns: 1fr 1fr !important;
  }

  /* stat-cardها کوچک‌تر */
  .stat-card {
    padding: 14px;
  }
  .stat-value {
    font-size: 1.2rem;
  }

  /* جدول‌ها: اسکرول افقی */
  .admin-content [style*="overflow-x:auto"] {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .admin-content [style*="overflow-x:auto"] table {
    min-width: 600px;
  }
  .admin-content .data-table {
    font-size: 0.75rem;
  }
  .admin-content .data-table thead th,
  .admin-content .data-table tbody td {
    padding: 10px 10px;
    white-space: nowrap;
  }

  /* اینپوت‌های قیمت در موبایل */
  .admin-content input[type="text"],
  .admin-content input[type="number"],
  .admin-content select,
  .admin-content textarea {
    font-size: 16px !important; /* جلوگیری از زوم خودکار iOS */
  }

  /* دکمه‌های عملیات جدول تمام‌عرض */
  .admin-content td [style*="display:flex"] {
    flex-wrap: wrap;
  }

  /* ردیف تنوع رنگی */
  .admin-content [data-variant-id] {
    flex-wrap: wrap;
  }

  /* کانتینر عکس‌ها */
  .admin-content [style*="display:flex;gap:8px;margin-top:10px"] {
    justify-content: center;
  }

  /* بوکسی که grid-column:span 2 دارد */
  .admin-content [style*="grid-column:span 2;display:flex;flex-direction:column"] {
    grid-column: 1 !important;
  }

  /* padding باکس‌های فرم */
  .admin-content [style*="background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-md);padding:20px"] {
    padding: 14px !important;
  }
  .admin-content [style*="background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-md);padding:18px"] {
    padding: 12px !important;
  }
}

@media (max-width: 560px) {
  .admin-layout {
    padding: 0 12px 80px;
    margin: 12px auto;
  }

  .admin-content h1 {
    font-size: 1.1rem !important;
  }
  .admin-content h2 {
    font-size: 0.9rem !important;
  }
  .admin-content h3 {
    font-size: 0.9rem !important;
  }

  /* فرم‌های ۳-۴ ستونی → تک ستون */
  .admin-content [style*="grid-template-columns:1fr 1fr 1fr"],
  .admin-content [style*="grid-template-columns:repeat(3,1fr)"],
  .admin-content [style*="grid-template-columns:repeat(4,1fr)"],
  .admin-content [style*="grid-template-columns:1fr 1fr 1fr 1fr auto"] {
    grid-template-columns: 1fr !important;
  }

  /* کارت‌های آماری ۳ ستونه → تک ستون */
  .admin-content [style*="grid-template-columns:repeat(3,1fr)"] {
    grid-template-columns: 1fr !important;
  }

  /* stat-cardها */
  .stat-card {
    padding: 12px;
  }
  .stat-value {
    font-size: 1rem;
  }
  .stat-label {
    font-size: 0.72rem;
  }

  /* باکس‌های محتوا جمع‌وجورتر */
  .admin-content [style*="padding:20px"] {
    padding: 10px !important;
  }
  .admin-content [style*="margin-bottom:24px"] {
    margin-bottom: 14px !important;
  }
  .admin-content [style*="gap:20px"] {
    gap: 12px !important;
  }

  /* چارت‌ها ارتفاع کمتر */
  .admin-content [style*="height:260px"] {
    height: 200px !important;
  }
  .admin-content [style*="height:280px"] {
    height: 220px !important;
  }

  /* جدول صفحات پربازدید */
  .admin-content [style*="max-height:280px"] {
    max-height: none !important;
  }

  /* دکمه‌ها تمام‌عرض */
  .admin-content form [style*="display:flex;gap:8px"].btn,
  .admin-content .btn[style*="width:auto"] {
    width: 100% !important;
    justify-content: center;
  }

  /* تب‌های رنگ بانکی */
  .admin-content [style*="display:flex;gap:6px;margin-bottom:14px"] {
    flex-wrap: wrap;
  }

  /* باکس قیمت بانکی */
  .admin-content [style*="grid-template-columns:repeat(auto-fill,minmax(200px,1fr))"] {
    grid-template-columns: 1fr !important;
  }

  /* اینپوت‌ها فول‌عرض */
  .admin-content input, .admin-content select, .admin-content textarea {
    max-width: 100%;
  }

  /* padding کلی */
  .admin-content [style*="padding:20px"] {
    padding: 14px !important;
  }
}

/* ---------- Track timeline ---------- */
.timeline-step {
  display: flex;
  gap: 14px;
  position: relative;
  margin-bottom: 24px;
}
.timeline-step::before {
  content: '';
  position: absolute;
  right: 17px;
  top: 36px;
  width: 2px;
  height: calc(100% - 12px);
  background: var(--color-border);
}
.timeline-step:last-child::before { display: none; }
.timeline-step.done::before { background: var(--color-primary); }
.timeline-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  border: 2px solid var(--color-border);
  z-index: 1;
}
.timeline-step.done .timeline-icon {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.timeline-content { padding-top: 6px; flex: 1; }
.timeline-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-text);
}
.timeline-step:not(.done) .timeline-title { color: var(--color-muted); }
.timeline-desc {
  font-size: 0.78rem;
  color: var(--color-muted);
  margin-top: 2px;
}

/* ---------- Responsive header adjustments ---------- */
@media (max-width: 900px) {
  .header-search { flex: 1; max-width: 220px; }
}
@media (max-width: 720px) {
  .header-inner { flex-wrap: wrap; height: auto; min-height: 70px; gap: 8px; padding: 10px 16px; }
  .header-search { order: 3; flex: 1 1 100%; max-width: none; margin-top: 4px; }
  .header-actions { gap: 4px; margin-right: auto; }
}

/* ====================================================================
   ====================== RESPONSIVE MOBILE FIXES ======================
   ==================================================================== */

/* ---------- Show nav toggle & hide main nav on mobile ---------- */
@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }
  .main-nav {
    display: none;
  }
  .header-inner {
    height: auto;
    min-height: 72px;
    gap: 12px;
  }
  .logo {
    font-size: 1.2rem;
    gap: 6px;
  }
  .logo-img {
    width: 36px;
    height: 36px;
  }
  .logo-icon {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }
  .cart-btn {
    width: 34px;
    height: 34px;
    border-radius: 11px;
  }
  .cart-btn svg {
    width: 18px;
    height: 18px;
  }
  .cart-count {
    width: 18px;
    height: 18px;
    font-size: 0.6rem;
    top: 0;
    left: -4px;
  }
  .wishlist-btn {
    width: 38px;
    height: 38px;
  }
  .wishlist-btn svg {
    width: 18px;
    height: 18px;
  }
  .header-search input {
    padding: 10px 42px 10px 16px;
    font-size: 0.85rem;
  }
  .header-search .search-icon {
    right: 12px;
    width: 16px;
    height: 16px;
  }
  .header-action span,
  .header-actions a.header-action span {
    display: none;
  }
  .header-actions a.header-action svg,
  .notif-bell-btn {
    width: 22px;
    height: 22px;
  }
  /* فشرده‌سازی دکمه حساب و باکس زنگوله در موبایل (جلوگیری از شکستن ردیف هدر هنگام ورود) */
  .header-actions .header-action {
    padding: 0;
    width: 34px;
    height: 34px;
    justify-content: center;
  }
  .header-actions {
    gap: 6px;
  }
  .notif-bell-btn {
    width: 20px;
    height: 20px;
    font-size: 1rem !important;
  }
  .notif-badge-count {
    width: 14px !important;
    height: 14px !important;
    font-size: 0.45rem !important;
  }
  /* نشانگرهای شمارنده در موبایل داخل هدر بمانند (جلوگیری از بیرون‌زدگی از بالای هدر) */
  .notif-badge-count,
  .wishlist-count-badge {
    top: 0 !important;
  }
  .notif-badge-count {
    right: -4px !important;
  }
  .wishlist-count-badge {
    left: -4px !important;
  }
}

@media (max-width: 480px) {
  .header-inner {
    height: auto;
    min-height: 60px;
    gap: 4px;
    flex-wrap: wrap;
    padding: 8px 10px;
  }
  .logo {
    font-size: 1rem;
    gap: 4px;
  }
  .logo-img {
    width: 32px;
    height: 32px;
  }
  .header-actions {
    gap: 2px;
    margin-right: auto;
  }
  .header-actions .header-action {
    width: 30px;
    height: 30px;
  }
  .cart-btn {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }
  .cart-btn svg {
    width: 16px;
    height: 16px;
  }
  .cart-count {
    width: 16px;
    height: 16px;
    font-size: 0.55rem;
  }
  .wishlist-btn {
    width: 34px;
    height: 34px;
  }
  .wishlist-btn svg {
    width: 16px;
    height: 16px;
  }
  .notif-bell-btn {
    width: 18px;
    height: 18px;
    font-size: 0.85rem !important;
  }
  .nav-toggle span {
    width: 20px;
    height: 2px;
  }
  .nav-toggle {
    padding: 6px;
    gap: 4px;
  }
  /* Adjust hamburger-to-X for smaller spans */
  .nav-toggle.active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }
  .nav-toggle.active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }
  .header-search {
    order: 3;
    flex: 1 1 100%;
    max-width: none;
    margin-top: 4px;
  }
  .header-search input {
    padding: 8px 36px 8px 12px;
    font-size: 0.82rem;
  }
  .header-search .search-icon {
    right: 10px;
    width: 14px;
    height: 14px;
  }
}

/* ---------- Container & Spacing responsive ---------- */
@media (max-width: 900px) {
  .container {
    padding: 0 20px;
  }
  .hero {
    padding: 40px 0 48px;
  }
  .categories {
    padding: 40px 0;
  }
  .products-section {
    padding: 40px 0;
  }
  .how {
    padding: 44px 0;
  }
  .cta-band {
    padding: 44px 0;
  }
  .faq {
    padding: 44px 0;
  }
  .page-header {
    padding: 36px 0 28px;
  }
  .section-head {
    margin-bottom: 24px;
  }
  .section-head h2 {
    font-size: clamp(1.3rem, 4vw, 1.6rem);
  }
  .filter-chip {
    padding: 8px 16px;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
  .hero {
    padding: 28px 0 36px;
  }
  .categories {
    padding: 28px 0;
  }
  .products-section {
    padding: 28px 0;
  }
  .how {
    padding: 32px 0;
  }
  .cta-band {
    padding: 32px 0;
  }
  .faq {
    padding: 32px 0;
  }
  .page-header {
    padding: 24px 0 20px;
  }
  .page-title {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }
  .page-subtitle {
    font-size: 0.9rem;
  }
  .breadcrumbs {
    font-size: 0.78rem;
  }
  .section-head {
    margin-bottom: 18px;
  }
  .section-head h2 {
    font-size: clamp(1.1rem, 5vw, 1.4rem);
  }
}

/* ---------- Hero: Single column on mobile ---------- */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 0;
    text-align: center;
  }
  .hero-visual {
    display: none;
  }
  .hero-visual-bg {
    display: none;
  }
  .hero-desc {
    max-width: none;
    margin: 0 auto 24px;
    font-size: 1rem;
  }
  .hero-actions {
    justify-content: center;
    margin-bottom: 28px;
  }
  .hero-actions .btn {
    width: 100%;
    max-width: 280px;
    padding: 14px 24px !important;
    font-size: 0.95rem !important;
  }
  .hero-stats {
    justify-content: center;
    gap: 20px;
  }
  .hero-title {
    font-size: clamp(1.8rem, 6vw, 2.4rem);
  }
  .eyebrow {
    margin: 0 auto 18px;
  }
  .trust-strip {
    padding: 16px 0;
  }
  .trust-item {
    font-size: 0.78rem;
    gap: 6px;
  }
  .trust-inner {
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: clamp(1.4rem, 7vw, 1.8rem);
  }
  .hero-desc {
    font-size: 0.9rem;
    margin-bottom: 20px;
  }
  .hero-actions .btn {
    max-width: none;
  }
  .hero-actions {
    margin-bottom: 24px;
    gap: 10px;
  }
  .stat strong {
    font-size: 1.1rem;
  }
  .stat span {
    font-size: 0.75rem;
  }
}

/* ---------- Category grid responsive ---------- */
@media (max-width: 900px) {
  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .cat-card {
    padding: 20px 16px;
  }
  .cat-icon {
    font-size: 2rem;
  }
  .cat-card h3 {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .cat-card {
    padding: 16px 12px;
    border-radius: var(--radius-md);
  }
  .cat-icon {
    font-size: 1.7rem;
    margin-bottom: 8px;
  }
  .cat-card h3 {
    font-size: 0.82rem;
  }
  .cat-card span {
    font-size: 0.72rem;
  }
}

/* ---------- Product grid responsive ---------- */
@media (max-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
  }
  .product-body {
    padding: 14px 16px 16px;
    gap: 6px;
  }
  .product-name {
    font-size: 0.92rem;
  }
  .filter-row {
    margin-bottom: 20px;
  }
  .add-btn {
    padding: 10px;
    font-size: 0.82rem;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .product-card {
    border-radius: var(--radius-md);
  }
  .product-body {
    padding: 10px 12px 12px;
    gap: 4px;
  }
  .product-name {
    font-size: 0.82rem;
    line-height: 1.4;
  }
  .product-cat {
    font-size: 0.68rem;
  }
  .product-img {
    aspect-ratio: 1 / 1;
  }
  .price-tag {
    padding-top: 8px;
  }
  .price-total {
    font-size: 0.7rem;
  }
  .price-total strong {
    font-size: 0.82rem;
  }
  .add-btn {
    margin-top: 8px;
    padding: 8px;
    font-size: 0.75rem;
    border-radius: 8px;
  }
  .filter-row {
    gap: 6px;
    margin-bottom: 16px;
  }
  .filter-chip {
    padding: 6px 12px;
    font-size: 0.72rem;
  }
  .product-stock-badge {
    top: 6px;
    right: 6px;
    padding: 4px 8px;
    font-size: 0.65rem;
    border-radius: 6px;
  }
  .product-brand {
    top: 6px;
    left: 6px;
    padding: 3px 8px;
    font-size: 0.6rem;
  }
  .wishlist-heart {
    width: 30px;
    height: 30px;
    top: 6px;
    left: 6px;
  }
  .wishlist-heart svg {
    width: 16px;
    height: 16px;
  }
}

/* ---------- CTA responsive improvements ---------- */
@media (max-width: 900px) {
  .cta-box {
    border-radius: var(--radius-md);
    padding: 40px 24px;
  }
  .cta-content h2 {
    font-size: clamp(1.2rem, 4vw, 1.6rem);
  }
  .cta-content p {
    font-size: 0.92rem;
    margin-bottom: 24px;
  }
  .cta-btn {
    width: 100%;
    max-width: 300px;
    padding: 14px 24px;
    font-size: 0.9rem;
  }
  .cta-actions {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  .cta-stats {
    gap: 20px;
    padding-top: 20px;
  }
  .cta-stat-num {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .cta-box {
    padding: 28px 16px;
  }
  .cta-content h2 {
    font-size: clamp(1rem, 5vw, 1.3rem);
  }
  .cta-content p {
    font-size: 0.85rem;
    margin-bottom: 20px;
  }
  .cta-btn {
    padding: 12px 20px;
    font-size: 0.85rem;
    max-width: none;
  }
  .cta-stats {
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }
  .cta-stat {
    flex-direction: row;
    gap: 8px;
  }
}

/* ---------- FAQ responsive ---------- */
@media (max-width: 720px) {
  .faq-item {
    padding: 12px 16px;
  }
  .faq-item summary {
    font-size: 0.88rem;
  }
  .faq-item p {
    font-size: 0.82rem;
  }
  .faq-list {
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .faq-item {
    padding: 10px 14px;
  }
  .faq-item summary {
    font-size: 0.82rem;
  }
  .faq-item p {
    font-size: 0.78rem;
  }
}

/* ---------- How section responsive ---------- */
@media (max-width: 900px) {
  .how-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
  }
  .how-card {
    padding: 20px 16px;
  }
  .how-card h3 {
    font-size: 0.92rem;
  }
  .how-card p {
    font-size: 0.82rem;
  }
}

@media (max-width: 480px) {
  .how-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .how-card {
    padding: 16px 14px;
    border-radius: var(--radius-md);
  }
  .how-card h3 {
    font-size: 0.88rem;
  }
  .how-card p {
    font-size: 0.8rem;
  }
  .how-step-icon {
    font-size: 2rem;
  }
}

/* ---------- Footer responsive improvements ---------- */
@media (max-width: 720px) {
  .site-footer {
    padding: 24px 0 80px;
    margin-top: 32px;
  }
  .footer-brand p {
    max-width: none;
  }
  .footer-col h4 {
    font-size: 0.78rem;
  }
  .footer-col a,
  .footer-col span {
    font-size: 0.72rem;
  }
}

@media (max-width: 480px) {
  .site-footer {
    padding: 20px 0 70px;
  }
  .footer-bottom {
    font-size: 0.68rem;
  }
}

/* ---------- Form responsive ---------- */
@media (max-width: 720px) {
  .form-group input,
  .form-group textarea,
  .form-group select {
    font-size: 16px !important; /* Prevent zoom on iOS */
  }
}

@media (max-width: 480px) {
  .btn {
    padding: 14px 24px;
    font-size: 0.9rem;
  }
  .btn-sm {
    padding: 10px 18px;
    font-size: 0.82rem;
  }
  .btn-xs {
    padding: 6px 12px;
    font-size: 0.78rem;
  }
}

/* ---------- Nav dropdown: prevent overflow on smaller screens ---------- */
@media (max-width: 1100px) {
  .nav-dropdown-menu {
    min-width: 220px;
  }
}

@media (max-width: 720px) {
  .nav-dropdown-menu {
    min-width: 200px;
  }
}

/* ---------- Notif dropdown responsive ---------- */
@media (max-width: 480px) {
  .notif-dropdown {
    width: 300px !important;
    right: -80px !important;
  }
}

/* ---------- Bottom Nav: Show on mobile ---------- */
@media (max-width: 720px) {
  .bottom-nav {
    display: block;
  }
  body {
    padding-bottom: 72px;
  }
}

@media (max-width: 480px) {
  body {
    padding-bottom: 64px;
  }
}

/* ---------- Scroll to top on mobile ---------- */
@media (max-width: 720px) {
  .scroll-to-top {
    bottom: 80px;
    left: 16px;
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  .scroll-to-top {
    bottom: 72px;
    left: 12px;
    width: 36px;
    height: 36px;
  }
}

/* ---------- Toast container on mobile ---------- */
@media (max-width: 720px) {
  .toast-container {
    left: 16px;
    right: 16px;
    bottom: 80px;
    max-width: none;
  }
  .toast {
    padding: 12px 16px;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .toast-container {
    bottom: 72px;
  }
}

/* ---------- Live search results on mobile ---------- */
@media (max-width: 720px) {
  .search-results {
    max-height: 280px;
    font-size: 0.82rem;
  }
}

/* ---------- Cart drawer on mobile ---------- */
@media (max-width: 480px) {
  .cart-drawer {
    width: 100%;
  }
  .drawer-head {
    padding: 16px 18px;
  }
  .drawer-body {
    padding: 12px 16px;
  }
  .drawer-foot {
    padding: 14px 16px 20px;
  }
  .cart-item {
    padding: 10px 12px;
    gap: 10px;
  }
  .cart-item-name {
    font-size: 0.82rem;
  }
}

/* ---------- Wishlist page responsive (if inline styles) ---------- */
@media (max-width: 480px) {
  .wishlist-count-badge {
    width: 14px !important;
    height: 14px !important;
    font-size: 0.45rem !important;
  }
}

/* ===== Admin pages: hide unnecessary UI ===== */

/* bottom-nav و site-footer بعد از admin-layout هستند → ∼ کار می‌کند */
.admin-layout ~ .bottom-nav,
.admin-layout ~ * .bottom-nav {
  display: none !important;
}

.admin-layout ~ .site-footer {
  margin-top: 0;
}
