/* ============================================================
   YANPI — تم سیاه‌وسفید (Dark)
   روی style.css + components.css سوار می‌شود
   ============================================================ */

html[data-theme='dark'] {
  --bg: #131110;
  --beige: #1a1715;
  --header-bg: #131110;
  --ink: #f2ede6;
  --ink-soft: #b3aaa1;
  --line: #2b2724;
  --peach: #241f1b;
  --pill: #f2ede6;
  --card: #1b1815;
  color-scheme: dark;
}

html[data-theme='dark'] body { background: #131110; color: #f2ede6; }

/* ---------- هدر ---------- */
html[data-theme='dark'] .site-header {
  background: rgba(19, 17, 16, .62);
  border-color: rgba(255, 255, 255, .10);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .5);
}
html[data-theme='dark'] .site-header.is-scrolled {
  background: rgba(19, 17, 16, .94);
  border-color: rgba(255, 255, 255, .08);
}
html[data-theme='dark'] .icon-btn:hover { background: rgba(255, 255, 255, .08); }
html[data-theme='dark'] .hdr-logo img { filter: invert(1) brightness(1.9); }

/* ---------- منوی کشویی ---------- */
html[data-theme='dark'] .drawer { background: #1b1815; border-color: #2b2724; }
html[data-theme='dark'] .drawer a { border-color: #2b2724; color: #f2ede6; }
html[data-theme='dark'] .drawer .close { color: #b3aaa1; }
html[data-theme='dark'] .scrim { background: rgba(0, 0, 0, .6); }

/* ---------- دکمه‌ها ---------- */
html[data-theme='dark'] .pill { background: #f2ede6; color: #17140f; }
html[data-theme='dark'] .pill:hover { background: #fff; box-shadow: 0 10px 22px rgba(0, 0, 0, .5); }
html[data-theme='dark'] .pill.ghost { background: transparent; color: #f2ede6; border-color: rgba(242, 237, 230, .3); }
html[data-theme='dark'] .pill.ghost:hover { background: rgba(255, 255, 255, .07); }

/* ---------- بخش‌های صفحه اول ---------- */
html[data-theme='dark'] .about,
html[data-theme='dark'] .dealers { background: #131110; }
html[data-theme='dark'] .products { background: #0f0d0c; }
html[data-theme='dark'] .contact { background: #131110; }
html[data-theme='dark'] .split-en { background: #1a1715; }
html[data-theme='dark'] .en-panel h2,
html[data-theme='dark'] .en-panel p { color: #efe9e2; }
html[data-theme='dark'] .dealer-card { background: #1b1815; border-color: #2b2724; }
html[data-theme='dark'] .dealer-item span,
html[data-theme='dark'] .dealer-item b { color: #ded7ce; }
html[data-theme='dark'] .dealer-phone { color: #b3aaa1; }
html[data-theme='dark'] .pcard img { background: #241f1b; }
html[data-theme='dark'] .car-ctrl button { background: rgba(38, 34, 30, .92); color: #f2ede6; }
html[data-theme='dark'] .car-ctrl button:hover { background: #3a342f; }
html[data-theme='dark'] .map { background: #1b1815; }
html[data-theme='dark'] .field input,
html[data-theme='dark'] .field textarea,
html[data-theme='dark'] .field select {
  background: #1b1815; border-color: #2b2724; color: #f2ede6;
}
html[data-theme='dark'] .field input:focus,
html[data-theme='dark'] .field textarea:focus { background: #221e1a; border-color: #4a423a; }
html[data-theme='dark'] .submit { background: #f2ede6; color: #17140f; }
html[data-theme='dark'] .submit:hover { background: #fff; }

/* ---------- فوتر ---------- */
html[data-theme='dark'] .site-footer { background: #0f0d0c; border-top-color: #241f1b; }
html[data-theme='dark'] .foot-col h4 { color: #f2ede6; }
html[data-theme='dark'] .foot-col a,
html[data-theme='dark'] .foot-col p { color: #b3aaa1; }
html[data-theme='dark'] .foot-col a:hover { color: #fff; }
html[data-theme='dark'] .socials a { background: #2a2521; color: #f2ede6; }
html[data-theme='dark'] .socials a:hover { background: #3a342f; }
html[data-theme='dark'] .seal-badge { background: linear-gradient(145deg, #2a241c, #1d1913); color: #e8dfcf; }
html[data-theme='dark'] .foot-bottom { border-top-color: #241f1b; color: #8d857c; }

/* ---------- صفحات داخلی ---------- */
html[data-theme='dark'] .page-hero { background: #131110; border-bottom-color: #221e1b; }
html[data-theme='dark'] .page-hero h1 { color: #f2ede6; }
html[data-theme='dark'] .page-hero p { color: #b3aaa1; }
html[data-theme='dark'] .page-hero .crumb { color: #8d857c; }
html[data-theme='dark'] .page-hero .crumb a { color: #b3aaa1; }

html[data-theme='dark'] .card,
html[data-theme='dark'] .value-card,
html[data-theme='dark'] .contact-card,
html[data-theme='dark'] .dist-list,
html[data-theme='dark'] .login-card,
html[data-theme='dark'] .agent-card,
html[data-theme='dark'] .admin-panel,
html[data-theme='dark'] .admin-nav {
  background: #1b1815; border-color: #2b2724; box-shadow: 0 2px 14px rgba(0, 0, 0, .35);
}
html[data-theme='dark'] .card h2,
html[data-theme='dark'] .value-card h3,
html[data-theme='dark'] .contact-card h2,
html[data-theme='dark'] .value-card p,
html[data-theme='dark'] .card p,
html[data-theme='dark'] .muted { color: #ded7ce; }
html[data-theme='dark'] .value-card p,
html[data-theme='dark'] .card p,
html[data-theme='dark'] .muted { color: #b3aaa1; }

html[data-theme='dark'] .values { background: #0f0d0c; }
html[data-theme='dark'] .cta-band { background: #1a1715; }
html[data-theme='dark'] .info-row { border-color: #2b2724; color: #b3aaa1; }
html[data-theme='dark'] .info-row b { color: #f2ede6; }
html[data-theme='dark'] .info-row svg { color: #8d857c; }
html[data-theme='dark'] .map-box { background: #1b1815; }

html[data-theme='dark'] .form-card input,
html[data-theme='dark'] .form-card textarea,
html[data-theme='dark'] .agent-card input,
html[data-theme='dark'] .agent-card textarea {
  background: #221e1a; border-color: #322c27; color: #f2ede6;
}
html[data-theme='dark'] .form-card input:focus,
html[data-theme='dark'] .form-card textarea:focus,
html[data-theme='dark'] .agent-card input:focus { background: #292420; border-color: #4a423a; }
html[data-theme='dark'] .form-card button,
html[data-theme='dark'] .agent-card button { background: #f2ede6; color: #17140f; }
html[data-theme='dark'] .form-card button:hover,
html[data-theme='dark'] .agent-card button:hover { background: #fff; }
html[data-theme='dark'] .agent-card button.ghost { background: #2a2521; color: #f2ede6; }

html[data-theme='dark'] .dist-grid #map { border-color: #2b2724; }
html[data-theme='dark'] .dist-item { border-color: #262220; }
html[data-theme='dark'] .dist-item:hover { background: #221e1a; }
html[data-theme='dark'] .dist-item b { color: #f2ede6; }
html[data-theme='dark'] .dist-item small { color: #b3aaa1; }

html[data-theme='dark'] .tabs .tab,
html[data-theme='dark'] .tab { background: #262220; color: #ded7ce; }
html[data-theme='dark'] .tab.active { background: #f2ede6; color: #17140f; }

html[data-theme='dark'] .price-table th { background: #221e1a; color: #a49b92; }
html[data-theme='dark'] .price-table th,
html[data-theme='dark'] .price-table td { border-color: #2b2724; color: #ded7ce; }
html[data-theme='dark'] .price-table td.num { color: #f2ede6; }

html[data-theme='dark'] .state.pending { background: #2b2416; color: #e3c777; }
html[data-theme='dark'] .state.rejected { background: #331d1f; color: #f1a1a8; }
html[data-theme='dark'] .state.ok { background: #1b2a1f; color: #9ad7a8; }

html[data-theme='dark'] .empty { color: #8d857c; }
html[data-theme='dark'] .linkcard { border-color: #2b2724; color: #f2ede6; }
html[data-theme='dark'] .linkcard:hover { background: #221e1a; }

/* ---------- دکمهٔ تم ---------- */
.theme-btn svg { width: 20px; height: 20px; }
html[data-theme='dark'] .theme-btn .moon { display: none; }
html:not([data-theme='dark']) .theme-btn .sun { display: none; }

/* ---------- رنگ متن‌های ثابت ---------- */
html[data-theme='dark'] h1,
html[data-theme='dark'] h2,
html[data-theme='dark'] h3,
html[data-theme='dark'] h4,
html[data-theme='dark'] .sec-title,
html[data-theme='dark'] .hero-copy h1,
html[data-theme='dark'] .about-copy h2,
html[data-theme='dark'] .about-copy h3,
html[data-theme='dark'] .en-panel h2,
html[data-theme='dark'] .pcard figcaption,
html[data-theme='dark'] .dealer-item span,
html[data-theme='dark'] .dealer-item b,
html[data-theme='dark'] .agent-card h1 { color: #f2ede6; }

html[data-theme='dark'] h1 span,
html[data-theme='dark'] p,
html[data-theme='dark'] li,
html[data-theme='dark'] .about-copy p,
html[data-theme='dark'] .sec-sub,
html[data-theme='dark'] .contact-copy p,
html[data-theme='dark'] .foot-col p { color: #c4bcb2; }

html[data-theme='dark'] .hero-copy h1 span,
html[data-theme='dark'] .sec-title,
html[data-theme='dark'] .about-copy h2,
html[data-theme='dark'] .about-copy h3 { color: #f6f2ec; }

/* عکس‌ها کمی مات‌تر می‌شوند تا چشم را نزنند */
html[data-theme='dark'] .about-media img,
html[data-theme='dark'] .en-media img,
html[data-theme='dark'] .pcard img { filter: brightness(.9) contrast(1.03); }

/* اسکرول‌بار تیره */
html[data-theme='dark'] ::-webkit-scrollbar { width: 10px; }
html[data-theme='dark'] ::-webkit-scrollbar-track { background: #131110; }
html[data-theme='dark'] ::-webkit-scrollbar-thumb { background: #3a342f; border-radius: 8px; }

/* ---------- نقشه‌ها در تم تاریک ---------- */
html[data-theme='dark'] .map-box iframe,
html[data-theme='dark'] #map .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.92); }
html[data-theme='dark'] .leaflet-bar a {
  background: #1b1815 !important; color: #f2ede6 !important; border-color: #2b2724 !important;
}
html[data-theme='dark'] .leaflet-popup-content-wrapper,
html[data-theme='dark'] .leaflet-popup-tip { background: #1b1815; color: #f2ede6; }
html[data-theme='dark'] .leaflet-container { background: #131110; }
html[data-theme='dark'] .leaflet-control-attribution {
  background: rgba(19, 17, 16, .82) !important; color: #a49b92 !important;
}
html[data-theme='dark'] .leaflet-control-attribution a { color: #c4bcb2 !important; }
/* عکس هیرو در تم تاریک کمی آرام‌تر */
html[data-theme='dark'] .hero .slide { filter: brightness(.82) contrast(1.04); }

/* ---------- پردهٔ تیره روی عکس هیرو (خوانایی تیتر سفید) ---------- */
html[data-theme='dark'] .hero-media::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: linear-gradient(90deg, rgba(10, 9, 8, .55) 0%, rgba(10, 9, 8, .18) 60%, rgba(10, 9, 8, .10) 100%);
}
@media (min-width: 901px) {
  html[data-theme='dark'] .hero-media { position: relative; }
}
@media (max-width: 900px) {
  html[data-theme='dark'] .hero-media::after {
    background: linear-gradient(180deg, rgba(10, 9, 8, .62) 0%, rgba(10, 9, 8, .34) 42%, rgba(10, 9, 8, .20) 60%, rgba(10, 9, 8, .55) 100%);
  }
}
/* آیکون‌های هدر روشن‌تر در تم تاریک */
html[data-theme='dark'] .icon-btn { color: #efe7dd; }
html[data-theme='dark'] .icon-btn svg { stroke-width: 1.8; }
