:root {
  --bg: #0A1220;
  --surface: #131E32;
  --surface-2: #1B2A44;
  --border: #223047;
  --text-900: #E9EEF6;
  --text-500: #93A0B8;
  --accent: #4C8DC9;
  --accent-hover: #6BA6DC;
  --gold-500: #D4AF52;

  --swiper-navigation-color: var(--accent);
  --swiper-pagination-color: var(--accent);
  --swiper-navigation-size: 19px;
}

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

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  font-family: 'Vazirmatn', Tahoma, 'Segoe UI', Arial, sans-serif;
  color: var(--text-900);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ---- هدر کوتاه (الهام از bittorrent.com) — منو راست، چون RTLـیم ---- */
header.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.header-inner {
  max-width: 1120px; margin: 0 auto; padding: 11px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo { font-weight: 700; font-size: 16.5px; color: var(--text-900); text-decoration: none; }
nav.main-nav ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
nav.main-nav a { color: var(--text-500); text-decoration: none; transition: color .2s ease; }
nav.main-nav a:hover, nav.main-nav a:focus-visible { color: var(--text-900); }

/* ---- فوتر (معرفی شرکت + مشخصات تماس) ---- */
footer.site-footer {
  background: #060B14; color: var(--text-500); margin-top: 36px;
  padding: 30px 24px 18px; font-size: 13px; line-height: 1.9;
  border-top: 1px solid var(--border);
}
footer.site-footer strong { color: var(--text-900); font-size: 14.5px; }
footer.site-footer a { color: var(--accent); text-decoration: none; }
footer.site-footer a:hover { color: var(--accent-hover); }
.footer-inner {
  max-width: 1120px; margin: 0 auto; display: flex; flex-wrap: wrap;
  justify-content: space-between; gap: 24px; text-align: right;
}
.footer-about { max-width: 480px; }
.footer-about p { margin: 8px 0 0; }
.footer-contact p { margin: 0 0 6px; }
.footer-bottom {
  max-width: 1120px; margin: 18px auto 0; padding-top: 14px;
  border-top: 1px solid var(--border); font-size: 11.5px; text-align: center;
}

/* ---- بخش‌ها ---- */
.section { max-width: 1120px; margin: 0 auto; padding: 30px 24px 20px; }
.section-head { text-align: center; margin-bottom: 22px; }
.eyebrow {
  display: inline-block; font-size: 12px; color: var(--gold-500);
  background: rgba(212,175,82,.12); padding: 5px 14px; border-radius: 20px;
  font-weight: 600; margin-bottom: 14px;
}
.section-head h1, .section-head h2 { font-size: 25px; margin: 0 0 9px; color: var(--text-900); }
.section-head p { color: var(--text-500); font-size: 14px; margin: 0; }

/* ---- کارت محصول (اسلایدر + گرید مشترکن) ---- */
.product-card {
  display: block; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden; text-decoration: none; color: inherit;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
  height: 100%;
}
.product-card:hover, .product-card:focus-visible {
  transform: translateY(-8px);
  box-shadow: 0 18px 34px -12px rgba(0,0,0,.55);
  border-color: var(--accent);
}
.product-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.card-media { height: 168px; overflow: hidden; background: var(--surface-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.product-card:hover .card-media img { transform: scale(1.06); }
.card-body { padding: 18px 20px 22px; }
.card-body h3 { font-size: 15px; margin: 0 0 8px; color: var(--text-900); }
.card-body p { font-size: 12.5px; color: var(--text-500); margin: 0 0 14px; line-height: 1.7; }
.card-cta { font-size: 12.5px; color: var(--accent); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.product-card:hover .card-cta { color: var(--gold-500); }
.card-cta svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s ease; }
.product-card:hover .card-cta svg { transform: translateX(-4px); }

/* ---- اسلایدر صفحه اصلی ---- */
.product-swiper { padding: 6px 4px 34px; }

/* ---- دکمه‌ها ---- */
.btn-view-all, .btn-primary-navy {
  display: inline-flex; align-items: center; gap: 8px; background: var(--accent);
  color: #fff; padding: 12px 26px; border-radius: 10px; text-decoration: none;
  font-size: 13.5px; font-weight: 600; transition: background .2s ease, transform .2s ease;
  border: none; cursor: pointer;
}
.btn-view-all svg, .btn-primary-navy svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-view-all:hover, .btn-primary-navy:hover { background: var(--accent-hover); transform: translateY(-2px); }
.view-all-wrap { text-align: center; margin-top: 6px; }

@media (prefers-reduced-motion: reduce) {
  .product-card, .card-cta svg, .btn-view-all, .btn-primary-navy { transition: none !important; }
}

/* ---- گرید کامل محصولات (/products) ---- */
.products-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 24px; margin-top: 8px;
}

/* ---- صفحه‌ی معرفی محصول ---- */
.breadcrumb { max-width: 1120px; margin: 20px auto 0; padding: 0 24px; font-size: 12.5px; color: var(--text-500); }
.breadcrumb a { color: var(--text-500); text-decoration: none; }
.breadcrumb a:hover { color: var(--text-900); }

.product-detail { max-width: 1120px; margin: 0 auto; padding: 24px 24px 60px; }
.product-detail h1 { font-size: 24px; color: var(--text-900); margin: 6px 0 14px; }
.product-detail .short-desc { color: var(--text-500); font-size: 14.5px; margin-bottom: 26px; max-width: 640px; }

/* گالری: کاشی‌های تامبنیل (همه عکس‌ها، از جمله اصلی) به‌صورت ستون سمت راست،
   عکس اصلی سمت چپ و بزرگ‌تر — این‌طوری هم جای عمودی کمتری می‌گیره هم میشه
   از تامبنیل به هر عکسی (حتی اصلی) برگشت */
.gallery { display: flex; gap: 12px; margin-bottom: 26px; align-items: flex-start; }
.gallery-main {
  flex: 1; min-width: 0; aspect-ratio: 16 / 9; max-height: 420px; overflow: hidden;
  border-radius: 14px; background: var(--surface-2);
}
.gallery-main img { width: 100%; height: 100%; object-fit: contain; display: block; }
.gallery-thumbs {
  display: flex; flex-direction: column; gap: 8px; width: 84px; flex-shrink: 0;
  max-height: 420px; overflow-y: auto; padding-left: 2px;
}
.gallery-thumbs .thumb {
  width: 84px; height: 64px; border-radius: 8px; overflow: hidden;
  border: 2px solid var(--border); flex: 0 0 auto; padding: 0; cursor: pointer;
  background: none; transition: border-color .2s ease; display: block;
}
.gallery-thumbs .thumb:hover, .gallery-thumbs .thumb:focus-visible { border-color: var(--accent); }
.gallery-thumbs .thumb.is-active { border-color: var(--gold-500); }
.gallery-thumbs .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.product-detail .full-desc { font-size: 14.5px; line-height: 2.1; color: var(--text-500); max-width: 720px; }

@media (max-width: 640px) {
  .header-inner { flex-direction: column; gap: 10px; }
  .section-head h1, .section-head h2 { font-size: 20px; }
  .gallery { flex-direction: column; }
  .gallery-main { width: 100%; aspect-ratio: 4 / 3; max-height: none; }
  .gallery-thumbs {
    flex-direction: row; width: 100%; max-height: none; overflow-x: auto; overflow-y: hidden;
    padding-left: 0; padding-bottom: 2px;
  }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-about { max-width: none; }
}
