/* Clean Tech: shared semantic tokens keep every customer journey in the same theme. */
:root {
    color-scheme: dark;
    --ct-bg: #26002d;
    --ct-panel: #38163f;
    --ct-soft: #432047;
    --ct-text: #fff7ff;
    --ct-muted: #d8bedb;
    --ct-border: #68426d;
    --ct-primary: #7955ed;
    --ct-link: #ef9dd1;
    --ct-on-light-link: #a52672;
    --ct-on-light-muted: #705e79;
    --ct-shadow: 0 12px 32px rgba(13, 0, 18, 0.18);
    --store-content-gutter: clamp(16px, 4vw - 32px, 40px);
    --store-content-width: min(1600px, 100% - var(--store-content-gutter) * 2);
}

@media (max-width: 767.98px) {
    :root {
        --store-content-gutter: 12px;
    }
}

html[data-bs-theme="light"] {
    color-scheme: light;
    --ct-bg: #f7f4fa;
    --ct-panel: #ffffff;
    --ct-soft: #eee7f4;
    --ct-text: #2d1635;
    --ct-muted: var(--ct-on-light-muted);
    --ct-border: #ded3e6;
    --ct-primary: #6940d8;
    --ct-link: var(--ct-on-light-link);
    --ct-shadow: 0 12px 32px rgba(55, 22, 70, 0.06);
}

/* Alias existing component tokens instead of maintaining a second product system. */
html[data-store-appearance] body {
    --bs-body-bg: var(--ct-bg);
    --bs-body-color: var(--ct-text);
    --bs-secondary-color: var(--ct-muted);
    --bs-border-color: var(--ct-border);
    --plum-950: var(--ct-bg);
    --plum-800: var(--ct-panel);
    --plum-700: var(--ct-soft);
    --plum-text: var(--ct-text);
    --plum-muted: var(--ct-muted);
    --store-bg: var(--ct-bg);
    --store-panel: var(--ct-panel);
    --store-panel-2: var(--ct-soft);
    --store-border: var(--ct-border);
    --store-muted: var(--ct-muted);
    --store-primary: var(--ct-primary);
    --product-bg: var(--ct-bg);
    --product-panel: var(--ct-panel);
    --product-panel-deep: var(--ct-soft);
    --product-border: var(--ct-border);
    --product-text: var(--ct-text);
    --product-muted: var(--ct-muted);
    --product-primary: var(--ct-primary);
    background: var(--ct-bg);
    color: var(--ct-text);
    font-family: "Outfit", "Segoe UI", sans-serif;
}

/* This layer changes presentation only; status badges and transactional alerts retain their meanings. */
html[data-store-appearance] :is(.app-page-content, .catalog-page, .catalog-content,
    .cart-page, .cart-content-section, .account-page, .account-content, .orders-page,
    .profile-page, .rewards-page, .legal-page,
    .storefront-page main, .store-section, .store-discovery-section,
    .about-page__intro, .about-page__support, .about-page__availability) {
    background: var(--ct-bg) !important;
    color: var(--ct-text);
}

html[data-store-appearance] :is(.catalog-hero, .account-hero, .cart-page-header,
    .profile-hero, .rewards-current-card, .store-trust-strip, .store-footer) {
    background: var(--ct-panel) !important;
    border-color: var(--ct-border) !important;
    color: var(--ct-text);
}

html[data-store-appearance] :is(.catalog-card, .catalog-stat, .catalog-filter,
    .store-product-card, .store-deal-card, .store-discovery-panel, .store-empty-state,
    .cart-items-panel, .cart-summary-card, .cart-empty-state, .order-card,
    .profile-card, .profile-identity, .profile-nav, .rewards-tier-card, .rewards-voucher,
    .rewards-empty-state, .company-address-card,
    .about-page__value-card, .about-page__availability-card, .legal-document,
    .product-checkout-card, .product-description-section,
    .signin-form-panel, .signup-form-panel, .recovery-form-panel, .card, .modal-content) {
    background: var(--ct-panel) !important;
    border-color: var(--ct-border) !important;
    color: var(--ct-text);
    box-shadow: var(--ct-shadow);
}

html[data-store-appearance] :is(.catalog-card-art, .catalog-stat > span,
    .cart-product-image, .cart-quantity-control, .cart-quantity-control button,
    .product-selected-summary, .product-quantity-control, .profile-limit-card,
    .purchase-limit-summary div, .rewards-current-badge) {
    background: var(--ct-soft) !important;
    border-color: var(--ct-border) !important;
    color: var(--ct-text) !important;
}

/* Explicit text roles avoid recoloring status badges, artwork and fixed-dark promotional panels. */
html[data-store-appearance] :is(.catalog-page, .cart-page, .orders-page, .profile-page,
    .rewards-page, .legal-document, .about-page__intro,
    .about-page__support, .about-page__availability, .product-checkout-card,
    .store-section, .store-discovery-intro, .store-trust-strip, .store-footer)
    :is(h1, h2, h3, h4, h5, label, dt) {
    color: var(--ct-text) !important;
}

html[data-store-appearance] :is(.catalog-page, .cart-page, .orders-page, .profile-page,
    .rewards-page, .legal-document, .about-page__intro,
    .about-page__support, .about-page__availability, .product-checkout-card,
    .store-section, .store-trust-strip, .store-footer)
    :is(p, small, .text-muted) {
    color: var(--ct-muted) !important;
}

html[data-store-appearance] :is(.catalog-card-price, .catalog-eyebrow,
    .catalog-breadcrumb a, .catalog-result-meta span, .store-product-price, .store-expand-button,
    .rewards-eyebrow, .rewards-card-value, .rewards-card-footer span,
    .product-content-heading > div > span, .product-checkout-heading > span) {
    color: var(--ct-link) !important;
}

html[data-store-appearance] :is(.catalog-breadcrumb, .catalog-result-meta,
    .cart-breadcrumb, .cart-player-meta, .cart-delivery-meta,
    .cart-summary-lines > div, .cart-summary-lines strong, .resume-payment-item-copy > span,
    .rewards-explainer, .rewards-card-footer, .store-footer a) {
    color: var(--ct-muted) !important;
}

html[data-store-appearance] :is(.cart-product-price strong, .cart-summary-total,
    .cart-product-info h3, .order-primary strong, .order-amount strong,
    .order-card-main, .catalog-stat strong, .rewards-current-card h2,
    .rewards-progress strong, .store-product-name, .store-deal-name,
    .resume-payment-item-total, .product-content-heading > small) {
    color: var(--ct-text) !important;
}

html[data-store-appearance] :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]), textarea, select) {
    background-color: var(--ct-panel);
    border-color: var(--ct-border);
    color: var(--ct-text);
}
html[data-store-appearance] :is(input, textarea)::placeholder { color: var(--ct-muted); opacity: 1; }
html[data-store-appearance] .contact-form :is(input, textarea) { background-color: var(--ct-bg) !important; }
html[data-store-appearance] :is(a, button, input, select, textarea):focus-visible {
    outline: 3px solid var(--ct-link);
    outline-offset: 3px;
}

/* A compact shared header keeps appearance, market and language reachable at small widths. */
html[data-store-appearance] #header {
    background: var(--ct-panel) !important;
    border-bottom: 1px solid var(--ct-border);
    box-shadow: none;
    /* Breakpoint changes need the full header height immediately. */
    transition-property: background-color, border-color;
}
html[data-store-appearance] #header :is(.store-primary-link, .menu-link,
    .store-country-toggle, .store-language-toggle, .mobile-nav-trigger, .btn-link) {
    color: var(--ct-text) !important;
}
html[data-store-appearance] :is(.store-country-menu, .store-language-menu,
    .account-dropdown, .mobile-store-menu, .store-nav-more-menu, .dropdown-menu) {
    background: var(--ct-panel) !important;
    border-color: var(--ct-border) !important;
    color: var(--ct-text);
}
html[data-store-appearance] :is(.dropdown-item, .store-country-option, .store-country-toggle) {
    color: var(--ct-text) !important;
    background-color: transparent;
}
html[data-store-appearance] :is(.dropdown-item:hover, .store-country-option:hover) {
    background: var(--ct-soft) !important;
}
.store-appearance-toggle:not([hidden]) {
    display: inline-grid;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    place-items: center;
    margin-inline: 4px;
    padding: 0;
    border: 1px solid var(--ct-border);
    border-radius: 10px;
    background: var(--ct-panel);
    color: var(--ct-text);
    font-size: 1.1rem;
}
.store-appearance-toggle:is(:hover, [aria-pressed="true"]) {
    background: var(--ct-soft);
    color: var(--ct-link);
}

/* Set the gutter on the content frame once so full-width section backgrounds can extend to the edges. */
:is(.storefront-page, .product-page-shell, .guest-page-shell) :is(main, .store-footer) .container-xxl,
.app-page-content .container,
.guest-page-content .signup-shell,
.app-page-content .error-page {
    width: var(--store-content-width);
    margin-inline: auto;
    padding-inline: 0;
}

:is(.storefront-page, .product-page-shell, .guest-page-shell) :is(main, .store-footer) .container-xxl {
    max-width: none;
}

@media (min-width: 992px) {
    .store-footer > .container-xxl > .row {
        /* Bootstrap offsets the row by half its column gap. Keep that offset within the page gutter. */
        --bs-gutter-x: min(3rem, var(--store-content-gutter) * 2);
    }
}

.product-page-shell #app .app-page-content :is(.catalog-hero, .catalog-content,
    .product-purchase-section, .product-description-section, .cart-page-header,
    .cart-content-section, .account-hero, .account-content) {
    padding-inline: 0;
}

.about-page__hero-content > :is(h1, p) {
    max-width: 53rem;
}

.product-rich-description {
    max-width: none;
}

/* Compact layouts share the minimum page gutter and keep their own reading widths. */
.contact-page {
    width: var(--store-content-width);
    padding-inline: 0;
}

.legal-policy-page {
    padding-inline: var(--store-content-gutter);
}

.guest-page-content > :is(form, .text-sm) {
    width: min(38rem, var(--store-content-width));
    margin-inline: auto;
}

/* Clean Tech landing */
html[data-store-appearance] .clean-home .store-hero {
    padding: 16px 0 0;
    background: var(--ct-bg);
}
.clean-home #storeHero {
    width: var(--store-content-width);
    isolation: isolate;
}
.clean-home #storeHero .carousel-inner {
    overflow: hidden;
    border-radius: 22px;
}
.clean-home #storeHero .carousel-item {
    height: clamp(230px, 22vw, 270px);
    background: #310638;
}
.clean-home #storeHero :is(.clean-hero-link, .clean-hero-art) {
    display: block;
    width: 100%;
    height: 100%;
}
.clean-home #storeHero .clean-hero-art {
    object-fit: cover;
    object-position: right 32%;
}
.clean-home #storeHero::after {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: 22px;
    background: radial-gradient(ellipse at 80% 20%, rgba(111, 76, 255, 0.16), transparent 55%);
    pointer-events: none;
    content: "";
    animation: clean-hero-drift 12s ease-in-out infinite alternate;
}
.clean-shortcuts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 22px auto 0;
}
.clean-shortcuts a {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 16px 26px;
    border: 1px solid var(--ct-border);
    border-radius: 18px;
    background: var(--ct-panel);
    color: var(--ct-text);
    text-decoration: none;
}
.clean-shortcuts a > i:first-child {
    display: grid;
    flex: 0 0 64px;
    height: 64px;
    place-items: center;
    border-radius: 13px;
    background: var(--ct-soft);
    color: var(--ct-link);
    font-size: 2rem;
}
.clean-shortcuts a > i:last-child { margin-left: auto; }
.clean-shortcuts span { display: grid; gap: 5px; }
.clean-shortcuts strong { font-size: clamp(1rem, 2.1vw, 1.65rem); line-height: 1.2; }
.clean-shortcuts small { color: var(--ct-muted); }
html[data-store-appearance] .store-section-heading h2,
html[data-store-appearance] .store-discovery-intro h2 {
    text-transform: none;
    letter-spacing: -0.025em;
    font-weight: 700;
}
html[data-store-appearance] :is(.store-product-card, .store-deal-card, .catalog-card) {
    border: 1px solid var(--ct-border);
    border-radius: 16px;
    transition: transform 180ms ease, opacity 180ms ease;
}
html[data-store-appearance] .store-product-name { text-align: left; padding: 14px; }
html[data-store-appearance] .store-product-image img { object-fit: contain; }
html[data-store-appearance] .catalog-filter input { background: transparent; }

/* Keep controls usable by touch; desktop hover never gates a purchase action. */
@media (hover: hover) and (pointer: fine) {
    html[data-store-appearance] :is(.store-product-card, .store-deal-card, .catalog-card, .clean-shortcuts a):hover {
        transform: translateY(-4px);
        border-color: var(--ct-link);
        background: var(--ct-panel);
    }
}
html[data-store-appearance] .offcanvas { --bs-offcanvas-transition: transform 240ms ease; }
html[data-store-appearance] .dropdown-menu.show { animation: clean-menu 160ms ease-out; }
@keyframes clean-menu { from { opacity: 0; } to { opacity: 1; } }
.store-section-reveal { animation: clean-reveal 360ms ease-out both; }
.store-cart-feedback { animation: clean-cart 400ms ease-out; }
@keyframes clean-hero-drift { to { transform: translate3d(-12px, 8px, 0); opacity: 0.5; } }
@keyframes clean-reveal { from { opacity: 0.5; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes clean-cart { 50% { transform: scale(1.25); } }

@media (max-width: 767px) {
    html[data-store-appearance] #header .store-header-container { flex-wrap: wrap; gap: 5px; padding: 8px 12px; }
    html[data-store-appearance] #header .brand { margin-right: auto; }
    html[data-store-appearance] #header .store-country-label { display: none; }
    html[data-store-appearance] #header :is(.mobile-nav-trigger, .store-language-toggle, .menu-link) { min-height: 44px; min-width: 44px; }
    html[data-store-appearance] :is(.store-product-grid, .store-deal-list,
        .store-featured .store-product-grid.store-product-scroll, .catalog-grid) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    html[data-store-appearance] :is(input, select, textarea) { font-size: 16px; }
    .clean-home #storeHero::after { animation: none; }
}

/* Disable existing and new decorative movement when the visitor requests reduced motion. */
@media (prefers-reduced-motion: reduce) {
    html[data-store-appearance] *, html[data-store-appearance] *::before, html[data-store-appearance] *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
    html[data-store-appearance] :is(.store-product-card, .store-deal-card, .catalog-card):hover { transform: none; }
}

/* Gateway handoff pages share appearance without changing signed forms or submission scripts. */
.payment-handoff { margin: 0; padding: 3rem var(--store-content-gutter); font-family: "Segoe UI", sans-serif; }
.payment-handoff main, .payment-handoff > form {
    max-width: 28rem; margin: auto; padding: 2rem; border-radius: 16px;
    background: var(--ct-panel); color: var(--ct-text); text-align: center;
}
.payment-handoff h1 { font-size: 1.4rem; }
.payment-handoff p { line-height: 1.6; text-align: center; }
.payment-handoff button { min-height: 44px; padding: 0.8rem 1.4rem; border: 0; border-radius: 10px; background: var(--ct-primary); color: #fff; }
.payment-handoff button:disabled { opacity: 0.5; }
.payment-handoff a { color: var(--ct-link); }

/* Legacy navigation and form text used fixed white/navy values; bind both to their surfaces. */
html[data-store-appearance] :is(.mobile-store-menu, .signup-form-panel,
    .signin-form-panel, .recovery-form-panel, .verification-form-panel) :is(a, label, h1, h2, h3, strong) {
    color: var(--ct-text) !important;
}
html[data-store-appearance] :is(.mobile-menu-label, .mobile-country-toggle,
    .mobile-country-option, .mobile-language-list button, .store-country-value,
    .store-country-option-code, .signup-form-header p, .signup-form-footer,
    .profile-nav a, .profile-card strong, .profile-card dd, .product-package-name,
    .product-package-pricing strong, .product-selected-summary strong,
    .product-price-summary strong, .product-price-summary span) { color: var(--ct-text) !important; }
html[data-store-appearance] :is(.mobile-country-toggle, .mobile-language-list button,
    .profile-nav a, .profile-inline-form, .profile-input, .product-account-fields input,
    .store-search-field, .store-nav-search, .store-nav-search-mobile) {
    background: var(--ct-soft) !important;
    border-color: var(--ct-border) !important;
}
html[data-store-appearance] :is(.signup-form-panel, .signin-form-panel,
    .recovery-form-panel, .verification-form-panel) :is(p, small) { color: var(--ct-muted) !important; }
/* The original package tiles have their own light surfaces and matching text. */
html[data-store-appearance] .product-package-card:focus-visible {
    outline-color: var(--ct-primary);
}

/* Authentication and the guest checkout panel use the active appearance colors. */
html[data-store-appearance] :is(.signup-page, .signup-shell,
    .signup-input, .verification-form-panel, .product-guest-panel) {
    background: var(--ct-panel) !important;
    border-color: var(--ct-border) !important;
}
html[data-store-appearance] :is(.product-guest-panel strong, .product-total-row b, .signup-field > label span,
    .signup-consent span, .signin-security-note, .signup-login,
    .product-guide-points, .profile-identity strong) { color: var(--ct-text) !important; }
html[data-store-appearance] :is(.signup-form-wrap > header > span, .signup-input > i,
    .signup-password-toggle, .signup-login a) { color: var(--ct-link) !important; }
html[data-store-appearance] :is(.signup-input input, .catalog-filter input) { background: transparent !important; }
html[data-store-appearance] .signup-input:focus-within {
    border-color: var(--ct-link) !important;
    box-shadow: 0 0 0 2px var(--ct-link);
}
/* The field wrapper provides the visible focus ring, including during autofill. */
html[data-store-appearance] .signup-input input:focus-visible { outline: none; }
html[data-store-appearance] .signup-field > label > span:not(.signin-label-main) { color: var(--ct-muted) !important; }

/* Public policy documents share the mode; printable invoice/receipt styles stay independent. */
html[data-store-appearance] .legal-policy-page { background: var(--ct-bg) !important; }
html[data-store-appearance] .legal-policy-document {
    background: var(--ct-panel) !important;
    border-color: var(--ct-border) !important;
    color: var(--ct-text) !important;
}
html[data-store-appearance] .legal-policy-document :is(h3, h4, b, strong) { color: var(--ct-text) !important; }
html[data-store-appearance] .legal-policy-document :is(p, li) { color: var(--ct-muted) !important; }
html[data-store-appearance] .legal-policy-document::before { color: var(--ct-link); }

/* Promotional artwork panels intentionally stay dark in both appearances. */
html[data-store-appearance] :is(.signup-story, .about-page__hero)
    :is(h1, h2, h3, strong) { color: #fff7ff !important; }
html[data-store-appearance] :is(.signup-story, .about-page__hero)
    :is(p, small, li) { color: #e5cfe9 !important; }

/* Search results, profile subpanels and office cards use the same readable surface roles. */
html[data-store-appearance] :is(.store-search, .store-search-results,
    .profile-card > header, .profile-field, .profile-inline-form, .purchase-limit-content,
    .product-quantity-control button, .product-description-content) {
    background: var(--ct-panel) !important;
    border-color: var(--ct-border) !important;
    color: var(--ct-text) !important;
}
html[data-store-appearance] .store-search input { background: transparent !important; }
html[data-store-appearance] :is(.store-search-result, .store-search-results a,
    .store-search-results strong, .company-address-card h3, .product-description-content,
    .product-description-content h2, .product-description-content h3) { color: var(--ct-text) !important; }
html[data-store-appearance] :is(.company-address-card p, .company-address-card address,
    .store-search-results small) { color: var(--ct-muted) !important; }
html[data-store-appearance] .mobile-store-menu .store-primary-link { color: var(--ct-text) !important; }

/* Primary actions and totals need sufficient contrast on either surface. */
html[data-store-appearance] :is(.cart-summary-total strong, .product-selected-summary > b,
    .product-price-summary b) { color: var(--ct-text) !important; }

/* Pair labels with their themed surfaces where legacy rules set their own foreground. */
html[data-store-appearance] :is(.storefront-page .store-trust-strip strong,
    .product-checkout-reassurance strong) {
    color: var(--ct-text);
}
html[data-store-appearance] :is(.store-footer-payment-methods, .product-checkout-reassurance,
    .product-guest-panel > small, .signup-password-note, .cart-empty-perks) {
    color: var(--ct-muted);
}
html[data-store-appearance] .store-footer .text-body {
    color: var(--ct-muted) !important;
}
html[data-store-appearance] :is(.storefront-page .store-trust-strip i, .product-description-label,
    .product-guest-panel > small a, .mobile-country-toggle b, .mobile-country-option > span,
    #header .store-country-value b, .cart-summary-heading > span) {
    color: var(--ct-link);
}
html[data-store-appearance] :is(#header .store-search input, #header .store-search-mobile input) {
    color: var(--ct-text);
}
html[data-store-appearance] :is(#header .store-search input, #header .store-search-mobile input)::placeholder {
    color: var(--ct-muted);
    opacity: 1;
}
html[data-store-appearance] .product-rich-description {
    background: var(--ct-panel);
    border-color: var(--ct-border);
}
html[data-store-appearance] .product-description-content a {
    color: var(--ct-link);
}
/* Match checkout and account text to the surfaces that switch with appearance. */
html[data-store-appearance] #header .account-email-trigger {
    color: var(--ct-text) !important;
}
html[data-store-appearance] :is(.cart-payment-options legend, .resume-payment-item-copy strong,
    .profile-page .profile-nav-heading > span, .profile-page .profile-nav-support strong) {
    color: var(--ct-text);
}
html[data-store-appearance] :is(.cart-payment-trust, .cart-player-meta > span, .account-page .account-breadcrumb,
    .profile-page .profile-identity em, .orders-page .order-primary > span, .orders-page .order-payment-action,
    .rewards-section-heading > span) {
    color: var(--ct-muted);
}
html[data-store-appearance] :is(.cart-breadcrumb a, .cart-eyebrow, .cart-payment-trust i,
    .account-page .account-breadcrumb a, .account-page .account-eyebrow, .orders-page .orders-toolbar > div > span,
    .profile-page .profile-card-step,
    .rewards-current-tier strong) {
    color: var(--ct-link);
}
html[data-store-appearance] :is(.profile-trust-row > span, .account-secondary-action) {
    background: var(--ct-soft) !important;
    border-color: var(--ct-border);
    color: var(--ct-text) !important;
}
html[data-store-appearance] .profile-page .profile-trust-row i {
    color: var(--ct-link);
}
html[data-store-appearance] .cart-payment-method-choice:has(input:focus-visible),
html[data-store-appearance] #apply-wallet:focus-visible {
    outline: 3px solid var(--ct-link);
    outline-offset: 3px;
}

/* Match the cart's payment controls to the active storefront palette. */
html[data-store-appearance] #apply-wallet:checked {
    background-color: var(--ct-primary);
    border-color: var(--ct-primary);
}

html[data-store-appearance] #apply-wallet:not(:disabled):hover {
    border-color: var(--ct-link);
}

/* Preserve order-state cues on Light mode panels with the existing Bootstrap semantic colors. */
html[data-store-appearance][data-bs-theme="light"] .orders-page :is(.order-status b.is-pending-payment,
    .order-status-icon.is-pending-payment, .order-payment-deadline, .order-payment-action > span > i) {
    color: var(--bs-warning-text-emphasis);
}
html[data-store-appearance][data-bs-theme="light"] .orders-page .is-payment-urgent :is(
    .order-status b.is-pending-payment, .order-status-icon.is-pending-payment, .order-payment-deadline) {
    color: var(--bs-danger-text-emphasis);
}
html[data-store-appearance][data-bs-theme="light"] .orders-page :is(.order-status b.is-paid,
    .order-status b.is-completed, .order-status-icon.is-paid, .order-status-icon.is-completed) {
    color: var(--bs-success-text-emphasis);
}

/* Keep foreground and background paired in nested cards and form notes in both modes. */
html[data-store-appearance] :is(.cart-page .cart-product-row, .orders-page .account-empty) {
    background: var(--ct-panel);
    border-color: var(--ct-border);
}
html[data-store-appearance] :is(.cart-page .cart-product-row:hover, .cart-page .cart-product-row.is-unavailable,
    .profile-page .profile-form-note, .profile-page .profile-password-hint, .profile-page .purchase-limit-hint,
    .signin-security-note, .recovery-help, .verification-instructions) {
    background: var(--ct-soft);
}
html[data-store-appearance] .cart-product-row.is-unavailable > .cart-product-info {
    opacity: 1;
    filter: none;
}
html[data-store-appearance] :is(.verification-divider, .verification-help) {
    color: var(--ct-muted);
}
html[data-store-appearance] :is(.cart-empty-kicker, .verification-help a) {
    color: var(--ct-link);
}
html[data-store-appearance] :is(.company-address-card__registration strong,
    .about-page__game > span, .about-page__payment-method > span) {
    color: var(--ct-text);
}
html[data-store-appearance] #cart-item-count {
    background-color: var(--ct-primary) !important;
    color: #fff;
}
html[data-store-appearance] .btn-outline-theme {
    color: var(--ct-link);
    border-color: var(--ct-link);
}
html[data-store-appearance] .btn-outline-theme:not(:disabled):is(:hover, :active, .active) {
    background-color: var(--ct-primary);
    border-color: var(--ct-primary);
    color: #fff;
}
html[data-store-appearance][data-bs-theme="dark"] .btn-outline-danger {
    --bs-btn-color: var(--bs-danger-text-emphasis);
    --bs-btn-border-color: var(--bs-danger-text-emphasis);
}
html[data-store-appearance][data-bs-theme="dark"] .cart-product-row.is-unavailable .cart-item-warning {
    color: #ffc3ba;
}

/* Keep trust labels available on small screens using the existing stacked layout. */
@media (max-width: 767px) {
    html[data-store-appearance] .storefront-page .store-trust-strip {
        display: block;
    }
}

html[data-store-appearance] :is(.primary-btn, .signup-submit, #header .store-signin-btn, .btn-theme) {
    background: var(--ct-primary) !important;
    border-color: transparent !important;
    color: #fff !important;
}
html[data-store-appearance] :is(.primary-btn, .signup-submit, #header .store-signin-btn, .btn-theme):disabled {
    opacity: 0.55;
}

/* The live headline and CTA overlay both the branded artwork and uploaded slides. */
.clean-banner-copy {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 12px;
    padding: 20px clamp(24px, 5vw, 62px);
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(38, 0, 45, 0.82), rgba(38, 0, 45, 0.36) 48%, transparent 75%);
    color: #fff7ff;
    pointer-events: none;
}
.clean-home #storeHero h1 {
    max-width: 68%;
    margin: 0;
    color: #fff7ff;
    font-size: clamp(2.15rem, 4vw, 3.45rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1.06;
}
.clean-home #storeHero p {
    display: block;
    width: min(390px, 56%);
    margin: 0;
    color: #fff7ff;
    font-size: clamp(0.9rem, 1.45vw, 1.22rem);
    line-height: 1.4;
}
.clean-hero-cta {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    gap: 10px;
    padding: 9px 23px;
    border-radius: 13px;
    background: #cc236d;
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    text-decoration: none;
    pointer-events: auto;
}
.clean-hero-cta:hover,
.clean-hero-cta:focus-visible {
    background: #ad195a;
    color: #fff;
}
.clean-home #storeHero .store-hero-indicators {
    bottom: 5px;
    z-index: 3;
    justify-content: flex-end;
    margin: 0 14px;
}
.clean-home #storeHero .store-hero-indicators button {
    width: 12px;
    height: 12px;
    margin-inline: 4px;
}

/* Keep the two discovery rows adjacent to the shortcuts, as in the Clean Tech reference. */
.clean-home .store-section {
    padding: 18px 0 0;
}
html[data-store-appearance] .clean-home .store-section-heading h2 {
    font-size: clamp(1.18rem, 2.35vw, 1.85rem);
    line-height: 1.15;
}
html[data-store-appearance] .clean-home .store-section-heading :is(a, button) {
    width: auto;
    min-height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ct-link);
    text-decoration: none;
    white-space: nowrap;
}
.clean-home .store-section-heading :is(a, button):hover {
    text-decoration: underline;
}
/* All home product sections use a single native scroll row. */
html[data-store-appearance] .clean-home .store-home-row {
    --store-row-columns: var(--store-visible-columns, 6);
    display: flex;
    flex-wrap: nowrap;
    min-width: 0;
    gap: var(--store-row-gap, 12px);
    overflow-x: auto;
    padding: 4px 0 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--ct-muted) transparent;
}
.clean-home .store-home-row > .store-product-card {
    flex: 0 0 calc((100% - (var(--store-row-columns) - 1) * var(--store-row-gap, 12px)) / var(--store-row-columns));
    min-width: 0;
}
/* Fill every homepage artwork frame while preserving the image proportions. */
html[data-store-appearance] .clean-home .store-home-row .store-product-image img {
    object-fit: cover;
    object-position: center;
}
.clean-home .store-home-row > .store-empty-state {
    flex: 0 0 100%;
}
.clean-home .store-home-row.is-scrollable > .store-product-card {
    cursor: grab;
}
.clean-home .store-home-row.is-dragging,
.clean-home .store-home-row.is-dragging > .store-product-card {
    cursor: grabbing;
    user-select: none;
}
.clean-home .store-home-row:focus-visible {
    outline: 2px solid var(--ct-link);
    outline-offset: 2px;
}
html[data-store-appearance] .clean-home .store-home-row > .store-product-card:focus-visible {
    outline-offset: -3px;
}
.clean-home .clean-deals {
    --store-visible-columns: 4;
    --store-row-gap: 16px;
}
html[data-store-appearance] .clean-home .clean-deals .store-product-image {
    aspect-ratio: 16 / 9;
}
.clean-home .clean-deals .store-product-name {
    min-height: 0;
    padding: 8px 12px 12px;
}
.clean-home .clean-recent {
    --store-visible-columns: 8;
}
/* Keep the price at the base of the row even when a title wraps. */
.clean-home .clean-recent .store-product-card {
    display: flex;
    flex-direction: column;
}
.clean-home .clean-recent .store-product-image {
    flex: none;
}
.clean-home .clean-recent .store-product-name {
    min-height: 0;
    padding: 8px 7px 5px;
    text-align: center;
}
.clean-home .clean-recent .store-product-price {
    margin-top: auto;
}
.clean-home .store-discovery-section {
    padding-block: 24px;
}
/* Keep sparse and full category rows on the same card grid without a separate panel. */
.clean-home .store-category-row + .store-category-row {
    margin-top: 24px;
}
.clean-home .store-category-row .store-section-heading {
    margin-bottom: 10px;
    align-items: center;
}
html[data-store-appearance] .clean-home .store-category-grid .store-product-image {
    aspect-ratio: 16 / 9;
}
html[data-store-appearance] .clean-home .store-category-grid .store-product-name {
    padding: 9px 11px 12px;
    overflow-wrap: anywhere;
}
.clean-mobile-dock-space {
    display: none;
}
.clean-home-brand-name {
    align-self: center;
    margin-inline-start: 8px;
    color: var(--ct-text);
    font-size: 1.22rem;
    font-weight: 800;
    letter-spacing: -0.035em;
    white-space: nowrap;
}

@media (min-width: 768px) and (max-width: 991.98px) {
    html[data-store-appearance] .clean-home .store-home-row {
        --store-row-columns: 3;
    }
    html[data-store-appearance] .clean-home .clean-recent .store-home-row {
        --store-row-columns: 4;
    }
}
@media (max-width: 767.98px) {
    html[data-store-appearance] .clean-home .store-home-row {
        /* Leave a sliver of the next card visible to signal horizontal scrolling. */
        --store-row-columns: 2.15;
        --store-row-gap: 10px;
    }
    :root {
        --clean-dock-height: calc(60px + env(safe-area-inset-bottom, 0px));
    }
    html[data-store-appearance] .clean-home #header {
        height: 111px;
    }
    html[data-store-appearance] .clean-home #header .store-header-container {
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr) repeat(3, auto);
        grid-template-rows: 44px auto;
        gap: 5px 4px;
    }
    .clean-home #header .mobile-nav-trigger { grid-area: 1 / 1; }
    .clean-home #header .navbar-brand { grid-area: 1 / 2; }
    .clean-home #header .store-country-selector { grid-area: 1 / 3; }
    .clean-home #header .store-appearance-toggle {
        grid-area: 1 / 4;
        margin: 0;
    }
    .clean-home #header .store-language-picker { grid-area: 1 / 5; }
    .clean-home #header #mobileStoreSearch {
        position: static;
        display: block;
        grid-area: 2 / 1 / 3 / -1;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }
    .clean-home #header [data-bs-target="#mobileStoreSearch"] {
        display: none;
    }
    .clean-home-brand-name {
        font-size: 1.02rem;
    }
    html[data-store-appearance] .clean-home .store-hero {
        padding-top: 10px;
    }
    .clean-home #storeHero .carousel-inner {
        border-radius: 15px;
    }
    .clean-home #storeHero .carousel-item {
        height: clamp(176px, 48vw, 226px);
    }
    .clean-home #storeHero .clean-hero-art {
        object-position: 64% 32%;
    }
    .clean-banner-copy {
        gap: 8px;
        padding: 12px 16px 18px;
        background: linear-gradient(90deg, rgba(38, 0, 45, 0.94), rgba(38, 0, 45, 0.55) 53%, transparent 85%);
    }
    .clean-home #storeHero h1 {
        max-width: 61%;
        font-size: clamp(1.4rem, 6.1vw, 2rem);
    }
    .clean-home #storeHero p {
        width: 62%;
        font-size: 0.78rem;
    }
    .clean-hero-cta {
        min-height: 38px;
        padding: 6px 12px;
        border-radius: 9px;
        font-size: 0.84rem;
    }
    .clean-shortcuts {
        gap: 10px;
        margin-top: 12px;
    }
    .clean-shortcuts a {
        min-height: 52px;
        gap: 6px;
        padding: 8px;
        border-radius: 11px;
    }
    .clean-shortcuts a > i:first-child {
        flex-basis: 24px;
        height: 29px;
        background: transparent;
        font-size: 1.45rem;
    }
    .clean-shortcuts strong {
        font-size: 0.85rem;
    }
    .clean-shortcuts small {
        display: none;
    }
    .clean-mobile-dock-space {
        display: block;
        height: var(--clean-dock-height);
    }
    .clean-mobile-dock {
        position: fixed;
        inset: auto 0 0;
        z-index: 1010;
        display: grid;
        height: var(--clean-dock-height);
        grid-template-columns: repeat(4, minmax(0, 1fr));
        padding: 3px 10px env(safe-area-inset-bottom, 0px);
        border-top: 1px solid var(--ct-border);
        background: var(--ct-panel);
    }
    .clean-mobile-dock a {
        display: grid;
        place-content: center;
        justify-items: center;
        gap: 3px;
        color: var(--ct-text);
        font-size: 0.78rem;
        font-weight: 650;
        text-decoration: none;
    }
    .clean-mobile-dock a i {
        font-size: 1.2rem;
        line-height: 1;
    }
    .clean-mobile-dock a[aria-current] {
        color: var(--ct-link);
    }
    .store-support-launcher--with-dock {
        bottom: calc(var(--clean-dock-height) + 12px);
    }
    .cart-checkout-button {
        /* Leave room for the dock when keyboard focus scrolls to Checkout. */
        scroll-margin-bottom: var(--clean-dock-height);
    }
}

@media (min-width: 390px) and (max-width: 767.98px) {
    .clean-home #header .store-country-selector {
        display: block;
        margin: 0;
    }
    .clean-home #header .store-language-picker {
        display: block !important;
        margin: 0;
    }
}
