html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #edf0f2;
  --ink-2: #dce0e3;
  --muted: #a5adb5;
  --line: #343a40;
  --paper: #15181b;
  --soft: #202428;
  --cream: #292621;
  --green: #63c397;
  --shadow: 0 22px 60px rgba(0, 0, 0, .32);
}

html[data-theme="dark"] body,
html[data-theme="dark"] .store-site,
html[data-theme="dark"] .company-site,
html[data-theme="dark"] .carousel-home,
html[data-theme="dark"] .ops-page,
html[data-theme="dark"] .branch-manager-page,
html[data-theme="dark"] .account-page,
html[data-theme="dark"] .cart-page,
html[data-theme="dark"] .order-status-page {
  background-color: #111315 !important;
  color: #edf0f2 !important;
}

html[data-theme="dark"] body:has(.card) {
  background: radial-gradient(circle at 18% 12%, #262a2e 0, #171a1d 46%, #111315 100%) !important;
}

html[data-theme="dark"] .site-header,
html[data-theme="dark"] .account-header,
html[data-theme="dark"] .cart-header,
html[data-theme="dark"] .status-header,
html[data-theme="dark"] .ops-header,
html[data-theme="dark"] .ops-sidebar,
html[data-theme="dark"] .bm-header,
html[data-theme="dark"] .site-footer,
html[data-theme="dark"] .company-footer,
html[data-theme="dark"] .topbar {
  background-color: #191c20 !important;
  color: #edf0f2 !important;
  border-color: #30363c !important;
}

html[data-theme="dark"] .carousel-header {
  background: linear-gradient(180deg, rgba(16, 18, 20, .96), rgba(16, 18, 20, .86)) !important;
  border-color: rgba(255, 255, 255, .1) !important;
}

html[data-theme="dark"] .store-slide-two,
html[data-theme="dark"] .company-slide-two {
  --slide-muted: #b0b6bc;
  background-color: #1b1e21 !important;
  color: #f1f3f4 !important;
}

html[data-theme="dark"] .store-slide-two .slide-wash,
html[data-theme="dark"] .company-slide-two .slide-wash {
  background: radial-gradient(ellipse at 24% 73%, rgba(226, 13, 27, .13), transparent 36%), linear-gradient(140deg, #202326, #151719) !important;
}

html[data-theme="dark"] :where(
  .hub-card,
  .ops-table-wrap,
  .bm-table-wrap,
  .category-tile,
  .product-card,
  .product-detail-art,
  .product-visual.visual-catalog,
  .catalog-product-symbol,
  .audience-band,
  .hero-search,
  .service-card,
  .company-product,
  .contact-form,
  .service-form,
  .service-dialog,
  .account-sidebar,
  .account-panel,
  .account-subcard,
  .account-metric,
  .quote-card,
  .quote-reminder-card,
  .cart-panel,
  .account-gate,
  .account-mode,
  .auth-method-choice,
  .buyer-choice,
  .account-options,
  .notification-choice,
  .branch-stock-summary,
  .status-card,
  .quote-preview,
  .tracking-branch,
  .status-help,
  .product-buy-card,
  .branch-option,
  .fulfillment-strip,
  .branch-locator-card,
  .branch-company-card,
  .ops-card,
  .ops-kpi,
  .attention-card,
  .branch-disclosure,
  .branch-directory-note,
  .stock-check-card,
  .bm-login-card,
  .bm-request-card,
  .bm-item-list,
  .bm-history-row,
  .bm-settings-card,
  .bm-empty,
  .branch-response-card,
  .branch-response-details,
  .login-card,
  .form-side,
  .card,
  .content
) {
  background-color: #1b1e22 !important;
  color: #edf0f2 !important;
  border-color: #343a40 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
}

html[data-theme="dark"] :where(
  .ops-nav button:hover,
  .ops-nav button.is-active,
  .account-tab:hover,
  .account-tab.is-active,
  .bm-tab.is-active,
  .branch-disclosure[open] > summary
) {
  background-color: #282c31 !important;
  color: #f5f6f7 !important;
}

html[data-theme="dark"] :where(
  input,
  select,
  textarea,
  .hero-search input,
  .sort-label select,
  .location-search input,
  .contact-form input,
  .contact-form textarea,
  .service-form input,
  .service-form textarea,
  .branch-form-grid input,
  .branch-form-grid select,
  .stock-check-actions select,
  .stock-check-actions textarea,
  .branch-stock-toolbar input,
  .bm-login-card input,
  .bm-table input,
  .bm-search input
) {
  background-color: #121416 !important;
  color: #edf0f2 !important;
  border-color: #3b4249 !important;
}

html[data-theme="dark"] :where(input, textarea, select)::placeholder {
  color: #89929a !important;
  opacity: 1;
}

html[data-theme="dark"] :where(table, th, td, .ops-table-wrap, .bm-table-wrap, .compare-dialog, .compare-table th) {
  color: #edf0f2 !important;
  border-color: #343a40 !important;
}

html[data-theme="dark"] :where(th, .bm-table th, .compare-table th) {
  background-color: #25292e !important;
}

html[data-theme="dark"] body :where(h1, h2, h3, h4) {
  color: #f1f3f5 !important;
}

html[data-theme="dark"] body p:not(.form-error):not(.error):not(.is-error):not(.form-feedback):not(.bm-status):not(.stock-feedback),
html[data-theme="dark"] body small {
  color: #aeb6bd !important;
}

html[data-theme="dark"] body label {
  color: #d1d6da;
}

html[data-theme="dark"] :where(
  .section-head p,
  .section-head small,
  .category-tile small,
  .product-info > p,
  .company-product p,
  .service-card p,
  .about-copy p,
  .contact-intro > p,
  .account-header .main-nav a,
  .ops-page-heading p,
  .bm-login-card > p,
  .bm-welcome p,
  .bm-section-head p,
  .hint,
  .intro,
  .eyebrow,
  .account-eyebrow,
  .branch-admin-intro,
  .branch-directory-note,
  .catalog-source-note p,
  .cart-note,
  .status-help,
  .product-detail-copy p
):not(.form-error):not(.error):not(.is-error):not(.form-feedback) {
  color: #aeb6bd !important;
}

html[data-theme="dark"] :where(hr, .section-rule, .fact-row, .ops-sidebar-foot, .account-tab, .quote-card, .status-timeline) {
  border-color: #343a40 !important;
}

html[data-theme="dark"] :where(.text-link, .main-nav a, .carousel-nav a, .footer-links a, .site-footer a, .company-footer a) {
  color: #d9dde0;
}

html[data-theme="dark"] :where(.catalog-source-note, .preview-notice, .sample-data-note, .demo-note, .checkout-note, .filter-note, .branch-directory-note, .notification-summary) {
  background-color: #25292e !important;
  color: #d4d9dd !important;
  border-color: #3a4046 !important;
}

html[data-theme="dark"] :where(.lang-toggle, .icon-button, .cart-button, .outline-link, .compare-btn, .filter-chip, .filter-button, .small-action, .ops-secondary-button, .bm-secondary, .status-secondary-button, .secondary, .toggle-password, .toggle) {
  background-color: #25292e !important;
  color: #edf0f2 !important;
  border-color: #3b4249 !important;
}

html[data-theme="dark"] .toast {
  background-color: #e9edf0;
  color: #151719;
}

html[data-theme="dark"] .service-dialog::backdrop {
  background: rgba(0, 0, 0, .76);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 7px 12px;
  border: 1px solid #dfe2e4;
  border-radius: 999px;
  background: #fff;
  color: #24282c;
  font: 700 13px/1.2 Vazirmatn, Tahoma, sans-serif;
  white-space: nowrap;
  box-shadow: 0 3px 12px rgba(15, 20, 25, .08);
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.theme-toggle:hover { transform: translateY(-1px); border-color: #c7ccd0; }
.theme-toggle:focus-visible { outline: 3px solid rgba(226, 13, 27, .35); outline-offset: 2px; }
.theme-toggle-icon { font-size: 17px; line-height: 1; }
.theme-toggle-floating { position: fixed; z-index: 100; top: 14px; inset-inline-start: 14px; }

html[data-theme="dark"] .theme-toggle {
  background: #282c31;
  color: #f1f3f5;
  border-color: #454c53;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .28);
}

@media (max-width: 720px) {
  .theme-toggle { min-height: 36px; padding: 6px 9px; gap: 5px; font-size: 12px; }
  .theme-toggle-floating { top: 10px; inset-inline-start: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .theme-toggle { transition: none; }
  .theme-toggle:hover { transform: none; }
}

/* Make the campaign homepages follow the selected light theme on every slide. */
html[data-theme="light"] .carousel-home {
  background-color: #f5f4f0 !important;
  color: #17191c !important;
}

html[data-theme="light"] .carousel-home .carousel-header {
  color: #17191c !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, .97), rgba(255, 255, 255, .88)) !important;
  border-color: rgba(23, 25, 28, .1) !important;
}

html[data-theme="light"] .carousel-home .carousel-brand,
html[data-theme="light"] .carousel-home .carousel-brand small,
html[data-theme="light"] .carousel-home .carousel-nav,
html[data-theme="light"] .carousel-home .carousel-nav a,
html[data-theme="light"] .carousel-home .store-login,
html[data-theme="light"] .carousel-home .company-contact-link {
  color: #292d31 !important;
}

html[data-theme="light"] .carousel-home .carousel-actions .lang-toggle {
  background: rgba(23, 25, 28, .04) !important;
  color: #292d31 !important;
  border-color: rgba(23, 25, 28, .17) !important;
}

html[data-theme="light"] .carousel-home :where(.store-slide-one, .store-slide-three, .company-slide-one, .company-slide-three) {
  --slide-accent: #c81420;
  --slide-muted: #535a61;
  background-color: #f5f4f0 !important;
  color: #17191c !important;
}

html[data-theme="light"] .carousel-home :where(.store-slide-one, .store-slide-three, .company-slide-one, .company-slide-three) .slide-wash {
  background: radial-gradient(ellipse at 76% 43%, rgba(226, 13, 27, .09), transparent 34%), linear-gradient(135deg, #fbfaf7, #eeece6) !important;
}

html[data-theme="light"] .carousel-home .carousel-arrows button {
  border-color: rgba(25, 27, 29, .24) !important;
  background: rgba(25, 27, 29, .04) !important;
  color: #202326 !important;
}

html[data-theme="light"] .carousel-home .carousel-dots button { background: rgba(25, 27, 29, .3) !important; }
html[data-theme="light"] .carousel-home .carousel-dots button.is-active { background: #202326 !important; }
html[data-theme="light"] .carousel-home .carousel-count { color: rgba(25, 27, 29, .72) !important; }
html[data-theme="light"] .carousel-home .carousel-count b { color: #202326 !important; }
html[data-theme="light"] .carousel-home .carousel-progress { background: rgba(25, 27, 29, .12) !important; }
html[data-theme="light"] .carousel-home .home-switch { color: rgba(25, 27, 29, .78) !important; }
html[data-theme="light"] .carousel-home .home-switch b { background: rgba(25, 27, 29, .09) !important; color: #202326 !important; }
