/* ============================================================
   فولاد آریایی - استایل اصلی
   ============================================================ */

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #fafafa;
  --text: #111111;
  --muted: #555555;
  --primary: #a3282d;
  --primary-hover: #8a2024;
  --gold: #c9a227;
  --gold-soft: rgba(201, 162, 39, 0.35);
  --border: #e5e5e5;
  --success: #1f7a44;
  --danger: #b3261e;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-card: 0 6px 24px rgba(0, 0, 0, 0.06);
  --glow: 0 0 0 2px rgba(201, 162, 39, 0.18), 0 0 14px rgba(201, 162, 39, 0.45);
  --container: 1100px;
}

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

html {
  font-family: 'Vazirmatn', 'Tahoma', sans-serif;
  direction: rtl;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Vazirmatn', 'Tahoma', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  line-height: 1.4;
  margin: 0 0 16px;
  color: var(--text);
}

h1 { font-size: clamp(26px, 4.5vw, 42px); }
h2 { font-size: clamp(22px, 3.4vw, 30px); }
h3 { font-size: 18px; }

p { margin: 0 0 16px; }

a { color: var(--primary); }

ul { margin: 0; padding: 0; }

button { font-family: inherit; }

input, select, textarea {
  font-family: 'Vazirmatn', 'Tahoma', sans-serif;
  font-size: 16px;
  color: var(--text);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

/* ============================================================
   Header
   ============================================================ */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 2px solid var(--gold);
  display: flex;
  align-items: center;
  gap: 16px;
  padding-block: 12px;
  padding-inline: 0;
}

.header-inner {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: nowrap;
}

.header .logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.header .logo::before {
  content: '▤';
  color: var(--gold);
  font-size: 22px;
}

.header .menu ul {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu-item {
  position: relative;
  display: inline-block;
  padding: 4px 0;
  color: #111111;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.menu-item::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: -2px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.25s ease;
}

.menu-item:hover { color: var(--primary); }
.menu-item:hover::after { transform: scaleX(1); }

.header .search-box {
  flex: 1 1 180px;
  min-width: 140px;
  max-width: 280px;
  position: relative;
}

.header .search-box input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.header .search-box input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: var(--glow);
  background: #fff;
}

.header .phone-block {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.header .phone-block a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  direction: ltr;
}

.header .phone-block .icon { font-size: 16px; }

.header-cta { padding: 10px 18px; font-size: 13px; }

.admin-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  background: #fff;
  color: #111111;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.admin-link:hover {
  color: var(--primary);
  border-color: var(--gold);
  box-shadow: var(--glow);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 8px;
  margin-inline-start: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ============================================================
   Buttons
   ============================================================ */

.gold-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--primary);
  color: #ffffff;
  border: 2px solid var(--gold);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.25s, box-shadow 0.25s, transform 0.15s;
}

.gold-button:hover {
  background: var(--primary-hover);
  box-shadow: var(--glow);
  transform: translateY(-1px);
}

.gold-button:active { transform: translateY(0); }

.gold-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.gold-button.small {
  padding: 8px 14px;
  font-size: 13px;
}

/* دکمهٔ «استعلام قیمت» — فقط برای ردیف/محصول بدون قیمت معتبر */
.inquiry-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: rgba(201, 162, 39, 0.12);
  color: #6f5510;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.inquiry-btn:hover,
.inquiry-btn:focus-visible {
  background: var(--gold);
  color: #111111;
  box-shadow: var(--glow);
}

.inquiry-btn.small {
  padding: 6px 12px;
  font-size: 12px;
}

.price-na {
  color: var(--muted);
}

.calc-card.calc-inquiry {
  text-align: center;
}

.calc-card.calc-inquiry .inquiry-btn {
  margin-top: 8px;
  width: 100%;
}

/* ============================================================
   Hero slider
   ============================================================ */

.hero-banner {
  position: relative;
  background: linear-gradient(135deg, #fdfbf5 0%, #ffffff 55%, #fbf6ea 100%);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.hero-slides {
  position: relative;
  max-width: var(--container);
  margin-inline: auto;
  min-height: 340px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 72px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease;
}

.hero-slide.active {
  position: relative;
  opacity: 1;
  visibility: visible;
}

.hero-content {
  text-align: center;
  max-width: 720px;
}

.hero-content h1,
.hero-content h2,
.hero-slide h1,
.hero-slide h2 {
  color: var(--primary);
  margin-bottom: 12px;
}

.hero-slide .btn {
  display: inline-block;
  padding: 12px 26px;
  background: var(--primary);
  color: #fff;
  border: 2px solid var(--gold);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: box-shadow 0.25s, background 0.25s;
}

.hero-slide .btn:hover {
  background: var(--primary-hover);
  box-shadow: var(--glow);
}

.hero-content p {
  color: var(--muted);
  font-size: 17px;
  margin-bottom: 28px;
}

.hero-btn {
  display: inline-block;
  padding: 12px 26px;
  background: var(--primary);
  color: #fff;
  border: 2px solid var(--gold);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: box-shadow 0.25s, background 0.25s;
}

.hero-btn:hover {
  background: var(--primary-hover);
  box-shadow: var(--glow);
}

/* دکمه‌های <button> با ظاهر دقیقاً یکسان با .hero-btn لینک‌ها */
button.hero-btn {
  font-size: inherit;
  line-height: inherit;
  cursor: pointer;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--primary);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
  box-shadow: var(--shadow-soft);
  transition: background 0.2s, color 0.2s;
}

.hero-arrow:hover { background: var(--gold); color: #fff; }
.hero-arrow.prev { left: max(12px, calc((100% - var(--container)) / 2 + 12px)); }
.hero-arrow.next { right: max(12px, calc((100% - var(--container)) / 2 + 12px)); }

.hero-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #d9d9d9;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.hero-dot.active,
.hero-dot:hover { background: var(--primary); transform: scale(1.2); }

/* ============================================================
   Section heads
   ============================================================ */

.section-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.section-head h2 { margin: 0; color: var(--primary); white-space: nowrap; }

.section-line {
  flex: 1;
  height: 1px;
  background: var(--gold-soft);
}

.section-divider hr {
  border: 0;
  border-top: 1px solid var(--gold-soft);
  margin: 24px 0;
}

/* ============================================================
   Product category cards
   ============================================================ */

.product-category-section { padding-block: 48px 24px; }

.product-category-slider {
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  display: flex;
  gap: 12px;
}

.product-category-slider::-webkit-scrollbar { display: none; }

.product-category-slider > ul { flex: 1 1 100%; min-width: 0; }

.product-category-slider > .product-card {
  flex: 0 0 220px;
  max-width: 220px;
  margin: 0;
}

section.product-category-slider {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
  padding-block: 24px;
}

.product-category-list {
  display: flex;
  gap: 12px;
  list-style: none;
  padding: 2px;
  margin: 0;
  scroll-snap-type: x mandatory;
}

.product-category-list > li {
  flex: 1 0 132px;
  max-width: 160px;
  scroll-snap-align: start;
}

.product-category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  padding: 20px 16px;
  background: linear-gradient(160deg, #ffffff 0%, #eceef2 100%);
  border: 1px solid #d9dce2;
  border-radius: 16px;
  box-shadow: 0 0 0 1px rgba(201, 162, 39, 0.35), 0 6px 20px rgba(201, 162, 39, 0.25);
  text-decoration: none;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

@media (hover: hover) {
  .product-category-card:hover {
    border-color: #c9a227;
    transform: translateY(-4px);
    box-shadow: 0 0 0 1px #c9a227, 0 10px 28px rgba(201, 162, 39, 0.45);
  }
}

.cat-icon { font-size: 36px; color: #c9a227; line-height: 1; }

.cat-image {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(201, 162, 39, 0.45);
  background: #fff;
}

.product-category-card h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #111111;
}

.cat-price {
  font-size: 15px;
  font-weight: 700;
  color: #333333;
}

.empty-search {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

/* ============================================================
   Daily prices
   ============================================================ */

.daily-prices { padding-block: 40px; scroll-margin-top: 96px; }

.daily-prices-tabs {
  display: flex;
  gap: 6px;
  padding: 6px;
  margin-bottom: 16px;
  overflow-x: auto;
  background: linear-gradient(160deg, #ffffff 0%, #eceef2 100%);
  border: 1px solid #d9dce2;
  border-radius: 16px;
  box-shadow: 0 0 0 1px rgba(201, 162, 39, 0.35), 0 6px 20px rgba(201, 162, 39, 0.25);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.daily-prices-tabs::-webkit-scrollbar { display: none; }

.daily-prices-tab {
  flex: 0 0 auto;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.25s, background 0.25s, border-color 0.25s;
}

@media (hover: hover) {
  .daily-prices-tab:hover { color: var(--primary); background: var(--surface-soft); }
}

.daily-prices-tab.active {
  color: var(--primary);
  background: #fff;
  border-color: #c9a227;
  font-weight: 700;
}

.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 20px;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.price-table,
.daily-prices-content table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
  font-size: 14px;
}

.price-table caption,
.daily-prices-content caption {
  caption-side: top;
  text-align: start;
  padding: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.price-table th,
.daily-prices-content th {
  background: var(--surface-soft);
  color: var(--primary);
  font-weight: 600;
  padding: 12px;
  text-align: start;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.price-table td,
.daily-prices-content td {
  padding: 12px;
  text-align: start;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.price-table tbody tr:hover,
.daily-prices-content tbody tr:hover { background: #fffdf6; }

.vat-toggle {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--gold-soft);
  font-size: 14px;
}

.vat-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

.vat-toggle-label { color: var(--muted); font-size: 13px; }

.last-update {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: 13px;
  color: var(--muted);
}

.last-update p { margin: 4px 0; }

/* ============================================================
   Invoice builder
   ============================================================ */

.invoice-builder {
  padding-block: 40px;
  scroll-margin-top: 96px;
}

.invoice-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 24px;
}

.invoice-builder-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.form-group { margin-bottom: 0; }

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.product-select,
.thickness-select,
.width-select,
.length-select,
.quantity-input,
.input-field,
.form-select,
.form-input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.product-select:focus,
.thickness-select:focus,
.width-select:focus,
.length-select:focus,
.quantity-input:focus,
.input-field:focus,
.form-select:focus,
.form-input:focus {
  outline: none;
  border-color: var(--gold);
  background: #fff;
  box-shadow: var(--glow);
}

.add-line-btn {
  grid-column: 1 / -1;
  padding: 12px;
  background: var(--primary);
  color: #fff;
  border: 2px solid var(--gold);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

.add-line-btn:hover { background: var(--primary-hover); box-shadow: var(--glow); }

.lines-list { margin-top: 20px; }

.empty-lines {
  margin: 0;
  padding: 16px;
  background: var(--surface-soft);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.line-item {
  display: grid;
  grid-template-columns: 1.2fr 1.6fr 0.8fr 1fr 1.2fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.line-name { font-weight: 600; }
.line-spec, .line-qty, .line-weight { color: var(--muted); }
.line-total { font-weight: 600; color: var(--primary); white-space: nowrap; }

.delete-btn {
  padding: 6px 12px;
  background: #fff;
  color: var(--danger);
  border: 1px solid var(--danger);
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.delete-btn:hover { background: var(--danger); color: #fff; }

.summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.summary .total-weight, .summary .total-amount { font-weight: 700; color: var(--primary); }

.vat-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  font-size: 14px;
}

.vat-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

.vat-amount-value { font-weight: 700; color: var(--primary); }

.final-amount {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

.submit-invoice { margin-top: 16px; width: 100%; }

.form-message { margin: 12px 0 0; font-size: 14px; color: var(--muted); min-height: 22px; }
.form-message.error { color: var(--danger); }
.form-message.success { color: var(--success); }

/* ============================================================
   Steps
   ============================================================ */

.steps-section { padding-block: 40px; scroll-margin-top: 96px; }

.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 16px;
}

.steps li {
  counter-increment: step;
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding-block: 16px;
  padding-inline: 20px 84px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.steps li::before {
  content: counter(step);
  position: absolute;
  inset-inline-end: 20px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-soft);
  border: 1px solid var(--gold-soft);
  border-radius: 50%;
  color: var(--primary);
  font-weight: 700;
}

.steps li .icon { font-size: 22px; }

.steps .step-text h3 { margin: 0 0 4px; font-size: 15px; color: var(--primary); }
.steps .step-text p { margin: 0; font-size: 13px; color: var(--muted); }

/* ============================================================
   About + FAQ
   ============================================================ */

.about-section { padding-block: 40px; scroll-margin-top: 96px; }
.about-section p { font-size: 15px; color: #222; }

.divider { height: 1px; background: var(--gold-soft); margin: 24px 0; }

.faq-accordion { display: grid; gap: 8px; }

.accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
}

.accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  background: var(--surface-soft);
  border: none;
  text-align: start;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}

.accordion-header:hover { background: #f4f1e6; }
.accordion-header .icon { color: var(--gold); transition: transform 0.25s; }
.accordion-header.active .icon { transform: rotate(180deg); }

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.accordion-content.active { max-height: 360px; }

.accordion-content p {
  margin: 0;
  padding: 0 20px 16px;
  font-size: 14px;
  color: var(--muted);
}

/* ============================================================
   Footer
   ============================================================ */

.footer {
  margin-top: 48px;
  padding-top: 40px;
  background: var(--surface-soft);
  border-top: 2px solid var(--gold);
  scroll-margin-top: 96px;
}

.footer-top {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding-bottom: 32px;
}

/* وقتی آدرس شرکت خالی است، ستونش حذف می‌شود و دو ستون بقیهٔ فضا را پر می‌کنند */
.footer-top.no-address {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.footer .footer-col h3 {
  font-size: 15px;
  color: var(--primary);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--gold-soft);
}

.footer .footer-col ul { list-style: none; }
.footer .footer-col li { margin-bottom: 8px; font-size: 14px; color: var(--muted); }
.footer .footer-col a { color: var(--muted); text-decoration: none; }
.footer .footer-col a:hover { color: var(--primary); }
.footer .footer-col p { font-size: 14px; color: var(--muted); margin: 0; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-block: 16px;
  border-top: 1px solid var(--border);
}

.copyright { font-size: 13px; color: var(--muted); }

.short-links { display: flex; gap: 16px; }
.short-links a { color: var(--muted); text-decoration: none; font-size: 13px; }
.short-links a:hover { color: var(--primary); }

/* ============================================================
   Modal
   ============================================================ */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  padding: 20px;
  background: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
}

.modal.active { display: flex; }

.modal-content {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 28px 24px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.modal-content h2 { font-size: 20px; color: var(--primary); margin-bottom: 20px; }

.modal-content .form-group { margin-bottom: 16px; }
.modal-content .input-field { width: 100%; }
.req-mark { color: var(--danger); }
.field-error {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--danger);
}
.field-error:empty { display: none; }
.form-group.invalid .input-field { border-color: var(--danger); }

.close-btn {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}

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

.modal-actions { display: flex; gap: 12px; margin-top: 20px; }

.modal-actions .btn {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
}

.modal-actions .btn-primary { background: var(--primary); color: #fff; border-color: var(--gold); }
.modal-actions .btn-primary:hover { background: var(--primary-hover); }
.modal-actions .btn-secondary { background: var(--surface-soft); color: var(--text); border-color: var(--border); }

/* ============================================================
   Server-rendered product pages
   ============================================================ */

body > .product-price-table,
body > .product-calculator,
body > .product-related,
body > .product-cta {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

.product-price-table { padding-block: 40px 24px; }
.product-price-table h2 { color: var(--primary); }

.vat-toggle-bottom {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.vat-toggle-bottom input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.product-price-table {
  overflow-x: auto;
}

.product-price-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table-scroll-table { width: 100%; }

.product-price-table th {
  background: var(--surface-soft);
  color: var(--primary);
  font-weight: 600;
  padding: 12px;
  text-align: start;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.product-price-table td {
  padding: 12px;
  text-align: start;
  border-bottom: 1px solid var(--border);
}

.product-price-table tbody tr:hover { background: #fffdf6; }

.product-calculator { padding-block: 24px; }
.product-calculator h2 { color: var(--primary); }

#productCalcForm {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.form-row .form-group { margin-bottom: 0; }

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.calc-result {
  margin-top: 20px;
  padding: 16px 20px;
  background: var(--surface-soft);
  border: 1px solid var(--gold-soft);
  border-radius: var(--radius);
}

.result-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}

.result-row:last-child { border-bottom: none; }
.result-weight, .result-price, .result-total { font-weight: 700; color: var(--primary); }

.product-related { padding-block: 24px; }
.product-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.product-card {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.product-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  box-shadow: var(--shadow-card);
}

.product-card h3 { margin: 0 0 8px; font-size: 16px; color: var(--primary); }
.product-card p { margin: 0; font-size: 13px; color: var(--muted); }

.product-cta {
  margin-block: 24px 40px;
  padding-block: 28px;
  text-align: center;
  background: #fffdf6;
  border: 1px solid var(--gold-soft);
  border-radius: var(--radius);
}

.product-cta p { font-size: 16px; margin-bottom: 16px; }
.product-cta .gold-button { margin: 0 6px; }

.error-page {
  max-width: 640px;
  margin: 80px auto;
  padding: 32px 24px;
  text-align: center;
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.error-page h1 { font-size: 24px; color: var(--primary); }
.error-page .buttons { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

/* ============================================================
   Admin
   ============================================================ */

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(160deg, #fdfbf5, #ffffff 60%, #fbf6ea);
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 32px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.login-card h2 { color: var(--primary); font-size: 22px; margin-bottom: 8px; }
.login-card > p { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.login-card .form-group { margin-bottom: 16px; }

.password-change-notice {
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--surface-soft);
  border-inline-start: 3px solid var(--gold);
  border-radius: var(--radius-sm);
}

.password-change-notice p { margin: 0; font-size: 13px; color: var(--muted); }

.admin-panel {
  max-width: 1200px;
  margin-inline: auto;
  padding: 20px;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: 2px solid var(--gold);
  border-radius: var(--radius) var(--radius) 0 0;
}

.admin-title { font-weight: 700; color: var(--primary); font-size: 17px; }
.admin-logout-btn { padding: 8px 16px; font-size: 13px; }

.admin-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-top: none;
}

.admin-tab {
  flex: 0 0 auto;
  padding: 10px 18px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
}

.admin-tab:hover { color: var(--primary); background: #fff; }

.admin-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(201, 162, 39, 0.35);
}

.admin-tab-content {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
}

.admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.admin-filters .input-field { flex: 1 1 200px; width: auto; }

.admin-table-wrapper {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  font-size: 13px;
}

.admin-table th {
  background: var(--surface-soft);
  color: var(--primary);
  font-weight: 600;
  padding: 12px;
  text-align: start;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.admin-table td {
  padding: 12px;
  text-align: start;
  border-bottom: 1px solid var(--border);
}

.admin-table tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: #fffdf6; }

.phone-link { color: var(--primary); text-decoration: none; direction: ltr; display: inline-block; }
.phone-link:hover { text-decoration: underline; }

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: var(--surface-soft);
  color: var(--muted);
  border: 1px solid var(--border);
}

.status-new { background: #fdf3e2; color: #8a5a00; border-color: #f0d9a8; }
.status-review { background: #eef3fb; color: #24467a; border-color: #c7d7f0; }
.status-confirmed { background: #eaf6ee; color: #1f6b3c; border-color: #bfe3cb; }
.status-completed { background: #e9f5f0; color: #145c45; border-color: #b9e0d2; }
.status-cancelled { background: #fbeaea; color: #8a2323; border-color: #efc4c4; }

.new-invoice-badge {
  margin-top: 12px;
  padding: 10px 14px;
  background: #fdf3e2;
  border: 1px solid #f0d9a8;
  border-radius: var(--radius-sm);
  color: #8a5a00;
  font-size: 13px;
}

.products-management { display: grid; gap: 16px; }

.products-list { display: grid; gap: 10px; }

.products-list .product-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: none;
}

.product-info { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.product-name { font-weight: 600; }
.product-density { font-size: 12px; color: var(--muted); }
.product-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.product-media { flex: 0 0 auto; }

.product-thumb {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.product-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}

.action-btn {
  padding: 7px 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.action-btn:hover { border-color: var(--gold); color: var(--primary); background: #fffdf6; }
.edit-btn:hover { border-color: var(--gold); }
.delete-btn.action-btn { color: var(--danger); border-color: #e8b7b7; }
.delete-btn.action-btn:hover { background: var(--danger); color: #fff; }

.action-view, .action-delete, .action-export {
  padding: 6px 10px;
  margin-inline-end: 4px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

.action-view:hover { border-color: var(--gold); color: var(--primary); }
.action-export { color: var(--success); border-color: #b7ddc5; }
.action-export:hover { border-color: var(--success); color: #fff; background: var(--success); }
.action-delete { color: var(--danger); border-color: #e8b7b7; }
.action-delete:hover { background: var(--danger); color: #fff; }

.quick-editor {
  padding: 20px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.quick-editor h3 { color: var(--primary); font-size: 16px; }
.quick-editor .input-field { margin-bottom: 12px; }

.settings-group {
  margin-bottom: 24px;
  padding: 16px 18px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.settings-group h3 {
  font-size: 15px;
  color: var(--primary);
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--gold-soft);
}

.settings-group .form-group { margin-bottom: 14px; }
.settings-group .form-group:last-child { margin-bottom: 0; }

.settings-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }

.settings-notice {
  padding: 14px 16px;
  background: #fffdf6;
  border: 1px solid var(--gold-soft);
  border-radius: var(--radius-sm);
}

.settings-notice p { margin: 0 0 10px; }
.settings-notice p:last-child { margin-bottom: 0; }

.toast {
  position: fixed;
  top: 20px;
  inset-inline-end: 20px;
  z-index: 2000;
  padding: 12px 18px;
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--gold);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  font-size: 14px;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 900px) {
  .header,
  .header-inner { flex-wrap: wrap; gap: 8px; }
  .header { padding: 8px 0; }
  .header-inner { padding-inline: 12px; }
  .hamburger { display: flex; order: 1; margin-inline-start: 0; width: 40px; height: 40px; padding: 9px; flex: 0 0 auto; }
  .header .logo { order: 2; font-size: 17px; }
  .header .logo::before { font-size: 18px; }
  .header-cta { order: 3; margin-inline-start: auto; display: inline-flex; padding: 7px 10px; font-size: 12px; }
  .header .admin-link { order: 4; padding: 6px 8px; font-size: 12px; }
  .header .menu { display: none; }
  .header .search-box { order: 6; flex: 1 1 100%; max-width: 100%; }
  .header .phone-block { display: none; }
}

@media (max-width: 900px) {
  .invoice-builder-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .line-item { grid-template-columns: 1fr 1fr; }
  .line-spec { grid-column: 1 / -1; }
  .delete-btn { grid-column: 1 / -1; justify-self: start; }
  .footer-top,
  .footer-top.no-address { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

@media (max-width: 600px) {
  .hero-slides { min-height: 300px; }
  .hero-slide { padding: 40px 20px 56px; }
  .hero-arrow { width: 38px; height: 38px; font-size: 22px; }
  .hero-arrow.prev { left: 8px; }
  .hero-arrow.next { right: 8px; }
  .hero-content p { font-size: 15px; }

  .header .logo { font-size: 16px; }

  .product-category-list > li { min-width: 150px; }
  .product-category-card h3 { font-size: 17px; }
  .product-category-section { padding-block: 32px 16px; }

  .price-card { padding: 14px; }
  .daily-prices-tabs { gap: 2px; }
  .daily-prices-tab { padding: 9px 12px; font-size: 12px; }

  /* Price table becomes stacked cards on phones */
  .price-table { min-width: 0; display: block; }
  .price-table caption { display: block; width: 100%; font-size: 13px; line-height: 1.6; }
  .price-table thead { display: none; }
  .price-table tbody, .price-table tr, .price-table td { display: block; width: 100%; }
  .price-table tr {
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
  }
  .price-table td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px dashed var(--border);
    white-space: normal;
  }
  .price-table td:last-child { border-bottom: none; }
  .price-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 13px;
  }

  .invoice-card { padding: 16px; }
  .invoice-builder-form { grid-template-columns: 1fr; }
  .line-item { grid-template-columns: 1fr; }
  .line-spec { grid-column: auto; }

  .steps li { padding-block: 14px; padding-inline: 16px 68px; }
  .steps li::before { inset-inline-end: 14px; width: 34px; height: 34px; font-size: 14px; }

  .footer-top,
  .footer-top.no-address { grid-template-columns: 1fr; gap: 20px; }
  .footer-bottom { flex-direction: column; text-align: center; }

  .modal-content { padding: 24px 18px 18px; }
  .modal-actions { flex-direction: column; }

  .form-row { grid-template-columns: 1fr; }

  .admin-panel { padding: 10px; }
  .admin-tab-content { padding: 14px; }
  .admin-topbar { flex-wrap: wrap; }
  .admin-filters .input-field { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ============================================================
   مکمل‌های سازگاری با قالب‌های سرور
   ============================================================ */

.hero-slide .text-content {
  text-align: center;
  max-width: 720px;
}

.vat-amount {
  font-weight: 700;
  color: var(--primary);
}

.add-size {
  padding: 7px 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
}

.add-size:hover {
  border-color: var(--gold);
  color: var(--primary);
  background: #fffdf6;
}

/* Hide empty server-template blocks (no tabs/cards generated) */
.daily-prices:not(:has(.daily-prices-tab)) { display: none; }
section.product-category-slider:not(:has(.product-card)) { display: none; }

/* ============================================================
   Admin panel - empty state + responsive
   ============================================================ */

.admin-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 900px) {
  /* Orders table becomes stacked cards on tablets and phones */
  .admin-table-wrapper {
    border: none;
    overflow: visible;
  }

  .admin-table {
    min-width: 0;
    display: block;
  }

  .admin-table thead { display: none; }

  .admin-table tbody,
  .admin-table tr,
  .admin-table td {
    display: block;
    width: 100%;
  }

  .admin-table tr {
    margin-bottom: 12px;
    padding: 12px 14px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
  }

  .admin-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px dashed var(--border);
  }

  .admin-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
  }

  .admin-table td:last-child {
    border-bottom: none;
    padding-top: 10px;
  }

  .admin-table td[colspan]::before { content: none; }
}

@media (max-width: 600px) {
  .login-screen { padding: 16px; }
  .login-card { padding: 24px 18px; }
  .login-card h2 { font-size: 20px; }
  .login-card .form-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .login-card .form-actions .gold-button { width: 100%; }

  .admin-panel { padding: 10px; }
  .admin-topbar { flex-wrap: wrap; }
  .admin-title { font-size: 15px; }
  .admin-tabs { padding: 6px; }
  .admin-tab { padding: 9px 12px; font-size: 13px; }
  .admin-tab-content { padding: 14px; }

  .admin-filters { flex-direction: column; }
  .admin-filters .input-field,
  .admin-filters .gold-button { flex: 1 1 100%; width: 100%; }

  .admin-table { font-size: 13px; }
  .admin-table td { flex-wrap: wrap; }

  .products-list .product-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .product-actions { width: 100%; }
  .product-actions .action-btn { flex: 1 1 auto; }

  .quick-editor { padding: 16px; }
  .settings-group { padding: 14px; }
  .settings-actions .gold-button,
  .settings-notice .gold-button,
  #changePasswordBtn { width: 100%; }
}


/* ============================================================
   کارت مشترک محصول + گرید محصولات + سرصفحهٔ داخلی
   (قالب مشترک صفحهٔ اصلی، /products و صفحه‌های محصول)
   ============================================================ */

.product-category-card {
  padding: 0;
  gap: 0;
  align-items: stretch;
  overflow: hidden;
}

.cat-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(160deg, #f8f9fb 0%, #e6e9ee 100%);
  border-bottom: 1px solid rgba(201, 162, 39, 0.28);
}

.cat-media .cat-image {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  object-fit: contain;
  object-position: center;
}

/* عکس آپلودی دسته: لبه‌به‌لبه کل ناحیهٔ تصویر را پر می‌کند (بدون پدینگ و بدون حاشیهٔ داخلی) */
.cat-media-photo {
  padding: 0;
  background: #eef0f4;
}

.cat-photo {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  object-fit: cover;
  object-position: center;
  z-index: 1;
}

/* آیکون فقط زمانی دیده می‌شود که عکس بارگذاری نشود (با onerror در مارک‌آپ) */
.cat-media-photo .cat-photo-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: none;
  align-items: center;
  justify-content: center;
}

.cat-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: 12px 10px 14px;
}

.cat-body h3 { margin: 0; }

/* نشان «مشاهده دسته» فقط روی هاور/فوکوس و پایین ناحیهٔ تصویر؛ روی صفحه‌های لمسی پنهان است */
.cat-cta {
  position: absolute;
  left: 50%;
  bottom: 8px;
  z-index: 3;
  transform: translate(-50%, 6px);
  padding: 4px 12px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .product-category-card:hover .cat-cta,
  .product-category-card:focus-visible .cat-cta {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@media (hover: none) {
  .cat-cta { display: none; }
}

/* گرید ریسپانسیو محصولات (۱ / ۲ / ۳ / ۴ ستون) */
.product-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);
  list-style: none;
  margin: 0;
  padding: 2px;
}

.product-grid > li {
  flex: none;
  min-width: 0;
  max-width: none;
}

@media (min-width: 600px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1200px) {
  .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.product-category-slider:has(.product-grid) {
  display: block;
  overflow: visible;
  padding-bottom: 0;
}

/* سرصفحهٔ داخلی صفحه‌ها */
.page-head {
  padding-block: 36px 8px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover { color: var(--primary); }

.breadcrumb .current {
  color: var(--text);
  font-weight: 600;
}

.page-head h1 {
  margin: 0 0 6px;
  color: var(--primary);
}

.page-head .page-intro {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
}

.product-list-section {
  padding-block: 20px 40px;
}


/* ============================================================
   فاکتور: صفحهٔ موفقیت، کد پیگیری، وضعیت‌ها، پیگیری سفارش و پنل مدیریت
   ============================================================ */

/* ---------- صفحهٔ موفقیت فاکتور ---------- */
.invoice-success {
  margin-top: 20px;
  padding: 22px 20px;
  background: #fffdf6;
  border: 1px solid var(--gold);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 26px rgba(201, 162, 39, 0.18);
  text-align: center;
}

.invoice-success-title {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 1.15rem;
}

.invoice-success-number {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 0.95rem;
}

.tracking-code-box {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 26px;
  margin-bottom: 16px;
  background: #fff;
  border: 2px dashed var(--gold);
  border-radius: var(--radius-sm);
}

.tracking-code-label {
  font-size: 0.78rem;
  color: var(--muted);
}

.tracking-code-value {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--primary);
  direction: ltr;
}

.invoice-success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.tracking-note {
  margin: 14px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.9;
}

/* ---------- رنگ وضعیت‌ها (خوانا و آرام) ---------- */
.status-badge,
.status-select {
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
}

.status-badge { display: inline-block; }

.st-registered { background: #f2f3f4; color: #4b545c; border-color: #d8dcdf; }
.st-reviewing { background: #edf1f6; color: #3d5068; border-color: #cbd6e3; }
.st-approved { background: #fbf3dd; color: #7a5700; border-color: #ecd9a3; }
.st-paid { background: #eaf4ec; color: #1f6b3c; border-color: #c4e2cc; }
.st-preparing { background: #fbf0e6; color: #8a4b16; border-color: #ecd0b6; }
.st-shipped { background: #eaf0f9; color: #22457a; border-color: #c6d5ea; }
.st-delivered { background: #e8f3ee; color: #145c45; border-color: #bfe0d1; }
.st-cancelled { background: #fbeaea; color: #8a2323; border-color: #efc4c4; }

/* ---------- صفحهٔ پیگیری سفارش ---------- */
.track-section {
  display: grid;
  gap: 20px;
  padding-bottom: 40px;
}

.track-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--gold);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 22px rgba(201, 162, 39, 0.12);
}

.track-form .form-group {
  flex: 1 1 220px;
  margin: 0;
}

.track-form .form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: var(--text);
}

.track-form .form-message {
  flex: 1 1 100%;
  margin: 0;
}

.track-recent h2 {
  font-size: 1rem;
  color: var(--primary);
  margin-bottom: 10px;
}

.track-recent-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.track-recent-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  text-align: start;
}

.track-recent-item:hover {
  border-color: var(--gold);
  background: #fffdf6;
}

.track-recent-code {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  direction: ltr;
}

.track-recent-number {
  font-size: 0.75rem;
  color: var(--muted);
}

.track-card {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: grid;
  gap: 16px;
}

.track-head {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.track-head-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.track-label {
  font-size: 0.78rem;
  color: var(--muted);
}

.track-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.track-code { direction: ltr; letter-spacing: 2px; }

.track-current { margin: 0; }

.track-cancelled {
  margin: 0;
  padding: 10px 14px;
  background: #fbeaea;
  border: 1px solid #efc4c4;
  border-radius: var(--radius-sm);
  color: #8a2323;
  font-weight: 500;
}

.track-subtitle {
  margin: 0;
  font-size: 1rem;
  color: var(--primary);
}

/* ---------- استپر مراحل سفارش ---------- */
.order-stepper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.order-step {
  flex: 1 1 108px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
}

.order-step-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 0.78rem;
  color: var(--muted);
}

.order-step.done {
  border-color: #e6d6a4;
  background: #fffdf6;
  color: #7a5700;
}

.order-step.done .order-step-dot {
  border-color: var(--gold);
  background: #fbf3dd;
  color: #7a5700;
}

.order-step.current {
  border-color: var(--primary);
  background: #fdf1f1;
  color: var(--primary);
  font-weight: 700;
}

.order-step.current .order-step-dot {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.order-stepper.is-cancelled .order-step.current {
  border-color: #efc4c4;
  background: #fbeaea;
  color: #8a2323;
}

/* ---------- تاریخچهٔ وضعیت ---------- */
.status-history {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.status-history-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.status-history-date {
  color: var(--muted);
  direction: ltr;
}

/* ---------- جمع‌بندی پیگیری ---------- */
.track-totals {
  display: grid;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

.track-total-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.track-total-row.is-final {
  font-weight: 700;
  color: var(--primary);
  font-size: 1rem;
}

.track-table-wrapper { overflow-x: auto; }
.track-table { min-width: 0; }
@media (min-width: 901px) {
  .track-table { min-width: 640px; }
}
.track-table tbody tr:hover { background: transparent; }

/* ---------- پنل مدیریت: جستجو، شمارش و صفحه‌بندی ---------- */
.admin-search {
  display: flex;
  gap: 8px;
  flex: 1 1 320px;
  flex-wrap: wrap;
}

.admin-search .input-field { flex: 1 1 200px; }

.admin-result-count {
  margin: 0 0 12px;
  font-size: 0.88rem;
  color: var(--muted);
}

.admin-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
}

.admin-page-info {
  font-size: 0.85rem;
  color: var(--muted);
}

.status-select {
  font-family: inherit;
  cursor: pointer;
  max-width: 150px;
}

.copy-code-btn {
  margin-inline-start: 4px;
  padding: 3px 8px;
  font-family: inherit;
  font-size: 11px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
}

.copy-code-btn:hover {
  border-color: var(--gold);
  color: var(--primary);
  background: #fffdf6;
}

.tracking-code-cell { direction: ltr; display: inline-block; }

.admin-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ---------- مودال جزئیات فاکتور ---------- */
.admin-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 28px 16px;
  background: rgba(26, 26, 26, 0.55);
  overflow-y: auto;
  z-index: 1200;
}

.admin-modal.active { display: flex; }

/* ---------- مودال ورود دوباره پس از انقضای نشست ---------- */
.admin-modal-card.admin-modal-small { max-width: 420px; }

.admin-modal-small .admin-modal-head { margin-bottom: 4px; }

.relogin-text {
  margin: 4px 0 14px;
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
}

#reloginForm .form-group { margin-bottom: 12px; }
#reloginForm .gold-button { width: 100%; }

.relogin-error {
  min-height: 20px;
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.8;
  font-weight: 600;
  color: #b23b3b;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}

.checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.admin-modal-card {
  width: 100%;
  max-width: 960px;
  background: var(--surface);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
  padding: 20px;
}

.admin-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.admin-modal-head h3 {
  margin: 0;
  color: var(--primary);
  font-size: 1.05rem;
}

.admin-modal-body {
  display: grid;
  gap: 16px;
  padding-top: 14px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 16px;
  font-size: 0.88rem;
}

.detail-grid dt { color: var(--muted); font-size: 0.78rem; }
.detail-grid dd { margin: 2px 0 0; color: var(--text); }
.detail-grid dd.ltr { direction: ltr; }

.detail-block {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.detail-block h4 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--primary);
}

.detail-status-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

@media (max-width: 768px) {
  .track-form { flex-direction: column; align-items: stretch; }
  .track-form .gold-button { width: 100%; }
  .order-step { flex: 1 1 72px; font-size: 0.7rem; }
  .admin-modal { padding: 12px; }
  .admin-modal-card { padding: 14px; }
  .status-select { max-width: 100%; }
}

@media (max-width: 480px) {
  .tracking-code-value { font-size: 1.35rem; }
  .invoice-success { padding: 16px 12px; }
  .order-step { flex: 1 1 62px; font-size: 0.66rem; }
  .order-step-label { line-height: 1.5; }
}

/* ---------- اصلاح چیدمان جستجوی فاکتورها در موبایل ---------- */
[hidden] { display: none !important; }

@media (max-width: 600px) {
  .admin-search {
    flex-direction: column;
    flex: 1 1 100%;
  }

  .admin-search .input-field,
  .admin-search .gold-button {
    flex: 1 1 auto;
    width: 100%;
  }

  .admin-filters .input-field {
    flex: 1 1 auto;
  }
}

/* ============================================================
   کاتالوگ سه‌سطحی: مگامنو، صفحهٔ قیمت، فیلترها، نمودار و ادمین
   ============================================================ */

/* ============================================================
   منوی سراسری: مگامنوی دسکتاپ و کشوی موبایل
   ============================================================ */

.header-inner { position: relative; }

/* ---------- دکمهٔ منوی محصولات ---------- */
.mega-item { display: flex; align-items: center; }
.mega-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.mega-toggle:hover,
.mega-toggle:focus-visible,
.mega-item.open .mega-toggle {
  border-color: var(--gold);
  color: #8a6c21;
  box-shadow: 0 0 10px rgba(201, 162, 39, 0.3);
  outline: none;
}
.mega-toggle-icon { font-size: 14px; line-height: 1; color: var(--gold); }
.mega-caret { font-size: 10px; transition: transform 0.2s; }
.mega-item.open .mega-caret { transform: rotate(180deg); }

/* ---------- پنل مگامنو ---------- */
.mega-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  width: min(1100px, calc(100% - 32px));
  max-height: 80vh;
  overflow: hidden;
  background: #fff;
  border: 1px solid #ece7dc;
  border-radius: 16px;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.14);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
  z-index: 120;
}
.mega-panel.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.mega-inner {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  max-height: calc(80vh - 2px);
}
.mega-cats {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px;
  max-height: calc(80vh - 2px);
  overflow-y: auto;
  background: #faf8f3;
  border-left: 1px solid #efe9dc;
  border-radius: 0 16px 16px 0;
}
.mega-cat {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 8px 10px;
  background: none;
  border: 1px solid transparent;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  color: #333;
  text-align: right;
  cursor: pointer;
}
.mega-cat:hover,
.mega-cat:focus-visible { background: #fff; border-color: #e6d7b0; outline: none; }
.mega-cat.active {
  background: #fff;
  color: #8a6c21;
  border-color: rgba(201, 162, 39, 0.45);
  box-shadow: inset -3px 0 0 var(--gold);
  font-weight: 600;
}
.mega-cat:focus-visible { box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.35); }
.mega-cat-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.menu-cat-icon,
.menu-cat-icon svg { width: 22px; height: 22px; color: #b8963c; display: inline-flex; flex: 0 0 auto; }
.menu-cat-img { width: 26px; height: 26px; object-fit: cover; border-radius: 6px; flex: 0 0 auto; }

.mega-content { padding: 18px 20px 16px; max-height: calc(80vh - 2px); overflow-y: auto; min-width: 0; }
.mega-pane { display: none; }
.mega-pane.active { display: block; }
.mega-pane-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  align-items: start;
}
.mega-col { min-width: 0; }
.mega-col h4 {
  margin: 0 0 10px;
  padding-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #8a6c21;
  border-bottom: 1px solid rgba(201, 162, 39, 0.35);
}
.mega-sub-links { display: grid; gap: 2px; }
.mega-sub-links.cols-1 { grid-template-columns: minmax(0, 1fr); }
.mega-sub-links.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mega-sub-links.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mega-sub-link {
  display: block;
  font-size: 15px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #333;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-bottom: 1px solid transparent;
}
.mega-sub-link:hover,
.mega-sub-link:focus-visible {
  background: rgba(201, 162, 39, 0.1);
  border-bottom-color: var(--gold);
  color: #7a600f;
  outline: none;
}
.mega-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mega-chip {
  padding: 6px 12px;
  border-radius: 999px;
  background: #f6f5f1;
  border: 1px solid #ece7dc;
  font-size: 13px;
  color: #333;
  text-decoration: none;
  white-space: nowrap;
}
.mega-chip:hover,
.mega-chip:focus-visible {
  border-color: var(--gold);
  background: #fff;
  box-shadow: 0 0 10px rgba(201, 162, 39, 0.3);
  outline: none;
}
.mega-see-all { display: inline-block; margin-top: 10px; font-size: 12.5px; color: #8a6c21; }
.mega-intro { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.mega-intro-img { width: 120px; height: 80px; object-fit: cover; border-radius: 10px; flex: 0 0 auto; }
.mega-intro-text { margin: 0; font-size: 13px; color: #666; line-height: 1.9; }
.mega-pane-foot { margin-top: 16px; padding-top: 12px; border-top: 1px solid #f1ece1; }
.mega-all-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--gold);
  border-radius: 8px;
  font-size: 13px;
  text-decoration: none;
  box-shadow: 0 0 12px rgba(201, 162, 39, 0.35);
}
.mega-all-link:hover,
.mega-all-link:focus-visible {
  background: var(--primary-hover);
  box-shadow: 0 0 18px rgba(201, 162, 39, 0.5);
  outline: none;
}

/* ---------- کشوی موبایل ---------- */
.mobile-drawer { display: none; }
.mobile-drawer.open { display: block; }
body.menu-open { overflow: hidden; }

@media (max-width: 1240px) {
  .mega-panel,
  .mega-item { display: none !important; }

  .mobile-drawer {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: #fff;
    border-top: 1px solid var(--border);
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.14);
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    z-index: 130;
  }
  .drawer-nav { padding: 8px 16px 24px; }
  .drawer-link,
  .drawer-cat-head {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 4px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.7;
    overflow-wrap: anywhere;
    cursor: pointer;
  }
  .drawer-link:active { background: rgba(201, 162, 39, 0.08); }
  .drawer-section { margin-top: 14px; }
  .drawer-section-title {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 700;
    color: #8a6c21;
  }
  .drawer-cat { border-bottom: 1px solid var(--border); }
  .drawer-cat-head { list-style: none; border-bottom: 0; }
  .drawer-cat-head::-webkit-details-marker { display: none; }
  .drawer-cat-name { min-width: 0; flex: 1; overflow-wrap: anywhere; }
  .drawer-chevron { color: var(--gold); transition: transform 0.2s; }
  .drawer-cat[open] .drawer-chevron { transform: rotate(180deg); }
  .drawer-cat-body { padding: 4px 0 14px 12px; }
  .drawer-all {
    display: flex;
    align-items: center;
    min-height: 44px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
  }
  .drawer-sub {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 6px 2px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.7;
    overflow-wrap: anywhere;
    border-bottom: 1px dashed #f0ece2;
  }
  .drawer-label { margin: 10px 0 6px; font-size: 12px; color: #8a6c21; font-weight: 700; }
  .drawer-chips { display: flex; flex-wrap: wrap; gap: 6px; }
  .drawer-chip {
    padding: 6px 10px;
    border: 1px solid #ece7dc;
    border-radius: 999px;
    background: #faf9f5;
    font-size: 12.5px;
    color: #333;
    text-decoration: none;
    white-space: normal;
    max-width: 100%;
  }
}

/* ---------- سر صفحهٔ قیمت ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #777;
  margin-bottom: 14px;
}
.breadcrumb a { color: #8a6c21; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.page-head h1 { margin: 0 0 8px; }
.page-intro { color: #666; line-height: 1.9; margin: 0 0 18px; }

.price-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.price-section-head h2 { margin: 0; }
.price-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.last-update-chip {
  display: inline-block;
  background: #fbf6e8;
  border: 1px solid #ecdfba;
  color: #7d6120;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
}
.price-vat-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }

.price-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: start;
}
.price-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 16px; }
.filter-card,
.calc-card {
  background: #fff;
  border: 1px solid #ece7dc;
  border-radius: 14px;
  padding: 16px;
}
.filter-card h3, .calc-card h3 { margin: 0 0 10px; font-size: 15px; }
.filter-block { border-top: 1px solid #f1ece1; padding: 10px 0; }
.filter-block summary { cursor: pointer; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.filter-block ul { list-style: none; margin: 0; padding: 0; }
.filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 4px 0;
  cursor: pointer;
}
.filter-option input { accent-color: #c9a24b; }
.filter-count {
  margin-right: auto;
  font-size: 11px;
  color: #999;
  background: #f6f3ea;
  border-radius: 999px;
  padding: 1px 8px;
}
.filter-note { font-size: 11px; color: #999; margin: 8px 0 0; line-height: 1.8; }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 12px;
  padding: 5px 10px;
  border: 1px solid #e6dcc2;
  border-radius: 999px;
  color: #7d6120;
  background: #fffdf7;
  text-decoration: none;
}
.chip:hover { background: #fbf3dd; }

/* ---------- جدول قیمت ---------- */
.price-table-wrap { overflow-x: auto; }
.price-table { width: 100%; border-collapse: collapse; background: #fff; font-size: 13px; }
.price-table th, .price-table td { padding: 10px 8px; border-bottom: 1px solid #f0ece2; text-align: right; vertical-align: middle; }
.price-table thead th { background: #faf7ef; color: #6f5a22; font-weight: 700; white-space: nowrap; }
.price-table tbody tr:hover { background: #fffdf6; }
.group-head td {
  background: #f6f1e4;
  padding: 8px 10px;
  border-bottom: 1px solid #e8e0cb;
}
.group-title { font-weight: 700; color: #6b5318; margin-left: 12px; }
.group-date { font-size: 11px; color: #8d8674; }
.price-cell .price-value { font-weight: 700; }
.price-unit { font-size: 11px; color: #999; }
.change { font-size: 12px; white-space: nowrap; }
.change.up { color: #2f7d4f; }
.change.down { color: #b23b3b; }
.change.flat { color: #999; }
.chart-btn, .add-row-btn {
  font-family: inherit;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e2d6b6;
  color: #7d6120;
  cursor: pointer;
  white-space: nowrap;
}
.chart-btn:hover, .add-row-btn:hover { background: #fbf3dd; box-shadow: 0 0 8px rgba(201, 162, 75, 0.3); }
.row-product-link { color: #8a6c21; text-decoration: none; }
.row-product-link:hover { text-decoration: underline; }

/* ---------- ماشین‌حساب ---------- */
.calc-card .form-group { margin-bottom: 10px; }
.calc-card label { display: block; font-size: 12px; color: #666; margin-bottom: 4px; }
.calc-result-line { font-size: 13px; margin: 6px 0; }
.calc-result-line span { font-weight: 700; color: #6b5318; }
.calc-price-note, .calc-note { font-size: 11px; color: #999; margin: 0 0 8px; line-height: 1.9; }
.calc-card .gold-button { width: 100%; margin-top: 8px; }

/* ---------- دیالوگ نمودار ---------- */
.chart-dialog {
  position: relative;
  width: min(720px, 94vw);
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid #ece7dc;
  border-radius: 16px;
  padding: 20px 20px 18px;
  background: #fff;
  color: #1c1c1c;
  outline: none;
}
.chart-dialog:focus,
.chart-dialog:focus-visible { outline: none; }
.chart-dialog::backdrop { background: rgba(0, 0, 0, 0.45); }

/* دکمهٔ بستن: دایرهٔ ۴۰px، سفید با حاشیهٔ طلایی، گوشهٔ بالا-چپ (RTL) */
.chart-dialog-close {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: #fff;
  color: var(--primary);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
  transition: background 0.15s ease, color 0.15s ease;
}
.chart-dialog-close:hover { background: #fdf7e6; color: var(--primary); }
.chart-dialog-close:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.chart-dialog-head { padding-inline-start: 52px; padding-inline-end: 4px; }
.chart-dialog-head h3 { margin: 0; font-size: 16px; line-height: 1.6; }
.chart-subtitle { color: #777; font-size: 12px; margin: 6px 0 10px; line-height: 1.9; }
.chart-body { position: relative; }
/* ناحیهٔ رسم نمودار چپ‌به‌راست است تا محور زمان از قدیم (چپ) به جدید (راست) پیش برود */
.price-chart-plot { direction: ltr; unicode-bidi: isolate; width: 100%; }
.price-chart-svg { width: 100%; height: auto; display: block; direction: ltr; }
.chart-label { font-size: 11px; fill: #8d8674; }
/* تاریخ شمسی در صفحهٔ RTL نباید جابه‌جا شود */
.chart-date { direction: ltr; unicode-bidi: isolate; }
.chart-unit { font-size: 10px; fill: #a99f88; }
.chart-grid-line { stroke: #f0ece4; stroke-width: 1; }
.chart-line { fill: none; stroke: var(--primary); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart-area { stroke: none; }
.chart-dot { fill: var(--gold); stroke: #fff; stroke-width: 1.5; }
.chart-dot.is-last { fill: var(--gold); stroke: var(--primary); stroke-width: 2; }
.chart-hit { fill: transparent; cursor: pointer; }
.chart-tooltip {
  position: absolute;
  z-index: 4;
  min-width: 120px;
  max-width: 220px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #ece7dc;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  font-size: 12px;
  line-height: 1.9;
  color: #333;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chart-tooltip[hidden] { display: none; }
.chart-tip-date { color: #8d8674; font-size: 11px; }
.chart-tip-price { font-weight: 700; color: #1c1c1c; }
.chart-tip-change { font-size: 11px; font-weight: 700; }
.chart-tip-change.up { color: #1f7a4d; }
.chart-tip-change.down { color: var(--primary); }
.chart-note { font-size: 12px; color: #8d8674; margin: 10px 0 0; text-align: center; }
.chart-empty { font-size: 13px; color: #777; margin: 18px 0; text-align: center; line-height: 1.9; }
.chart-summary { font-size: 12px; color: #666; margin: 10px 0 0; line-height: 1.9; }

body.chart-open { overflow: hidden; }

@media (max-width: 640px) {
  .chart-dialog {
    width: 94vw;
    max-width: 94vw;
    max-height: 90vh;
    padding: 16px 14px 14px;
  }
  .chart-dialog-close { top: 8px; inset-inline-start: 8px; width: 44px; height: 44px; }
  .chart-dialog-head { padding-inline-start: 48px; }
  .chart-dialog-head h3 { font-size: 15px; }
  .chart-label { font-size: 10px; }
}

/* ---------- آخرین تغییرات قیمت ---------- */
.latest-changes { margin-bottom: 40px; }
.latest-changes-table td a { color: #8a6c21; text-decoration: none; }
.section-actions { margin-top: 16px; text-align: center; }

/* ---------- دسته و کارت ---------- */
.cat-parent { display: block; font-size: 11px; color: #999; margin-top: 4px; }
.category-icon-svg svg { width: 46px; height: 46px; color: #b8963c; }
.category-icon-img { width: 60px; height: 60px; object-fit: contain; }

.product-cta { background: #181818; color: #fff; padding: 26px 0; margin-top: 30px; }
.product-cta .container { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.product-cta p { margin: 0; color: #f0e6cd; }

/* ---------- ادمین: درخت و جدول ردیف‌ها ---------- */
.admin-split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.cat-tree { list-style: none; margin: 0; padding: 0; }
.cat-tree-item { border: 1px solid #eee; border-radius: 10px; margin-bottom: 8px; overflow: hidden; }
.cat-tree-item > button.cat-tree-head {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #fbfaf7;
  border: none;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  text-align: right;
}
.cat-tree-item.active > button.cat-tree-head { background: #f6efdc; color: #6b5318; font-weight: 700; }
.cat-sub-list { list-style: none; margin: 0; padding: 6px 8px; border-top: 1px solid #f0ece2; }
.cat-sub-list li { display: flex; align-items: center; gap: 6px; }
.cat-sub-list button.sub-link {
  flex: 1;
  text-align: right;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.cat-sub-list button.sub-link:hover { background: #f7f3e8; }
.cat-sub-list button.sub-link.active { background: #f6efdc; color: #6b5318; font-weight: 700; }
.badge-off { font-size: 10px; color: #b23b3b; border: 1px solid #f0c9c9; border-radius: 999px; padding: 1px 6px; }
.badge-on { font-size: 10px; color: #2f7d4f; border: 1px solid #c8e6d3; border-radius: 999px; padding: 1px 6px; }
.rows-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.rows-table th, .rows-table td { border-bottom: 1px solid #f0ece2; padding: 6px; text-align: right; }
.rows-table input, .rows-table select { font-family: inherit; font-size: 12px; padding: 4px 6px; border: 1px solid #e0dccf; border-radius: 6px; width: 100%; box-sizing: border-box; }
.rows-table input.price-input { text-align: left; direction: ltr; }
.bulk-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; background: #fbfaf6; border: 1px solid #eee7d7; border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.bulk-toolbar .field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.bulk-toolbar select, .bulk-toolbar input { font-family: inherit; font-size: 12px; padding: 6px 8px; border: 1px solid #e0dccf; border-radius: 6px; }
.preview-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 10px; }
.preview-table th, .preview-table td { border-bottom: 1px solid #f2eee4; padding: 5px 6px; text-align: right; }
.preview-table .new-price { color: #2f7d4f; font-weight: 700; }
.admin-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.admin-tab { font-family: inherit; font-size: 13px; padding: 8px 14px; border: 1px solid #e2dccb; background: #fff; border-radius: 999px; cursor: pointer; }
.admin-tab.active { background: #181818; color: #f0e6cd; border-color: #181818; }
.tab-panel[hidden] { display: none !important; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.char-count { font-size: 10px; color: #999; }
.list-editor { display: flex; gap: 6px; margin-bottom: 6px; }
.list-editor input { flex: 1; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.tag { display: inline-flex; align-items: center; gap: 6px; background: #f7f3e8; border: 1px solid #e6dcc2; border-radius: 999px; padding: 3px 10px; font-size: 12px; }
.tag button { background: none; border: none; color: #b23b3b; cursor: pointer; font-size: 13px; line-height: 1; }

/* ---------- ریسپانسیو ---------- */
@media (max-width: 1100px) {
  .price-layout { grid-template-columns: minmax(0, 1fr); }
  .price-side { position: static; order: -1; }
  .admin-split { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 768px) {
  .price-table { font-size: 12px; }
  .price-table thead { display: none; }
  .price-table, .price-table tbody, .price-table tr, .price-table td { display: block; width: 100%; }
  .price-table tr.price-row {
    border: 1px solid #efe9dc;
    border-radius: 12px;
    margin-bottom: 10px;
    padding: 8px 10px;
    background: #fff;
  }
  .price-table td { border: none; padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; }
  .price-table td::before {
    content: attr(data-label);
    color: #8d8674;
    font-size: 11px;
    flex: 0 0 42%;
  }
  .group-head { display: block; }
  .group-head td { display: block; }
  .group-head td::before { content: none; }
  .group-title, .group-date { display: block; }
  .latest-changes-table tr { border: 1px solid #efe9dc; border-radius: 12px; margin-bottom: 10px; padding: 8px 10px; }
  .form-grid { grid-template-columns: 1fr; }
  .chart-dialog { padding: 14px; }
}

@media (max-width: 420px) {
  .price-section-head { flex-direction: column; align-items: stretch; }
  .last-update-chip { font-size: 11px; }
  .filter-card, .calc-card { padding: 12px; }
  .chart-btn, .add-row-btn { font-size: 11px; padding: 5px 8px; }
}

/* ---------- تنظیم عرض هدر پس از افزودن آیتم «وبلاگ» ---------- */
@media (min-width: 901px) and (max-width: 1600px) {
  .header-inner { gap: 10px; }
  .header .menu ul { gap: 12px; }
  .header .search-box { min-width: 110px; max-width: 170px; }
  .header .admin-link { padding: 6px 8px; }
}

/* ---------- نشان «در منو نمایش داده نمی‌شود» در پنل ---------- */
.menu-reason {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  font-weight: 400;
  line-height: 1.6;
  color: #8a8a8a;
}
.cat-tree-name { min-width: 0; overflow-wrap: anywhere; }

/* ---------- جبران عرض هدر در دسکتاپ باریک (۹۰۱ تا ۱۲۰۰) ---------- */
@media (min-width: 901px) and (max-width: 1200px) {
  .header-inner { gap: 8px; padding-inline: 12px; }
  .header .menu ul { gap: 8px; }
  .header .search-box { min-width: 90px; max-width: 130px; }
  .header .phone-block { display: none; }
}

@media (min-width: 901px) and (max-width: 1000px) {
  .header .header-cta { display: none; }
}

/* ============================================================
   نسخهٔ جدید: مگامنو با ستون‌های زیرمجموعه، گروه‌بندی و برندها
   ============================================================ */
.mega-content { padding: 18px 22px 16px; }
.mega-sub-columns {
  column-width: 230px;
  column-gap: 32px;
  column-fill: balance;
  margin: 0 0 6px;
}
.mega-sub-link {
  display: block;
  padding: 8px 10px;
  font-size: 15px;
  line-height: 1.8;
  color: #2f2c27;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
  border-radius: 8px;
  border-bottom: 1px solid transparent;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
}
.mega-sub-link:hover,
.mega-sub-link:focus-visible {
  background: rgba(201, 162, 39, 0.1);
  border-bottom-color: var(--gold);
  color: #7a600f;
  outline: none;
}
.mega-sub-group {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  margin: 0 0 14px;
  padding: 0 0 4px;
}
.mega-group-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 4px;
  padding: 6px 10px;
  font-size: 13.5px;
  font-weight: 700;
  color: #7a600f;
  border-bottom: 1px solid rgba(201, 162, 39, 0.35);
  break-after: avoid;
}
.mega-group-chevron { font-size: 11px; color: var(--gold); }
.mega-brand-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #f1ece1;
}
.mega-brand-label { font-size: 12.5px; font-weight: 700; color: #8a6c21; }
.mega-brand-row .mega-chips { flex: 1; }
.mega-pane-foot { margin-top: 12px; padding-top: 0; border-top: 0; }
.mega-see-all, .mega-col, .mega-sub-links, .mega-pane-grid { display: none !important; }

/* کشوی موبایل: گروه‌ها */
.drawer-group { margin: 4px 0 8px; }
.drawer-group-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0 2px;
  font-size: 12.5px;
  font-weight: 700;
  color: #8a6c21;
}

/* سرصفحهٔ دسته با تصویر */
.category-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin: 6px 0 18px;
}
.category-hero .page-intro { margin: 0; flex: 1 1 260px; }
.category-hero-img {
  width: 320px;
  height: 200px;
  max-width: 100%;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid #ece7dc;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

/* فاکتور: انتخاب مرحله‌ای */
.invoice-builder-form { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.invoice-cascade-group { grid-column: auto; min-width: 0; }
.invoice-cascade-group .product-select { min-width: 0; max-width: 100%; }
.field-status { display: block; min-height: 16px; margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.field-status.error { color: var(--danger); }
.price-row-select { min-width: 0; max-width: 100%; }

@media (max-width: 640px) {
  .invoice-builder-form { grid-template-columns: 1fr; }
  .invoice-cascade-group { grid-column: 1 / -1; }
}
.invoice-calc-preview {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  font-size: 12.5px;
  color: #6b5318;
  background: #fbf7ea;
  border: 1px solid #efe3c4;
  border-radius: 8px;
  padding: 8px 12px;
}
.invoice-calc-preview:empty { display: none; }
.invoice-calc-preview.error { color: #b23b3b; background: #fdf3f3; border-color: #f0cccc; }

/* ادمین: تصویر، پیشنهادها، تست فرمول */
.cat-thumb { width: 34px; height: 34px; border-radius: 7px; object-fit: cover; flex: 0 0 auto; }
.cat-thumb-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f3efe4;
  color: #b8963c;
  font-size: 15px;
}
.cat-thumb-hint { margin: 0; padding: 0 12px 6px 12px; font-size: 11px; color: #9a8f78; }
.cat-tree-head { align-items: flex-start; flex-wrap: wrap; }
.cat-tree-name { flex: 1; min-width: 0; }
.admin-image-row { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.admin-preview-img { border-radius: 10px; border: 1px solid #ece7dc; object-fit: cover; }
.image-hint { margin: 6px 0 0; font-size: 12px; line-height: 1.9; }
.formula-test { margin-top: 12px; background: #fbfaf6; border: 1px solid #f0ebdf; border-radius: 10px; padding: 12px; }
.formula-test h5 { margin: 0 0 8px; font-size: 13px; }
.formula-test-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px; }
.formula-result { margin: 10px 0 0; font-size: 13px; font-weight: 700; color: #2f7d4f; }
.formula-result.error { color: #b23b3b; }
.rows-table input { min-width: 70px; }
.rows-table td[hidden] { display: none !important; }
@media (max-width: 1024px) {
  .admin-split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .invoice-select-group { grid-column: span 1; }
  .category-hero-img { width: 100%; height: auto; aspect-ratio: 16 / 10; }
}

/* ============================================================
   صفحهٔ محصول: عرض بیشتر صفحه + جدول قیمت بدون اسکرول افقی
   ============================================================ */
@media (min-width: 1200px) {
  .container.product-wide {
    max-width: 1600px;
    padding-inline: 16px;
  }
}

@media (max-width: 1200px) {
  .product-wide .price-layout { grid-template-columns: minmax(0, 1fr); }
  .product-wide .price-side { position: static; order: -1; }
}

.price-rows-table {
  width: 100%;
  table-layout: auto;
  font-size: 12.5px;
}

.price-rows-table th,
.price-rows-table td {
  padding: 8px 7px;
}

.price-rows-table td[data-label="قیمت (تومان)"],
.price-rows-table td[data-label="واحد"],
.price-rows-table td[data-label="تاریخ بروزرسانی"],
.price-rows-table td[data-label="عملیات"],
.price-rows-table td[data-label="نمودار"] {
  white-space: nowrap;
}

.price-rows-table .price-unit { font-size: 10px; color: #8f8f8f; }

.price-rows-table .chart-btn,
.price-rows-table .add-row-btn {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 7px;
}

/* ============================================================
   بخش «دربارهٔ محصول» در پایین صفحهٔ محصول
   ============================================================ */
.product-content {
  margin-block: 34px;
  padding: 26px 24px 28px;
  background: var(--surface);
  border: 1px solid #ece7dc;
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}

.product-content .detail-text { margin-bottom: 24px; }

.product-content h2,
.product-content h3,
.product-content h4 {
  color: var(--primary);
  font-weight: 700;
}

.product-content .detail-text h2 {
  position: relative;
  margin: 0 0 18px;
  padding-bottom: 12px;
  font-size: 22px;
}

.product-content .detail-text h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  width: 64px;
  height: 3px;
  border-radius: 999px;
  background: var(--gold);
}

.product-content h3,
.product-content h4 {
  margin: 28px 0 12px;
  padding-right: 10px;
  border-right: 3px solid var(--gold);
  font-size: 16px;
}

.product-content p {
  margin: 0 0 16px;
  color: #3c3c3c;
  line-height: 2;
}

/* اگر توضیح به‌صورت <p><strong>…</strong></p> آمده باشد، مثل تیتر نمایش داده می‌شود */
.product-content p > strong:only-child,
.product-content p > b:only-child {
  display: block;
  margin: 28px 0 12px;
  padding-right: 10px;
  border-right: 3px solid var(--gold);
  color: var(--primary);
  font-size: 16px;
  line-height: 1.6;
}

.product-content .detail-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.product-content .spec-block {
  padding: 16px 16px 18px;
  background: #fffdf8;
  border: 1px solid #efe8d6;
  border-top: 3px solid var(--gold);
  border-radius: 12px;
}

.product-content .spec-block h3 {
  margin: 0 0 10px;
  padding: 0 0 8px;
  border: none;
  border-bottom: 1px solid #f1e9d6;
  font-size: 15.5px;
}

.product-content .spec-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.product-content .spec-list li {
  position: relative;
  margin-bottom: 9px;
  padding-right: 16px;
  color: #3c3c3c;
  font-size: 14px;
  line-height: 1.9;
}

.product-content .spec-list li::before {
  content: '';
  position: absolute;
  top: 10px;
  right: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

.product-content .spec-list li:last-child { margin-bottom: 0; }

@media (max-width: 1024px) {
  .product-content .detail-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .product-content {
    margin-block: 24px;
    padding: 18px 16px 20px;
    border-radius: 14px;
  }
  .product-content .detail-text h2 { font-size: 19px; }
  .product-content .detail-columns { grid-template-columns: 1fr; }
}

/* ============================================================
   ریسپانسیو پنل مدیریت (فقط داخل پنل — سایت عمومی تغییر نمی‌کند)
   ============================================================ */

.admin-panel {
  width: 100%;
  max-width: 1500px;
  padding: 16px;
  overflow-x: clip;
}

.admin-topbar { flex-wrap: nowrap; }
.admin-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-logout-btn { flex: 0 0 auto; }

.admin-tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.admin-tab { flex: 0 0 auto; white-space: nowrap; }

/* ---------- جدول فاکتورها: دسکتاپ و لپ‌تاپ ---------- */
#tabInvoices .admin-table-wrapper {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

#tabInvoices .admin-table {
  table-layout: auto;
  width: 100%;
  min-width: 1060px;
  font-size: 12.5px;
}

#tabInvoices .admin-table th,
#tabInvoices .admin-table td {
  padding: 8px 10px;
  vertical-align: middle;
}
#tabInvoices .admin-table th { font-size: 12.5px; }

#tabInvoices .col-id,
#tabInvoices .col-code,
#tabInvoices .col-date,
#tabInvoices .col-national,
#tabInvoices .col-contact,
#tabInvoices .col-weight,
#tabInvoices .col-total { white-space: nowrap; }

#tabInvoices .col-id { font-weight: 700; color: var(--primary); }
#tabInvoices .col-name { min-width: 130px; }
#tabInvoices .col-actions-head,
#tabInvoices .col-actions { min-width: 200px; }

#tabInvoices .col-date .date-line { display: block; line-height: 1.6; }
#tabInvoices .col-date .time-line { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.6; }

#tabInvoices .contact-line { display: block; line-height: 1.7; }
#tabInvoices .contact-tag { font-size: 10.5px; color: var(--muted); margin-inline-end: 4px; }

#tabInvoices .status-select-label { display: none; }
#tabInvoices .status-select { max-width: 150px; }

#tabInvoices .admin-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#tabInvoices .admin-row-actions button {
  margin: 0;
  padding: 6px 10px;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

#tabInvoices .admin-row-actions .action-view:hover,
#tabInvoices .admin-row-actions .action-next:hover {
  border-color: var(--gold);
  color: var(--primary);
  background: #fffdf6;
}

#tabInvoices .admin-row-actions .action-export { color: var(--success); border-color: #b7ddc5; }
#tabInvoices .admin-row-actions .action-export:hover { color: #fff; background: var(--success); border-color: var(--success); }

#tabInvoices .admin-row-actions .action-delete { color: var(--danger); border-color: #e8b7b7; }
#tabInvoices .admin-row-actions .action-delete:hover { color: #fff; background: var(--danger); border-color: var(--danger); }

/* خط جداکنندهٔ تب‌های پنل، مستقل از استایل وبلاگ */
.admin-tab-content .section-divider { height: auto; background: none; margin: 0; }

/* ---------- جدول مقالات (تب مقالات) ---------- */
#tabBlog .admin-table-wrapper {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
#tabBlog .blog-admin-table { min-width: 760px; }
#tabBlog .admin-blog-toolbar { flex-wrap: wrap; }

.admin-modal-close-bottom { display: none; width: 100%; margin-top: 12px; }

/* ---------- لپ‌تاپ باریک ---------- */
@media (max-width: 1100px) {
  .admin-panel { padding: 12px; }
  #tabInvoices .admin-table { min-width: 1000px; font-size: 12px; }
  #tabInvoices .admin-table th,
  #tabInvoices .admin-table td { padding: 7px 8px; }
  #tabInvoices .col-actions-head,
  #tabInvoices .col-actions { min-width: 184px; }
  .admin-filters { gap: 10px; }
}

/* ---------- تبلت و موبایل: کارت به جای ردیف جدول ---------- */
@media (max-width: 900px) {
  .admin-panel { padding: 10px; }
  .admin-topbar { flex-wrap: wrap; row-gap: 8px; }
  .admin-title { white-space: normal; }

  .admin-filters { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
  .admin-filters > *,
  .admin-filters .admin-search,
  .admin-filters .input-field,
  .admin-filters .gold-button { width: 100%; flex: 1 1 100%; }
  .admin-search { flex-direction: column; align-items: stretch; }
  .admin-search .input-field { width: 100%; }

  #tabInvoices .admin-table-wrapper {
    overflow: visible;
    -webkit-overflow-scrolling: auto;
    border: none;
  }

  #tabInvoices .admin-table {
    display: block;
    width: 100%;
    min-width: 0;
    font-size: 13px;
  }
  #tabInvoices .admin-table thead { display: none; }
  #tabInvoices .admin-table tbody { display: block; }

  #tabInvoices .admin-table tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    margin-bottom: 12px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  }
  #tabInvoices .admin-table tr:hover { background: #fff; }

  #tabInvoices .admin-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 8px 0;
    border: 0;
    border-bottom: 1px dashed var(--border);
    white-space: normal;
    text-align: start;
  }

  #tabInvoices .admin-table td[data-label]::before {
    content: attr(data-label);
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
  }

  /* سر کارت: شماره فاکتور + نشان وضعیت + تاریخ */
  #tabInvoices .admin-table td.col-id {
    order: 1;
    flex: 0 0 auto;
    width: auto;
    padding: 0 0 8px;
    border-bottom: 0;
    font-size: 15px;
    font-weight: 700;
  }
  #tabInvoices .admin-table td.col-id::before {
    content: "فاکتور";
    font-size: 11px;
    font-weight: 400;
    margin-inline-end: 5px;
  }

  #tabInvoices .admin-table td.col-status {
    display: contents;
  }
  #tabInvoices .col-status .status-badge {
    order: 2;
    margin: 0 auto 8px 8px;
    align-self: center;
  }

  #tabInvoices .admin-table td.col-date {
    order: 3;
    flex: 0 0 auto;
    width: auto;
    padding: 0 0 8px 10px;
    border-bottom: 0;
    text-align: end;
  }
  #tabInvoices .admin-table td.col-date::before { content: none; }

  #tabInvoices .admin-table td.col-code,
  #tabInvoices .admin-table td.col-name,
  #tabInvoices .admin-table td.col-national,
  #tabInvoices .admin-table td.col-contact,
  #tabInvoices .admin-table td.col-weight,
  #tabInvoices .admin-table td.col-total {
    order: 10;
    flex: 1 1 100%;
    width: 100%;
  }

  #tabInvoices .admin-table td.col-name { font-weight: 600; }
  #tabInvoices .admin-table td.col-contact { align-items: flex-start; }
  #tabInvoices .contact-lines { display: flex; flex-direction: column; gap: 2px; text-align: start; }

  #tabInvoices .col-status .status-select-label {
    display: block;
    order: 88;
    flex: 1 1 100%;
    width: 100%;
    margin-top: 10px;
    font-size: 11.5px;
    color: var(--muted);
  }
  #tabInvoices .col-status .status-select {
    order: 89;
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    min-height: 40px;
    font-size: 13px;
    padding: 8px 10px;
  }

  #tabInvoices .admin-table td.col-actions {
    order: 90;
    flex: 1 1 100%;
    width: 100%;
    display: block;
    padding-top: 10px;
    border-bottom: 0;
  }
  #tabInvoices .admin-table td.col-actions::before { content: none; }

  #tabInvoices .admin-table td.col-actions .admin-row-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  #tabInvoices .admin-table td.col-actions .admin-row-actions button {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    font-size: 12.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  #tabInvoices .admin-table td[colspan] {
    order: 99;
    flex: 1 1 100%;
    width: 100%;
    justify-content: center;
    border-bottom: 0;
  }
  #tabInvoices .admin-table td[colspan]::before { content: none; }
  /* ---------- مودال جزئیات فاکتور ---------- */
  .admin-modal { padding: 0; align-items: stretch; }

  .admin-modal-card {
    max-width: 100%;
    min-height: 100vh;
    max-height: 100vh;
    min-height: 100dvh;
    max-height: 100dvh;
    padding: 14px;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .admin-modal-head {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--surface);
    flex: 0 0 auto;
  }

  .admin-modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
  }

  .admin-modal .detail-grid { grid-template-columns: 1fr; }

  .admin-modal .detail-status-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-modal .detail-status-controls > * { width: 100%; max-width: 100%; }

  .admin-modal-close-bottom { display: block; flex: 0 0 auto; }

  .admin-modal .admin-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border);
  }
  .admin-modal .admin-table { min-width: 0; }

  /* ---------- محصولات / قیمت‌ها / مقالات / تنظیمات ---------- */
  .admin-split { grid-template-columns: minmax(0, 1fr); }

  .bulk-toolbar { flex-direction: column; align-items: stretch; }
  .bulk-toolbar .field,
  .bulk-toolbar select,
  .bulk-toolbar input,
  .bulk-toolbar .gold-button { width: 100%; }

  .admin-form-actions { flex-wrap: wrap; }
  .admin-form-actions .gold-button { flex: 1 1 auto; }

  #tabBlog .admin-blog-toolbar { flex-direction: column; align-items: stretch; }
  #tabBlog .admin-blog-toolbar input,
  #tabBlog .admin-blog-toolbar select,
  #tabBlog .admin-blog-toolbar .gold-button { width: 100%; flex: 1 1 100%; }
  #tabBlog .blog-admin-table { min-width: 720px; }

  .settings-actions,
  .settings-notice { flex-direction: column; align-items: stretch; }
  .settings-actions .gold-button,
  .settings-notice .gold-button { width: 100%; }

  .blog-editor-grid { grid-template-columns: 1fr; }
}

/* ---------- موبایل ---------- */
@media (max-width: 600px) {
  .admin-panel { padding: 8px; }
  .admin-tab-content { padding: 12px; }
  .admin-topbar { padding: 12px; }
  .admin-title { font-size: 15px; }

  .admin-panel .input-field,
  .admin-panel input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  .admin-panel select,
  .admin-panel textarea {
    width: 100%;
    max-width: 100%;
  }

  #tabInvoices .admin-table tr { padding: 10px 12px; }
  #tabInvoices .admin-table td.col-actions .admin-row-actions { grid-template-columns: 1fr; }
  #tabInvoices .admin-table td.col-actions .admin-row-actions button { min-height: 42px; font-size: 13px; }

  .admin-filters .gold-button { min-height: 40px; }
  .admin-pagination { gap: 8px; }
  .admin-pagination .gold-button { flex: 1 1 100%; }

  .admin-modal-card { padding: 12px; }
  .admin-modal-head h3 { font-size: 1rem; }
  .admin-modal-body { gap: 12px; }
  .admin-modal .detail-block { padding: 12px; }

  .bulk-toolbar { padding: 10px; }
  .settings-group { padding: 12px; }
  .admin-form-actions .gold-button { flex: 1 1 100%; }
}

/* ============================================================
   دسته‌بندی محصولات صفحهٔ اصلی: فقط دسته‌های اصلی، بدون اسکرول افقی
   ============================================================ */
.product-category-section .product-category-slider {
  display: block;
  overflow: visible;
  padding-bottom: 0;
}

#productCategorySlider {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 2px;
  scroll-snap-type: none;
}

#productCategorySlider > li {
  flex: 0 1 220px;
  max-width: 220px;
  width: 100%;
  scroll-snap-align: none;
}

#productCategorySlider .product-category-card { height: 100%; }

.category-count {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 900px) {
  #productCategorySlider { gap: 14px; }
  #productCategorySlider > li { flex: 0 1 200px; max-width: 200px; }
  #productCategorySlider .cat-body h3 { font-size: 16px; }
}

@media (max-width: 600px) {
  #productCategorySlider { gap: 12px; }
  #productCategorySlider > li { flex: 0 1 150px; max-width: 150px; }
  #productCategorySlider .product-category-card { padding: 0; }
  #productCategorySlider .cat-body { padding: 10px 8px 12px; }
  #productCategorySlider .cat-body h3 { font-size: 14px; }
  #productCategorySlider .cat-cta { font-size: 11px; }
}

/* لینک بازگشت در صفحهٔ دستهٔ اصلی */
.category-back { margin: 6px 0 0; font-size: 13px; }
.category-back a { color: var(--primary); text-decoration: none; }
.category-back a:hover { text-decoration: underline; color: var(--gold); }

/* ============================================================
   دستهٔ اصلی بدون محصول: پیام «به‌زودی» و دکمهٔ تماس
   ============================================================ */
.category-soon {
  margin-block: 8px 32px;
  padding: 28px 24px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.category-soon .soon-badge {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}

.category-soon .soon-text {
  margin: 0 auto 18px;
  max-width: 560px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--muted);
}

.mega-soon {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

/* ============================================================
   درخواست پیش‌فاکتور (Quote request) — عمومی
   ============================================================ */

.outline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: 999px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s, box-shadow 0.25s, transform 0.15s;
}

.outline-button:hover,
.outline-button:focus-visible {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--gold);
  box-shadow: var(--glow);
  transform: translateY(-1px);
}

.outline-button:active { transform: translateY(0); }

.outline-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.header-quote-btn {
  padding: 8px 14px;
  font-size: 12px;
  border-width: 1px;
}

.drawer-quote-btn {
  display: block;
  width: 100%;
  margin: 8px 0;
  padding: 10px 12px;
  font-size: 14px;
  text-align: center;
  border-width: 1px;
}

.outline-on-dark {
  color: #f4e7c3;
  border-color: var(--gold);
  background: transparent;
}

.outline-on-dark:hover,
.outline-on-dark:focus-visible {
  background: var(--gold);
  color: #1a1a1a;
}

.product-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.section-head > .outline-button {
  margin-inline-start: auto;
  padding: 8px 16px;
  font-size: 13px;
}

@media (max-width: 1280px) {
  .header .header-quote-btn { display: none; }
}

@media (max-width: 640px) {
  .section-head > .outline-button { margin-inline-start: 0; width: 100%; }
}

/* ---------- مودال ---------- */

body.qr-modal-open {
  overflow: hidden;
}

.qr-modal {
  position: fixed;
  inset: 0;
  z-index: 1350;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 16px;
  overflow-y: auto;
  background: rgba(26, 26, 26, 0.6);
}

.qr-modal.active { display: flex; }

.qr-modal-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: auto;
  padding: 26px 24px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.qr-modal-card h2 {
  margin: 0 0 18px;
  font-size: 1.15rem;
  color: var(--primary);
}

.qr-modal-close {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--primary);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.qr-modal-close:hover {
  background: var(--primary);
  color: #fff;
}

.qr-honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.qr-modal .form-group { margin-bottom: 14px; }

.qr-modal .input-field { width: 100%; }

.qr-textarea {
  min-height: 84px;
  resize: vertical;
  font-family: inherit;
}

.qr-file-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px;
  border: 1px dashed var(--gold);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.qr-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.qr-file-btn {
  padding: 7px 14px;
  font-size: 13px;
  border-width: 1px;
}

.qr-file-name {
  font-size: 13px;
  color: var(--muted);
}

.qr-file-selected {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(201, 162, 39, 0.1);
  font-size: 12.5px;
}

.qr-file-selected-name {
  font-weight: 600;
  word-break: break-all;
}

.qr-file-selected-size { color: var(--muted); }

.qr-file-remove {
  margin-inline-start: auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--danger);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.qr-file-hint {
  margin: 6px 0 2px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
}

.qr-template-link {
  display: inline-block;
  margin-top: 4px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: underline;
}

.qr-form-message {
  min-height: 20px;
  margin: 4px 0 8px;
  font-size: 12.5px;
  line-height: 1.8;
  font-weight: 600;
  color: var(--muted);
}

.qr-form-message.is-error { color: var(--danger); }

.qr-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.qr-actions .gold-button { flex: 1 1 auto; }
.qr-actions .outline-button { flex: 0 0 auto; }

.qr-success {
  padding: 18px 16px;
  border: 1px solid var(--gold);
  border-radius: var(--radius-sm);
  background: rgba(201, 162, 39, 0.08);
  text-align: center;
}

.qr-success-text {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 2;
  color: var(--text);
}

.qr-success .gold-button { min-width: 140px; }

@media (max-width: 640px) {
  .qr-modal { padding: 0; align-items: stretch; }
  .qr-modal-card {
    width: 94vw;
    max-width: 94vw;
    max-height: 92vh;
    overflow-y: auto;
    margin: 12px auto;
    padding: 20px 16px 18px;
    border-radius: var(--radius);
  }
  .qr-modal-card h2 { font-size: 1.05rem; margin-bottom: 14px; }
  .qr-actions { flex-direction: column; }
  .qr-actions .gold-button,
  .qr-actions .outline-button { width: 100%; flex: 1 1 auto; }
  .qr-file-box { flex-direction: column; align-items: stretch; }
  .qr-file-btn { width: 100%; }
}

/* ============================================================
   پنل مدیریت — تب درخواست پیش‌فاکتور
   ============================================================ */

.admin-tab .qr-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-inline-start: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.admin-tab .qr-tab-badge[hidden] { display: none; }

.qr-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}

.qr-status.st-new { background: #fdeceb; color: #a3282d; border-color: #f3c8c6; }
.qr-status.st-reviewing { background: #fdf6e3; color: #8a6a10; border-color: #f0e0b0; }
.qr-status.st-sent { background: #eef4ee; color: #1f7a44; border-color: #cfe3d6; }
.qr-status.st-closed { background: #f2f3f4; color: #4b545c; border-color: #d8dcdf; }

.qr-file-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
  max-width: 220px;
}

.qr-file-cell .qr-file-icon { font-size: 14px; }

.qr-file-cell .qr-file-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qr-desc-cell {
  display: inline-block;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

.qr-detail-section {
  margin-bottom: 16px;
}

.qr-detail-section h4 {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--primary);
}

.qr-detail-desc {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  font-size: 13px;
  line-height: 2;
  white-space: pre-wrap;
  word-break: break-word;
}

.qr-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.qr-preview-wrap {
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.qr-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  min-width: 560px;
}

.qr-preview-table th,
.qr-preview-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  text-align: right;
  white-space: nowrap;
}

.qr-preview-table thead th {
  position: sticky;
  top: 0;
  background: var(--surface-soft);
  font-weight: 700;
}

.qr-preview-note {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 820px) {
  .qr-desc-cell { max-width: 100%; white-space: normal; }
  .qr-detail-actions > * { flex: 1 1 100%; }
  .qr-detail-actions .status-select { width: 100%; }
}
/* ---------- تب درخواست پیش‌فاکتور: اکشن‌های ردیف (هم‌سبک با فاکتورها) ---------- */

#tabQuotes .status-select { max-width: 165px; }

#tabQuotes .admin-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#tabQuotes .admin-row-actions button,
#tabQuotes .admin-row-actions a {
  margin: 0;
  padding: 6px 10px;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

#tabQuotes .admin-row-actions .action-view:hover,
#tabQuotes .admin-row-actions .action-next:hover {
  border-color: var(--gold);
  color: var(--primary);
  background: #fffdf6;
}

#tabQuotes .admin-row-actions .action-export { color: var(--success); border-color: #b7ddc5; }
#tabQuotes .admin-row-actions .action-export:hover { color: #fff; background: var(--success); border-color: var(--success); }

#tabQuotes .admin-row-actions .action-delete { color: var(--danger); border-color: #e8b7b7; }
#tabQuotes .admin-row-actions .action-delete:hover { color: #fff; background: var(--danger); border-color: var(--danger); }

#tabQuotes tr.qr-unread td {
  font-weight: 600;
}

#tabQuotes .qr-unread-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  vertical-align: middle;
}

#tabQuotes .qr-status-select {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  padding: 4px 8px;
}

@media (max-width: 820px) {
  #tabQuotes .admin-table td.col-actions .admin-row-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  #tabQuotes .admin-row-actions button,
  #tabQuotes .admin-row-actions a {
    justify-content: center;
    width: 100%;
  }

  #tabQuotes .qr-status-select { max-width: 100%; }
  .qr-admin-table { min-width: 0; }
}
/* ============================================================
   Brand logo — هدر، فوتر و پنل مدیریت
   (فقط لوگوی برند؛ آیکون‌های دیگر دست‌نخورده)
   ============================================================ */

.header .logo::before { content: none; }

.header .logo img.logo-img {
  height: 40px;
  width: auto;
  display: block;
  object-fit: contain;
  border: 0;
  background: none;
  filter: none;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer-logo {
  height: 56px;
  width: auto;
  display: block;
  object-fit: contain;
  border: 0;
  background: none;
}

.login-logo {
  height: 72px;
  width: auto;
  display: block;
  object-fit: contain;
  margin: 0 auto 16px;
}

.admin-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.admin-logo {
  height: 48px;
  width: auto;
  display: block;
  object-fit: contain;
  border: 0;
  flex: 0 0 auto;
}

@media (max-width: 600px) {
  .header .logo img.logo-img { height: 32px; }
}

/* ============================================================
   هدر: جا شدن کامل در عرض صفحه (بدون اسکرول افقی)
   ============================================================ */

html, body { overflow-x: clip; }

.header-inner {
  width: 100%;
  max-width: 1500px;
  box-sizing: border-box;
  padding-inline: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

.header-inner > * { min-width: 0; }

.header .logo { flex: 0 0 auto; }
.header .menu { flex: 0 1 auto; min-width: 0; }
.header .menu ul { gap: 14px; }
.header .search-box { flex: 1 1 140px; min-width: 110px; }
.header .phone-block,
.header .header-cta,
.header .admin-link,
.header .hamburger { flex: 0 0 auto; }

/* فشرده‌سازی بین 1240 تا 1500 پیکسل */
@media (max-width: 1500px) {
  .header-inner { padding-inline: 16px; gap: 10px; }
  .header .menu ul { gap: 12px; }
  .menu-item { font-size: 13px; }
  .header .search-box { flex-basis: 120px; min-width: 110px; }
  .header .phone-block a { display: none; }
  .header .phone-block .icon { font-size: 18px; }
  .header .gold-button.header-cta { padding: 8px 12px; font-size: 12px; }
  .header .header-quote-btn { padding: 8px 10px; font-size: 12px; }
  .header .admin-link { padding: 7px 10px; font-size: 12px; }
}

/* کمتر از 1240 پیکسل: فقط لوگو + منوی همبرگری + آیکون تلفن */
@media (max-width: 1240px) {
  .header { padding-block: 8px; }
  .header-inner { padding-inline: 12px; gap: 10px; flex-wrap: nowrap; }

  .hamburger {
    display: flex;
    order: 1;
    margin-inline-start: 0;
    width: 40px;
    height: 40px;
    padding: 9px;
  }

  .header .logo { order: 2; }

  .header .menu,
  .header .search-box,
  .header .gold-button.header-cta,
  .header .header-quote-btn,
  .header .admin-link { display: none; }

  .header .phone-block {
    display: inline-flex;
    order: 3;
    margin-inline-start: auto;
  }

  .header .phone-block .icon { font-size: 20px; }
}

@media (max-width: 600px) {
  .header .logo img.logo-img { height: 32px; }
}
/* ============================================================
   بخش «جدول قیمت» در صفحه‌های دسته و محصول
   چیدمان عریض، فیلترهای جمع‌شدنی، جدول فشرده و کارت‌های موبایل
   (فقط داخل .price-section — سایر بخش‌ها تغییر نمی‌کنند)
   ============================================================ */

.price-section {
  box-sizing: border-box;
  width: 100%;
  max-width: 1600px;
  margin-inline: auto;
  padding-inline: 24px;
}

.price-section .price-section-head { margin-bottom: 18px; }
.price-section .price-section-head h2 { overflow-wrap: anywhere; }

.price-section .price-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 20px;
  align-items: start;
}

.price-section .price-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.price-section .price-side > .filter-card,
.price-section .price-side > .calc-card { flex: 0 0 auto; }

/* filters: toggle / sheet chrome (hidden on wide desktop) */
.filters-toggle { display: none; }
.filters-close { display: none; }
.filters-sheet-actions { display: none; }
.filters-backdrop { display: none; }
.filters-clear {
  display: none;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 12.5px;
  color: #a3282d;
  cursor: pointer;
  text-decoration: underline;
}
.filters-clear:not([hidden]) { display: inline-block; }
.filter-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.filter-card-head h3 { margin: 0 0 10px; }

.price-section .filters-panel { display: block; min-width: 0; }

/* long filter lists get their own scroll */
.price-section .filter-block ul {
  max-height: 320px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-inline-end: 4px;
}

.price-section .filter-sort label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}
.price-section .filter-sort .input-field { width: 100%; }

/* sticky sidebar on wide screens */
@media (min-width: 1201px) {
  .price-section .price-side {
    position: sticky;
    top: 96px;
    align-self: start;
    max-height: calc(100vh - 112px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-inline-end: 4px;
  }
}

/* ---------- table: wide, compact, nothing clipped ---------- */
.price-section .price-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.price-section .price-table {
  width: 100%;
  min-width: 0;
  table-layout: auto;
  font-size: 13px;
}

.price-section .price-table th,
.price-section .price-table td {
  padding: 9px 10px;
  vertical-align: middle;
}

.price-section .price-rows-table th { font-size: 12.5px; }

.price-section .price-rows-table td {
  white-space: nowrap;
  max-width: none;
}

.price-section .price-rows-table td[data-label="ابعاد"] { min-width: 130px; }

.price-section .group-head td {
  padding: 10px 12px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.price-section .group-head-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
}
.price-section .group-title { margin-left: 0; }
.price-section .group-date { margin-left: 0; }

/* compact row buttons */
.price-section .price-rows-table .chart-btn,
.price-section .price-rows-table .add-row-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  border-radius: 8px;
}
.price-section .price-rows-table .add-row-btn { min-width: 0; }
.price-section .price-rows-table .inquiry-btn { white-space: nowrap; }
.price-section .price-rows-table td[data-label="نمودار"],
.price-section .price-rows-table td[data-label="عملیات"] { white-space: nowrap; }

.row-btn-label-short { display: none; }
@media (min-width: 1201px) and (max-width: 1500px) {
  .row-btn-label-full { display: none; }
  .row-btn-label-short { display: inline; }
}

/* change badge inside the price cell (mobile cards only) */
.change-inline { display: none; }

/* result count (shown when filters collapse) */
.price-result-count {
  display: none;
  margin: 0 0 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: #7d6120;
}

/* ---------- tablet & below: single column, filters behind a button ---------- */
@media (max-width: 1200px) {
  .price-section { padding-inline: 16px; }

  .price-section .price-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .price-section .price-side {
    position: static;
    order: -1;
    max-height: none;
    overflow: visible;
    padding-inline-end: 0;
    width: 100%;
  }

  .price-result-count { display: block; }

  .filters-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid #e2d6b6;
    border-radius: 10px;
    background: #fff;
    color: #7d6120;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
  }
  .filters-toggle:hover { background: #fbf3dd; }
  .filters-toggle.has-active { border-color: #c9a24b; background: #fffdf5; }
  .filters-toggle-icon { font-size: 15px; line-height: 1; }

  .filters-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #a3282d;
    color: #fff;
    font-size: 11px;
    line-height: 1;
  }
  .filters-badge[hidden] { display: none; }

  .price-section .filters-panel { display: none; }
  .price-section .filters-panel.is-open { display: block; }
}

/* tablet: filter groups in a responsive grid, calculator fields 2 columns */
@media (min-width: 900px) and (max-width: 1200px) {
  .price-section .filters-panel .filter-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 2px 18px;
    align-items: start;
  }
  .price-section .filters-panel .filter-card-head,
  .price-section .filters-panel .filters-clear,
  .price-section .filters-panel #resetFiltersBtn,
  .price-section .filters-panel .filter-note { grid-column: 1 / -1; }
  .price-section .filter-block ul { max-height: 260px; }

  .price-section .calc-card { width: 100%; }
  .price-section .calc-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 14px;
  }
  .price-section .calc-field-wide { grid-column: 1 / -1; }
}

/* ---------- mobile: cards instead of a table ---------- */
@media (max-width: 899px) {
  .price-section { padding-inline: 12px; }

  .price-section .price-section-head {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .price-section .price-meta {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
  }
  .price-section .last-update-chip { width: 100%; text-align: center; }
  .price-section .price-vat-toggle {
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
    padding: 9px 10px;
    background: #fffdf5;
    border: 1px solid #f0e8d2;
    border-radius: 10px;
  }

  .price-section .price-table-wrap { overflow: visible; }

  .price-section .price-rows-table { display: block; width: 100%; }
  .price-section .price-rows-table thead { display: none; }
  .price-section .price-rows-table tbody { display: block; width: 100%; }
  .price-section .price-rows-table tbody.price-group { margin-bottom: 16px; }

  .price-section .price-rows-table tr.group-head { display: block; }
  .price-section .price-rows-table tr.group-head td {
    display: block;
    width: 100%;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
  }
  .price-section .group-head-inner { display: block; }
  .price-section .group-title { display: block; font-size: 14px; }
  .price-section .group-date { display: block; margin-top: 2px; }

  .price-section .price-rows-table tr.price-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 10px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid #efe9dc;
    border-radius: 12px;
    background: #fff;
    white-space: normal;
  }

  .price-section .price-rows-table tr.price-row td {
    display: block;
    width: auto;
    min-width: 0;
    padding: 0;
    border: 0;
    white-space: normal;
  }
  .price-section .price-rows-table tr.price-row td::before { content: none; }

  .price-section .price-row td[data-label="ابعاد"] {
    grid-column: 1 / 2;
    font-size: 15px;
    font-weight: 700;
    color: #2b2b2b;
    overflow-wrap: anywhere;
  }
  .price-section .price-row td[data-label="برند"] {
    grid-column: 2 / 3;
    justify-self: end;
    text-align: left;
    font-size: 12.5px;
    color: #8d8674;
  }

  .price-section .price-row td[data-label="قیمت (تومان)"] {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    margin-top: 2px;
    font-weight: 700;
    color: #7b1e22;
  }
  .price-section .price-row .price-value { font-size: 17px; }
  .price-section .price-row .price-unit { display: block; font-size: 11px; }
  .price-section .price-row .change-inline {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
  }
  .price-section .price-rows-table td[data-label="نوسان"] { display: none; }

  .price-section .price-row td[data-label="محل تحویل"],
  .price-section .price-row td[data-label="واحد"],
  .price-section .price-row td[data-label="تاریخ بروزرسانی"],
  .price-section .price-row td[data-label="حالت"],
  .price-section .price-row td[data-label="کیفیت"],
  .price-section .price-row td[data-label="محصول"] {
    grid-column: 1 / -1;
    font-size: 12px;
    color: #6b6b6b;
  }
  .price-section .price-row td[data-label="محل تحویل"]::before,
  .price-section .price-row td[data-label="واحد"]::before,
  .price-section .price-row td[data-label="تاریخ بروزرسانی"]::before,
  .price-section .price-row td[data-label="حالت"]::before,
  .price-section .price-row td[data-label="کیفیت"]::before,
  .price-section .price-row td[data-label="محصول"]::before {
    content: attr(data-label) ": ";
    color: #8d8674;
  }

  .price-section .price-row td[data-label="نمودار"],
  .price-section .price-row td[data-label="عملیات"] { margin-top: 6px; }
  .price-section .price-row td[data-label="نمودار"] { grid-column: 1 / 2; }
  .price-section .price-row td[data-label="عملیات"] { grid-column: 2 / 3; }

  .price-section .price-row td[data-label="نمودار"] .chart-btn,
  .price-section .price-row td[data-label="عملیات"] .add-row-btn {
    width: 100%;
    height: 40px;
    min-height: 40px;
    font-size: 12.5px;
  }
  .price-section .price-row .row-btn-label-short { display: none; }
  .price-section .price-row .row-btn-label-full { display: inline; }

  /* rows without a price: one full-width inquiry button */
  .price-section .price-row.price-row--inquiry td[data-label="نمودار"],
  .price-section .price-row.price-row--inquiry td[data-label="عملیات"],
  .price-section .price-row.price-row--inquiry .change-inline { display: none; }
  .price-section .price-row.price-row--inquiry td[data-label="قیمت (تومان)"] { display: block; }
  .price-section .price-row.price-row--inquiry .inquiry-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 40px;
  }

  /* filters as a bottom sheet */
  .price-section .filters-panel {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    top: auto;
    z-index: 130;
    max-height: 88vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px 16px 20px;
    background: #fff;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -14px 40px rgba(0, 0, 0, 0.25);
  }

  .filters-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 125;
    background: rgba(0, 0, 0, 0.45);
  }
  .filters-backdrop[hidden] { display: none; }

  .filters-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid #e6dcc2;
    border-radius: 8px;
    background: #fff;
    color: #7d6120;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
  }

  .filters-sheet-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
    position: sticky;
    bottom: 0;
    padding-top: 10px;
    background: #fff;
  }
  .filters-sheet-actions .gold-button,
  .filters-sheet-actions .outline-button {
    width: 100%;
    min-height: 42px;
    justify-content: center;
  }

  body.filters-open { overflow: hidden; }

  .price-section .filter-block ul { max-height: 220px; }
}

/* safety net only — the real causes are fixed above */
html,
body { overflow-x: clip; }
/* ============================================================
   هدر: لوگوی یکپارچه (نشان + نام) و دکمه‌های درخواست پیش‌فاکتور
   (فقط همین دو مورد؛ بقیهٔ هدر دست‌نخورده)
   ============================================================ */

/* فاصلهٔ مشخص بین لوگو و منو */
/* متن مخصوص صفحه‌خوان (نام برند فقط یک‌بار شنیده شود) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ارتفاع لوگو در یک جا تعریف می‌شود */
.header { --logo-h: 64px; }

.header .brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  white-space: nowrap;
  margin-inline-end: clamp(24px, 3.2vw, 56px);
  text-decoration: none;
  border-radius: 10px;
}

.header .brand-lockup .logo-img {
  height: var(--logo-h);
  width: auto;
  max-width: 100%;
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
  border: 0;
  background: none;
  filter: none;
}

.header .brand-lockup:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

/* ارتفاع هدر زیاد نشود: افزایش ارتفاع لوگو با کم کردن padding جبران می‌شود */
@media (min-width: 1241px) {
  .header { padding-block: 4px; }
}

/* دو دکمهٔ درخواست پیش‌فاکتور با یک عرض مشترک */
.header-cta-group {
  --hdr-btn-w: clamp(180px, 12vw, 228px);
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.header-cta-group .header-cta {
  width: var(--hdr-btn-w);
  box-sizing: border-box;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 1500px) {
  .header .brand-lockup { margin-inline-end: clamp(16px, 2vw, 28px); }
}

@media (max-width: 1100px) {
  .header { --logo-h: 56px; }
}

@media (max-width: 1240px) {
  .header .brand-lockup { order: 2; margin-inline-end: 16px; }
  .header-cta-group { display: none; }
}

@media (max-width: 1240px) and (min-width: 601px) {
  .header { padding-block: 4px; }
}

@media (max-width: 900px) {
  .header .brand-lockup { order: 2; }
}

@media (max-width: 600px) {
  .header { --logo-h: 44px; }
  .header .brand-lockup { gap: 8px; margin-inline-end: 12px; }
}

/* heading «درخواست پیش فاکتور» و دکمهٔ «... با پیوست» بلندترند:
   دکمه هرگز نمی‌شکند و در موبایل زیر heading و تمام‌عرض می‌رود */
.invoice-builder .section-head > .outline-button {
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .invoice-builder .section-head { flex-wrap: wrap; row-gap: 10px; }
}

@media (max-width: 600px) {
  .invoice-builder .section-head > .outline-button {
    order: 3;
    flex: 1 0 100%;
    width: 100%;
    margin-inline-start: 0;
  }
}

/* ============================================================
   دسته‌بندی محصولات صفحهٔ اصلی: یک ردیف افقی با درگ/اسکرول
   (فقط همین بخش؛ کارت مشترک در گرید صفحات دیگر دست‌نخورده است)
   ============================================================ */
.product-category-section .product-category-slider {
  position: relative;
  display: block;
  overflow: visible;
  min-width: 0;
  padding-bottom: 0;
}

#productCategorySlider {
  --fade-right: 0px;
  --fade-left: 0px;
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: stretch;
  gap: 20px;
  margin: 0;
  padding: 8px 4px 16px;
  list-style: none;
  direction: rtl;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  -webkit-mask-image: linear-gradient(to left, transparent 0, #000 var(--fade-right), #000 calc(100% - var(--fade-left)), transparent 100%);
  mask-image: linear-gradient(to left, transparent 0, #000 var(--fade-right), #000 calc(100% - var(--fade-left)), transparent 100%);
}

#productCategorySlider::-webkit-scrollbar { display: none; }

#productCategorySlider.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  scroll-snap-type: none;
  -webkit-user-select: none;
  user-select: none;
}

#productCategorySlider > li {
  flex: 0 0 240px;
  width: 240px;
  min-width: 0;
  max-width: none;
  scroll-snap-align: start;
}

#productCategorySlider .product-category-card {
  height: 100%;
  -webkit-user-drag: none;
}

#productCategorySlider .product-category-card img { -webkit-user-drag: none; }

/* دکمه‌های گرد سمت ردیف (هم‌سبک با فلش‌های اسلایدر) */
.cat-row-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--primary);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: background 0.2s, color 0.2s, opacity 0.2s;
}

.cat-row-arrow:hover { background: var(--gold); color: #fff; }
.cat-row-arrow:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.cat-row-arrow.prev { right: -6px; }
.cat-row-arrow.next { left: -6px; }
.cat-row-arrow[hidden] { display: none; }

@media (hover: none) {
  .cat-row-arrow { display: none !important; }
}

@media (max-width: 1100px) {
  #productCategorySlider { gap: 18px; }
  #productCategorySlider > li { flex: 0 0 200px; width: 200px; }
}

@media (max-width: 600px) {
  #productCategorySlider { gap: 14px; }
  #productCategorySlider > li { flex: 0 0 168px; width: 168px; }
}
