/*
 * Continuous storefront background.
 *
 * The ambient gradients and grid belong to the complete store content area,
 * instead of restarting or disappearing between the hero, catalog and
 * "How it works" sections.
 */
.store-body > main {
    --store-grid-size: 72px;
    position: relative;
    isolation: isolate;
    min-height: calc(100vh - 76px);
    background-color: #03040b;
    background-image:
        radial-gradient(circle at 8% 22%, rgba(0, 231, 255, .16), transparent 24%),
        radial-gradient(circle at 78% 20%, rgba(108, 63, 255, .22), transparent 32%),
        radial-gradient(circle at 60% 72%, rgba(0, 79, 255, .16), transparent 36%),
        linear-gradient(180deg, #02030a 0%, #071126 55%, #02030a 100%);
    background-size:
        100% 100%,
        100% 100%,
        100% 100%,
        100% 100%;
    background-attachment: fixed;
}

.store-public-scene {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.store-public-scene > span {
    position: fixed;
    display: block;
    pointer-events: none;
}

.store-scene-grid {
    inset: 76px 0 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .047) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .047) 1px, transparent 1px);
    background-size: var(--store-grid-size) var(--store-grid-size);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 12%, #000 72%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 12%, #000 72%, transparent 100%);
    opacity: .55;
}

.store-scene-stars {
    inset: 76px 0 0;
    background-image: radial-gradient(circle, rgba(255, 255, 255, .8) 1px, transparent 1.5px);
    background-size: 140px 120px;
    -webkit-mask-image: linear-gradient(to bottom, #000, transparent 75%);
    mask-image: linear-gradient(to bottom, #000, transparent 75%);
    opacity: .7;
}

.store-scene-floor {
    right: -10%;
    bottom: 18%;
    left: -10%;
    height: 260px;
    background:
        linear-gradient(90deg, transparent, rgba(0, 231, 255, .34), rgba(139, 57, 255, .35), transparent),
        radial-gradient(ellipse at center, rgba(0, 120, 255, .25), transparent 65%);
    filter: blur(24px);
    opacity: .72;
    transform: perspective(700px) rotateX(68deg);
}

.store-scene-aurora {
    top: -40%;
    right: -20%;
    left: -20%;
    height: 80vh;
    background: conic-gradient(from 180deg at 50% 50%, transparent, rgba(0, 231, 255, .11), transparent, rgba(139, 57, 255, .12), transparent);
    filter: blur(58px);
    opacity: .65;
    animation: storeSceneSpin 22s linear infinite;
    will-change: transform;
}

@keyframes storeSceneSpin {
    to { transform: rotate(360deg); }
}

/*
 * The hero has its own dark surface, so its grid must be painted locally.
 * Synchronize it with the global canvas so every vertical and horizontal line
 * continues at exactly the same position when the next section begins.
 */
.store-body > main .commerce-hero {
    background: transparent !important;
}

.store-body > main .commerce-hero::before {
    display: none;
}

.store-body > main > :not(.store-public-scene) {
    position: relative;
    z-index: 1;
}

/*
 * Homepage sections share the main canvas. These selectors intentionally
 * override alternating, promotional and testimonial section backgrounds so
 * no rectangular layer restarts between content blocks.
 */
.store-body > main .commerce-section,
.store-body > main .commerce-promotions,
.store-body > main .commerce-testimonials,
.store-body > main .commerce-final-cta {
    background: transparent !important;
}

.store-body > main .commerce-testimonials {
    color: var(--text) !important;
}

.store-body > main .commerce-testimonials .commerce-section-head p,
.store-body > main .commerce-testimonials .commerce-testimonial-card footer small {
    color: var(--muted);
}

.store-body > main .commerce-testimonial-card {
    border-color: var(--border);
    background: color-mix(in srgb, var(--card) 88%, transparent);
}

.store-body > main .commerce-testimonial-card blockquote {
    color: var(--text);
}

[data-theme="dark"] .store-body > main .store-hero,
[data-theme="dark"] .store-body > main .store-categories,
[data-theme="dark"] .store-body > main .store-products,
[data-theme="dark"] .store-body > main .store-how {
    background: transparent !important;
}

[data-theme="dark"] .store-body > main .store-how {
    border-top-color: rgba(112, 125, 173, .13);
}

[data-theme="dark"] .store-body > main .store-how::before {
    display: none;
}

[data-theme="light"] .store-body > main {
    background-color: #f3f7fc;
    background-image:
        radial-gradient(circle at 8% 22%, rgba(0, 190, 220, .13), transparent 25%),
        radial-gradient(circle at 78% 20%, rgba(119, 81, 255, .14), transparent 33%),
        radial-gradient(circle at 60% 72%, rgba(45, 105, 255, .09), transparent 37%),
        linear-gradient(180deg, #fbfdff 0%, #f2f6fc 55%, #edf2f8 100%);
    background-size:
        100% 100%,
        100% 100%,
        100% 100%,
        100% 100%;
}

[data-theme="light"] .store-scene-grid {
    background-image:
        linear-gradient(rgba(45, 66, 105, .075) 1px, transparent 1px),
        linear-gradient(90deg, rgba(45, 66, 105, .075) 1px, transparent 1px);
    opacity: .52;
}

[data-theme="light"] .store-scene-stars {
    background-image: radial-gradient(circle, rgba(48, 67, 110, .38) 1px, transparent 1.5px);
    opacity: .42;
}

[data-theme="light"] .store-scene-floor {
    background:
        linear-gradient(90deg, transparent, rgba(0, 191, 220, .2), rgba(120, 80, 255, .2), transparent),
        radial-gradient(ellipse at center, rgba(47, 112, 255, .14), transparent 65%);
    opacity: .58;
}

[data-theme="light"] .store-scene-aurora {
    background: conic-gradient(from 180deg at 50% 50%, transparent, rgba(0, 191, 220, .075), transparent, rgba(120, 80, 255, .085), transparent);
    opacity: .45;
}

[data-theme="dark"] .store-body > main .commerce-hero {
    color: #f8fbff;
}

[data-theme="light"] .store-body > main .commerce-hero {
    color: var(--text);
}

[data-theme="light"] .store-body > main .commerce-hero-copy > p,
[data-theme="light"] .store-body > main .commerce-trust {
    color: var(--muted);
}

[data-theme="light"] .store-body > main .commerce-hero .store-btn.secondary {
    border-color: color-mix(in srgb, var(--p) 20%, var(--border));
    background: color-mix(in srgb, #ffffff 76%, transparent);
    color: var(--text);
}

[data-theme="light"] .store-body > main .commerce-hero-orbit,
[data-theme="light"] .store-body > main .commerce-hero-orbit > span {
    border-color: rgba(86, 73, 170, .15);
}

[data-theme="light"] .store-body > main .commerce-hero-orbit > i {
    color: var(--p);
}

[data-theme="light"] .store-body > main .commerce-hero-orbit > b {
    border-color: var(--border);
    background: rgba(255, 255, 255, .78);
    color: var(--text);
}

[data-theme="light"] .store-body > main .store-hero,
[data-theme="light"] .store-body > main .store-categories,
[data-theme="light"] .store-body > main .store-products,
[data-theme="light"] .store-body > main .store-how {
    background: transparent !important;
}

[data-theme="light"] .store-body > main .store-how::before {
    display: none;
}

/*
 * Authentication views join the same clean public canvas used by catalog,
 * product, cart and legal pages. Their ambient glows remain decorative, but
 * the old dotted layer no longer replaces the shared grid.
 */
.store-auth-body > main .store-login-page {
    background: transparent !important;
}

.store-auth-body > main .store-login-bg {
    background-image: none;
    opacity: 1;
    pointer-events: none;
}

@media (max-width: 700px) {
    .store-body > main {
        --store-grid-size: 52px;
        min-height: calc(100vh - 66px);
    }

    .store-scene-grid,
    .store-scene-stars {
        top: 66px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .store-scene-aurora {
        animation: none;
    }
}
