/* Shared safe-area geometry. Loaded last by both masters. */
:root {
    --cbs-safe-top: env(safe-area-inset-top, 0px);
    --cbs-safe-bottom: env(safe-area-inset-bottom, 0px);
    --cbs-safe-left: env(safe-area-inset-left, 0px);
    --cbs-safe-right: env(safe-area-inset-right, 0px);
    --cbs-nav-content: 70px;
    --cbs-nav-total: calc(var(--cbs-nav-content) + var(--cbs-safe-bottom));
    --cbs-site-top: calc(70px + var(--cbs-safe-top));
    --cbs-site-small: calc(58px + var(--cbs-safe-top));
    --cbs-public-top: calc(76px + var(--cbs-safe-top));
    --cbs-status-bg: #132637;
}
html[data-mode="dark"] { --cbs-status-bg: #08111d; }
html[data-appearance-mode="colorful"] { --cbs-status-bg: var(--cbs-colorful-deep, #132637); }
html:has(body.site-master-body) {
    --site-header-height: var(--cbs-site-top);
    --site-header-small-height: var(--cbs-site-small);
}
html:has(body.public-master-body) { --public-header-h: var(--cbs-public-top); }
html body.site-master-body { padding-top: var(--cbs-site-top) !important; }
html body.site-master-body.header-scrolled { padding-top: var(--cbs-site-small) !important; }
html body.site-master-body #SiteHeader.site-header {
    top: 0 !important; height: var(--cbs-site-top) !important;
    padding-top: var(--cbs-safe-top) !important;
    padding-left: var(--cbs-safe-left) !important; padding-right: var(--cbs-safe-right) !important;
}
html body.site-master-body.header-scrolled #SiteHeader.site-header { height: var(--cbs-site-small) !important; }
html body.public-master-body { padding-top: var(--cbs-public-top) !important; }
html body.public-master-body .public-header {
    position: fixed !important; top: 0 !important; left: 0 !important; right: 0 !important;
    height: var(--cbs-public-top) !important; box-sizing: border-box !important;
    padding-top: var(--cbs-safe-top) !important;
    padding-left: var(--cbs-safe-left) !important; padding-right: var(--cbs-safe-right) !important;
}
html:has(body.public-master-body) { scroll-padding-top: calc(var(--cbs-public-top) + 12px) !important; }
html:has(body.site-master-body) { scroll-padding-top: calc(var(--cbs-site-top) + 12px) !important; }
/* The status strip is a dedicated layer, not a fake clock or a fixed pixel notch guess. */
#CbsSystemStatusStrip {
    position: fixed; inset: 0 0 auto; height: var(--cbs-safe-top); background: var(--cbs-status-bg);
    z-index: 7000; pointer-events: none;
}
/* Modal content and drawers use the safe rectangle; their dimming overlays may cover the screen. */
html body:is(.public-master-body,.site-master-body) :is(.mobile-drawer,.app-drawer,.app-info-drawer,#CustomerInfoDrawer,#VendorInfoDrawer,#RightDrawer).is-open,
html body:is(.public-master-body,.site-master-body).drawer-open .mobile-drawer {
    top: var(--cbs-safe-top) !important; bottom: var(--cbs-safe-bottom) !important;
    max-height: calc(100dvh - var(--cbs-safe-top) - var(--cbs-safe-bottom)) !important;
}
html body.site-master-body .mobile-drawer { z-index: 50010 !important; overflow-y: auto; }
html body:is(.public-master-body,.site-master-body) #StandardAppearancePanel {
    max-height: calc(100dvh - var(--cbs-safe-top) - var(--cbs-safe-bottom) - 24px) !important;
    overflow-y: auto !important;
}
html body:is(.public-master-body,.site-master-body) :is(.promotion-picker-modal,.digital-statement-modal,.creativity-company-modal) {
    padding-top: max(8px,var(--cbs-safe-top)) !important;
    padding-bottom: max(8px,var(--cbs-safe-bottom)) !important;
    padding-left: max(8px,var(--cbs-safe-left)) !important;
    padding-right: max(8px,var(--cbs-safe-right)) !important;
}
html body:is(.public-master-body,.site-master-body) :is(.promotion-picker-dialog,.digital-statement-dialog,.creativity-company-card) {
    max-height: calc(100dvh - max(8px,var(--cbs-safe-top)) - max(8px,var(--cbs-safe-bottom))) !important;
    max-width: 100% !important;
}
html body.site-master-body .digital-statement-dialog { min-height: 0 !important; }
html body:is(.public-master-body,.site-master-body) #PwaInstallDialog { max-height: calc(100dvh - var(--cbs-safe-top) - var(--cbs-safe-bottom) - 24px) !important; }
/* Phones and tablets, including large iPad landscape. Mouse-first desktop keeps its normal navigation. */
@media (max-width: 1100px), (max-width: 1440px) and (pointer: coarse) {
    :root {
        --cbs-site-top: calc(62px + var(--cbs-safe-top));
        --cbs-site-small: var(--cbs-site-top);
        --cbs-public-top: calc(66px + var(--cbs-safe-top));
    }
    html:has(body.public-master-body) { --public-mobile-header-h: var(--cbs-public-top); --public-mobile-nav-h: var(--cbs-nav-content); }
    html:has(body.site-master-body) { --site-mobile-bottom-height: var(--cbs-nav-content); }
    html body.site-master-body,
    html body.site-master-body:has(.products-page),
    html body.public-master-body.has-mobile-nav {
        padding-bottom: calc(var(--cbs-nav-total) + 12px) !important;
    }
    html:has(body:is(.public-master-body,.site-master-body)) { scroll-padding-bottom: calc(var(--cbs-nav-total) + 12px); }
    html body.site-master-body #SiteHeader .site-header-inner {
        display: grid !important; grid-template-columns: minmax(0,1fr) auto !important;
        grid-template-rows: 1fr; padding: 0 12px !important; gap: 8px !important;
    }
    html body.site-master-body #SiteHeader :is(.site-nav,.site-brand,.header-right-block) { display: none !important; }
    html body.site-master-body #SiteHeader .site-brand-center {
        grid-column: 1; grid-row: 1; display: flex !important; min-width: 0;
        justify-self: start; justify-content: flex-start;
    }
    html body.site-master-body #SiteHeader .site-brand-center-text { align-items: flex-start; text-align: left; }
    html body.site-master-body #SiteHeader .site-brand-center-name { max-width: 100%; }
    html body.site-master-body #SiteHeader .site-right { grid-column: 2; grid-row: 1; }
    html body:is(.public-master-body,.site-master-body) .hamburger-btn { display: inline-block !important; flex-shrink: 0; }
    html body.public-master-body .public-header-inner { display: flex !important; justify-content: space-between !important; align-items: center !important; gap: 8px !important; width: calc(100% - 20px) !important; }
    html body.public-master-body .public-header :is(.public-nav,.public-account-link,.public-customer-chip) { display: none !important; }
    html body.public-master-body .public-header:has(.public-brand-center) .public-brand { display: none !important; }
    html body.public-master-body .public-header:not(:has(.public-brand-center)) .public-brand { display: flex !important; min-width: 0; }
    html body.public-master-body .public-brand-center { display: flex !important; align-items: center; min-width: 0; flex: 1 1 auto; }
    html body.public-master-body .public-brand-center-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    html body.public-master-body .public-right { flex: 0 0 auto; }
    html body.public-master-body.drawer-open :is(.mobile-drawer,.mobile-drawer-overlay) { display: flex !important; }
    html body:is(.site-master-body,.public-master-body) :is(.site-mobile-bottom-nav,.public-mobile-nav):not([hidden]) {
        display: grid !important; grid-template-columns: none !important; grid-auto-flow: column !important;
        grid-auto-columns: minmax(0,1fr) !important; align-items: stretch !important; gap: 3px !important;
        position: fixed !important; inset: auto 0 0 0 !important; width: 100% !important; max-width: none !important;
        box-sizing: border-box !important; height: var(--cbs-nav-total) !important; min-height: var(--cbs-nav-total) !important; max-height: none !important;
        padding: 6px max(8px,var(--cbs-safe-right)) calc(6px + var(--cbs-safe-bottom)) max(8px,var(--cbs-safe-left)) !important;
        margin: 0 !important; border-radius: 0 !important; border: 0 !important;
        border-top: 1px solid var(--theme-border,var(--border,#cbd5e1)) !important;
        background: var(--theme-surface,var(--surface,#fff)) !important;
        color: var(--theme-text,var(--text,#0f172a)) !important;
        box-shadow: 0 -8px 28px rgba(15,23,42,.13) !important;
        transform: none !important; opacity: 1 !important; visibility: visible !important;
        z-index: 1300 !important; overflow: visible !important;
    }
    html body.public-master-body .public-mobile-nav:not([hidden]) { z-index: 6000 !important; }
    html body:is(.public-master-body,.site-master-body) :is(.site-mobile-bottom-nav,.public-mobile-nav) .mobile-nav-item:not([hidden]) {
        display: flex !important; flex-direction: column !important; justify-content: center !important; align-items: center !important;
        position: relative; min-width: 0 !important; min-height: 44px !important; height: auto !important; gap: 3px !important;
        padding: 4px 2px !important; font: inherit; font-size: clamp(10px, 2.7vw, 13px) !important; line-height: 1.15 !important; font-weight: 750 !important;
        border: 0 !important; border-radius: 11px !important; text-decoration: none; text-align: center;
        color: inherit !important; background: transparent !important; cursor: pointer;
    }
    html body:is(.public-master-body,.site-master-body) :is(.site-mobile-bottom-nav,.public-mobile-nav) [hidden] { display: none !important; }
    html body:is(.public-master-body,.site-master-body) :is(.site-mobile-bottom-nav,.public-mobile-nav) .mobile-nav-item.active {
        background: color-mix(in srgb,var(--theme-accent,var(--primary,#1683ff)) 14%,transparent) !important;
        color: var(--theme-text,var(--text,#0f172a)) !important;
    }
    html body:is(.public-master-body,.site-master-body) :is(.site-mobile-bottom-nav,.public-mobile-nav) .mobile-nav-item:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }
    html body:is(.public-master-body,.site-master-body) :is(.site-mobile-bottom-nav,.public-mobile-nav) :is(.nav-icon,.mobile-nav-icon) { display: grid !important; place-items: center; width: 26px !important; height: 26px !important; min-width: 26px !important; }
    html body:is(.public-master-body,.site-master-body) :is(.site-mobile-bottom-nav,.public-mobile-nav) svg { width: 22px !important; height: 22px !important; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
    html body.site-master-body #SiteFooter { display: none !important; }
    /* Keep storefront legal/vendor information at the end of the page, not stacked over navigation. */
    html body.public-master-body .public-footer { position: relative !important; inset: auto !important; transform: none !important; margin: 12px auto 0 !important; }
    html body.site-master-body #ThemeFab { bottom: calc(var(--cbs-nav-total) + 12px) !important; right: max(12px,var(--cbs-safe-right)) !important; }
    html body:is(.public-master-body,.site-master-body) #StandardAppearancePanel { bottom: calc(var(--cbs-nav-total) + 12px) !important; top: auto !important; max-height: calc(100dvh - var(--cbs-safe-top) - var(--cbs-nav-total) - 24px) !important; }
    html body.site-master-body .page-content-wrapper { min-height: calc(100dvh - var(--cbs-site-top) - var(--cbs-nav-total)) !important; }
    html body.public-master-body .public-page-content { min-height: calc(100dvh - var(--cbs-public-top) - var(--cbs-nav-total)) !important; }
}
@media (min-width: 1101px) and (pointer: fine), (min-width: 1441px) {
    html body:is(.site-master-body,.public-master-body) :is(.site-mobile-bottom-nav,.public-mobile-nav) { display: none !important; }
}
/* Colorful mode v2: saturated, contrast-safe chrome and a graded body palette.
   No geometry changes: the safe-area and touch-navigation rules above stay intact. */
html[data-appearance-mode="colorful"] {
    --cbs-colorful-gradient: linear-gradient(110deg,var(--cbs-colorful-top,#17619d),var(--cbs-colorful-end,#102c48));
    --cbs-colorful-page: radial-gradient(ellipse at 12% 0%,var(--cbs-colorful-soft,#dbeafe),transparent 38rem),linear-gradient(155deg,var(--cbs-colorful-bg,#c4dcf5) 0%,var(--cbs-colorful-soft,#dbeafe) 52%,var(--cbs-colorful-card,#f2f7ff) 100%);
    color-scheme: light;
    background: var(--cbs-colorful-bg) !important;
}
html[data-appearance-mode="colorful"] body:is(.site-master-body,.public-master-body) {
    background: var(--cbs-colorful-page) !important;
    color: var(--cbs-colorful-ink) !important;
}
/* Keep the ambient effect from replacing the stronger page gradient with gray. */
html[data-appearance-mode="colorful"] body.site-master-body .wa-ambient { background: transparent !important; }
html[data-appearance-mode="colorful"] body.public-master-body {
    --primary: var(--cbs-colorful-accent); --primary-soft: var(--cbs-colorful-deep);
    --primary-soft2: var(--cbs-colorful-soft); --bg: var(--cbs-colorful-bg); --bg-soft: var(--cbs-colorful-soft);
    --surface: var(--cbs-colorful-card); --surface-2: var(--cbs-colorful-soft);
    --text: var(--cbs-colorful-ink); --text-soft: #475569; --border: var(--cbs-colorful-border);
    --header-bg: var(--cbs-colorful-top); --header-bg-2: var(--cbs-colorful-end); --header-text: #fff;
    --header-soft: #fff; --header-control-bg: rgba(0,0,0,.15); --header-control-hover: rgba(0,0,0,.25);
    --header-control-border: rgba(255,255,255,.32);
    --footer-bg: var(--cbs-colorful-top); --footer-bg-2: var(--cbs-colorful-end); --footer-text: #fff;
    --footer-soft: #fff; --footer-faint: #fff; --footer-border: var(--cbs-colorful-line);
    --mobile-nav-bg: var(--cbs-colorful-top); --mobile-nav-text: #fff;
}
/* An obvious separator under the e-commerce header, in all modes.
   Inset line preserves the existing header box and safe area. */
html body.site-master-body #SiteHeader.site-header {
    border-bottom: 3px solid var(--cbs-colorful-line,var(--theme-accent,var(--wa-accent,#1683ff))) !important;
}
html body.site-master-body #SiteFooter.footer {
    border-top: 3px solid var(--cbs-colorful-line,var(--theme-accent,var(--wa-accent,#1683ff))) !important;
}
html[data-appearance-mode="colorful"] body:is(.site-master-body,.public-master-body) :is(#SiteHeader,.public-header) {
    background: var(--cbs-colorful-gradient) !important; color: #fff !important;
    border-color: var(--cbs-colorful-line) !important;
    box-shadow: 0 10px 28px rgba(15,23,42,.18) !important;
}
html[data-appearance-mode="colorful"] body:is(.site-master-body,.public-master-body) :is(#SiteHeader,.public-header) :is(.site-brand,.header-right-block,.header-search-btn,.vendor-head-name,.vendor-head-sub,.header-user-name,.header-user-sub,.header-login-primary,.site-brand-center-name,.site-brand-center-tagline,.public-brand-center-name,.public-brand-center-tagline,.public-customer-name,.public-customer-label,.public-account-link,.public-nav a,.public-icon-btn,.public-cart-btn,.public-customer-chip,.hamburger-btn) {
    color: #fff !important;
}
html[data-appearance-mode="colorful"] body:is(.site-master-body,.public-master-body) :is(#SiteHeader,.public-header) :is(.site-nav,.header-right-block,.header-search-btn,.public-icon-btn,.public-cart-btn,.public-account-link,.public-customer-chip,.hamburger-btn) {
    background: rgba(0,0,0,.16) !important; border-color: rgba(255,255,255,.28) !important;
    box-shadow: none !important;
}
html[data-appearance-mode="colorful"] body:is(.site-master-body,.public-master-body) :is(#SiteHeader,.public-header) :is(.header-nav-link,.public-nav a) {color:#fff !important;}
html[data-appearance-mode="colorful"] body:is(.site-master-body,.public-master-body) :is(#SiteHeader,.public-header) :is(.header-nav-link,.public-nav a):is(.active,:hover) {
    background: rgba(0,0,0,.24) !important; color: #fff !important; opacity:1 !important;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.35) !important;
}
html[data-appearance-mode="colorful"] body:is(.site-master-body,.public-master-body) :is(#SiteHeader,.public-header) :is(.nav-icon,.search-icon,.public-nav-icon) { color:#fff !important; background:rgba(0,0,0,.18) !important; }
html[data-appearance-mode="colorful"] body.site-master-body #SiteHeader .header-nav-link.active .nav-text {color:#fff !important;}
html[data-appearance-mode="colorful"] body.site-master-body #SiteHeader .header-nav-link.active::after {background:var(--cbs-colorful-line) !important;}
html[data-appearance-mode="colorful"] body:is(.site-master-body,.public-master-body) :is(#SiteHeader,.public-header) .hamburger-btn span { background:#fff !important; }
html[data-appearance-mode="colorful"] body:is(.site-master-body,.public-master-body) :is(#SiteFooter,.public-footer,.site-mobile-bottom-nav,.public-mobile-nav) {
    background: var(--cbs-colorful-gradient) !important;
    color: #fff !important; border-color: var(--cbs-colorful-line) !important;
}
html[data-appearance-mode="colorful"] body:is(.site-master-body,.public-master-body) :is(#SiteFooter,.public-footer) :is(.footer-separator,.public-footer-brand-copy strong,.public-footer-brand-copy span,.public-footer-links a,.public-footer-links button,.public-footer-legal strong,.public-footer-legal div > span,.public-footer-powered strong,.public-footer-powered span,.public-footer-link-icon) {color:#fff !important;}
html[data-appearance-mode="colorful"] body.public-master-body .public-footer .public-footer-powered {background:rgba(0,0,0,.18) !important;border-color:rgba(255,255,255,.25) !important;}
html[data-appearance-mode="colorful"] :is(.public-page-content,.page-content-wrapper) { background-color: transparent !important; }
html[data-appearance-mode="colorful"] :is(.product-card,.glow-card,.info-profile-card,.info-section-card,.wa-rich-card,.category-card,.brand-card) {
    background-color: var(--cbs-colorful-card) !important; border-color: var(--cbs-colorful-border) !important;
}
html[data-appearance-mode="colorful"] :is(.public-page-content,.page-content-wrapper) :is(.category-card,.brand-card,.glow-card) {
    background-image: linear-gradient(145deg,var(--cbs-colorful-card),var(--cbs-colorful-soft)) !important;
}
@media (max-width: 1100px), (max-width: 1440px) and (pointer: coarse) {
    html body.site-master-body .site-mobile-bottom-nav:not([hidden]) { border-top: 3px solid var(--cbs-colorful-line,var(--theme-accent,#1683ff)) !important; }
    html[data-appearance-mode="colorful"] body:is(.site-master-body,.public-master-body) :is(.site-mobile-bottom-nav,.public-mobile-nav):not([hidden]) {border-top:3px solid var(--cbs-colorful-line) !important;}
    html[data-appearance-mode="colorful"] body:is(.site-master-body,.public-master-body) :is(.site-mobile-bottom-nav,.public-mobile-nav) .mobile-nav-item:not([hidden]) {color:#fff !important;background:transparent !important;}
    html[data-appearance-mode="colorful"] body:is(.site-master-body,.public-master-body) :is(.site-mobile-bottom-nav,.public-mobile-nav) .mobile-nav-item:is(.active,.is-open,:hover) {background:rgba(0,0,0,.25) !important;color:#fff !important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.36) !important;}
    html[data-appearance-mode="colorful"] body:is(.site-master-body,.public-master-body) :is(.site-mobile-bottom-nav,.public-mobile-nav) :is(.nav-icon,.mobile-nav-icon) {color:#fff !important;background:transparent !important;}
}

/* Fallback badge styling for branch templates that do not ship the old Public.css. */
html body.public-master-body .public-mobile-nav .public-mobile-cart-count { position:absolute; top:3px; right:12%; min-width:19px; height:19px; padding:0 4px; border-radius:999px; color:#fff; background:#334155; font-size:10px; display:none; align-items:center; justify-content:center; }
html body.public-master-body .public-mobile-nav .public-mobile-cart-count.show { display:inline-flex; }

/* =========================================================
   COLORFUL V3 - scoped chrome foreground contrast
   ThemeFinish resolves Colorful as light for page content. Its chrome
   foreground must not leak into the darker Colorful header/footer.
   The V2 palette already constrains both gradient ends to a luminance
   <= .175 for every accent/strength, so its contrast token is white.
   Preserve the palette, layouts, and non-Colorful modes.
   ========================================================= */
html[data-appearance-mode="colorful"] body:is(.site-master-body,.public-master-body) :is(#SiteHeader,.public-header,#SiteFooter,.public-footer,.site-mobile-bottom-nav,.public-mobile-nav) {
    --wa-rich-chrome-text: var(--cbs-colorful-chrome-ink,#fff) !important;
    --wa-text: var(--cbs-colorful-chrome-ink,#fff) !important;
    --wa-muted: var(--cbs-colorful-chrome-ink,#fff) !important;
    --theme-text: var(--cbs-colorful-chrome-ink,#fff) !important;
    --theme-muted: var(--cbs-colorful-chrome-ink,#fff) !important;
    --header-text: var(--cbs-colorful-chrome-ink,#fff) !important;
    --header-soft: var(--cbs-colorful-chrome-ink,#fff) !important;
    --footer-text: var(--cbs-colorful-chrome-ink,#fff) !important;
    --footer-soft: var(--cbs-colorful-chrome-ink,#fff) !important;
    --footer-faint: var(--cbs-colorful-chrome-ink,#fff) !important;
    --mobile-nav-text: var(--cbs-colorful-chrome-ink,#fff) !important;
    color: var(--cbs-colorful-chrome-ink,#fff) !important;
}
/* Set the actual labels, not just their links: legacy rules set span/svg colors directly. */
html[data-appearance-mode="colorful"] body:is(.site-master-body,.public-master-body) :is(#SiteHeader,.public-header) :is(#HeaderNav,.public-nav,.site-nav) :is(a,button,.nav-text,.nav-label,.nav-icon,.public-nav-icon,.nav-svg,#HeaderCartCount) {
    color: var(--cbs-colorful-chrome-ink,#fff) !important;
    opacity: 1 !important;
}
html[data-appearance-mode="colorful"] body:is(.site-master-body,.public-master-body) :is(#SiteHeader,.public-header) :is(#HeaderNav,.public-nav,.site-nav) :is(a,button):is(.active,.is-open,[aria-current="page"],:hover,:focus-visible) {
    color: var(--cbs-colorful-chrome-ink,#fff) !important;
    background: rgba(0,0,0,.28) !important;
    box-shadow: inset 0 0 0 1px var(--cbs-colorful-line,#fff) !important;
    opacity: 1 !important;
}
html[data-appearance-mode="colorful"] body:is(.site-master-body,.public-master-body) :is(#SiteHeader,.public-header) :is(#HeaderNav,.public-nav,.site-nav) :is(a,button):is(.active,.is-open,[aria-current="page"],:hover,:focus-visible) :is(.nav-icon,.public-nav-icon) {
    color: var(--cbs-colorful-chrome-ink,#fff) !important;
    background: rgba(0,0,0,.20) !important;
}
html[data-appearance-mode="colorful"] body:is(.site-master-body,.public-master-body) :is(#SiteHeader,.public-header) :is(.nav-svg,.public-nav-icon svg,.search-icon svg),
html[data-appearance-mode="colorful"] body:is(.site-master-body,.public-master-body) :is(.site-mobile-bottom-nav,.public-mobile-nav) :is(.nav-svg,.mobile-nav-icon svg) {
    color: var(--cbs-colorful-chrome-ink,#fff) !important;
    stroke: currentColor !important;
}
html[data-appearance-mode="colorful"] body:is(.site-master-body,.public-master-body) :is(#SiteFooter,.public-footer) :is(a,button,span,p,strong,small,b,em,.public-footer-powered-icon,.public-footer-link-icon) {
    color: var(--cbs-colorful-chrome-ink,#fff) !important;
    opacity: 1 !important;
}
html[data-appearance-mode="colorful"] body.public-master-body .public-footer :is(.public-footer-powered-icon,.public-footer-legal-mark,.public-footer-link-icon) {
    background: rgba(0,0,0,.25) !important;
}
html[data-appearance-mode="colorful"] body:is(.site-master-body,.public-master-body) :is(.site-mobile-bottom-nav,.public-mobile-nav) :is(.mobile-nav-item,.nav-label,.nav-text,.nav-icon,.mobile-nav-icon,.nav-svg) {
    color: var(--cbs-colorful-chrome-ink,#fff) !important;
    opacity: 1 !important;
}
html[data-appearance-mode="colorful"] body:is(.site-master-body,.public-master-body) :is(.site-mobile-bottom-nav,.public-mobile-nav) .mobile-nav-item:is(.active,.is-open,[aria-current="page"],:hover,:focus-visible) {
    background: rgba(0,0,0,.28) !important;
    box-shadow: inset 0 0 0 1px var(--cbs-colorful-line,#fff) !important;
}
/* Badge text remains readable for bright yellow/white custom accents too. */
html[data-appearance-mode="colorful"] body:is(.site-master-body,.public-master-body) :is(#SiteHeader,.public-header,.site-mobile-bottom-nav,.public-mobile-nav) :is(.mobile-cart-badge,.public-mobile-cart-count,.public-cart-count) {
    color: var(--cbs-colorful-chrome-ink,#fff) !important;
    background: var(--cbs-colorful-end,#102c48) !important;
    box-shadow: 0 0 0 1px var(--cbs-colorful-line,#fff) !important;
}

/* =========================================================
   V4: one shell, one loading rectangle, one Colorful action palette.
   Desktop copyright footer stays fixed on every Site.Master page.
   On touch layouts the existing bottom navigation is the app footer.
   ========================================================= */
@media screen {
    html body.site-master-body {
        --cbs-visible-header: var(--cbs-site-top);
        --cbs-visible-bottom: calc(var(--site-footer-height,44px) + var(--cbs-safe-bottom));
        --cbs-loading-inset: var(--cbs-visible-header) 0px var(--cbs-visible-bottom) 0px;
        padding-bottom: calc(var(--cbs-visible-bottom) + 12px) !important;
    }
    html body.site-master-body.header-scrolled { --cbs-visible-header: var(--cbs-site-small); }
    html body.public-master-body {
        --cbs-visible-header: var(--cbs-public-top);
        --cbs-visible-bottom: calc(var(--public-footer-h,76px) + 12px + var(--cbs-safe-bottom));
        --cbs-loading-inset: var(--cbs-visible-header) 0px var(--cbs-visible-bottom) 0px;
    }
    html body.site-master-body #SiteFooter.footer:not([hidden]) {
        position: fixed !important; inset: auto 0 0 0 !important;
        display: flex !important; align-items: center !important; justify-content: center !important;
        visibility: visible !important; opacity: 1 !important; transform: none !important;
        z-index: 2000 !important; box-sizing: border-box !important;
        height: var(--cbs-visible-bottom) !important; min-height: var(--cbs-visible-bottom) !important;
        padding-bottom: calc(9px + var(--cbs-safe-bottom)) !important;
        margin: 0 !important;
    }
    /* Page-specific CSS must not put product cards above the persistent shell. */
    html body.site-master-body:has(.products-page) #PageContentWrapper {
        isolation: isolate; z-index: 0 !important;
    }
    html body.site-master-body:has(.products-page) {
        padding-bottom: calc(var(--cbs-visible-bottom) + 12px) !important;
    }
    html body.site-master-body:has(.products-page):not(.products-showcase-mode) .products-page {
        scroll-padding-bottom: var(--cbs-visible-bottom);
    }
    html body.site-master-body.products-showcase-mode #PageContentWrapper {
        height: calc(100dvh - var(--cbs-visible-header) - var(--cbs-visible-bottom)) !important;
        max-height: calc(100dvh - var(--cbs-visible-header) - var(--cbs-visible-bottom)) !important;
        min-height: 0 !important;
    }
    html body.site-master-body #ThemeFab { bottom: calc(var(--cbs-visible-bottom) + 14px) !important; }
    /* The loader is still the top content overlay, not a full-screen cover.
       The inline Loading.js inset resolves to this same variable. */
    html body:is(.site-master-body,.public-master-body) :is(#StandardLoadingOverlay,#GlobalPageLoader,#PublicPageLoader):not([hidden]) {
        inset: var(--cbs-loading-inset) !important;
        box-sizing: border-box !important;
        width: auto !important; height: auto !important;
        max-height: none !important; min-height: 0 !important;
        overflow: auto !important;
        padding: 12px max(12px,var(--cbs-safe-right)) 12px max(12px,var(--cbs-safe-left)) !important;
    }
    html[data-wa-loading='busy'] body.site-master-body :is(#SiteHeader,#SiteFooter,.site-mobile-bottom-nav),
    html[data-wa-loading='busy'] body.public-master-body :is(.public-header,.public-footer,.public-mobile-nav) {
        opacity: 1 !important; visibility: visible !important; filter: none !important;
    }
    html[data-wa-loading='busy'] body.site-master-body #SiteHeader { transform: none !important; }
}
@media screen and (max-width:1100px), screen and (max-width:1440px) and (pointer:coarse) {
    html body:is(.site-master-body,.public-master-body) { --cbs-visible-bottom: var(--cbs-nav-total); }
    /* Keep one bottom strip, not two stacked footers, on phones/tablets. */
    html body.site-master-body #SiteFooter.footer { display: none !important; }
    html body.site-master-body .site-mobile-bottom-nav:not([hidden]) { z-index: 2000 !important; }
    html body.site-master-body #ThemeFab { bottom: calc(var(--cbs-visible-bottom) + 12px) !important; }
}
/* Colorful uses the very same contrast-safe gradient as its header/footer.
   Do not recolor stock, error, discount, or promotional status indicators. */
html[data-appearance-mode='colorful'] {
    --cbs-action-fill: var(--cbs-colorful-gradient);
    --cbs-action-ink: var(--cbs-colorful-chrome-ink,#fff);
    --cbs-action-price: var(--cbs-colorful-end,#102c48);
}
html[data-appearance-mode='colorful'] body.site-master-body .products-page .products-grid .product-card :is(.product-add-btn,.product-login-order-btn):not(:disabled):not([aria-disabled='true']),
html[data-appearance-mode='colorful'] body.site-master-body .products-page .products-grid .product-card .qty-btn:not(.product-qty-row > .qty-btn):not(:disabled),
html[data-appearance-mode='colorful'] body.site-master-body :is(.products-filter-modal,.product-filter-modal,.products-filter-overlay) :is(.filter-apply-btn,.pfm-apply-btn):not(:disabled),
html[data-appearance-mode='colorful'] body.site-master-body #ItemDrawer.products-item-drawer.product-info-modal #DrawerApply:not(:disabled),
html[data-appearance-mode='colorful'] body.site-master-body .products-page :is(.showcase-qty-btn.showcase-qty-plus,.showcase-detail-qty-btn.plus):not(:disabled),
html[data-appearance-mode='colorful'] body.site-master-body .products-page :is(.product-client-group-title,.product-group-title) .group-title-count {
    background: var(--cbs-action-fill) !important; color: var(--cbs-action-ink) !important;
    border-color: var(--cbs-colorful-line) !important; text-shadow: none !important;
}
html[data-appearance-mode='colorful'] body.site-master-body .products-page .product-card :is(.product-add-btn,.product-login-order-btn) svg { color:inherit !important; stroke:currentColor !important; }
html[data-appearance-mode='colorful'] body.site-master-body .products-page .product-card :is(.product-simple-price,.product-row-price strong),
html[data-appearance-mode='colorful'] body.site-master-body .products-page .showcase-detail-price strong,
html[data-appearance-mode='colorful'] body.site-master-body #ItemDrawer.products-item-drawer .drawer-price {
    color: var(--cbs-action-price) !important;
}
html[data-appearance-mode='colorful'] body.site-master-body .products-page .products-grid .product-card :is(.card-info,.products-info-btn),
html[data-appearance-mode='colorful'] body.site-master-body .products-page .products-grid .product-card .product-qty-row > .qty-btn {
    color: var(--cbs-action-price) !important; border-color: var(--cbs-colorful-border) !important;
}
/* Accent strength now also drives the product section and search surfaces.
   Preserve all card geometry and product photos. */
html[data-appearance-mode='colorful'][data-standardization='internal'] body.site-master-body .products-page :is(.products-search-option-bar,.product-client-group-title,.product-group-title) {
    background: linear-gradient(135deg,var(--cbs-colorful-card),var(--cbs-colorful-soft)) !important;
    border-color: var(--cbs-colorful-border) !important;
}
html[data-appearance-mode='colorful'] body.site-master-body .products-page .products-grid .product-card .image-count-badge {
    background: var(--cbs-action-fill) !important; color: var(--cbs-action-ink) !important;
    border-color: var(--cbs-colorful-line) !important;
}
/* While loading, header shrink must be instantaneous so there is no transient
   overlap between the overlay's new top and the animated old header height. */
@media screen {
    html[data-wa-loading='busy'] body.site-master-body #SiteHeader.site-header { transition: none !important; }
}
html[data-appearance-mode='colorful'] body.site-master-body .products-page .products-search-icon,
html[data-appearance-mode='colorful'] body.site-master-body .products-page .products-search-icon::before,
html[data-appearance-mode='colorful'] body.site-master-body .products-page .filter-icon::before,
html[data-appearance-mode='colorful'] body.site-master-body .products-page .products-view-menu-btn:is(:hover,:focus-visible) {
    color: var(--cbs-action-price) !important;
}
html[data-appearance-mode='colorful'] body.site-master-body .products-page .products-filter-button em,
html[data-appearance-mode='colorful'] body.site-master-body #CategoriesModal.products-filter-overlay #ApplyFiltersBtn:not(:disabled) {
    background: var(--cbs-action-fill) !important; color: var(--cbs-action-ink) !important;
    border-color: var(--cbs-colorful-line) !important;
}
