:root {
    --sdc-surface: var(--sdc-paper, #fff);
    --sdc-surface-muted: #f1f5f9;
    --sdc-text: var(--sdc-ink, #182235);
}
:root.dark {
    --sdc-canvas: #101827;
    --sdc-surface: #192437;
    --sdc-surface-muted: #243247;
    --sdc-text: #eef3fa;
    --sdc-muted: #b3c2d5;
    --sdc-border: #405169;
    --sdc-ink: #eef3fa;
    --sdc-body: #eef3fa;
    --sdc-paper: #192437;
    --heading-color: 215 55% 96%;
    --body-color: 215 40% 80%;
    --dm-ink: var(--sdc-text);
    --dm-text: var(--sdc-text);
    --dm-muted: var(--sdc-muted);
    --dm-line: var(--sdc-border);
    --dm-canvas: var(--sdc-canvas);
    --dm-paper: var(--sdc-surface);
}
html.dark .sdc-homepage { background: var(--sdc-canvas) !important; }
html.dark :is(.sdc-marketpro-tabs__nav,.sdc-marketpro-tabs__card,.sdc-product-spotlight,.sdc-service-item,.sdc-promise-card,.sdc-compare-page,.sdc-compare-loading,.sdc-compare-corner,.sdc-compare-product,.sdc-compare-feature-name,.sdc-compare-feature-value,.sdc-compare-no-features,.sdc-product-card,.payment-trust-badge,.storefront-loader,.sdc-marketpro-products,.sdc-marketpro-brands .brand-item,.sdc-empty-state,.sdc-newsletter,.sdc-blog-card,.sdc-article-card,.sdc-article-sidebar,.sdc-vendor-card,.sdc-vendor-hero,.sdc-feature-card,.sdc-step-card,.sdc-compare-card) {
    background: var(--sdc-surface) !important;
    color: var(--sdc-text);
    border-color: var(--sdc-border);
}
html.dark .sdc-hero--light .delivery::after {
    background: linear-gradient(270deg, rgb(16 24 39 / 96%) 6%, rgb(16 24 39 / 85%) 50%, rgb(16 24 39 / 65%) 100%) !important;
}
html.dark :is(.sdc-promo-column .promotional-banner-item__content,.sdc-slider--light .banner-item__content) {
    background: rgb(25 36 55 / 94%) !important;
    color: var(--sdc-text);
}
html.dark :is(.header,.header-middle,.mobile-menu) :is(a,button):not(.btn-main):not(.btn-primary) { color: var(--sdc-text); }
html.dark :is(.cart-item__wishlist,.cart-actions__continue,.checkout-address-stage__add,.checkout-address-stage__add-inline,.checkout-summary-stage__change-link,.change-payment-actions .btn-outline,.order-button--outline,.sdc-account-page .account-order__action--outline,.sdc-account-page .btn-outline-primary,.sdc-account-page .btn-secondary) {
    background: var(--sdc-surface) !important; color: var(--sdc-text) !important; border-color: var(--sdc-border) !important;
}
html.dark body, html.dark body.dm-body {
    --dm-ink: var(--sdc-text); --dm-text: var(--sdc-text); --dm-muted: var(--sdc-muted);
    --dm-line: var(--sdc-border); --dm-canvas: var(--sdc-canvas); --dm-paper: var(--sdc-surface);
    background-color: var(--sdc-canvas);
    color: var(--sdc-text);
}
html.dark :is(.bg-white,.bg-color-one,.bg-gray-50,.bg-gray-100,.header-middle,.header,.mobile-menu,.footer,.bottom-footer,.product-card,.site-dialog__panel,.search-overlay__panel) {
    background-color: var(--sdc-surface) !important;
    color: var(--sdc-text);
}
html.dark :is(.text-gray-900,.text-gray-800,.text-gray-700,h1,h2,h3,h4,h5,h6) { color: var(--sdc-text); }
/* The shipped MarketPro banner keeps its light artwork in both color modes. */
html.dark .sdc-marketpro-preset-hero .banner-item__title { color: #121535; }
html.dark .sdc-marketpro-preset-hero .banner-item__description { color: #2d394d; }
html.dark :is(.text-gray-600,.text-gray-500,.text-gray-400) { color: var(--sdc-muted) !important; }
html.dark :is(.border-gray-50,.border-gray-100,.border-gray-200,.border-gray-300) { border-color: var(--sdc-border) !important; }
html.dark :is(input:not([type=checkbox]):not([type=radio]),select,textarea) {
    background-color: var(--sdc-surface); color: var(--sdc-text); border-color: var(--sdc-border);
}
html.dark input::placeholder, html.dark textarea::placeholder { color: var(--sdc-muted); }
html.dark .brand-logo-pair__light { display: none !important; }
html.dark .brand-logo-pair__dark { display: block !important; }
.sdc-color-preference {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: .625rem;
    max-inline-size: 100%;
    margin-block-start: 1.25rem;
    padding: 0;
    color: var(--sdc-text);
    background: transparent;
}
.sdc-color-preference label {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    margin: 0;
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
}
.sdc-color-preference label svg { flex: none; opacity: .7; }
.sdc-color-preference select {
    font: inherit;
    font-size: 13px;
    line-height: 1.6;
    min-inline-size: 0;
    max-inline-size: 100%;
    min-block-size: 44px;
    padding: .5rem .875rem;
    border: 1px solid var(--sdc-border);
    border-color: color-mix(in srgb, currentColor 18%, transparent);
    border-radius: 999px;
    color: var(--sdc-text);
    background-color: rgb(255 255 255 / 24%);
    cursor: pointer;
}
html.dark .sdc-color-preference select { background-color: rgb(255 255 255 / 4%); }
.sdc-color-preference select:hover { border-color: currentColor; }
:is(a,button,input,select,textarea):focus-visible { outline:3px solid #599efa; outline-offset:3px; }
@media print { html.dark { --sdc-canvas:#fff; --sdc-surface:#fff; --sdc-surface-muted:#f1f5f9; --sdc-text:#182235; --sdc-muted:#52637b; --sdc-border:#dbe3ee; } .sdc-color-preference{display:none} }
html.dark :is(.header,.header-middle,.mobile-menu) :is(.item-hover i,.toggle-mobileMenu,.toggle-mobileMenu i,.text-gray-500,.text-gray-800,.category-button) { color: var(--sdc-text) !important; }
html.dark :is(.nav-submenu,.common-dropdown,.category-dropdown,.search-results) { background-color:var(--sdc-surface); color:var(--sdc-text); border-color:var(--sdc-border); }
html.dark .dm-bottom-nav { background:rgb(25 36 55 / 98%); }
html.dark .dm-bottom-nav a.is-active { color:#fff; }
html.dark :is(.text-heading,.text-black,.form-label,label) { color:var(--sdc-text) !important; }
html.dark :is(.footer,.footer-item) :is(a,p,li,span:not(.text-white),.text-gray-900,.text-gray-700) { color:var(--sdc-muted) !important; }
html.dark :is(.checkout-selected-address,.checkout-summary__card,.cart-sidebar,.account-card,.account-card--form,.account-prelude__card,.account-hero,.account-sidebar-card--support,.order-completion) {
    background:linear-gradient(135deg,var(--sdc-surface),var(--sdc-surface-muted)) !important;
    color:var(--sdc-text); border-color:var(--sdc-border) !important;
}
html.dark .sdc-account-page .account-tab:not(.is-active) { background:var(--sdc-surface-muted) !important; color:var(--sdc-text) !important; }
html.dark :is(.account-hero-card__value,.account-hero__action,.account-hero-card strong,.account-hero-card h3) { color:var(--sdc-text) !important; }
html.dark .sdc-account-page :is(.text-gray-500,.account-hero-card__label,.account-card__header p) { color:var(--sdc-muted) !important; }
html.dark :is(.account-shop-link,.account-navigation__identity strong,.account-order-card__number,.account-order-card__summary > strong,.text-gray-900) { color:var(--sdc-text) !important; }
/* The brand listing also runs in themes without Bootstrap's grid utilities. */
.row.g-24:has(> .col-6 > .brand-item) { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; margin:0; }
.row.g-24:has(> .col-6 > .brand-item) > .col-6 { width:auto; min-width:0; padding:0; }
@media (min-width:768px) { .row.g-24:has(> .col-6 > .brand-item) { grid-template-columns:repeat(4,minmax(0,1fr)); } }

/* Both themes share legacy utility classes. Their compiled colors do not all
   use the tenant tokens, so dark surfaces and foregrounds must be paired. */
html.dark {
    --sdc-accent-text: color-mix(in srgb, var(--sdc-main) 38%, #fff);
    --sdc-main-soft: color-mix(in srgb, var(--sdc-main) 14%, #192437);
    --sdc-orange-soft: color-mix(in srgb, var(--sdc-orange) 14%, #192437);
    --main-50: var(--sdc-main-soft);
    --main-100: var(--sdc-main-soft);
    --main-color-50: var(--sdc-main-soft);
    --main-color-100: var(--sdc-main-soft);
    --main-two-50: var(--sdc-orange-soft);
    --main-two-100: var(--sdc-orange-soft);
}
html.dark :is(.breadcrumb,.bg-main-two-50,.bg-main-two-100,.bg-neutral-50,.bg-neutral-100) {
    background: var(--sdc-surface-muted) !important;
    color: var(--sdc-text);
}
html.dark :is(.text-gray-700,.text-gray-800,.text-gray-900,.text-neutral-600,.text-neutral-900) { color: var(--sdc-text) !important; }
html.dark :is(.text-main-600,.sdc-homepage .text-main-600,.sdc-marketpro-tabs__card .text-main-600) { color: var(--sdc-accent-text) !important; }
html.dark :is(.bg-main-50,.bg-main-100,.hover-bg-main-50:hover) { background-color: var(--sdc-main-soft) !important; }
html.dark :is(.btn-main,.bg-main-600):not(.header-top) { background-color: var(--sdc-main-dark) !important; color: #fff !important; }
html.dark .btn-main-two { color: #182235 !important; }
html.dark :is(.product-card__cart,.sdc-product-card__cart,.sdc-marketpro-tabs__cart) {
    background: var(--sdc-main-soft) !important;
    color: var(--sdc-accent-text) !important;
    border-color: var(--sdc-border) !important;
}
/* Multiplying a photograph by a dark card makes the product almost black. */
html.dark :is(.product-card,.sdc-product-card,.sdc-marketpro-tabs__card,.sdc-compare-product,.sdc-product-spotlight) img { mix-blend-mode: normal !important; }
html.dark :is(.sdc-marketpro-tabs__image,.sdc-marketpro-tabs__thumb,.product-card__thumb,.sdc-product-card__image) { background: var(--sdc-surface-muted) !important; }
html.dark :is(.product-details,.shop,.sdc-compare-page) { color: var(--sdc-text); }
html.dark :is(.product-details__content,.product-details__content p,.nav-link.bt-tb-btn) { color: var(--sdc-muted); }
html.dark .nav-link.bt-tb-btn.active { background: var(--sdc-main-dark); color: #fff; }
html.dark :is(.sdc-product-card-action,.site-dialog__button--secondary) { background: var(--sdc-surface-muted); color: var(--sdc-text); border-color: var(--sdc-border); }

/* Native selects, Select2 and TomSelect all appear in the shopping flow. */
html.dark :is(.select2-dropdown,.select2-container--default .select2-selection--single,.select2-search__field,.ts-control,.ts-dropdown,.search-result-item,.search-overlay__input-wrap) {
    background: var(--sdc-surface) !important;
    color: var(--sdc-text) !important;
    border-color: var(--sdc-border) !important;
}
html.dark :is(.select2-container--default .select2-selection__rendered,.select2-results__option,.ts-control input,.ts-control .item,.ts-dropdown .option) { color: var(--sdc-text) !important; }
html.dark :is(.select2-container--default .select2-results__option--selected,.ts-dropdown .option.active) { background: var(--sdc-surface-muted) !important; }
html.dark .select2-container--default .select2-results__option--highlighted[aria-selected] { background: var(--sdc-main-dark) !important; color: #fff !important; }
html.dark :is(.common-input,.form-input,.form-textarea,.form-select):focus { background: var(--sdc-surface); color: var(--sdc-text); }

/* Existing CMS cards keep their stored content; only known light surfaces
   receive a night palette. Artwork and image backgrounds are preserved. */
html.dark .page-content :is([style*="background:#fbfdfb"],[style*="background: #fbfdfb"],[style*="background:#f7f2e8"],[style*="background: #f7f2e8"]) {
    background: var(--sdc-surface-muted) !important;
    color: var(--sdc-text) !important;
    border-color: var(--sdc-border) !important;
}
html.dark .page-content :is(h2,h3,h4,h5,h6)[style*="color"] { color: var(--sdc-text) !important; }
html.dark :is(.sdc-blog-card__meta,.sdc-article-meta,.sdc-vendor-card__description) { color: var(--sdc-muted); }
html.dark :is(.sdc-vendor-card .btn-outline-main,.sdc-article-sidebar a,.page-content a) { color: var(--sdc-accent-text); }

/* Account and order states use the same palette as the catalog. */
html.dark .sdc-account-page { background: var(--sdc-canvas); color: var(--sdc-text); }
html.dark :is(.account-order-card__header,.account-order-card__details dl,.account-hero-card__item--metric,.account-tab b,.order-timeline__icon,.checkout-selected-address,.checkout-payment-card--active) {
    background: var(--sdc-surface-muted) !important;
    color: var(--sdc-text);
    border-color: var(--sdc-border);
}
html.dark :is(.account-breadcrumb,.account-breadcrumb a,.account-page-heading p,.account-navigation__identity span,.account-order-card__eyebrow,.account-order-card__summary small,.account-order-card__details dt,.account-tab i,.account-order-timeline li,.order-completion__message) { color: var(--sdc-muted); }
html.dark :is(.account-order-card__details dd,.account-page-heading h1,.account-card__header h2) { color: var(--sdc-text); }
html.dark .sdc-account-page .account-tab.is-active { background: var(--sdc-main-soft) !important; color: var(--sdc-accent-text) !important; }
html.dark :is(.sdc-account-page .account-tab.is-active i,.account-order-timeline li.is-current,.account-order-timeline li.is-complete,.checkout-shipping-card__price,.checkout-chip__title,.checkout-chip__remove,.checkout-tag,.order-button--ghost) { color: var(--sdc-accent-text); }
html.dark :is(.account-hero__eyebrow,.account-prelude__eyebrow,.account-sidebar-card__eyebrow,.account-hero__meta-item,.account-hero__meta-item strong,.account-card__reset,.account-banner,.account-addresses__count,.account-address__icon,.account-address__subtitle,.account-address__badge,.account-modal__icon,.account-date-input__icon,.change-payment-eyebrow,.change-payment-amount span) { color: #a9caff; }
html.dark :is(.account-hero-card__icon,.account-navigation__avatar,.account-order-timeline li.is-current > span) { background: var(--sdc-main-soft); color: var(--sdc-accent-text); }
html.dark :is(.account-navigation__completion,.account-order-card__status,.order-completion__label,.checkout-payment-card__default-badge) { background: var(--sdc-orange-soft); color: #ffd19a; }
html.dark :is(.account-order-card__status--delivered,.account-order-card__details .payment-paid,.order-summary-card dd.is-success,.checkout-alert--success,.change-payment-alert--success) { color: #8ee3b5; }
html.dark .account-order-card__status--delivered { background: var(--sdc-main-soft); }
html.dark .account-order-card__status--shipped { background: #233956; color: #a9caff; }
html.dark :is(.account-order-card__status--cancelled,.account-order-card__cancelled,.account-order__action--danger,.account-order-card__details .payment-cancelled,.checkout-alert--danger,.change-payment-alert--error,.order-completion__badge.is-danger-soft) { background: #492733; color: #ffb7c2; }
html.dark :is(.field-validation,.validation-summary,.checkout-validation,.change-payment-validation,.text-danger-600,.text-red-600,.account-navigation__logout button) { color: #ffabb7; }
html.dark :is(.account-order-card__details .payment-pending,.account-order-card__details .payment-partial,.order-summary-card dd.is-warning) { color: #ffd19a; }
html.dark :is(.checkout-alert--success,.change-payment-alert--success) { background: var(--sdc-main-soft); }
html.dark :is(.checkout-primary-button[disabled],.cart-sidebar__checkout--disabled) { background: var(--sdc-surface-muted); color: var(--sdc-muted); }
html.dark .order-timeline__item:not(.is-completed):not(.is-current) .order-timeline__icon { background: var(--sdc-surface-muted); color: var(--sdc-muted); }
html.dark :is(.order-timeline__item.is-completed,.order-timeline__item.is-current) .order-timeline__icon { background: var(--sdc-main-dark) !important; color: #fff; }
html.dark .order-completion__badge.is-warning { background: #73430f; color: #ffe0b5; }
html.dark .order-completion__badge.is-success { background: #20533e; color: #b1f0d0; }
html.dark .order-completion__badge.is-info { background: #234d72; color: #d3e9ff; }
html.dark :is(.page-link.bg-main-600,.nav-link.bt-tb-btn.active,.sdc-step-card > span) { background: var(--sdc-main-dark) !important; color: #fff !important; }
html.dark :is(.sdc-status-badge,.checkout-address-stage__eyebrow,.checkout-summary-stage__eyebrow,.checkout-selected-address__eyebrow,.checkout-address-card__edit,.checkout-shipping-card__icon,.checkout-shipping-card__indicator,.checkout-payment-card__indicator,.account-address__badge,.order-completion__label) { color: var(--sdc-accent-text) !important; }
html.dark :is(.account-order__action--accent,.sdc-account-page .account-order__action--accent) { background: var(--sdc-orange) !important; color: #182235 !important; }
html.dark :is(.btn-danger,.text-danger-600,.checkout-summary__row--accent,.checkout-chip__remove) { color: #ffabb7 !important; }
html.dark .account-modal--error .account-modal__action { background: #a62d42; color: #fff; }
html.dark :is(.sdc-feature-card p,.sdc-step-card p,.sdc-quick-view__rating,.sdc-quick-view__meta,.sdc-quick-view__price span,.sdc-quick-view__price del) { color: var(--sdc-muted); }
html.dark :is(th,.h1,.h2,.h3,.h4,.h5,.h6,.sdc-quick-view__price strong) { color: var(--sdc-text); }
html.dark .page-content [style*="color:#0f5132"] { color: var(--sdc-text) !important; }
html.dark :is(.page-content blockquote,.sdc-marketpro-brands .brand-item,.sdc-quick-view__eyebrow,.sdc-quick-view__meta i,.leaflet-control-locate) { color: var(--sdc-accent-text) !important; }
html.dark :is(.sdc-quick-view__dialog,.sdc-quick-view__close) { background: var(--sdc-surface); color: var(--sdc-text); }
html.dark .sdc-quick-view__media { background: var(--sdc-surface-muted); }
html.dark .sdc-quick-view__meta { border-color: var(--sdc-border); }
html.dark .banner:not(.sdc-marketpro-preset-hero) .banner-item { background: var(--sdc-surface-muted) !important; }
html.dark .banner:not(.sdc-marketpro-preset-hero) :is(.banner-item__title,.banner-item__description) { color: var(--sdc-text) !important; }
html.dark .dm-body {
    --main-50: var(--sdc-main-soft);
    --main-100: var(--sdc-main-soft);
    --main-color-50: var(--sdc-main-soft);
    --main-color-100: var(--sdc-main-soft);
}
html.dark :is(.shop-sidebar,.sdc-quick-view__dialog,.mobile-menu .nav-submenu) { background: var(--sdc-surface) !important; color: var(--sdc-text); }
html.dark .shop-sidebar .btn-outline { color: var(--sdc-text); border-color: var(--sdc-border); }
html.dark .brand-item, html.dark .brand-item span { color: var(--sdc-text) !important; }
html.dark .leaflet-control-attribution { background: #f1f5f9; color: #334155; }
html.dark .leaflet-control-attribution a { color: #075985; }
html.dark :is(.sdc-compare-product__price,.sdc-compare-product__view) { color: var(--sdc-accent-text) !important; }
html.dark :is(.dm-superapp a.is-active,.product-copy a) { color: var(--sdc-accent-text) !important; }
html.dark .dm-body .product-details__sidebar { background: var(--sdc-surface-muted); }
html.dark .dm-body :is(.product-details__sidebar .btn-main,.checkout-primary-button),
html.dark .dm-body #productAddToCartForm button[type="submit"] { background: var(--sdc-main-dark) !important; color: #fff !important; }
html.dark .dm-body .product-details__sidebar .btn-outline-main { background: var(--sdc-surface) !important; color: var(--sdc-accent-text) !important; }
html.dark :is(.success-card,.sdc-compare-product__remove) { background: var(--sdc-surface) !important; color: var(--sdc-text); }
html.dark .dm-body .header .nav-menu__link { color: var(--sdc-text) !important; }
html.dark :is(.success-icon,.success-hero-icon .text-4xl) { color: var(--sdc-accent-text) !important; }
/* Verification, payment and availability notices are used outside checkout too. */
html.dark :is(.bg-amber-50,.bg-warning-50) { background: #49351f !important; color: #ffe0b5 !important; }
html.dark :is(.bg-success-50,.bg-main-50.text-main-700) { background: #1d3c32 !important; color: #b1f0d0 !important; }
html.dark .bg-danger-50 { background: #492733 !important; color: #ffb7c2 !important; }
html.dark .bg-primary-50 { background: #233956 !important; color: #d3e9ff !important; }
html.dark :is(.text-neutral-700,.text-neutral-800) { color: var(--sdc-text) !important; }
html.dark .sdc-promo-column .promotional-banner-item { background-color: var(--sdc-surface-muted) !important; }
html.dark .sdc-promo-column .promotional-banner-item__content { background: transparent !important; }
html.dark .sdc-promo-column .promotional-banner-item img { mix-blend-mode: normal; }
