/* ==========================================================================
   پرتو پلیمر گلپا — استایل اصلی سایت
   • رنگ‌ها از لوگو (سبز برگ + قرمز پارتو)
   • راست‌چین، رسپانسیو، انیمیشن سبک
   • حالت شب/روز خودکار بر اساس تنظیمات دستگاه کاربر
   برای تغییر رنگ‌ها فقط متغیرهای :root (و بخش دارک‌مود) را عوض کن.
   ========================================================================== */

:root {
  color-scheme: light dark;

  --green-900: #12300a;
  --green-800: #1c4610;
  --green-700: #2c6a13;
  --green-500: #5d9a24;
  --green-300: #9bc768;
  --green-100: #eaf3de;
  --green-50:  #f4f9ec;
  --red-600:   #a32d2d;
  --red-500:   #c23a34;
  --wa:        #25a05b;
  --tg:        #229ED9;

  --ink:     #17210f;   /* عنوان‌ها */
  --body:    #4e5a48;   /* متن اصلی */
  --muted:   #7b856f;   /* متن کم‌رنگ */
  --paper:   #ffffff;   /* پس‌زمینه‌ی صفحه */
  --paper-2: #f7f9f3;   /* پس‌زمینه‌ی سکشن متناوب */
  --surface: #ffffff;   /* پس‌زمینه‌ی کارت‌ها */
  --line:    #e5eadb;   /* خطوط */
  --header-bg: rgba(255,255,255,.88);

  --radius: 12px;
  --radius-lg: 16px;
  --maxw: 1180px;
  --header-h: 68px;
  --font: "Vazirmatn", system-ui, -apple-system, sans-serif;
  --shadow-sm: 0 1px 3px rgba(18,48,10,.06);
  --shadow:    0 4px 20px rgba(18,48,10,.09);
  --shadow-lg: 0 18px 46px rgba(18,48,10,.18);
  --ease: cubic-bezier(.4, 0, .2, 1);
}

/* ---------- حالت شب (خودکار، طبق تنظیمات دستگاه) ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --green-100: #1e3312;
    --green-50:  #17250f;
    --green-300: #a9d47a;

    --ink:     #edf3e5;
    --body:    #bcc7b0;
    --muted:   #8d9a82;
    --paper:   #11150e;
    --paper-2: #171c13;
    --surface: #1a2016;
    --line:    #2b3325;
    --header-bg: rgba(17,21,14,.9);

    --shadow-sm: 0 1px 3px rgba(0,0,0,.4);
    --shadow:    0 4px 20px rgba(0,0,0,.45);
    --shadow-lg: 0 18px 46px rgba(0,0,0,.6);
  }
}

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--body);
  background: var(--paper);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

h1, h2, h3, h4 { color: var(--ink); font-weight: 800; line-height: 1.4; margin: 0; letter-spacing: -.3px; }
h1 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.85rem); }
h3 { font-size: 1.05rem; }

/* ---------- eyebrow ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--green-700); font-size: .76rem; font-weight: 800;
  letter-spacing: 1.2px; margin-bottom: 8px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--green-500); border-radius: 2px; }
@media (prefers-color-scheme: dark) { .eyebrow { color: var(--green-300); } }

/* ---------- دکمه‌ها ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius);
  font-family: var(--font); font-size: .92rem; font-weight: 700; cursor: pointer;
  border: 1.5px solid transparent; white-space: nowrap;
  transition: transform .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease);
}
.btn:hover  { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn svg { width: 17px; height: 17px; fill: currentColor; flex-shrink: 0; }
.btn-sm { padding: 8px 14px; font-size: .86rem; }
.btn-red   { background: var(--red-600); color: #fff; }
.btn-red:hover { background: var(--red-500); }
.btn-green { background: var(--green-700); color: #fff; }
.btn-green:hover { background: var(--green-800); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-tg { background: var(--tg); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--green-700); border-color: var(--green-300); }
.btn-ghost:hover { border-color: var(--green-500); }
.btn-light { background: rgba(255,255,255,.16); color: #fff; border-color: rgba(255,255,255,.32); }
@media (prefers-color-scheme: dark) { .btn-ghost { color: var(--green-300); } }

/* ---------- هدر ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg); backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; height: var(--header-h); }

.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { height: 40px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-text b { color: var(--ink); font-size: .94rem; font-weight: 800; }
.brand-text small { color: var(--muted); font-size: .7rem; letter-spacing: .4px; }

.main-nav { display: flex; align-items: center; gap: 2px; margin-inline-start: auto; }
.main-nav a {
  position: relative; padding: 7px 12px; border-radius: 8px;
  color: var(--body); font-size: .92rem; font-weight: 600;
  transition: color .18s var(--ease), background .18s var(--ease);
}
.main-nav a::after {
  content: ""; position: absolute; bottom: 2px; right: 12px; left: 12px; height: 2px;
  background: var(--green-500); border-radius: 2px;
  transform: scaleX(0); transform-origin: right; transition: transform .25s var(--ease);
}
.main-nav a:hover { color: var(--green-700); background: var(--green-50); }
.main-nav a:hover::after, .main-nav a.is-active::after { transform: scaleX(1); }
.main-nav a.is-active { color: var(--green-700); font-weight: 700; }
@media (prefers-color-scheme: dark) {
  .main-nav a:hover, .main-nav a.is-active { color: var(--green-300); }
}

.header-actions { display: flex; align-items: center; gap: 9px; margin-inline-start: 4px; }

.hamburger {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  width: 42px; height: 42px; padding: 0;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.hamburger:hover { border-color: var(--green-300); background: var(--green-50); }
.hamburger span {
  display: block; width: 19px; height: 2px; border-radius: 2px; background: var(--ink);
  transition: transform .3s var(--ease), opacity .2s var(--ease), width .3s var(--ease);
}
.hamburger span:nth-child(3) { width: 12px; }
.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { width: 19px; transform: translateY(-7px) rotate(-45deg); }

/* ---------- منوی کشویی ---------- */
.nav-backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(9,18,5,.6); backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility .35s;
}
.nav-backdrop.open { opacity: 1; visibility: visible; }

.nav-drawer {
  position: fixed; top: 0; right: 0; z-index: 70;
  width: min(310px, 82vw); height: 100%;
  background: var(--green-900); color: #fff;
  display: flex; flex-direction: column; padding: 18px;
  transform: translateX(105%);
  transition: transform .4s var(--ease);
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
}
.nav-drawer.open { transform: translateX(0); }

.drawer-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.12); }
.drawer-brand { display: flex; align-items: center; gap: 9px; font-size: .88rem; font-weight: 700; color: #fff; }
.drawer-brand img { height: 34px; background: #fff; border-radius: 8px; padding: 3px; }
.drawer-close {
  width: 36px; height: 36px; flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.22); border-radius: 10px;
  background: transparent; color: #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .2s var(--ease);
}
.drawer-close:hover { background: rgba(255,255,255,.12); }
.drawer-close svg { width: 19px; height: 19px; fill: currentColor; }

.drawer-links { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; flex: 1; }
.drawer-links a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: 10px;
  color: #dcecc7; font-size: .98rem; font-weight: 600;
  opacity: 0; transform: translateX(22px);
  transition: opacity .38s var(--ease), transform .38s var(--ease), background .18s var(--ease), color .18s var(--ease);
}
.nav-drawer.open .drawer-links a { opacity: 1; transform: translateX(0); }
.nav-drawer.open .drawer-links a:nth-child(1) { transition-delay: .08s; }
.nav-drawer.open .drawer-links a:nth-child(2) { transition-delay: .13s; }
.nav-drawer.open .drawer-links a:nth-child(3) { transition-delay: .18s; }
.nav-drawer.open .drawer-links a:nth-child(4) { transition-delay: .23s; }
.nav-drawer.open .drawer-links a:nth-child(5) { transition-delay: .28s; }
.drawer-links a:hover { background: rgba(255,255,255,.09); color: #fff; }
.drawer-links svg { width: 19px; height: 19px; fill: var(--green-300); flex-shrink: 0; }

.drawer-foot { padding-top: 14px; border-top: 1px solid rgba(255,255,255,.12); display: flex; flex-direction: column; gap: 10px; }
.drawer-contact { display: flex; align-items: center; gap: 8px; color: #c9e3a8; font-size: .9rem; font-weight: 600; }
.drawer-contact svg { width: 17px; height: 17px; fill: currentColor; }

/* ---------- هیرو ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 340px at 88% -10%, rgba(93,154,36,.16), transparent 60%),
    linear-gradient(170deg, var(--green-50) 0%, var(--paper) 100%);
  border-bottom: 1px solid var(--line);
}
.hero::after {
  content: ""; position: absolute; left: -80px; bottom: -100px;
  width: 260px; height: 260px; border-radius: 50%;
  border: 2px solid rgba(93,154,36,.15);
}
.hero-inner { position: relative; padding: clamp(34px, 5vw, 60px) 0; max-width: 700px; }
.hero h1 { margin-bottom: 12px; }
.hero h1 .accent { color: var(--green-700); }
.hero p { font-size: 1rem; color: var(--body); margin: 0 0 20px; max-width: 540px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
@media (prefers-color-scheme: dark) { .hero h1 .accent { color: var(--green-300); } }

/* ---------- نوار اعتماد ---------- */
.trust { display: flex; flex-wrap: wrap; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.trust-item {
  flex: 1 1 190px; display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; background: var(--paper-2); border-radius: var(--radius);
}
.trust-item svg { width: 23px; height: 23px; fill: var(--green-500); flex-shrink: 0; }
.trust-item b { display: block; color: var(--ink); font-size: .96rem; font-weight: 800; line-height: 1.35; }
.trust-item span { color: var(--muted); font-size: .8rem; }

/* ---------- سکشن ---------- */
.section { padding: clamp(32px, 4.2vw, 52px) 0; }
.section-alt { background: var(--paper-2); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.section-head p { color: var(--muted); margin: 4px 0 0; font-size: .92rem; }
.link-more { color: var(--green-700); font-weight: 700; font-size: .92rem; display: inline-flex; align-items: center; gap: 5px; transition: gap .2s var(--ease); }
.link-more:hover { gap: 10px; }
@media (prefers-color-scheme: dark) { .link-more { color: var(--green-300); } }

/* ---------- گرید و کارت ---------- */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card {
  display: block; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--green-300); }
/* پس‌زمینه‌ی عکس همیشه سفید می‌ماند چون عکس‌ها روی کادر سفید ۳:۴ یکسان شده‌اند */
.card-img { position: relative; aspect-ratio: 3 / 4; background: #fff; border-bottom: 1px solid var(--line); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: contain; transition: transform .4s var(--ease); }
.card:hover .card-img img { transform: scale(1.04); }
.card-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: #f2f4ee; }
.card-placeholder svg { width: 30px; height: 30px; fill: #c9d2bd; }
.card-body { padding: 12px 14px 14px; }
.card-body h3 { font-size: .96rem; }
.card-cat { color: var(--muted); font-size: .8rem; margin: 3px 0 0; }
.card-order { display: inline-flex; align-items: center; gap: 5px; color: var(--red-600); font-size: .82rem; font-weight: 700; margin-top: 8px; }
.card-order svg { width: 14px; height: 14px; fill: currentColor; }
@media (prefers-color-scheme: dark) { .card-order { color: #e07a72; } }

/* ---------- فیلتر ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.chip {
  padding: 7px 15px; border-radius: 30px; font-size: .86rem; font-weight: 600;
  border: 1px solid var(--line); background: var(--surface); color: var(--body);
  transition: all .2s var(--ease);
}
.chip:hover { border-color: var(--green-300); color: var(--green-700); }
.chip.active { background: var(--green-700); color: #fff; border-color: var(--green-700); }

/* ---------- جزئیات محصول ---------- */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.product-gallery { aspect-ratio: 3/4; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.product-gallery img { width: 100%; height: 100%; object-fit: contain; }
.product-badge { display: inline-block; background: var(--green-100); color: var(--green-700); font-size: .78rem; font-weight: 700; padding: 4px 12px; border-radius: 20px; margin-bottom: 10px; }
.product-desc { color: var(--body); margin: 10px 0 18px; }
@media (prefers-color-scheme: dark) { .product-badge { color: var(--green-300); } }

/* ---------- بلوک سفارش ---------- */
.order-box {
  background: linear-gradient(150deg, var(--green-100), var(--green-50));
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 30px); text-align: center;
}
.order-box h3 { font-size: clamp(1.05rem, 1.9vw, 1.3rem); margin-bottom: 5px; }
.order-box p { color: var(--body); font-size: .9rem; margin: 0 0 16px; }
.order-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.order-actions .btn-wa { animation: pulse 2.4s ease-in-out infinite; }

/* ---------- درباره ---------- */
.about-hero {
  background: linear-gradient(160deg, var(--green-900), var(--green-800));
  color: #fff; text-align: center; padding: clamp(34px,5vw,58px) 0;
}
.about-hero h1 { color: #fff; }
.about-hero p { color: var(--green-300); max-width: 560px; margin: 10px auto 0; }
.about-hero .eyebrow { color: var(--green-300); }
.about-hero .eyebrow::before { background: var(--green-300); }
.home-about { display: grid; grid-template-columns: 1.6fr 1fr; gap: 26px; align-items: center; }
.stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; text-align: center; }
.stat b { display: block; font-size: 1.8rem; color: var(--green-700); font-weight: 800; }
.stat span { color: var(--muted); font-size: .85rem; }
.stat svg { width: 27px; height: 27px; fill: var(--green-500); }
.feature { display: flex; gap: 13px; padding: 14px 0; border-top: 1px solid var(--line); }
.feature svg { width: 24px; height: 24px; fill: var(--green-500); flex-shrink: 0; }
.feature p { margin: 3px 0 0; color: var(--muted); font-size: .9rem; }
@media (prefers-color-scheme: dark) { .stat b { color: var(--green-300); } }

/* ---------- تماس ---------- */
.contact-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 22px; margin-bottom: 24px; }
.map-box { aspect-ratio: 4/3; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); }
.map-box iframe { width: 100%; height: 100%; border: 0; }
.contact-info { display: flex; flex-direction: column; gap: 14px; }
.contact-row { display: flex; gap: 11px; color: var(--body); font-size: .93rem; }
.contact-row svg { width: 21px; height: 21px; fill: var(--green-500); flex-shrink: 0; margin-top: 3px; }

/* ---------- فوتر ---------- */
.site-footer { background: var(--green-900); color: #c9dcb0; padding: 36px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 26px; }
.footer-grid h4 { color: #fff; margin: 0 0 10px; font-size: .98rem; }
.footer-grid a { display: block; padding: 4px 0; color: #b9d59a; font-size: .92rem; transition: color .18s var(--ease); }
.footer-grid a:hover { color: #fff; }
.footer-brand img { height: 42px; background: #fff; border-radius: 10px; padding: 5px; margin-bottom: 10px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 24px; padding-top: 16px; text-align: center; font-size: .83rem; color: #93b273; }

/* ---------- واتساپ شناور ---------- */
.wa-float {
  position: fixed; bottom: 20px; left: 20px; z-index: 45;
  width: 52px; height: 52px; border-radius: 50%; background: var(--wa); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(37,160,91,.42);
  animation: pulse 2.6s ease-in-out infinite;
  transition: transform .2s var(--ease);
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 28px; height: 28px; fill: currentColor; }

/* ---------- انیمیشن ---------- */
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ==========================================================================
   سکشن‌های تکمیلی
   ========================================================================== */

.page-hero {
  background: linear-gradient(165deg, var(--green-50), var(--paper));
  border-bottom: 1px solid var(--line);
  padding: clamp(24px, 3.4vw, 38px) 0;
}
.page-hero p { color: var(--muted); margin: 6px 0 0; font-size: .93rem; }
.breadcrumb { font-size: .82rem; color: var(--muted); margin-bottom: 8px; }
.breadcrumb a:hover { color: var(--green-700); }

/* خدمات */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.service {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 18px 16px; transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.service:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--green-300); }
.service-icon {
  width: 44px; height: 44px; border-radius: 12px; background: var(--green-100);
  display: flex; align-items: center; justify-content: center; margin-bottom: 11px;
}
.service-icon svg { width: 23px; height: 23px; fill: var(--green-700); }
.service h3 { margin-bottom: 5px; }
.service p { color: var(--muted); font-size: .88rem; margin: 0; line-height: 1.65; }
@media (prefers-color-scheme: dark) { .service-icon svg { fill: var(--green-300); } }

/* دسته‌بندی‌ها */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cat-tile {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 14px 16px; transition: all .22s var(--ease);
}
.cat-tile:hover { border-color: var(--green-500); background: var(--green-50); transform: translateX(-4px); }
.cat-tile svg { width: 22px; height: 22px; fill: var(--green-500); flex-shrink: 0; }
.cat-tile b { color: var(--ink); font-size: .95rem; display: block; }
.cat-tile span { color: var(--muted); font-size: .8rem; }
.cat-tile .arrow { margin-inline-start: auto; color: var(--green-500); font-weight: 700; }

/* مراحل سفارش */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.step { position: relative; }
.step-num {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--green-700); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1rem; margin-bottom: 10px;
}
.step h3 { margin-bottom: 4px; }
.step p { color: var(--muted); font-size: .87rem; margin: 0; line-height: 1.65; }
.step::after {
  content: ""; position: absolute; top: 19px; right: 52px; left: -8px; height: 2px;
  background: repeating-linear-gradient(to left, var(--green-300) 0 6px, transparent 6px 12px);
}
.step:last-child::after { display: none; }

/* سوالات متداول */
.faq { display: flex; flex-direction: column; gap: 9px; max-width: 800px; margin: 0 auto; }
.faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px 16px; transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.faq details[open] { border-color: var(--green-300); box-shadow: var(--shadow-sm); }
.faq summary {
  cursor: pointer; font-weight: 700; color: var(--ink); font-size: .94rem;
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; color: var(--green-700); font-size: 1.3rem; font-weight: 700;
  transition: transform .25s var(--ease); line-height: 1;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { color: var(--muted); font-size: .9rem; margin: 9px 0 0; line-height: 1.75; }
@media (prefers-color-scheme: dark) { .faq summary::after { color: var(--green-300); } }

/* نوار آمار */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.metric { text-align: center; padding: 16px 12px; background: var(--paper-2); border-radius: var(--radius-lg); }
.metric b { display: block; font-size: 1.6rem; color: var(--green-700); font-weight: 800; line-height: 1.3; }
.metric span { color: var(--muted); font-size: .83rem; }
@media (prefers-color-scheme: dark) { .metric b { color: var(--green-300); } }

/* نوار CTA */
.cta-strip {
  background: var(--red-600); color: #fff; border-radius: var(--radius-lg);
  padding: 18px 24px; display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
}
.cta-strip h3 { color: #fff; margin-bottom: 2px; }
.cta-strip p { margin: 0; color: rgba(255,255,255,.85); font-size: .89rem; }

/* ---------- رسپانسیو ---------- */
@media (max-width: 1000px) {
  .main-nav { display: none; }
  .header-inner { justify-content: space-between; }
  .header-actions { margin-inline-start: auto; }
  .services, .steps, .metrics { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .step::after { display: none; }
}
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .product-detail, .contact-grid, .home-about { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  :root { --header-h: 62px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .services, .steps, .cat-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .brand img { height: 34px; }
  .brand-text small { display: none; }
  .hide-sm { display: none; }
  .hero-cta .btn { flex: 1 1 100%; }
  .wa-float { bottom: 16px; left: 16px; width: 48px; height: 48px; }
  .cta-strip { flex-direction: column; align-items: flex-start; }
}

/* ---------- دسترس‌پذیری ---------- */
:focus-visible { outline: 3px solid var(--green-500); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .nav-drawer { transition: transform .01ms !important; }
}

/* ==========================================================================
   حالت روشن/تاریک دستی (data-theme) — دکمه‌ی سوییچ در منوی کشویی
   data-theme توسط اسکریپت head همیشه ست می‌شود (dark یا light).
   ========================================================================== */

/* اجبار حالت تاریک (روی هر دستگاهی) */
:root[data-theme="dark"] {
  --green-100: #1e3312;
  --green-50:  #17250f;
  --green-300: #a9d47a;
  --ink:     #edf3e5;
  --body:    #bcc7b0;
  --muted:   #8d9a82;
  --paper:   #11150e;
  --paper-2: #171c13;
  --surface: #1a2016;
  --line:    #2b3325;
  --header-bg: rgba(17,21,14,.9);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.4);
  --shadow:    0 4px 20px rgba(0,0,0,.45);
  --shadow-lg: 0 18px 46px rgba(0,0,0,.6);
}
/* اجبار حالت روشن (حتی اگر دستگاه تاریک باشد) */
:root[data-theme="light"] {
  --green-100: #eaf3de;
  --green-50:  #f4f9ec;
  --green-300: #9bc768;
  --ink:     #17210f;
  --body:    #4e5a48;
  --muted:   #7b856f;
  --paper:   #ffffff;
  --paper-2: #f7f9f3;
  --surface: #ffffff;
  --line:    #e5eadb;
  --header-bg: rgba(255,255,255,.88);
  --shadow-sm: 0 1px 3px rgba(18,48,10,.06);
  --shadow:    0 4px 20px rgba(18,48,10,.09);
  --shadow-lg: 0 18px 46px rgba(18,48,10,.18);
}
/* تنظیمات رنگی جزئی در حالت تاریکِ دستی */
:root[data-theme="dark"] .eyebrow,
:root[data-theme="dark"] .link-more,
:root[data-theme="dark"] .main-nav a:hover,
:root[data-theme="dark"] .main-nav a.is-active,
:root[data-theme="dark"] .btn-ghost,
:root[data-theme="dark"] .hero h1 .accent,
:root[data-theme="dark"] .stat b,
:root[data-theme="dark"] .metric b,
:root[data-theme="dark"] .product-badge { color: var(--green-300); }
:root[data-theme="dark"] .eyebrow::before { background: var(--green-300); }
:root[data-theme="dark"] .service-icon svg,
:root[data-theme="dark"] .faq summary::after { color: var(--green-300); fill: var(--green-300); }
:root[data-theme="dark"] .card-order { color: #e07a72; }

/* دکمه‌ی سوییچ در منوی کشویی */
.theme-toggle {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; padding: 11px; margin-top: 2px;
  border: 1px solid rgba(255,255,255,.22); border-radius: 10px;
  background: transparent; color: #dcecc7; cursor: pointer;
  font-family: var(--font); font-size: .9rem; font-weight: 600;
  transition: background .18s var(--ease);
}
.theme-toggle:hover { background: rgba(255,255,255,.09); }
.theme-toggle svg { width: 19px; height: 19px; fill: currentColor; flex-shrink: 0; }
/* ---------- انیمیشن نرم هنگام سوییچ لایت/دارک ---------- */
/* فقط وقتی کلاس theme-anim روی html باشد فعال می‌شود (هنگام کلیک روی دکمه)،
   تا بارگذاری اولیه‌ی صفحه کند نشود. */
html.theme-anim,
html.theme-anim body,
html.theme-anim .site-header,
html.theme-anim .card,
html.theme-anim .service,
html.theme-anim .cat-tile,
html.theme-anim .stat,
html.theme-anim .metric,
html.theme-anim .faq details,
html.theme-anim .trust-item,
html.theme-anim .chip,
html.theme-anim .order-box,
html.theme-anim .map-apps,
html.theme-anim .icon-btn,
html.theme-anim .hamburger,
html.theme-anim .page-hero,
html.theme-anim .hero,
html.theme-anim .section-alt {
  transition: background-color .45s var(--ease), color .45s var(--ease),
              border-color .45s var(--ease), fill .45s var(--ease) !important;
}
@media (prefers-reduced-motion: reduce) {
  html.theme-anim, html.theme-anim * { transition: none !important; }
}

/* دکمه‌های باز کردن موقعیت در بلد/نشان/گوگل‌مپ */
.map-apps {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 18px; margin-bottom: 24px;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.map-apps-label { color: var(--muted); font-size: .9rem; font-weight: 600; }
.map-apps-btns { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 560px) {
  .map-apps { flex-direction: column; align-items: stretch; }
  .map-apps-btns { justify-content: space-between; }
  .map-apps-btns .btn { flex: 1; }
}

/* دکمه‌ی آیکونی کوچک (تم روشن/تاریک) در هدر */
.icon-btn {
  width: 42px; height: 42px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.icon-btn:hover { border-color: var(--green-300); background: var(--green-50); }
.icon-btn svg { width: 20px; height: 20px; fill: currentColor; }

/* نمایش آیکون مناسب: در حالت تاریک خورشید، در حالت روشن ماه */
.icon-sun { display: none; }
.icon-moon { display: inline-block; }
:root[data-theme="dark"] .icon-sun { display: inline-block; }
:root[data-theme="dark"] .icon-moon { display: none; }
