/* MATJARI compiled storefront colour contract. */


/*
 * MATJARI storefront all-pages colour contract ().
 * Keeps content, archives, search, errors and product journeys in the same
 * saved light/dark mode as the homepage.
 */

html[data-matjari-theme="light"] {
    --mtj-content-bg: var(--mtj-store-light-bg, #f7f7f8);
    --mtj-content-surface: var(--mtj-store-light-surface, #ffffff);
    --mtj-content-surface-2: #f6f1f3;
    --mtj-content-text: var(--mtj-store-light-text, #171717);
    --mtj-content-muted: var(--mtj-store-light-muted, #64748b);
    --mtj-content-border: var(--mtj-store-light-border, #e5e7eb);
    --mtj-content-accent: var(--mtj-store-light-primary, #c8102e);
    --mtj-content-shadow: rgba(17,24,39,.09);
}

html[data-matjari-theme="dark"] {
    --mtj-content-bg: var(--mtj-store-bg, #04131c);
    --mtj-content-surface: var(--mtj-store-surface, #08202d);
    --mtj-content-surface-2: var(--mtj-store-surface-alt, #0b3442);
    --mtj-content-text: var(--mtj-store-text, #f8fbff);
    --mtj-content-muted: var(--mtj-store-muted, #a8c0cc);
    --mtj-content-border: var(--mtj-store-border, #1a5368);
    --mtj-content-accent: var(--mtj-store-accent, #ff9f1c);
    --mtj-content-shadow: rgba(0,0,0,.36);
}

html[data-matjari-theme] body,
html[data-matjari-theme] .mtj-site,
html[data-matjari-theme] .mtj-main,
html[data-matjari-theme] .mtj-page,
html[data-matjari-theme] .mtj-single,
html[data-matjari-theme] .mtj-page-section,
html[data-matjari-theme] .mtj-page-content,
html[data-matjari-theme] .mtj-content-narrow {
    background-color: var(--mtj-content-bg);
    color: var(--mtj-content-text);
    border-color: var(--mtj-content-border);
}

html[data-matjari-theme] .mtj-page-header {
    background: linear-gradient(135deg, var(--mtj-content-surface), var(--mtj-content-surface-2));
    color: var(--mtj-content-text);
    border-bottom: 1px solid var(--mtj-content-border);
}

html[data-matjari-theme="dark"] .mtj-page-header {
    background:
        radial-gradient(circle at 82% 20%, var(--mtj-store-glow), transparent 34%),
        linear-gradient(135deg, var(--mtj-store-hero-1), var(--mtj-store-hero-2));
}

html[data-matjari-theme] :is(.mtj-card,.mtj-empty) {
    background-color: var(--mtj-content-surface);
    color: var(--mtj-content-text);
    border-color: var(--mtj-content-border);
    box-shadow: 0 14px 38px var(--mtj-content-shadow);
}

html[data-matjari-theme] :is(.mtj-page-content,.mtj-content-narrow,.mtj-card,.mtj-empty) :is(h1,h2,h3,h4,h5,h6,strong,b) {
    color: var(--mtj-content-text);
}

html[data-matjari-theme] :is(.mtj-page-content,.mtj-content-narrow,.mtj-card,.mtj-empty) :is(p,li,small,figcaption,.wp-block-post-excerpt) {
    color: var(--mtj-content-muted);
}

html[data-matjari-theme] :is(.mtj-page-content,.mtj-content-narrow,.mtj-card,.mtj-empty) a:not(.wp-element-button):not(.mtj-button) {
    color: var(--mtj-content-accent);
}

html[data-matjari-theme] :is(.mtj-page-content,.mtj-content-narrow) :is(
    table,
    .wp-block-table,
    blockquote,
    pre,
    code,
    .wp-block-code,
    .wp-block-preformatted,
    .wp-block-pullquote,
    .wp-block-search,
    .wp-block-comments,
    .comment-body,
    .navigation,
    .pagination
) {
    background-color: var(--mtj-content-surface);
    color: var(--mtj-content-text);
    border-color: var(--mtj-content-border);
}

html[data-matjari-theme] :is(.mtj-page-content,.mtj-content-narrow) :is(table,.wp-block-table table) :is(th,td) {
    color: var(--mtj-content-text);
    border-color: var(--mtj-content-border);
}

html[data-matjari-theme] :is(.mtj-page-content,.mtj-content-narrow) :is(input:not([type="submit"]):not([type="button"]),select,textarea) {
    background-color: var(--mtj-content-surface);
    color: var(--mtj-content-text);
    border: 1px solid var(--mtj-content-border);
}

html[data-matjari-theme] :is(.mtj-page-content,.mtj-content-narrow) :is(input,textarea)::placeholder {
    color: var(--mtj-content-muted);
    opacity: 1;
}

html[data-matjari-theme] :is(.mtj-page-content,.mtj-content-narrow) :is(hr,.wp-block-separator) {
    border-color: var(--mtj-content-border);
}

html[data-matjari-theme] :is(.nav-links,.page-numbers) {
    color: var(--mtj-content-text);
    border-color: var(--mtj-content-border);
}

html[data-matjari-theme] .page-numbers.current {
    background-color: var(--mtj-content-accent);
    color: #111827;
}

/* Builder documents follow the explicit switch, never the OS preference alone. */
html[data-matjari-theme="light"] .mtjbp-document {
    color-scheme: light;
}

html[data-matjari-theme="dark"] .mtjbp-document {
    color-scheme: dark;
}

/*
 * Product, checkout, receipt, reviews and FAQ journey. The product module
 * uses its own token namespace, so map it to the same storefront palette.
 */
html[data-matjari-theme="dark"] .mtj-product-sale { color-scheme: dark; }

html[data-matjari-theme="dark"] .mtj-product-sale :is(
    .mtj-product-sale-order-card,
    .mtj-product-sale-proof-bar article,
    .mtj-product-sale-share-row a,
    .mtj-product-sale-share-row button,
    .mtj-product-sale-addon-preview,
    .mtj-product-sale-carousel article,
    .mtj-product-sale-product-grid article,
    .mtj-product-faq-faq,
    .mtj-product-faq-faq-list details,
    .mtj-product-review-review-card
) {
    background-color: var(--mtj208-surface);
    color: var(--mtj208-ink);
    border-color: var(--mtj208-line);
}

html[data-matjari-theme="dark"] .mtj-product-sale :is(
    .mtj-product-sale-product-head h2,
    .mtj-product-sale-order-card h3,
    .mtj-product-sale-addon-preview,
    .mtj-product-faq-faq h2,
    .mtj-product-faq-faq-list summary,
    .mtj-product-sale-product-grid h3,
    .mtj-product-review-review-card h3
) {
    color: var(--mtj208-ink);
}

html[data-matjari-theme="dark"] .mtj-product-sale :is(
    .mtj-product-sale-product-head p,
    .mtj-product-faq-faq-list p,
    .mtj-product-sale-product-grid p,
    .mtj-product-review-review-card p
) {
    color: var(--mtj208-muted);
}

html[data-matjari-theme="dark"] .mtj-product-sale :is(input,select,textarea) {
    background-color: #0d1522;
    color: var(--mtj208-ink);
    border-color: var(--mtj208-line);
}

html[data-matjari-theme="dark"] .mtj-product-sale-addon-zone {
    background: linear-gradient(135deg, var(--mtj208-offers-bg,var(--mtj-store-surface-alt)), var(--mtj208-surface,var(--mtj-store-surface)));
    border-color: var(--mtj208-line,var(--mtj-store-border));
}

html[data-matjari-theme="dark"] .mtj-product-sale-receipt {
    background-color: var(--mtj208-surface,var(--mtj-store-surface));
    color: #f8fafc;
    border-color: var(--mtj208-line,var(--mtj-store-border));
}

html[data-matjari-theme="dark"] .mtj-product-sale-plan.active {
    background: linear-gradient(135deg, var(--mtj208-featured,var(--mtj-store-accent)), var(--mtj208-sale,var(--mtj-store-accent-soft)));
    color: #17110a;
    border-color: var(--mtj208-featured,var(--mtj-store-accent));
}

html[data-matjari-theme="dark"] .mtj-product-sale-sticky button {
    background: linear-gradient(135deg, var(--mtj208-featured,var(--mtj-store-accent)), var(--mtj208-sale,var(--mtj-store-accent-soft)));
    color: #17110a;
}

html[data-matjari-theme="dark"] .mtj-demo-badge {
    background-color: #3b2410;
    color: #ffd58a;
    border-color: #83541f;
}

/* Product imagery intentionally keeps a neutral canvas for colour accuracy. */
html[data-matjari-theme="dark"] .mtj-product-sale :is(
    .mtj-product-sale-main-media,
    .mtj-product-sale-thumb,
    .mtj-product-sale-product-grid .image
) {
    background-color: #f8fafc;
}

@media (max-width: 680px) {
    html[data-matjari-theme] .mtj-page-header {
        padding: 40px 0;
    }

    html[data-matjari-theme] .mtj-page-content > *:not(.matjari-page-rendered):not(.alignfull) {
        width: min(100% - 20px, var(--mtj-container));
    }
}

@media (prefers-reduced-motion: reduce) {
    html[data-matjari-theme] body,
    html[data-matjari-theme] body * {
        scroll-behavior: auto;
    }
}


/*
 * MATJARI storefront all-pages light contract ().
 * Removes navy/black islands from daylight mode and introduces clear,
 * colourful, high-contrast commerce surfaces.
 */

html[data-matjari-theme="light"] {
    --mtj-content-bg: #f6f8fb;
    --mtj-content-surface: #ffffff;
    --mtj-content-surface-2: #eef4fb;
    --mtj-content-text: #172033;
    --mtj-content-muted: #5b6474;
    --mtj-content-border: #d5deea;
    --mtj-content-accent: #b31632;
    --mtj-content-blue: #245fbd;
    --mtj-content-violet: #6d4bd3;
    --mtj-content-cyan: #087f9e;
    --mtj-content-green: #147a52;
    --mtj-content-amber: #8a5a00;
    --mtj-content-shadow: rgba(37,55,84,.10);
    color-scheme: light;
}

html[data-matjari-theme="light"] :is(body,.mtj-site,.mtj-main,.mtj-page,.mtj-single,.mtj-page-section,.mtj-page-content,.mtj-content-narrow) {
    background-color: var(--mtj-content-bg);
    color: var(--mtj-content-text);
}

html[data-matjari-theme="light"] .mtj-page-header {
    background:
        radial-gradient(circle at 88% 12%, rgba(109,75,211,.08), transparent 30%),
        radial-gradient(circle at 12% 0%, rgba(8,127,158,.08), transparent 27%),
        linear-gradient(135deg, #ffffff, #eef5fd);
    color: var(--mtj-content-text);
    border-color: var(--mtj-content-border);
}

html[data-matjari-theme="light"] :is(.mtj-card,.mtj-empty) {
    background: #ffffff;
    color: var(--mtj-content-text);
    border-color: var(--mtj-content-border);
    box-shadow: 0 14px 34px var(--mtj-content-shadow);
}

/* The footer remains part of daylight mode instead of becoming a navy island. */
html[data-matjari-theme="light"] .mtj-footer {
    background:
        radial-gradient(circle at 8% 0%, rgba(8,127,158,.08), transparent 28%),
        linear-gradient(135deg, #edf5fd, #f7effb);
    color: var(--mtj-content-text);
    border-top: 1px solid var(--mtj-content-border);
}

html[data-matjari-theme="light"] .mtj-footer :is(h1,h2,h3,h4,strong,b,a) {
    color: var(--mtj-content-text);
}

html[data-matjari-theme="light"] .mtj-footer :is(p,small,span) {
    color: var(--mtj-content-muted);
}

/* Generic Builder patterns remain light-mode aware. The canonical storefront
 * homepage owns its premium palette in Builder Pro storefront-home.css. */
html[data-matjari-theme="light"] .mtjbp-marketplace-lead[data-has-media="0"],
html[data-matjari-theme="light"] body:not(.matjari-electronics-home) .mtjbp-hero-slider {
    background:
        radial-gradient(circle at 16% 18%, rgba(8,127,158,.16), transparent 34%),
        radial-gradient(circle at 88% 10%, rgba(109,75,211,.14), transparent 32%),
        linear-gradient(135deg, #eef7ff, #f8f1ff 58%, #fff8e8);
    color: var(--mtj-content-text);
    border-color: #cbdbea;
    box-shadow: 0 24px 64px rgba(37,55,84,.14);
}

html[data-matjari-theme="light"] body:not(.matjari-electronics-home) .mtjbp-hero-slide .mtjbp-marketing-media::after {
    background: linear-gradient(90deg, rgba(255,255,255,.22) 0%, rgba(255,255,255,.72) 48%, rgba(248,251,255,.96) 100%);
}

html[data-matjari-theme="light"] body:not(.matjari-electronics-home) .mtjbp-hero-slide .mtjbp-marketing-content,
html[data-matjari-theme="light"] body:not(.matjari-electronics-home) .mtjbp-hero-slide .mtjbp-marketing-content h2 {
    color: var(--mtj-content-text);
    text-shadow: none;
}

html[data-matjari-theme="light"] body:not(.matjari-electronics-home) .mtjbp-hero-slide .mtjbp-marketing-content p {
    color: #45566f;
}

html[data-matjari-theme="light"] body:not(.matjari-electronics-home) .mtjbp-hero-slide .mtjbp-marketing-btn {
    background: linear-gradient(135deg, #f3c94d, #ffd978);
    color: #3d2b00;
    border-color: #d7aa2d;
}

html[data-matjari-theme="light"] body:not(.matjari-electronics-home) .mtjbp-hero-slide .mtjbp-marketing-link {
    background: rgba(255,255,255,.86);
    color: #245fbd;
    border-color: #9ab8df;
}

html[data-matjari-theme="light"] body:not(.matjari-electronics-home) .mtjbp-hero-slider :is(.mtjbp-slider-prev,.mtjbp-slider-next) {
    background: rgba(255,255,255,.92);
    color: #245fbd;
    border-color: #b9cde5;
    box-shadow: 0 8px 20px rgba(37,55,84,.12);
}

html[data-matjari-theme="light"] .mtjbp-pattern-ticker {
    background: linear-gradient(90deg, #e7f5fb, #f1ecff, #fff4d8);
    color: var(--mtj-content-text);
    border-color: var(--mtj-content-border);
}

html[data-matjari-theme="light"] .mtjbp-pattern-ticker :is(a,span,strong,b) {
    color: var(--mtj-content-text);
    text-shadow: none;
}

html[data-matjari-theme="light"] .mtjbp-pattern-cta {
    background:
        radial-gradient(circle at 85% 20%, rgba(109,75,211,.10), transparent 34%),
        linear-gradient(135deg, #edf5ff, #fbf0f8);
    color: var(--mtj-content-text);
    border-color: var(--mtj-content-border);
}

html[data-matjari-theme="light"] .mtjbp-pattern-cta :is(h1,h2,h3,p,a,span,strong) {
    color: inherit;
    text-shadow: none;
}

html[data-matjari-theme="light"] :is(
    .mtjbp-pattern-hero--edc,
    .mtjbp-pattern-hero--marketplace,
    .mtjbp-pattern-section--black,
    .mtjbp-pattern-ticker--dark
) {
    background:
        radial-gradient(circle at 84% 14%, rgba(109,75,211,.11), transparent 32%),
        radial-gradient(circle at 14% 0%, rgba(8,127,158,.11), transparent 29%),
        linear-gradient(135deg, #edf6ff, #f7f0fb 60%, #fff7e5);
    color: var(--mtj-content-text);
    border-color: var(--mtj-content-border);
}

html[data-matjari-theme="light"] :is(
    .mtjbp-pattern-hero--edc,
    .mtjbp-pattern-hero--marketplace,
    .mtjbp-pattern-section--black,
    .mtjbp-pattern-ticker--dark
) :is(h1,h2,h3,h4,p,a,span,strong,b,small) {
    color: inherit;
    text-shadow: none;
}

html[data-matjari-theme="light"] .mtjbp-structural-background.is-slideshow::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: rgba(255,255,255,.58);
}

/* Product and checkout journey: replace every fixed navy sales panel. */
html[data-matjari-theme="light"] .mtj-product-sale {
    --mtj208-bg: #f6f8fb;
    --mtj208-surface: #ffffff;
    --mtj208-ink: #172033;
    --mtj208-muted: #5b6474;
    --mtj208-line: #d5deea;
    --mtj208-primary: #245fbd;
    --mtj208-sale: #b31632;
    --mtj208-green: #147a52;
    --mtj208-orange: #b94f17;
    color-scheme: light;
}

html[data-matjari-theme="light"] .mtj-product-sale-gallery-frame {
    background: linear-gradient(145deg, #e8f2fb, #f3ecfb);
    box-shadow: 0 26px 62px rgba(37,55,84,.15);
}

html[data-matjari-theme="light"] .mtj-product-sale-marquee {
    background: linear-gradient(90deg, #e5f5fa, #ede9ff, #fff2d3);
    color: #17324d;
    border-block: 1px solid #cadbea;
}

html[data-matjari-theme="light"] .mtj-product-sale-marquee b {
    color: #a12b40;
}

html[data-matjari-theme="light"] .mtj-product-sale-deal-board {
    background:
        radial-gradient(circle at 90% 8%, rgba(109,75,211,.10), transparent 34%),
        linear-gradient(145deg, #edf5ff, #f7effb);
    color: #172033;
    border: 1px solid #cbdbea;
    box-shadow: 0 18px 44px rgba(37,55,84,.11);
}

html[data-matjari-theme="light"] .mtj-product-sale-deal-board :is(h2,h3,h4,strong,b,span,small) {
    color: #172033;
}

html[data-matjari-theme="light"] .mtj-product-sale-countdown > small {
    color: #a12b40;
}

html[data-matjari-theme="light"] .mtj-product-sale-countdown span {
    background: #ffffff;
    color: #17324d;
    border-color: #c7d8ea;
}

html[data-matjari-theme="light"] .mtj-product-sale-plan {
    background: #ffffff;
    color: #17324d;
    border-color: #c7d8ea;
    box-shadow: 0 8px 20px rgba(37,55,84,.07);
}

html[data-matjari-theme="light"] .mtj-product-sale-plan small {
    color: #147a52;
}

html[data-matjari-theme="light"] .mtj-product-sale-plan.active {
    background: linear-gradient(135deg, #e3efff, #eee8ff);
    color: #17324d;
    border-color: #7ca4d5;
    box-shadow: 0 12px 28px rgba(36,95,189,.14);
}

html[data-matjari-theme="light"] .mtj-product-sale-trust-band {
    background: linear-gradient(90deg, #e7f8f0, #e9f6fb);
    color: #17324d;
    border-block: 1px solid #b9ddce;
}

html[data-matjari-theme="light"] .mtj-product-sale-trust-band :is(h1,h2,h3,h4,p,span,strong,b,small) {
    color: #17324d;
}

html[data-matjari-theme="light"] .mtj-product-sale-showcase {
    background: linear-gradient(135deg, #eef5fd, #f8f1fb);
    color: #172033;
}

html[data-matjari-theme="light"] .mtj-product-sale-showcase :is(h1,h2,h3,h4,p,span,strong,b,small) {
    color: #172033;
}

html[data-matjari-theme="light"] .mtj-product-sale-sticky {
    background: rgba(255,255,255,.96);
    color: #172033;
    border-color: #c7d8ea;
    box-shadow: 0 20px 55px rgba(37,55,84,.18);
    backdrop-filter: blur(14px);
}

html[data-matjari-theme="light"] .mtj-product-sale-sticky :is(b,strong,span) {
    color: #172033;
}

html[data-matjari-theme="light"] .mtj-product-sale-sticky strong {
    color: #a12b40;
}

html[data-matjari-theme="light"] .mtj-product-sale-sticky button {
    background: linear-gradient(135deg, #2d70d0, #7352cf);
    color: #ffffff;
    border: 0;
}

html[data-matjari-theme="light"] .mtj-product-sale :is(
    .mtj-product-sale-order-card,
    .mtj-product-sale-proof-bar article,
    .mtj-product-sale-addon-preview,
    .mtj-product-sale-receipt,
    .mtj-product-sale-carousel article,
    .mtj-product-faq-faq,
    .mtj-product-faq-faq-list details,
    .mtj-product-review-review-card
) {
    background-color: #ffffff;
    color: #172033;
    border-color: #d5deea;
}

html[data-matjari-theme="light"] .mtj-product-sale-addon-zone {
    background: linear-gradient(135deg, #edf5ff, #f5f1ff);
    color: #172033;
    border-color: #c6d8ef;
}

html[data-matjari-theme="light"] .mtj-product-sale :is(input,select,textarea) {
    background: #ffffff;
    color: #172033;
    border-color: #c7d8ea;
}

html[data-matjari-theme="light"] .mtj-product-sale :is(input,textarea)::placeholder {
    color: #6a7788;
    opacity: 1;
}

/* Product images stay neutral and accurate, not grey or colour-tinted. */
html[data-matjari-theme="light"] .mtj-product-sale :is(
    .mtj-product-sale-main-media,
    .mtj-product-sale-thumb,
    .mtj-product-sale-product-grid .image
) {
    background: #ffffff;
    border-color: #d5deea;
}


/*
 * MATJARI storefront colour-mode bridge ().
 * Unifies classic templates, Gutenberg content and Builder Pro internal pages
 * with the explicit data-matjari-theme switch. Saved per-block custom colours
 * still win because this file supplies inherited defaults rather than replacing
 * block-level custom properties.
 */

html[data-matjari-theme="light"] {
    color-scheme: light;
}

html[data-matjari-theme="dark"] {
    color-scheme: dark;
}

html[data-matjari-theme] body.matjari-global-storefront-skin,
html[data-matjari-theme] body.matjari-global-storefront-skin :where(
    .mtj-site,
    .mtj-main,
    .site-main,
    main,
    .mtj-page,
    .mtj-single,
    .mtj-page-section,
    .mtj-page-content,
    .mtj-content-narrow,
    .mtj-builder-pro-page-runtime,
    .matjari-page-rendered
) {
    background-color: var(--mtj-store-bg, var(--mtj-content-bg));
    color: var(--mtj-store-text, var(--mtj-content-text));
    border-color: var(--mtj-store-border, var(--mtj-content-border));
}

/* Inner pages use the same unified dark background contract. */
html[data-matjari-theme="dark"] body.matjari-global-storefront-skin :where(
    .mtj-main,
    .site-main,
    main,
    .mtj-page-content,
    .mtj-content-narrow,
    .mtj-builder-pro-page-runtime
) {
    background-color: var(--mtj-store-bg, #04131c);
    color: var(--mtj-store-text, #f8fbff);
}

html[data-matjari-theme] .mtj-page-content > .mtj-builder-pro-page-runtime,
html[data-matjari-theme] .mtj-builder-pro-page-runtime > .mtjbp-document {
    width: 100%;
    max-width: none;
    background: var(--mtj-store-bg, var(--mtj-content-bg));
}

/* --------------------------------------------------------------------------
 * Builder Pro: mode-aware inherited defaults
 * ----------------------------------------------------------------------- */

html[data-matjari-theme="light"] .mtjbp-document {
    --mtj-page: var(--mtj-store-bg, #f4f8fa);
    --mtj-surface: var(--mtj-store-surface, #ffffff);
    --mtj-surface-alt: var(--mtj-store-surface-alt, #eaf2f5);
    --mtj-surface-2: var(--mtj-store-surface-alt, #eaf2f5);
    --mtj-surface-3: color-mix(in srgb, var(--mtj-store-surface-alt, #eaf2f5) 72%, var(--mtj-store-surface, #ffffff));
    --mtj-soft: var(--mtj-store-soft, #e8f7f8);
    --mtj-ink: var(--mtj-store-text, #10212b);
    --mtj-text: var(--mtj-store-text, #10212b);
    --mtj-muted: var(--mtj-store-muted, #607783);
    --mtj-line: var(--mtj-store-border, #d5e2e7);
    --mtj-accent: var(--mtj-store-primary, #087f8c);
    --mtj-accent-strong: var(--mtj-store-primary-hover, #066774);
    --mtj-shadow-sm: 0 1px 2px rgba(16, 33, 43, .06);
    --mtj-shadow-md: 0 14px 38px rgba(16, 33, 43, .11);
    --mtj-shadow: var(--mtj-shadow-md);
    color-scheme: light;
    background: var(--mtj-page);
    color: var(--mtj-text);
}

html[data-matjari-theme="dark"] .mtjbp-document {
    --mtj-page: var(--mtj-store-bg, #04131c);
    --mtj-surface: var(--mtj-store-surface, #08202d);
    --mtj-surface-alt: var(--mtj-store-surface-alt, #0b3442);
    --mtj-surface-2: var(--mtj-store-surface-alt, #0b3442);
    --mtj-surface-3: color-mix(in srgb, var(--mtj-store-surface-alt, #0b3442) 78%, var(--mtj-store-surface, #08202d));
    --mtj-soft: var(--mtj-store-soft, var(--mtj-store-surface-alt, #0b3442));
    --mtj-ink: var(--mtj-store-text, #f8fbff);
    --mtj-text: var(--mtj-store-text, #f8fbff);
    --mtj-muted: var(--mtj-store-muted, #a8c0cc);
    --mtj-line: var(--mtj-store-border, #1a5368);
    --mtj-accent: var(--mtj-store-primary, #19b6c9);
    --mtj-accent-strong: var(--mtj-store-primary-hover, #0f96aa);
    --mtj-danger: #ff8b9a;
    --mtj-success: #65d69a;
    --mtj-shadow-sm: 0 1px 2px rgba(0, 0, 0, .24);
    --mtj-shadow-md: 0 18px 44px rgba(0, 0, 0, .36);
    --mtj-shadow: var(--mtj-shadow-md);
    color-scheme: dark;
    background: var(--mtj-page);
    color: var(--mtj-text);
}

/* Component defaults. Inline values saved by Builder Pro remain authoritative. */
html[data-matjari-theme="dark"] .mtjbp-document {
    --mtjbp-carousel-arrow-bg: var(--mtj-surface);
    --mtjbp-carousel-arrow-color: var(--mtj-ink);
    --mtjbp-carousel-dot: var(--mtj-line);
    --mtjbp-carousel-dot-active: var(--mtj-accent);

    --mtjbp-faq-title-color: var(--mtj-ink);
    --mtjbp-faq-subtitle-color: var(--mtj-muted);
    --mtjbp-faq-item-bg: var(--mtj-surface);
    --mtjbp-faq-item-active-bg: var(--mtj-surface-2);
    --mtjbp-faq-border-color: var(--mtj-line);
    --mtjbp-faq-question-color: var(--mtj-ink);
    --mtjbp-faq-question-active: var(--mtj-accent);
    --mtjbp-faq-icon-color: var(--mtj-muted);
    --mtjbp-faq-icon-active: var(--mtj-accent);
    --mtjbp-faq-answer-color: var(--mtj-muted);

    --mtjbp-posts-heading-color: var(--mtj-ink);
    --mtjbp-posts-subtitle-color: var(--mtj-muted);
    --mtjbp-posts-card-bg: var(--mtj-surface);
    --mtjbp-posts-card-border-color: var(--mtj-line);
    --mtjbp-posts-hover-border: color-mix(in srgb, var(--mtj-accent) 48%, var(--mtj-line));
    --mtjbp-posts-meta-color: var(--mtj-muted);
    --mtjbp-posts-link-color: var(--mtj-accent);
    --mtjbp-posts-title-color: var(--mtj-ink);
    --mtjbp-posts-excerpt-color: var(--mtj-muted);
    --mtjbp-posts-link-hover: var(--mtj-accent-strong);

    --mtjbp-icon-primary: var(--mtj-accent);
    --mtjbp-icon-secondary: var(--mtj-surface);
    --mtjbp-icon-box-primary: var(--mtj-accent);
    --mtjbp-icon-box-secondary: var(--mtj-surface);
    --mtjbp-icon-box-title-color: var(--mtj-ink);
    --mtjbp-icon-box-description-color: var(--mtj-muted);

    --mtjbp-testimonial-border-color: var(--mtj-line);
    --mtjbp-testimonial-bg: var(--mtj-surface);
    --mtjbp-testimonial-color: var(--mtj-text);
    --mtjbp-testimonial-hover-border: color-mix(in srgb, var(--mtj-accent) 45%, var(--mtj-line));
    --mtjbp-testimonial-name-color: var(--mtj-ink);
    --mtjbp-testimonial-role-color: var(--mtj-muted);
    --mtjbp-testimonial-verified: var(--mtj-success);
    --mtjbp-testimonial-rating: #f6b93b;
    --mtjbp-testimonial-quote: color-mix(in srgb, var(--mtj-accent) 30%, transparent);

    --mtjbp-trust-border-color: var(--mtj-line);
    --mtjbp-trust-card-bg: var(--mtj-surface);
    --mtjbp-trust-hover-border: color-mix(in srgb, var(--mtj-accent) 45%, var(--mtj-line));
    --mtjbp-trust-hover-bg: var(--mtj-surface-2);
    --mtjbp-trust-icon-color: var(--mtj-accent);
    --mtjbp-trust-icon-bg: color-mix(in srgb, var(--mtj-accent) 14%, var(--mtj-surface));
    --mtjbp-trust-title: var(--mtj-ink);
    --mtjbp-trust-text: var(--mtj-muted);

    --mtjbp-product-title: var(--mtj-ink);
    --mtjbp-product-meta: var(--mtj-muted);
    --mtjbp-product-card-bg: var(--mtj-surface);
    --mtjbp-product-border-color: var(--mtj-line);
    --mtjbp-product-excerpt: var(--mtj-muted);
    --mtjbp-product-button-bg: var(--mtj-accent);
    --mtjbp-product-button-hover-bg: var(--mtj-accent-strong);
    --mtjbp-product-button-color: var(--mtj-store-on-primary, #ffffff);
    --mtjbp-product-button-hover-color: var(--mtj-store-on-primary, #ffffff);
    --mtjbp-product-price: var(--mtj-accent);

    --mtjbp-countdown-bg: color-mix(in srgb, var(--mtj-accent) 10%, var(--mtj-surface));
    --mtjbp-countdown-eyebrow: var(--mtj-accent);
    --mtjbp-countdown-title: var(--mtj-ink);
    --mtjbp-countdown-unit-bg: var(--mtj-surface);
    --mtjbp-countdown-unit-border: var(--mtj-line);
    --mtjbp-countdown-digit: var(--mtj-ink);
    --mtjbp-countdown-label: var(--mtj-muted);
    --mtjbp-countdown-separator: var(--mtj-accent);

    --mtjbp-cta-bg: var(--mtj-surface);
    --mtjbp-cta-border-color: var(--mtj-line);
    --mtjbp-cta-eyebrow: var(--mtj-accent);
    --mtjbp-cta-title: var(--mtj-ink);
    --mtjbp-cta-description: var(--mtj-muted);
    --mtjbp-cta-primary-bg: var(--mtj-accent);
    --mtjbp-cta-primary-hover-bg: var(--mtj-accent-strong);
    --mtjbp-cta-primary-color: var(--mtj-store-on-primary, #ffffff);
    --mtjbp-cta-primary-hover-color: var(--mtj-store-on-primary, #ffffff);
    --mtjbp-cta-secondary-color: var(--mtj-ink);
    --mtjbp-cta-secondary-bg: transparent;
    --mtjbp-cta-secondary-border: var(--mtj-line);
    --mtjbp-cta-secondary-hover-color: var(--mtj-ink);
    --mtjbp-cta-secondary-hover-bg: var(--mtj-surface-2);

    --mtjbp-progress-title-color: var(--mtj-ink);
    --mtjbp-progress-background: var(--mtj-surface-3);
    --mtjbp-progress-bar-color: var(--mtj-accent);
    --mtjbp-progress-inline-color: var(--mtj-store-on-primary, #ffffff);
    --mtjbp-rating-unmarked-color: var(--mtj-line);
    --mtjbp-rating-marked-color: #f6b93b;

    --mtjbp-social-primary: var(--mtj-accent);
    --mtjbp-social-secondary: var(--mtj-surface);
    --mtjbp-social-border-color: var(--mtj-line);

    --mtjbp-ticker-bg: var(--mtj-surface-alt);
    --mtjbp-ticker-color: var(--mtj-ink);
    --mtjbp-ticker-hover: var(--mtj-accent);
    --mtjbp-ticker-icon: var(--mtj-accent);

    --mtjbp-image-carousel-caption-color: var(--mtj-muted);
    --mtjbp-image-carousel-border-color: var(--mtj-line);
    --mtjbp-gallery-caption-color: var(--mtj-muted);
}

html[data-matjari-theme="dark"] .mtjbp-document :where(
    .mtjbp-pattern-section--minimal,
    .mtjbp-pattern-section--conversion,
    .mtjbp-pattern-section--social,
    .mtjbp-pattern-section--faq,
    .mtjbp-pattern-featured-product,
    .mtjbp-term-card.is-style-tile,
    .mtjbp-featured-product
) {
    background: var(--mtj-surface);
    color: var(--mtj-text);
    border-color: var(--mtj-line);
}

html[data-matjari-theme="dark"] .mtjbp-document .mtjbp-pattern-section:nth-of-type(even) {
    background: var(--mtj-surface-alt);
}

html[data-matjari-theme="dark"] .mtjbp-document :where(
    .mtjbp-post-media,
    .mtjbp-product-media,
    .mtjbp-image-carousel-media,
    .mtjbp-image-gallery-placeholder,
    .mtjbp-image-carousel-placeholder,
    .mtjbp-video-placeholder,
    .mtjbp-product-showcase-placeholder,
    .mtjbp-product-image-placeholder,
    .mtjbp-cta-media.is-placeholder,
    .mtjbp-banner-empty,
    .mtjbp-trust-empty,
    .mtjbp-social-icons-placeholder
) {
    background: var(--mtj-surface-2);
    color: var(--mtj-muted);
    border-color: var(--mtj-line);
}

html[data-matjari-theme="dark"] .mtjbp-document :where(
    .mtjbp-image-gallery-placeholder strong,
    .mtjbp-image-carousel-placeholder strong,
    .mtjbp-video-placeholder strong,
    .mtjbp-product-showcase-placeholder strong,
    .mtjbp-image-placeholder-title
) {
    color: var(--mtj-ink);
}

html[data-matjari-theme="dark"] .mtjbp-document :where(
    .mtjbp-image-gallery-placeholder span,
    .mtjbp-image-carousel-placeholder span,
    .mtjbp-video-placeholder span,
    .mtjbp-product-showcase-placeholder span,
    .mtjbp-image-placeholder-icon
) {
    color: var(--mtj-accent);
}

html[data-matjari-theme="dark"] .mtjbp-document :where(
    .mtjbp-banner-grid .mtjbp-carousel-arrow,
    .mtjbp-trust-bar .mtjbp-carousel-arrow,
    .mtjbp-carousel-arrow
) {
    background: var(--mtj-surface);
    color: var(--mtj-ink);
    border-color: var(--mtj-line);
    box-shadow: var(--mtj-shadow-sm);
}

html[data-matjari-theme="dark"] .mtjbp-document :where(
    .mtjbp-banner-grid .mtjbp-carousel-dots button,
    .mtjbp-trust-bar .mtjbp-carousel-dots button,
    .mtjbp-carousel-dots button
) {
    background: var(--mtj-line);
}

html[data-matjari-theme="dark"] .mtjbp-document :where(
    .mtjbp-banner-grid .mtjbp-carousel-dots button.is-active,
    .mtjbp-trust-bar .mtjbp-carousel-dots button.is-active,
    .mtjbp-carousel-dots button.is-active
) {
    background: var(--mtj-accent);
}

html[data-matjari-theme="dark"] .mtjbp-document :where(
    .mtjbp-testimonials-heading p,
    .mtjbp-product-body p,
    .mtjbp-card-stock,
    .mtjbp-term-card p,
    .mtjbp-product-price del,
    .mtjbp-product-showcase-placeholder small
) {
    color: var(--mtj-muted);
}

html[data-matjari-theme="dark"] .mtjbp-document .mtjbp-testimonial-avatar {
    background: color-mix(in srgb, var(--mtj-accent) 14%, var(--mtj-surface));
    color: var(--mtj-accent);
}

html[data-matjari-theme="dark"] .mtjbp-document :where(input, select, textarea) {
    background-color: var(--mtj-surface);
    color: var(--mtj-ink);
    border-color: var(--mtj-line);
}

html[data-matjari-theme="dark"] .mtjbp-document :where(input, textarea)::placeholder {
    color: var(--mtj-muted);
    opacity: 1;
}

/* Builder preview editor chrome is emitted after block CSS. A source-level
 * selector keeps the selected preview mode authoritative without forced rules. */
html[data-matjari-theme="dark"].matjari-theme-ready body .mtjbp-canvas-tools {
    background: var(--mtj-store-surface, #08202d);
    color: var(--mtj-store-text, #f8fbff);
    border-color: var(--mtj-store-border, #1a5368);
}

html[data-matjari-theme="dark"].matjari-theme-ready body .mtjbp-canvas-tools button {
    background: var(--mtj-store-surface-alt, #0b3442);
    color: var(--mtj-store-text, #f8fbff);
    border-color: var(--mtj-store-border, #1a5368);
}


/* --------------------------------------------------------------------------
 * Product Experience progressive dark fallback
 * -----------------------------------------------------------------------
 * The server normally prints a valid product tone and theme.js synchronises it
 * with the global storefront tone. These base tokens keep the entire purchase
 * journey dark even before JavaScript runs, when cached markup contains an old
 * tone value, or when a third-party optimiser delays the runtime script.
 */
html[data-matjari-theme="dark"] .mtj-product-sale {
    --mtj208-bg: var(--mtj-store-bg, #04131c);
    --mtj208-surface: var(--mtj-store-surface, #08202d);
    --mtj208-ink: var(--mtj-store-text, #f8fbff);
    --mtj208-muted: var(--mtj-store-muted, #a8c0cc);
    --mtj208-line: var(--mtj-store-border, #1a5368);
    --mtj208-primary: var(--mtj-store-primary, #19b6c9);
    --mtj208-sale: var(--mtj-store-accent, #ff9f1c);
    --mtj208-sales-accent: var(--mtj-store-primary, #19b6c9);
    --mtj208-offers-bg: var(--mtj-store-surface-alt, #0b2b39);
    --mtj208-featured: var(--mtj-store-accent, #ff8a00);
    --mtj208-featured-text: var(--mtj-store-on-primary, #17120a);
    --mtj208-headline: var(--mtj-store-accent, #ffd166);
    --mtj208-ticker-bg: color-mix(in srgb, var(--mtj-store-bg, #04131c) 78%, #000);
    --mtj208-ticker-text: var(--mtj-store-text, #f7e7b7);
    --mtj-tone-glow-1: color-mix(in srgb, var(--mtj-store-primary, #19b6c9) 38%, transparent);
    --mtj-tone-glow-2: color-mix(in srgb, var(--mtj-store-accent, #ff9f1c) 20%, transparent);
    --mtj-tone-panel: color-mix(in srgb, var(--mtj-store-bg, #04131c) 84%, #000);
    --mtj-tone-panel-2: var(--mtj-store-surface-alt, #0b3442);
    --mtj-tone-hero-1: var(--mtj-store-bg, #04131c);
    --mtj-tone-hero-2: color-mix(in srgb, var(--mtj-store-primary, #19b6c9) 32%, var(--mtj-store-bg, #04131c));
    --mtj-tone-hero-3: color-mix(in srgb, var(--mtj-store-primary, #19b6c9) 58%, var(--mtj-store-bg, #04131c));
    --mtj-tone-cta-1: var(--mtj-store-accent, #ff8a00);
    --mtj-tone-cta-2: color-mix(in srgb, var(--mtj-store-accent, #ff8a00) 60%, #ffd166);
    --mtj-tone-cta-ink: var(--mtj-store-on-primary, #17120a);
    background-color: var(--mtj208-bg);
    color: var(--mtj208-ink);
}

html[data-matjari-theme="dark"] .mtj-product-sale :where(
    .mtj-product-sale-order-card,
    .mtj-product-sale-receipt,
    .mtj-product-sale-addon-preview,
    .mtj-product-sale-addon-zone,
    .mtj-product-sale-price-stage,
    .mtj-product-sale-proof-bar article,
    .mtj-product-sale-benefits > div,
    .mtj-product-sale-carousel article,
    .mtj-product-sale-product-grid article,
    .mtj-product-faq-faq-list details,
    .mtj-product-review-review-card,
    .mtj-product-review-review-empty
) {
    color: var(--mtj208-ink);
    border-color: var(--mtj208-line);
}

html[data-matjari-theme="dark"] .mtj-product-sale :where(
    .mtj-product-sale-order-card,
    .mtj-product-sale-addon-preview,
    .mtj-product-sale-proof-bar article,
    .mtj-product-sale-benefits > div,
    .mtj-product-sale-carousel article,
    .mtj-product-sale-product-grid article,
    .mtj-product-faq-faq-list details,
    .mtj-product-review-review-card,
    .mtj-product-review-review-empty
) {
    background-color: var(--mtj208-surface);
}

html[data-matjari-theme="dark"] .mtj-product-sale :where(input, select, textarea) {
    background-color: color-mix(in srgb, var(--mtj208-surface) 86%, #000);
    color: var(--mtj208-ink);
    border-color: var(--mtj208-line);
}

html[data-matjari-theme="dark"] .mtj-product-sale :where(input, textarea)::placeholder {
    color: var(--mtj208-muted);
    opacity: 1;
}

/* --------------------------------------------------------------------------
 * Gutenberg and classic WordPress content
 * ----------------------------------------------------------------------- */

html[data-matjari-theme] :where(.mtj-page-content, .mtj-content-narrow) :where(
    .wp-block-group,
    .wp-block-columns,
    .wp-block-column,
    .wp-block-media-text,
    .wp-block-query,
    .wp-block-post-template > li,
    .wp-block-latest-posts > li,
    .wp-block-comments,
    .comment-body,
    details,
    dialog
) {
    color: inherit;
    border-color: var(--mtj-content-border);
}

html[data-matjari-theme="dark"] :where(.mtj-page-content, .mtj-content-narrow) :where(
    .has-matjari-white-background-color,
    .has-matjari-light-background-color,
    .has-white-background-color,
    .has-base-background-color
) {
    background-color: var(--mtj-content-surface);
}

html[data-matjari-theme="dark"] :where(.mtj-page-content, .mtj-content-narrow) :where(
    .has-matjari-black-color,
    .has-black-color,
    .has-contrast-color
) {
    color: var(--mtj-content-text);
}

html[data-matjari-theme="dark"] :where(.mtj-page-content, .mtj-content-narrow) :where(
    .wp-block-search__input,
    .wp-block-post-comments-form input:not([type="submit"]),
    .wp-block-post-comments-form textarea,
    .comment-form input:not([type="submit"]),
    .comment-form textarea,
    select
) {
    background: var(--mtj-content-surface);
    color: var(--mtj-content-text);
    border-color: var(--mtj-content-border);
}

html[data-matjari-theme="dark"] :where(.mtj-page-content, .mtj-content-narrow) :where(
    .wp-block-table.is-style-stripes tbody tr:nth-child(odd),
    table tbody tr:nth-child(odd)
) {
    background-color: color-mix(in srgb, var(--mtj-content-surface-2) 72%, transparent);
}

html[data-matjari-theme="dark"] :where(.mtj-page-content, .mtj-content-narrow) :where(
    .wp-block-button__link:not(.has-background),
    .wp-block-search__button,
    .wp-block-post-comments-form input[type="submit"],
    .comment-form input[type="submit"]
) {
    background-color: var(--mtj-store-primary);
    color: var(--mtj-store-on-primary);
    border-color: transparent;
}

html[data-matjari-theme="dark"] :where(.mtj-page-content, .mtj-content-narrow) :where(
    .wp-block-button.is-style-outline .wp-block-button__link,
    .is-style-outline > .wp-block-button__link
) {
    background: transparent;
    color: var(--mtj-content-accent);
    border-color: currentColor;
}


/* Older Gutenberg pages may store default white/black colours inline rather
 * than as palette classes. Limit the repair to structural content blocks and
 * retain an explicit preserve-colours escape hatch for intentional artwork. */
html[data-matjari-theme="dark"] :where(.mtj-page-content, .mtj-content-narrow) :where(
    .wp-block-group,
    .wp-block-column,
    .wp-block-media-text,
    .wp-block-query,
    .wp-block-post-template > li
):not(.mtj-preserve-colors):not([data-mtj-preserve-colors]):not(.mtj-preserve-colors *):not([data-mtj-preserve-colors] *)[style*="background-color: #fff" i],
html[data-matjari-theme="dark"] :where(.mtj-page-content, .mtj-content-narrow) :where(
    .wp-block-group,
    .wp-block-column,
    .wp-block-media-text,
    .wp-block-query,
    .wp-block-post-template > li
):not(.mtj-preserve-colors):not([data-mtj-preserve-colors]):not(.mtj-preserve-colors *):not([data-mtj-preserve-colors] *)[style*="background-color:#fff" i],
html[data-matjari-theme="dark"] :where(.mtj-page-content, .mtj-content-narrow) :where(
    .wp-block-group,
    .wp-block-column,
    .wp-block-media-text,
    .wp-block-query,
    .wp-block-post-template > li
):not(.mtj-preserve-colors):not([data-mtj-preserve-colors]):not(.mtj-preserve-colors *):not([data-mtj-preserve-colors] *)[style*="rgb(255, 255, 255)" i] {
    background-color: var(--mtj-content-surface);
    border-color: var(--mtj-content-border);
}

html[data-matjari-theme="dark"] :where(.mtj-page-content, .mtj-content-narrow) :where(
    h1,h2,h3,h4,h5,h6,p,li,figcaption,summary
):not(.mtj-preserve-colors):not([data-mtj-preserve-colors]):not(.mtj-preserve-colors *):not([data-mtj-preserve-colors] *)[style*="color: #000" i],
html[data-matjari-theme="dark"] :where(.mtj-page-content, .mtj-content-narrow) :where(
    h1,h2,h3,h4,h5,h6,p,li,figcaption,summary
):not(.mtj-preserve-colors):not([data-mtj-preserve-colors]):not(.mtj-preserve-colors *):not([data-mtj-preserve-colors] *)[style*="color:#000" i],
html[data-matjari-theme="dark"] :where(.mtj-page-content, .mtj-content-narrow) :where(
    h1,h2,h3,h4,h5,h6,p,li,figcaption,summary
):not(.mtj-preserve-colors):not([data-mtj-preserve-colors]):not(.mtj-preserve-colors *):not([data-mtj-preserve-colors] *)[style*="rgb(0, 0, 0)" i] {
    color: var(--mtj-content-text);
}

@media (prefers-reduced-motion: reduce) {
    html[data-matjari-theme] *,
    html[data-matjari-theme] *::before,
    html[data-matjari-theme] *::after {
        transition: none;
        animation: none;
    }
}
