/*
 * =============================================
 * KAVI G — Design System CSS
 * =============================================
 * Table of Contents:
 *
 * 1. Design Tokens (Custom Properties)
 *   1b. Cosmic Theme Tokens ([data-theme="cosmic"])
 * 2. Reduced Motion Override
 * 3. Base Styles (body, skip-to-content)
 * 4. Typography Utilities
 * 5. Responsive Typography
 * 6. Dividers
 * 7. Image Treatment Filters
 * 8. Button Styles
 * 9. Focus Ring
 * 10. Cultural SVG Utilities
 * 11. Color Utilities
 * 12. Navigation
 * 13. Error Pages
 * 14. Scroll Reveal Animations
 * 15. Skeleton/Shimmer Loading
 * 16. Button State Extensions
 * 17. Card Hover & Extended Focus Rings
 * 18. Counter & Countdown Animations
 * 19. Text Stagger, Cursor Glow & Vinyl Spin
 * 24. Cosmic Foundation Utilities (nebula glow, star field, grain)
 * 25. Cosmic Signature Motifs (heart-eye, marquee)
 * 26. Cosmic Type & Color Utilities (font-hand, text-accent)
 * 27. Cosmic Reduced Motion Overrides
 * =============================================
 */

/*
 * TOKEN ENFORCEMENT RULE:
 * All color values MUST use var(--color-*) semantic tokens.
 * Raw hex/rgb values are ONLY permitted in:
 *   - :root {} token definitions
 *   - CSS gradients (browser compatibility)
 *   - CSS box-shadow rgba() values (browser compatibility)
 * New CSS that violates this rule should be flagged in code review.
 */

/* 1. Design Tokens (Custom Properties) */
:root {
    /* Surface scale (4-tier) */
    --color-surface-0: #0A0A0A;
    --color-surface-1: #141414;
    --color-surface-2: #1E1E1E;
    --color-surface-3: #2A2A2A;

    /* Gold accent */
    --color-primary: #FFD700;
    --color-primary-dark: #B8860B;
    --gradient-gold: linear-gradient(135deg, #FFD700, #B8860B);

    /* Cultural accent — deep wine crimson reserved for FILLS under light text
       (badges, cart badge). White on #B01030 = 7.1:1. Do NOT use for text. */
    --color-crimson: #B01030;
    /* Legible error red for TEXT/icons/borders on the dark surfaces.
       #EA335B on #0A0A0A = 4.83:1, on #141414 = 4.49:1 (>= 4.5:1 AA small text). */
    --color-error: #EA335B;
    /* Info toast accent (matches Bootstrap --bs-info) */
    --color-info: #6EA8FE;

    /* Text */
    --color-on-surface: #FFFFFF;
    --color-on-surface-muted: #B0B0B0;
    --color-on-primary: #0A0A0A;

    /* Dividers */
    --color-divider: rgba(255, 215, 0, 0.2);

    /* Atmosphere & glow — decorative layers. Tokenized so the default theme
       keeps these exact values while cosmic overrides them via the same names. */
    --color-atmosphere-hero: rgba(255, 215, 0, 0.04);
    --color-atmosphere-store-a: rgba(255, 215, 0, 0.06);
    --color-atmosphere-store-b: rgba(184, 134, 11, 0.08);
    --color-glow-cursor: rgba(255, 215, 0, 0.06);
    --color-glow-card: rgba(255, 215, 0, 0.15);
    --color-ring-store-art: rgba(255, 215, 0, 0.08);
    --color-shimmer-fleck: rgba(255, 215, 0, 0.05);

    /* Newsletter success alert */
    --color-alert-success-bg: rgba(255, 215, 0, 0.05);
    --color-alert-success-border: var(--color-primary);
    --color-alert-success-text: var(--color-primary);

    /* Image duotone (gold sepia) */
    --filter-duotone: sepia(100%) saturate(300%) brightness(70%) hue-rotate(10deg);

    /* Store-mode cosmic refinements (gold defaults — store-mode stays
       pixel-identical under the default theme) */
    --scale-store-art-hover: 1.03;
    --color-glow-store-art: transparent;
    --heading-transform-store: uppercase;
    --tracking-store-heading: 0.14em;
    --size-store-heading: 13px;

    /* Typography */
    --font-display: 'Anton', sans-serif;
    --font-body: 'Space Grotesk', sans-serif;
    --font-accent: 'Rajdhani', sans-serif;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    /* Layout */
    --nav-height: 72px;
    --max-content-width: 1440px;

    /* Z-index */
    --z-nav: 100;
    --z-overlay: 200;
    --z-modal: 300;
    --z-toast: 400;

    /* Motion */
    --duration-fast: 300ms;
    --duration-default: 600ms;
    --duration-slow: 900ms;
    --easing-default: ease-out;
}

/* 1b. Cosmic Theme Tokens — active when <html data-theme="cosmic"> */
/*
 * Overrides the default (gold) theme via the same semantic token names.
 * `html[data-theme="cosmic"]` is the same element as :root but with higher
 * specificity, so the default theme stays untouched and remains the fallback
 * when the attribute is absent.
 * Tokens NOT redefined here (spacing, layout, z-index, motion, --color-crimson)
 * inherit from :root — crimson error/upcoming states stay legible in both themes.
 */
html[data-theme="cosmic"] {
    /* Deep-space surface scale (4-tier) */
    --color-surface-0: #07060F;
    --color-surface-1: #0D0A19;
    --color-surface-2: #151027;
    --color-surface-3: #21183A;

    /* Violet primary (replaces gold) */
    --color-primary: #8D6CE0;
    --color-primary-dark: #6B4FC4;

    /* Cosmic gradient — canonical name (new in cosmic) */
    --gradient-cosmic: linear-gradient(135deg, #8D6CE0, #20D9E0);
    /* Backwards-compat: keep --gradient-gold defined so every existing consumer
       (.btn-gold, .img-gold-overlay, .store-mode-card::before) adapts, but point
       its value at the cosmic gradient under this theme. */
    --gradient-gold: var(--gradient-cosmic);

    /* Interactive accent — cyan */
    --color-accent: #20D9E0;
    --color-accent-soft: #83AFE8;

    /* Nebula atmosphere */
    --color-nebula-pink: #C872C7;
    --color-nebula-magenta: #EF9DDA;
    --color-nebula-blue: #8994E1;
    --color-nebula-violet: #8D6CE0;

    /* Text */
    --color-on-surface: #FFF8FF;
    --color-on-surface-muted: #C9C2D5;
    --color-on-primary: #080711;

    /* Star field (cosmic-only — undefined in default so gold theme stays clean) */
    --color-star: #FFF8FF;

    /* Divider */
    --color-divider: rgba(32, 217, 224, 0.2);

    /* Atmosphere & glow — cosmic equivalents: violet/cyan at low alpha.
       Deliberately not neon: these stay soft so the hand-drawn "imperfection"
       of the theme reads through. */
    --color-atmosphere-hero: rgba(141, 108, 224, 0.12);
    --color-atmosphere-store-a: rgba(141, 108, 224, 0.1);
    --color-atmosphere-store-b: rgba(32, 217, 224, 0.08);
    --color-glow-cursor: rgba(32, 217, 224, 0.06);
    --color-glow-card: rgba(141, 108, 224, 0.22);
    --color-ring-store-art: rgba(32, 217, 224, 0.14);
    --color-shimmer-fleck: rgba(32, 217, 224, 0.06);

    /* Newsletter success alert — cyan tint */
    --color-alert-success-bg: rgba(32, 217, 224, 0.08);
    --color-alert-success-border: var(--color-accent);
    --color-alert-success-text: var(--color-accent);

    /* Image duotone — violet/cyan cast (replaces gold sepia) */
    --filter-duotone: sepia(35%) saturate(420%) brightness(82%) hue-rotate(205deg);

    /* Display heading air — undefined under the default theme, so the
       .heading-kern utility is a silent no-op there */
    --tracking-display: 0.04em;

    /* Store-mode cosmic refinements */
    --scale-store-art-hover: 1.025;
    --color-glow-store-art: rgba(141, 108, 224, 0.26);
    --heading-transform-store: none;
    --tracking-store-heading: 0.02em;
    --size-store-heading: 1.15rem;

    /* Hand-drawn display accent (album lettering feel) */
    --font-hand: 'Caveat', cursive;
}

/* 2. Reduced Motion Override */
@media (prefers-reduced-motion: reduce) {
    :root {
        --duration-fast: 0ms;
        --duration-default: 0ms;
        --duration-slow: 0ms;
    }
}

/* 3. Base Styles */
html {
    overflow-x: hidden;
}

body {
    background-color: var(--color-surface-0);
    color: var(--color-on-surface-muted);
    font-family: var(--font-body);
    padding-top: var(--nav-height);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#main-content {
    flex: 1 0 auto;
}

.site-footer {
    flex-shrink: 0;
}

/* Skip to content — hidden until focused (WCAG 2.4.1) */
.skip-to-content {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: calc(var(--z-toast) + 100);
}

.skip-to-content:focus {
    position: fixed;
    left: 50%;
    top: var(--space-sm);
    transform: translateX(-50%);
    width: auto;
    height: auto;
    overflow: visible;
    background: var(--color-primary);
    color: var(--color-on-primary);
    font-family: var(--font-accent);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: var(--space-sm) var(--space-lg);
    text-decoration: none;
    outline: 2px solid var(--color-on-surface);
    outline-offset: 2px;
}

/* Hero sections go full-bleed under transparent nav */
.hero-section {
    margin-top: calc(-1 * var(--nav-height));
    padding-top: var(--nav-height);
}

/* 4. Typography Utilities */
.font-display { font-family: var(--font-display); text-transform: uppercase; }
.font-body { font-family: var(--font-body); }
.font-accent { font-family: var(--font-accent); }

.heading-display {
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 400;
    line-height: 1.1;
    text-transform: uppercase;
    color: var(--color-on-surface);
}

.heading-section {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 400;
    line-height: 1.2;
    text-transform: uppercase;
    color: var(--color-on-surface);
}

.heading-subsection {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 400;
    line-height: 1.3;
    text-transform: uppercase;
    color: var(--color-on-surface);
}

.text-accent {
    font-family: var(--font-accent);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.text-label {
    font-family: var(--font-accent);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-on-surface-muted);
}

/* 5. Responsive Typography */
@media (max-width: 575px) {
    .heading-display { font-size: 32px; }
    .heading-section { font-size: 22px; }
    .heading-subsection { font-size: 18px; }
}
@media (min-width: 576px) and (max-width: 991px) {
    .heading-display { font-size: 40px; }
    .heading-section { font-size: 26px; }
    .heading-subsection { font-size: 19px; }
}

/* 6. Dividers */
.divider-gold {
    border: none;
    border-top: 1px solid var(--color-divider);
    margin: var(--space-2xl) 0;
}

/* 7. Image Treatment Filters */
.img-gold-duotone {
    filter: var(--filter-duotone);
}

.img-bw-contrast {
    filter: grayscale(100%) contrast(1.2) brightness(0.8);
}

.img-gold-overlay {
    position: relative;
    overflow: hidden;
}
.img-gold-overlay img {
    filter: grayscale(100%) contrast(1.2) brightness(0.8);
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.img-gold-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-gold);
    opacity: 0.2;
    mix-blend-mode: overlay;
    pointer-events: none;
}

/* 8. Button Styles */
.btn-gold {
    display: inline-block;
    padding: var(--space-sm) var(--space-lg);
    background: var(--gradient-gold);
    color: var(--color-on-primary);
    font-family: var(--font-accent);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    border-radius: 0;
    text-decoration: none;
    transition: opacity var(--duration-fast) var(--easing-default),
                transform var(--duration-fast) var(--easing-default);
}
.btn-gold:hover {
    opacity: 0.9;
    color: var(--color-on-primary);
    text-decoration: none;
}
.btn-gold:active {
    transform: scale(0.97);
}

.btn-gold-outline {
    display: inline-block;
    padding: var(--space-sm) var(--space-lg);
    background: transparent;
    color: var(--color-primary);
    font-family: var(--font-accent);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid var(--color-primary);
    border-radius: 0;
    text-decoration: none;
    transition: background-color var(--duration-fast) var(--easing-default),
                color var(--duration-fast) var(--easing-default);
}
.btn-gold-outline:hover,
.btn-gold-outline.active {
    background-color: var(--color-primary);
    color: var(--color-on-primary);
    text-decoration: none;
}
.btn-gold-outline:active {
    transform: scale(0.97);
}

/* 9. Focus Ring */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* 10. Cultural SVG Utilities */
.dhaka-bg {
    position: relative;
}
.dhaka-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('/svg/dhaka-pattern.svg');
    background-repeat: repeat;
    background-size: 120px;
    opacity: 0.06;
    pointer-events: none;
    z-index: 0;
}
.dhaka-bg > * {
    position: relative;
    z-index: 1;
}

/* 11. Color Utilities */
.text-gold { color: var(--color-primary); }
/* Crimson text always resolves to the legible --color-error value; the deep
   --color-crimson fill is for badge backgrounds only, never text. */
.text-crimson { color: var(--color-error); }
.text-muted-custom { color: var(--color-on-surface-muted); }
.bg-surface-0 { background-color: var(--color-surface-0); }
.bg-surface-1 { background-color: var(--color-surface-1); }
.bg-surface-2 { background-color: var(--color-surface-2); }
.bg-surface-3 { background-color: var(--color-surface-3); }

/* =============================================
 * 12. Navigation
 * ============================================= */

.navbar-kavig {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: var(--z-nav);
    background-color: transparent;
    transition: background-color var(--duration-fast) var(--easing-default),
                backdrop-filter var(--duration-fast) var(--easing-default);
    height: var(--nav-height);
    padding-top: 0;
    padding-bottom: 0;
}

.navbar-kavig.nav-scrolled {
    background-color: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Non-hero pages: nav starts solid immediately */
.navbar-kavig.nav-solid {
    background-color: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Mobile action cluster — hidden on desktop (>= lg) where cart/search live in
   the collapse; shown on mobile via the media query below. */
.nav-mobile-cluster {
    display: none;
}

.navbar-kavig .navbar-brand {
    color: var(--color-primary);
    font-size: 1.5rem;
    letter-spacing: 0.05em;
}

.navbar-kavig .nav-link {
    color: var(--color-on-surface);
    font-family: var(--font-accent);
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: var(--space-sm) var(--space-md);
    position: relative;
    transition: color var(--duration-fast) var(--easing-default);
}

/* Gold underline - active state */
.navbar-kavig .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: var(--space-md);
    right: var(--space-md);
    height: 2px;
    background-color: var(--color-primary);
}

/* Gold underline - hover animation (slides from left) */
.navbar-kavig .nav-link:not(.active)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: var(--space-md);
    right: var(--space-md);
    height: 2px;
    background-color: var(--color-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--duration-fast) var(--easing-default);
}

.navbar-kavig .nav-link:not(.active):hover::after {
    transform: scaleX(1);
}

.navbar-kavig .nav-link:hover {
    color: var(--color-primary);
}

/* Dropdown styling */
.dropdown-menu-kavig {
    background-color: var(--color-surface-2);
    border: 1px solid var(--color-divider);
    border-radius: 0;
    padding: var(--space-xs) 0;
}

.dropdown-menu-kavig .dropdown-item {
    color: var(--color-on-surface);
    font-family: var(--font-accent);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: var(--space-sm) var(--space-md);
    transition: background-color var(--duration-fast) var(--easing-default),
                color var(--duration-fast) var(--easing-default);
}

.dropdown-menu-kavig .dropdown-item:hover {
    background-color: var(--color-surface-3);
    color: var(--color-primary);
}

/* Dropdown chevron rotation */
.navbar-kavig .dropdown-toggle::after {
    transition: transform var(--duration-fast) var(--easing-default);
}

.navbar-kavig .dropdown-toggle[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

/* Nav CTA button */
.btn-nav-cta {
    font-size: 13px;
    padding: var(--space-xs) var(--space-md);
}

/* Custom hamburger with gold bars */
.navbar-toggler-kavig {
    border: 1px solid var(--color-primary);
    padding: var(--space-xs) var(--space-sm);
    position: relative;
    width: 44px;
    height: 44px;
}

.navbar-toggler-kavig:focus {
    box-shadow: 0 0 0 2px var(--color-primary);
}

.navbar-toggler-kavig .toggler-bar {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--color-primary);
    margin: 4px auto;
    transition: transform var(--duration-fast) var(--easing-default),
                opacity var(--duration-fast) var(--easing-default);
}

/* Hamburger → X animation on open */
.navbar-toggler-kavig[aria-expanded="true"] .toggler-bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.navbar-toggler-kavig[aria-expanded="true"] .toggler-bar:nth-child(2) {
    opacity: 0;
}

.navbar-toggler-kavig[aria-expanded="true"] .toggler-bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Mobile nav overlay */
@media (max-width: 991px) {
    .navbar-kavig .navbar-collapse {
        background-color: var(--color-surface-0);
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        bottom: 0;
        padding: var(--space-xl);
        overflow-y: auto;
    }

    /* 44px minimum touch target for the in-menu links */
    .navbar-kavig .navbar-collapse .nav-link {
        font-size: 18px;
        padding: 13px 0;
        min-height: 44px;
        display: flex;
        align-items: center;
        border-bottom: 1px solid var(--color-divider);
    }

    .navbar-kavig .navbar-collapse .btn-nav-cta {
        margin-top: var(--space-lg);
        display: flex;
        text-align: center;
        min-height: 44px;
        align-items: center;
        justify-content: center;
    }

    .navbar-kavig .navbar-collapse .dropdown-menu-kavig {
        background-color: transparent;
        border: none;
        padding-left: var(--space-lg);
    }

    .navbar-kavig .navbar-collapse .dropdown-menu-kavig .dropdown-item {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    /* ── Mobile action cluster (cart + badge + search) ──
       Sits between the brand and the hamburger, ALWAYS visible outside the
       collapse. Right-padding reserves 44px for the hamburger so nothing
       overlaps. The duplicate .nav-mobile-cluster inside the collapse is
       hidden here — it exists only so the same links render in the menu. */
    .nav-mobile-cluster {
        display: flex;
        align-items: center;
        gap: 2px;
        margin-left: auto;
        margin-right: calc(var(--space-xs) - 6px);
    }

    .nav-mobile-cluster .nav-link {
        font-size: 18px;
        padding: 0 var(--space-sm);
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        border-bottom: none;
    }

    /* Cart badge — bumped up/right and bumped right so it clears the search
       icon and stays on the bag itself. */
    .nav-mobile-cluster .cart-badge-cluster {
        top: -2px;
        right: -6px;
    }

    /* Hide the in-collapse duplicate search/cart (the collapse is already full
       of big links; the persistent cluster covers cart/search there). */
    .navbar-collapse .nav-mobile-cluster-duplicate {
        display: none;
    }
}

/* =============================================
 * 13. Error Pages
 * ============================================= */

.error-page {
    padding: var(--space-3xl) var(--space-lg);
}

.error-svg {
    width: 200px;
    max-width: 80vw;
    height: auto;
    opacity: 0.4;
    animation: errorFadeIn var(--duration-slow) var(--easing-default) forwards;
}

@keyframes errorFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 0.4;
        transform: translateY(0);
    }
}

/* =============================================
 * 14. Scroll Reveal Animations
 * ============================================= */

/* Container: applied to sections that reveal on scroll */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--duration-default) var(--easing-default),
                transform var(--duration-default) var(--easing-default);
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Children: stagger-animated items within a reveal container */
.reveal-item {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--duration-default) var(--easing-default),
                transform var(--duration-default) var(--easing-default);
}

.reveal-on-scroll.revealed .reveal-item {
    opacity: 1;
    transform: translateY(0);
}

/* =============================================
 * 15. Skeleton/Shimmer Loading
 * ============================================= */

.skeleton {
    background-color: var(--color-surface-1);
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(30, 30, 30, 0.8) 40%,
        var(--color-shimmer-fleck) 50%,
        rgba(30, 30, 30, 0.8) 60%,
        transparent 100%
    );
    transform: translateX(-100%);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* Skeleton shape variants */
.skeleton-text {
    height: 12px;
    border-radius: 6px;
    margin-bottom: var(--space-sm);
}

.skeleton-text:last-child {
    width: 60%;
}

.skeleton-image {
    width: 100%;
    aspect-ratio: 16 / 9;
}

.skeleton-card {
    padding: var(--space-md);
}

.skeleton-card .skeleton-image {
    margin-bottom: var(--space-md);
}

/* =============================================
 * 16. Button State Extensions (disabled, loading)
 * ============================================= */

/* Disabled state */
.btn-gold[disabled],
.btn-gold.disabled,
.btn-gold-outline[disabled],
.btn-gold-outline.disabled {
    opacity: 0.4;
    pointer-events: none;
    cursor: not-allowed;
}

/* Loading state */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
    min-width: var(--btn-min-width, auto);
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    margin-left: -8px;
    border: 2px solid transparent;
    border-top-color: var(--color-primary);
    border-right-color: var(--color-primary);
    border-radius: 50%;
    animation: btnSpin var(--duration-default) linear infinite;
}

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

/* =============================================
 * 17. Card Hover & Extended Focus Rings
 * ============================================= */

/* Card component base */
.card-kavig {
    background-color: var(--color-surface-1);
    border: 1px solid transparent;
    overflow: hidden;
    transition: box-shadow var(--duration-fast) var(--easing-default),
                border-color var(--duration-fast) var(--easing-default);
}

.card-kavig:hover {
    box-shadow: 0 0 0 1px var(--color-primary),
                0 0 20px var(--color-glow-card);
}

.card-kavig .card-kavig-image {
    overflow: hidden;
}

.card-kavig .card-kavig-image img {
    transition: transform var(--duration-fast) var(--easing-default);
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-kavig:hover .card-kavig-image img {
    transform: scale(1.03);
}

/* Extended focus rings — larger interactive elements get 3px */
.btn-gold:focus-visible,
.btn-gold-outline:focus-visible {
    outline-width: 3px;
    outline-offset: 3px;
}

.card-kavig:focus-visible {
    outline: none;
    box-shadow: 0 0 0 1px var(--color-primary),
                0 0 20px var(--color-glow-card);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline-width: 3px;
    outline-offset: 2px;
}

/* Global touch target enforcement (WCAG 2.5.5) */
.btn-gold,
.btn-gold-outline,
.card-kavig a,
.card-kavig button,
button,
input[type="submit"],
input[type="button"],
input[type="reset"],
select,
[role="button"] {
    min-height: 44px;
}

/* Touch target spacing utility */
.touch-gap {
    gap: var(--space-sm);
}

/* =============================================
 * 18. Counter & Countdown Animations
 * ============================================= */

/* Countdown flip container */
.countdown-digit {
    display: inline-block;
    perspective: 300px;
    overflow: hidden;
}

.countdown-digit .digit-inner {
    display: inline-block;
    transition: transform var(--duration-fast) var(--easing-default);
    font-variant-numeric: tabular-nums;
}

.countdown-digit .digit-inner.flipping {
    transform: rotateX(-90deg);
}

/* =============================================
 * 19. Text Stagger, Cursor Glow & Vinyl Spin
 * ============================================= */

/* Text stagger — word-by-word reveal */
.stagger-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity var(--duration-default) var(--easing-default),
                transform var(--duration-default) var(--easing-default);
}

.stagger-word.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Cursor glow — hero section, desktop only */
@media (hover: hover) {
    .hero-section {
        --mouse-x: 50%;
        --mouse-y: 50%;
    }

    .hero-section::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(
            300px circle at var(--mouse-x) var(--mouse-y),
            var(--color-glow-cursor),
            transparent 70%
        );
        pointer-events: none;
        z-index: 1;
    }
}

/* Vinyl spin — album cover hover */
.vinyl-hover {
    position: relative;
    transition: box-shadow var(--duration-fast) var(--easing-default);
}

.vinyl-hover img {
    transition: transform 0s linear;
}

.vinyl-hover:hover img {
    animation: vinylSpin 4s linear infinite;
}

.vinyl-hover:not(:hover) img {
    animation-play-state: paused;
}

/* Vinyl center shadow */
.vinyl-hover::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30%;
    height: 30%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6);
    pointer-events: none;
    z-index: 2;
}

@keyframes vinylSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* =============================================
 * 20. Phase 3 Reduced Motion Overrides
 * ============================================= */

@media (prefers-reduced-motion: reduce) {
    /* Skeleton shimmer — static placeholder */
    .skeleton::after {
        animation: none;
    }

    /* Button spinner — static indicator */
    .btn-loading::after {
        animation: none;
        border-color: var(--color-primary);
        opacity: 0.6;
    }

    /* Card hover — glow only, no zoom */
    .card-kavig .card-kavig-image img {
        transition: none;
    }

    .card-kavig:hover .card-kavig-image img {
        transform: none;
    }

    /* Text stagger — instant reveal */
    .stagger-word {
        opacity: 1;
        transform: none;
        transition: none;
    }

    /* Vinyl spin — static only */
    .vinyl-hover:hover img {
        animation: none;
    }

    /* Cursor glow — disabled */
    @media (hover: hover) {
        .hero-section::before {
            display: none;
        }
    }
}

/* =============================================
 * 22. Footer
 * ============================================= */

.footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    font-size: 1.25rem;
    color: var(--color-on-surface-muted);
    border: 1px solid var(--color-divider);
    transition: color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
    text-decoration: none;
}

.footer-social-link:hover,
.footer-social-link:focus-visible {
    color: var(--color-primary);
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.footer-nav-link {
    color: var(--color-on-surface-muted);
    text-decoration: none;
    font-family: var(--font-accent);
    font-size: 0.8125rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: color var(--transition-fast);
}

.footer-nav-link:hover,
.footer-nav-link:focus-visible {
    color: var(--color-primary);
}

/* =============================================
 * 23. Store Mode — Revamped Homepage Purchase Experience
 * ============================================= */

.store-mode-home {
    position: relative;
    padding: 0;
    background: var(--color-surface-0);
    overflow: hidden;
}

.store-mode-container {
    position: relative;
    isolation: isolate;
    padding: clamp(32px, 6vw, 80px) 0 clamp(48px, 8vw, 100px);
}

.store-mode-hero-section {
    position: relative;
    padding: clamp(16px, 3vw, 40px) 0;
}

/* Master Card Container */
.store-mode-card {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(24px, 4vw, 48px);
    padding: clamp(20px, 4vw, 52px);
    background: linear-gradient(165deg, var(--color-surface-1) 0%, rgba(10, 10, 10, 0.95) 100%);
    border: 1px solid var(--color-divider);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Gold hairline accent on card top */
.store-mode-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-gold);
    opacity: 0.9;
}

/* Artwork Column */
.store-mode-art-column {
    display: flex;
    flex-direction: column;
}

.store-mode-art-frame {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--color-surface-2);
    border: 1px solid var(--color-divider);
    box-shadow: 0 0 0 1px var(--color-ring-store-art, rgba(212, 175, 55, 0.2)), 0 20px 48px rgba(0, 0, 0, 0.6);
    transition: all var(--duration-default) var(--easing-default);
}

.store-mode-art-frame:hover {
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.15), 0 20px 48px rgba(0, 0, 0, 0.7);
}

.store-mode-art-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--duration-default) var(--easing-default);
}

.store-mode-art-frame:hover .store-mode-art-img {
    transform: scale(1.03);
}

.store-mode-art-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    font-size: 4rem;
    opacity: 0.25;
}

/* Floating Badges */
.store-mode-badges-wrapper {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    right: var(--space-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xs);
    pointer-events: none;
    z-index: 2;
}

.store-badge-pill {
    padding: 6px 12px;
    background: rgba(10, 10, 10, 0.85);
    border: 1px solid var(--color-divider);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-family: var(--font-accent);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-on-surface);
}

.store-badge-limited {
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.store-badge-preorder {
    color: #F59E0B;
    border-color: #F59E0B;
}

.store-badge-soldout {
    color: var(--color-crimson);
    border-color: var(--color-crimson);
}

.store-badge-type {
    margin-left: auto;
    color: var(--color-primary);
    background: rgba(18, 18, 18, 0.9);
}

.store-art-zoom-btn {
    position: absolute;
    bottom: var(--space-md);
    right: var(--space-md);
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 10, 0.85);
    border: 1px solid var(--color-divider);
    color: var(--color-on-surface);
    font-size: 14px;
    cursor: pointer;
    transition: all var(--duration-fast) var(--easing-default);
    z-index: 2;
}

.store-art-zoom-btn:hover {
    background: var(--color-primary);
    color: var(--color-on-primary);
    border-color: var(--color-primary);
}

/* Highlights Ribbon below Art */
.store-art-perks-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.store-art-perk {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px 6px;
    background: var(--color-surface-1);
    border: 1px solid var(--color-divider);
    font-size: 11px;
    line-height: 1.3;
    color: var(--color-on-surface-muted);
}

.store-art-perk i {
    font-size: 16px;
    margin-bottom: 4px;
}

/* Right Column Purchase Hub */
.store-mode-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.store-mode-title {
    font-family: var(--font-display);
    font-size: clamp(32px, 6vw, 56px);
    font-weight: 400;
    line-height: 1.05;
    text-transform: uppercase;
    color: var(--color-on-surface);
}

.store-mode-desc {
    font-size: clamp(14px, 1.5vw, 15px);
    line-height: 1.7;
    color: var(--color-on-surface-muted);
    max-width: 58ch;
}

/* Banners */
.store-preorder-banner,
.store-limited-banner {
    background: var(--color-surface-2);
    border: 1px solid var(--color-divider);
}

.store-limited-banner {
    border-color: rgba(176, 16, 48, 0.4);
}

/* Pricing Box */
.store-mode-price-box {
    padding: 16px 20px;
    background: var(--color-surface-2);
    border: 1px solid var(--color-divider);
}

.store-mode-price-amount {
    font-family: var(--font-accent);
    font-size: clamp(28px, 4vw, 38px);
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
}

/* Currency Pills */
.store-mode-currency-pills {
    display: inline-flex;
    padding: 3px;
    background: var(--color-surface-0);
    border: 1px solid var(--color-divider);
}

.currency-toggle-pill {
    padding: 6px 14px;
    border: none;
    background: transparent;
    color: var(--color-on-surface-muted);
    font-family: var(--font-accent);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all var(--duration-fast) var(--easing-default);
}

.currency-toggle-pill.active {
    background: var(--color-primary);
    color: var(--color-on-primary);
}

/* Variant Pills */
.btn-variant-pill {
    position: relative;
    padding: 10px 18px;
    background: var(--color-surface-2);
    border: 1px solid var(--color-divider);
    color: var(--color-on-surface);
    font-family: var(--font-accent);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all var(--duration-fast) var(--easing-default);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-variant-pill:hover:not(:disabled) {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-variant-pill.active {
    border-color: var(--color-primary);
    background: rgba(212, 175, 55, 0.12);
    color: var(--color-primary);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.2);
}

.badge-stock-out {
    font-size: 9px;
    padding: 2px 4px;
    background: var(--color-crimson);
    color: #FFF;
    text-transform: uppercase;
}

/* Stepper */
.store-mode-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--color-divider);
    background: var(--color-surface-2);
    height: 52px;
}

.store-mode-step {
    width: 44px;
    height: 100%;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--color-on-surface);
    font-family: var(--font-accent);
    font-size: 18px;
    cursor: pointer;
    transition: all var(--duration-fast) var(--easing-default);
}

.store-mode-step:hover:not(:disabled) {
    background: var(--color-surface-1);
    color: var(--color-primary);
}

.store-mode-step:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.store-mode-step-value {
    min-width: 44px;
    text-align: center;
    font-family: var(--font-accent);
    font-size: 16px;
    font-weight: 600;
    color: var(--color-on-surface);
    font-variant-numeric: tabular-nums;
}

/* CTA Buttons */
.store-mode-btn-cart {
    min-height: 52px;
    font-size: 15px;
    font-family: var(--font-accent);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 600;
}

.store-mode-btn-buynow {
    min-height: 52px;
    font-size: 15px;
    font-family: var(--font-accent);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 700;
    background: var(--gradient-gold, #D4AF37);
    color: #0A0A0A;
    border: none;
    transition: all var(--duration-fast) var(--easing-default);
}

.store-mode-btn-buynow:hover:not(:disabled) {
    filter: brightness(1.15);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
    transform: translateY(-1px);
    color: #000;
}

.btn-store-wishlist {
    min-width: 52px;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface-2);
    border: 1px solid var(--color-divider);
    color: var(--color-on-surface-muted);
    font-size: 18px;
    cursor: pointer;
    transition: all var(--duration-fast) var(--easing-default);
}

.btn-store-wishlist:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-store-wishlist.active {
    border-color: var(--color-crimson);
    color: var(--color-crimson);
}

.store-mode-soldout-box {
    border: 1px dashed var(--color-divider);
    background: var(--color-surface-1);
}

/* Trust Badges */
.store-trust-badges {
    background: var(--color-surface-1);
    border: 1px solid var(--color-divider);
}

/* Bento Grid */
.store-bento-card {
    background: var(--color-surface-1);
    border: 1px solid var(--color-divider);
    transition: all var(--duration-default) var(--easing-default);
    position: relative;
    overflow: hidden;
}

.store-bento-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background: var(--color-primary);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform var(--duration-fast) var(--easing-default);
}

.store-bento-card:hover {
    border-color: rgba(212, 175, 55, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.store-bento-card:hover::before {
    transform: scaleY(1);
}

.store-bento-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface-2);
    border: 1px solid var(--color-divider);
    font-size: 20px;
}

/* Artist Statement Quote */
.store-artist-quote {
    background: var(--color-surface-2);
    border: 1px solid var(--color-divider);
}

/* Accordion FAQs */
.store-accordion-item {
    background: var(--color-surface-2) !important;
    border: 1px solid var(--color-divider) !important;
    border-radius: 0 !important;
}

.store-accordion-btn {
    background: var(--color-surface-2) !important;
    color: var(--color-on-surface) !important;
    font-family: var(--font-accent);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 18px 22px !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.store-accordion-btn:not(.collapsed) {
    color: var(--color-primary) !important;
    border-bottom: 1px solid var(--color-divider);
}

.store-accordion-btn::after {
    filter: invert(1) brightness(0.7);
}

.store-accordion-btn:not(.collapsed)::after {
    filter: invert(80%) sepia(50%) saturate(1000%) hue-rotate(5deg);
}

.store-accordion-body {
    padding: 20px 22px !important;
    color: var(--color-on-surface-muted);
    line-height: 1.75;
    font-size: 14px;
}

/* Sticky Mobile Quick-Buy Bar */
.store-mode-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px));
    background: rgba(10, 10, 10, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--color-divider);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.5);
    transform: translateY(100%);
    transition: transform var(--duration-default) var(--easing-default);
}

/* Ensure footer links (privacy, terms, etc.) are never obscured by fixed bottom bar on mobile */
@media (max-width: 991.98px) {
    .site-footer.has-sticky-bottom,
    body:has(.store-mode-sticky-bar) .site-footer,
    body:has(.store-mode-home) .site-footer {
        padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px)) !important;
    }

    body:has(.store-mode-sticky-bar) .back-to-top,
    body:has(.store-mode-home) .back-to-top {
        bottom: calc(90px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

.store-mode-sticky-bar.visible {
    transform: translateY(0);
}

.store-sticky-thumb {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border: 1px solid var(--color-divider);
}

.store-sticky-thumb-fallback {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface-2);
    border: 1px solid var(--color-divider);
}

/* Responsive Grid & Spacing Adjustments */
.store-mode-home .divider-gold {
    margin: 20px 0;
}

@media (max-width: 767.98px) {
    .store-mode-home section.py-5 {
        padding-top: 28px !important;
        padding-bottom: 28px !important;
    }

    .store-mode-home .divider-gold {
        margin: 0 !important;
    }

    .store-mode-home .text-center.mb-5 {
        margin-bottom: 20px !important;
    }

    .store-mode-home .text-center.mb-4 {
        margin-bottom: 16px !important;
    }

    .store-mode-hero-section {
        padding: 12px 0 20px;
    }
}

@media (min-width: 768px) {
    .store-mode-card {
        grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
        align-items: center;
    }

    .store-mode-sticky-bar {
        display: none !important;
    }
}

@media (min-width: 1200px) {
    .store-mode-card {
        grid-template-columns: minmax(0, 5.2fr) minmax(0, 6.8fr);
        padding: 56px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .store-mode-art-img,
    .store-mode-sticky-bar,
    .store-bento-card {
        transition: none;
    }

    .store-mode-art-frame:hover .store-mode-art-img,
    .store-bento-card:hover {
        transform: none;
    }
}

/* =============================================
 * 24. Cosmic Foundation Utilities
 * =============================================
 * Atmosphere layers designed for the cosmic theme. Decorative, pointer-
 * transparent layers (z-index 0) that sit behind content but above the page
 * background. Token-driven, so they degrade gracefully in any theme.
 */

/* --- Nebula glow: large blurred ambient blobs (cosmic theme only) --- */
.nebula-glow {
    display: none;
}

html[data-theme="cosmic"] .nebula-glow {
    display: block;
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.nebula-glow::before,
.nebula-glow::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
}

/* Blob colors mix the cosmic tokens down to low-luminance alphas over the dark
   base (color-mix keeps them token-driven; rgba is permitted in gradients). */
.nebula-glow--violet::before {
    width: 70vmax;
    height: 70vmax;
    top: -25%;
    left: -20%;
    background: radial-gradient(circle, color-mix(in srgb, var(--color-nebula-violet) 26%, transparent) 0%, transparent 62%);
}

.nebula-glow--violet::after {
    width: 55vmax;
    height: 55vmax;
    bottom: -30%;
    right: -15%;
    background: radial-gradient(circle, color-mix(in srgb, var(--color-accent) 16%, transparent) 0%, transparent 60%);
}

.nebula-glow--pink::before {
    width: 60vmax;
    height: 60vmax;
    top: -20%;
    right: -15%;
    background: radial-gradient(circle, color-mix(in srgb, var(--color-nebula-pink) 22%, transparent) 0%, transparent 62%);
}

.nebula-glow--pink::after {
    width: 55vmax;
    height: 55vmax;
    bottom: -22%;
    left: -12%;
    background: radial-gradient(circle, color-mix(in srgb, var(--color-nebula-blue) 20%, transparent) 0%, transparent 60%);
}

.nebula-glow--cyan::before {
    width: 64vmax;
    height: 64vmax;
    top: -18%;
    left: 8%;
    background: radial-gradient(circle, color-mix(in srgb, var(--color-accent) 20%, transparent) 0%, transparent 62%);
}

.nebula-glow--cyan::after {
    width: 52vmax;
    height: 52vmax;
    bottom: -26%;
    left: 32%;
    background: radial-gradient(circle, color-mix(in srgb, var(--color-nebula-magenta) 20%, transparent) 0%, transparent 60%);
}

/* --- Star field: sparse static stars with optional slow twinkle (cosmic theme only) --- */
.star-field {
    display: none;
}

html[data-theme="cosmic"] .star-field {
    display: block;
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

/* Markup: <span class="star" style="--star-x:12%; --star-y:30%; --star-size:3px"></span>
   Add .star--twinkle (+ optional --star-delay / --star-cycle) for the few that animate. */
.star {
    position: absolute;
    left: var(--star-x, 50%);
    top: var(--star-y, 50%);
    font-size: var(--star-size, 4px);
    line-height: 1;
    color: var(--color-star, transparent);
    opacity: var(--star-opacity, 0.8);
    pointer-events: none;
    user-select: none;
}

.star::before {
    content: '✦';
    display: block;
    text-shadow: 0 0 6px currentColor;
}

.star--twinkle {
    animation: twinkle var(--star-cycle, 6s) ease-in-out infinite;
    animation-delay: var(--star-delay, 0s);
}

@keyframes twinkle {
    0%, 100% {
        opacity: var(--star-opacity, 0.8);
        transform: scale(1);
    }
    50% {
        opacity: calc(var(--star-opacity, 0.8) * 0.35);
        transform: scale(0.8);
    }
}

/* --- Grain overlay: barely perceptible film grain, fixed to the viewport --- */
.grain-overlay {
    position: fixed;
    inset: 0;
    z-index: calc(var(--z-nav) - 1); /* below nav, above page backgrounds */
    pointer-events: none;
    opacity: var(--grain-opacity, 0.035);
    mix-blend-mode: soft-light;
    /* Inline feTurbulence grain (no external asset) */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
    background-size: 180px 180px;
}

/* =============================================
 * 25. Cosmic Signature Motifs
 * ============================================= */

/* --- Heart-eye: the album's signature glyph ---
   Rendered from an inline SVG mask so it inherits currentColor:
   size via font-size, color via color (tokens). One-off motif — use sparingly
   (hero, marquee separators, footer watermark); never as a repeating pattern. */
.heart-eye {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: -0.15em;
    color: var(--color-accent, var(--color-primary));
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='%23000'%3E%3Cpath d='M12 20.8 C10.6 19.6 3.2 14.4 3.2 8.6 C3.2 5.7 5.6 3.2 8.5 3.2 C10.4 3.2 11.6 4 12 4.9 C12.4 4 13.6 3.2 15.5 3.2 C18.4 3.2 20.8 5.7 20.8 8.6 C20.8 14.4 13.4 19.6 12 20.8 Z'/%3E%3Ccircle cx='12' cy='10.6' r='3.5'/%3E%3Ccircle cx='12' cy='10.6' r='1.15'/%3E%3C/g%3E%3Cg fill='%23fff'%3E%3Ccircle cx='12' cy='10.6' r='2.3'/%3E%3Ccircle cx='11.1' cy='9.7' r='0.5'/%3E%3C/g%3E%3Cpath d='M8.7 7.6 C10 6.7 14 6.7 15.3 7.6' fill='none' stroke='%23000' stroke-width='1.3' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='%23000'%3E%3Cpath d='M12 20.8 C10.6 19.6 3.2 14.4 3.2 8.6 C3.2 5.7 5.6 3.2 8.5 3.2 C10.4 3.2 11.6 4 12 4.9 C12.4 4 13.6 3.2 15.5 3.2 C18.4 3.2 20.8 5.7 20.8 8.6 C20.8 14.4 13.4 19.6 12 20.8 Z'/%3E%3Ccircle cx='12' cy='10.6' r='3.5'/%3E%3Ccircle cx='12' cy='10.6' r='1.15'/%3E%3C/g%3E%3Cg fill='%23fff'%3E%3Ccircle cx='12' cy='10.6' r='2.3'/%3E%3Ccircle cx='11.1' cy='9.7' r='0.5'/%3E%3C/g%3E%3Cpath d='M8.7 7.6 C10 6.7 14 6.7 15.3 7.6' fill='none' stroke='%23000' stroke-width='1.3' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
    flex-shrink: 0;
}

/* --- Marquee: very slow horizontal scroll for music metadata ---
   Markup: <div class="marquee"><div class="marquee-track">
             <span class="marquee-group">…content…</span>
             <span class="marquee-group" aria-hidden="true">…same content…</span>
           </div></div>
   The -50% loop needs the content duplicated into exactly two groups. */
.marquee {
    position: relative;
    overflow: hidden;
    width: 100%;
    white-space: nowrap;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    user-select: none;
}

.marquee-track {
    display: inline-flex;
    align-items: center;
    min-width: max-content;
    will-change: transform;
    animation: marquee var(--marquee-duration, 32s) linear infinite;
}

.marquee-group {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    padding-right: var(--marquee-gap, 3.5rem);
}

@media (hover: hover) {
    .marquee:hover .marquee-track {
        animation-play-state: paused;
    }
}

@keyframes marquee {
    from { transform: translateX(-50%); }
    to { transform: translateX(0); }
}

/* =============================================
 * 26. Cosmic Type & Color Utilities
 * ============================================= */

/* Hand-lettered accent font (album lettering vibe).
   Undefined under the default theme, so this resolves to inherited — a no-op. */
.font-hand {
    font-family: var(--font-hand);
}

/*
 * Accent color utility (cyan under cosmic). Extends the existing .text-accent
 * typography class with a color that is defined only under [data-theme="cosmic"];
 * under the default theme the variable is undefined, so the declaration resolves
 * to inherit and the class renders exactly as it does today.
 */
.text-accent {
    color: var(--color-accent);
}

/*
 * Combined heart-eye + text-accent: beats the later single-class .text-accent
 * color declaration so the motif keeps its built-in fallback chain — cyan under
 * cosmic, gold (--color-primary) under the default theme where --color-accent
 * is undefined.
 */
.heart-eye.text-accent {
    color: var(--color-accent, var(--color-primary));
}

/* Heading air — subtle letter-spacing on the hero display heading.
   No-op under the default theme (--tracking-display undefined → inherited). */
.heading-kern {
    letter-spacing: var(--tracking-display);
}

/* Hand-written marquee lyric line (album lettering vibe).
   No-op under the default theme: --font-hand/--color-accent are undefined
   there, so these declarations resolve to inherited. */
.marquee-lyric {
    font-family: var(--font-hand);
    color: var(--color-accent);
    font-size: 1.35rem;
    line-height: 1;
}

/* Star separators inside the marquee lyric line (inherit the lyric color) */
.marquee-sep {
    margin: 0 var(--space-md);
}

/* =============================================
 * 27. Cosmic Reduced Motion Overrides
 * ============================================= */

@media (prefers-reduced-motion: reduce) {
    /* Stars — static, no twinkle */
    .star--twinkle {
        animation: none;
    }
}

/* =============================================
 * 28. Pagination (Dark Theme)
 * ============================================= */
/*
 * Laravel's default paginator markup emits .pagination / .page-item /
 * .page-link / .active classes. Bootstrap 5.3 reads the --bs-pagination-*
 * variables below on the .pagination element, so overriding them here matches
 * the dark theme (page background #0A0A0A, gold accent #F5C518).
 */
.pagination {
    --bs-pagination-color: #e5e7eb;
    --bs-pagination-bg: #16181d;
    --bs-pagination-border-color: #2a2d34;
    --bs-pagination-hover-color: #ffffff;
    --bs-pagination-hover-bg: #23262d;
    --bs-pagination-hover-border-color: #3a3f48;
    --bs-pagination-focus-color: #ffffff;
    --bs-pagination-focus-bg: #23262d;
    --bs-pagination-active-bg: #F5C518;
    --bs-pagination-active-border-color: #F5C518;
    --bs-pagination-active-color: #0A0A0A;
    --bs-pagination-disabled-bg: #101114;
    --bs-pagination-disabled-border-color: #26292f;
}

/* Fallback: force .page-link colors directly in case the variable override is
   insufficient (older Bootstrap builds / precompiled styles). */
.pagination .page-link {
    color: #e5e7eb;
    background-color: #16181d;
    border-color: #2a2d34;
}

.pagination .page-link:hover,
.pagination .page-link:focus {
    color: #ffffff;
    background-color: #23262d;
    border-color: #3a3f48;
}

.pagination .page-item.active .page-link {
    color: #0A0A0A;
    background-color: #F5C518;
    border-color: #F5C518;
}

.pagination .page-item.disabled .page-link {
    color: #9ca3af;
    background-color: #101114;
    border-color: #26292f;
}

/* =============================================
 * 29. Wishlist Heart Toggle
 * =============================================
 * Shared by store/show and store grid cards. Uses the existing
 * .wishlist-toggle handler in kavig.js (data-wishlist-url + aria-pressed).
 */
.wishlist-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    min-height: 44px;
    padding: var(--space-xs) var(--space-md);
    background: transparent;
    color: var(--color-on-surface-muted);
    border: 1px solid var(--color-divider);
    font-family: var(--font-accent);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: color var(--duration-fast) var(--easing-default),
                border-color var(--duration-fast) var(--easing-default),
                background-color var(--duration-fast) var(--easing-default);
}

.wishlist-toggle:hover {
    color: var(--color-error);
    border-color: var(--color-error);
}

.wishlist-toggle.active {
    color: var(--color-error);
    border-color: var(--color-error);
    background: rgba(234, 51, 91, 0.06);
}

.wishlist-toggle[disabled] {
    opacity: 0.5;
    pointer-events: none;
}

/* Compact heart for grid card corners */
.wishlist-heart-card {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    z-index: 2;
    width: 40px;
    height: 40px;
    padding: 0;
    background: rgba(10, 10, 10, 0.7);
    border: 1px solid var(--color-divider);
    color: var(--color-on-surface-muted);
    border-radius: 0;
}

.wishlist-heart-card:hover,
.wishlist-heart-card.active {
    color: var(--color-error);
    border-color: var(--color-error);
    background: rgba(10, 10, 10, 0.85);
}

.wishlist-heart-card .bi {
    font-size: 1.15rem;
}

/* =============================================
 * 30. Back-to-Top
 * =============================================
 * Fixed bottom-right; fades in after scrolling. Hidden from reduced-motion
 * users' focus order until visible via the .is-visible class.
 */
.back-to-top {
    position: fixed;
    right: var(--space-lg);
    bottom: var(--space-lg);
    z-index: var(--z-nav);
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface-1);
    color: var(--color-primary);
    border: 1px solid var(--color-divider);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity var(--duration-fast) var(--easing-default),
                visibility var(--duration-fast) var(--easing-default),
                transform var(--duration-fast) var(--easing-default),
                background-color var(--duration-fast) var(--easing-default);
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus-visible {
    background: var(--color-primary);
    color: var(--color-on-primary);
}

@media (prefers-reduced-motion: reduce) {
    .back-to-top {
        transition: none;
    }
}

/* =============================================
 * 31. Checkout — Modern Dark-First Revamp
 * =============================================
 * Responsive 2-column checkout layout with sticky order summary,
 * custom payment gateway cards, currency pills, and step indicators.
 */
.checkout-layout {
    max-width: 1140px;
}

.checkout-step-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
}

.checkout-step-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-family: var(--font-accent);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-on-surface-muted);
}

.checkout-step-item.active {
    color: var(--color-primary);
    font-weight: 600;
}

.checkout-step-item.completed {
    color: var(--color-on-surface);
}

.checkout-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    background: var(--color-surface-2);
    color: var(--color-on-surface-muted);
    border: 1px solid var(--color-divider);
}

.checkout-step-item.active .checkout-step-num {
    background: var(--color-primary);
    color: var(--color-on-primary);
    border-color: var(--color-primary);
}

.checkout-step-divider {
    width: 28px;
    height: 1px;
    background: var(--color-divider);
}

.checkout-card {
    background: var(--color-surface-1);
    border: 1px solid var(--color-divider);
    padding: var(--space-xl);
    position: relative;
    transition: border-color var(--duration-fast) var(--easing-default);
}

.checkout-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-divider);
}

.checkout-card-header .title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-on-surface);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin: 0;
}

.checkout-input {
    background: var(--color-surface-0) !important;
    border: 1px solid var(--color-divider) !important;
    color: var(--color-on-surface) !important;
    border-radius: 0 !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
    font-family: var(--font-body) !important;
    transition: border-color var(--duration-fast) var(--easing-default),
                box-shadow var(--duration-fast) var(--easing-default) !important;
}

.checkout-input:focus {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2) !important;
    outline: none !important;
}

.checkout-input::placeholder {
    color: var(--color-on-surface-muted);
    opacity: 0.6;
}

.checkout-currency-pills {
    display: inline-flex;
    align-items: center;
    background: var(--color-surface-0);
    border: 1px solid var(--color-divider);
    border-radius: 50px;
    padding: 3px;
    gap: 2px;
}

.checkout-currency-pill {
    border: none;
    border-radius: 50px;
    background: transparent;
    color: var(--color-on-surface-muted);
    font-family: var(--font-accent);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 6px 16px;
    cursor: pointer;
    transition: all var(--duration-fast) var(--easing-default);
}

.checkout-currency-pill:hover {
    color: var(--color-on-surface);
}

.checkout-currency-pill.active {
    background: var(--color-primary);
    color: var(--color-on-primary);
}

.gateway-option-card {
    border: 1px solid var(--color-divider);
    background: var(--color-surface-0);
    padding: var(--space-md) var(--space-lg);
    cursor: pointer;
    transition: border-color var(--duration-fast) var(--easing-default),
                background var(--duration-fast) var(--easing-default),
                box-shadow var(--duration-fast) var(--easing-default);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    position: relative;
}

.gateway-option-card:hover {
    border-color: rgba(255, 215, 0, 0.4);
    background: rgba(255, 215, 0, 0.02);
}

.gateway-option-card.selected {
    border-color: var(--color-primary);
    background: rgba(255, 215, 0, 0.04);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.08);
}

.gateway-option-card .form-check-input {
    width: 1.15rem;
    height: 1.15rem;
    margin: 0;
    cursor: pointer;
    background-color: var(--color-surface-2);
    border-color: var(--color-divider);
}

.gateway-option-card .form-check-input:checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.gateway-brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: var(--color-surface-2);
    border: 1px solid var(--color-divider);
    border-radius: 3px;
    font-size: 11px;
    font-family: var(--font-accent);
    font-weight: 600;
    color: var(--color-on-surface);
    letter-spacing: 0.04em;
}

.checkout-summary-sticky {
    position: sticky;
    top: calc(var(--nav-height) + var(--space-lg));
}

@media (min-width: 992px) {
    .checkout-summary-sticky {
        max-height: calc(100vh - var(--nav-height) - var(--space-2xl));
        overflow-y: auto;
    }
}

.checkout-item-thumb {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    position: relative;
    border: 1px solid var(--color-divider);
    overflow: hidden;
}

.checkout-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.checkout-variant-tag {
    display: inline-block;
    padding: 1px 6px;
    background: var(--color-surface-2);
    border: 1px solid var(--color-divider);
    font-size: 11px;
    font-family: var(--font-accent);
    color: var(--color-on-surface-muted);
    letter-spacing: 0.04em;
    margin-top: 2px;
}

.checkout-qty-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    background: var(--color-surface-2);
    border: 1px solid var(--color-divider);
    font-size: 12px;
    font-family: var(--font-accent);
    font-weight: 600;
    color: var(--color-on-surface);
}

.checkout-trust-box {
    background: var(--color-surface-0);
    border: 1px solid var(--color-divider);
    padding: var(--space-md);
    font-size: 12px;
    color: var(--color-on-surface-muted);
    line-height: 1.6;
}

.checkout-trust-box .trust-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.checkout-trust-box .trust-item i {
    color: var(--color-primary);
    font-size: 14px;
    margin-top: 2px;
}

/* Mobile collapsible order summary banner (<992px) */
.checkout-mobile-summary-bar {
    display: none;
    background: var(--color-surface-1);
    border: 1px solid var(--color-divider);
    padding: 12px 16px;
    margin-bottom: var(--space-lg);
    cursor: pointer;
}

@media (max-width: 991.98px) {
    .checkout-mobile-summary-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
}


/* =============================================
 * 32. Fan Profile — Verification Banner & Password
 * ============================================= */
.verify-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    flex-wrap: wrap;
    padding: var(--space-md) var(--space-lg);
    background: var(--color-surface-1);
    border: 1px solid var(--color-error);
}

/* =============================================
 * 33. Press Quotes (Home)
 * ============================================= */
.press-quote {
    position: relative;
    padding: var(--space-lg);
    background: var(--color-surface-1);
    border: 1px solid var(--color-divider);
    height: 100%;
}

.press-quote blockquote {
    margin: 0 0 var(--space-md);
    color: var(--color-on-surface);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    font-style: italic;
}

.press-quote figcaption {
    color: var(--color-on-surface-muted);
    font-family: var(--font-accent);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* =============================================
 * 34. Release Alerts Opt-In (Music Show)
 * ============================================= */
.release-alert {
    background: var(--color-surface-1);
    border: 1px solid var(--color-divider);
}

/* =============================================
 * 35. Toast Consolidation — single container
 * =============================================
 * Both KavigUI.notify (JS) and the server flash partial render into the SAME
 * .toast-container.kavig-ui-toasts anchor (z-index 1100, top-right). The
 * server flash partial emits static toasts into this container on load, and
 * JS appends live ones — never two competing containers.
 */
.toast-container.kavig-ui-toasts {
    z-index: 1100;
}

/* =============================================
 * 36. Song Previews Audio Player — Studio Console
 * ============================================= */
.song-previews-container {
    background: var(--color-surface-1);
    border: 1px solid var(--color-divider);
    padding: var(--space-lg);
    max-width: 100%;
    position: relative;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}

.song-previews-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
    opacity: 0.85;
}

.song-previews-header {
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-divider);
    margin-bottom: var(--space-lg);
}

.preview-badge-master {
    font-family: var(--font-accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.preview-disc-icon {
    font-size: 13px;
    color: var(--color-primary);
}

.preview-count-badge {
    font-family: var(--font-accent);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--color-on-surface-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 3px 8px;
}

.song-preview-deck {
    padding: var(--space-xs) 0;
}

.preview-active-title {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 3vw, 2.1rem);
    letter-spacing: -0.01em;
    line-height: 1.1;
    color: var(--color-on-surface);
    text-transform: uppercase;
    transition: opacity var(--duration-normal) var(--easing-default), transform var(--duration-normal) var(--easing-default);
}

.preview-active-title.title-transitioning {
    opacity: 0;
    transform: translateY(3px);
}

.preview-status-line {
    font-family: var(--font-accent);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-on-surface-muted);
}

.preview-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-on-surface-muted);
    opacity: 0.4;
    transition: all var(--duration-fast) var(--easing-default);
}

.preview-status-dot.is-active {
    background: var(--color-primary);
    opacity: 1;
    box-shadow: 0 0 8px var(--color-primary);
    animation: statusPulse 1.6s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.6; }
}

.btn-preview-vol-toggle,
.btn-preview-skip {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--color-surface-2);
    border: 1px solid var(--color-divider);
    color: var(--color-on-surface-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all var(--duration-fast) var(--easing-default);
    flex-shrink: 0;
}

.btn-preview-vol-toggle:hover,
.btn-preview-skip:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
    background: var(--color-surface-3);
    transform: scale(1.05);
}

/* Waveform Visualizer */
.preview-waveform-deck {
    background: var(--color-surface-0);
    border: 1px solid var(--color-divider);
    padding: var(--space-md) var(--space-md) var(--space-sm);
}

.preview-waveform {
    height: 52px;
    position: relative;
    cursor: pointer;
}

.preview-waveform-bars {
    width: 100%;
    height: 100%;
    gap: 3px;
    pointer-events: none;
}

.preview-wave-bar {
    flex: 1;
    max-width: 5px;
    height: var(--bar-height, 30%);
    background: rgba(255, 255, 255, 0.12);
    border-radius: 1px;
    transition: background 0.12s linear, height 0.2s var(--easing-default);
}

.preview-wave-bar.is-played {
    background: var(--color-primary);
    opacity: 0.95;
}

.preview-wave-bar.is-active {
    background: #FFFFFF;
    box-shadow: 0 0 8px var(--color-primary);
    animation: barBounce 0.7s ease-in-out infinite alternate;
}

@keyframes barBounce {
    0% { transform: scaleY(0.7); }
    100% { transform: scaleY(1.2); }
}

.preview-scrubber {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    margin: 0;
    z-index: 3;
}

.preview-time-row {
    font-family: var(--font-accent);
    font-size: 12px;
    letter-spacing: 0.06em;
    font-variant-numeric: tabular-nums;
}

.preview-current-time {
    color: var(--color-on-surface);
    font-weight: 600;
}


.preview-duration {
    color: var(--color-on-surface-muted);
    font-weight: 500;
}

/* Master Play Button */
.btn-preview-master-play {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 1.5px solid var(--color-primary);
    background: var(--color-surface-2);
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.4rem;
    transition: all var(--duration-fast) var(--easing-default);
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    position: relative;
}

.btn-preview-master-play:hover {
    transform: scale(1.06);
    background: var(--color-primary);
    color: var(--color-on-primary);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.35);
}

html[data-theme="cosmic"] .btn-preview-master-play:hover {
    box-shadow: 0 0 20px rgba(141, 108, 224, 0.45);
}

.btn-preview-master-play.is-playing {
    border-color: var(--color-primary);
    box-shadow: 0 0 16px rgba(255, 215, 0, 0.25);
}

html[data-theme="cosmic"] .btn-preview-master-play.is-playing {
    box-shadow: 0 0 16px rgba(141, 108, 224, 0.35);
}

.btn-preview-master-play .bi-play-fill {
    margin-left: 2px;
}

.btn-preview-ctrl-sm {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid var(--color-divider);
    background: var(--color-surface-3);
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all var(--duration-fast) var(--easing-default);
}

.btn-preview-ctrl-sm:hover,
.song-preview-item.active .btn-preview-ctrl-sm {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: var(--color-on-primary);
}

/* Tracklist */
.song-preview-tracklist {
    border-top: 1px solid var(--color-divider);
}

.tracklist-heading {
    font-family: var(--font-accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--color-primary);
}

.tracklist-hint {
    font-family: var(--font-accent);
    font-size: 11px;
    letter-spacing: 0.05em;
}

.song-preview-items-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.song-preview-item {
    background: transparent;
    border: 1px solid transparent;
    padding: 10px 14px;
    cursor: pointer;
    transition: all var(--duration-fast) var(--easing-default);
}

.song-preview-item:hover {
    background: var(--color-surface-2);
    border-color: var(--color-divider);
    padding-left: 18px;
}

.song-preview-item.active {
    background: var(--color-surface-2);
    border-color: var(--color-divider);
    border-left: 2px solid var(--color-primary);
    padding-left: 16px;
}

.song-preview-item.active .song-track-title {
    color: var(--color-primary);
    font-weight: 600;
}

.track-indicator-slot {
    width: 26px;
    height: 26px;
}

.song-track-num {
    font-family: var(--font-accent);
    font-size: 13px;
    font-weight: 600;
    color: var(--color-on-surface-muted);
}

.song-preview-item.active .song-track-num {
    color: var(--color-primary);
}

.preview-eq-bars {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 14px;
    width: 14px;
}

.preview-eq-bars .eq-bar {
    width: 2px;
    background: var(--color-primary);
    border-radius: 1px;
    animation: eqBounce 0.7s ease-in-out infinite alternate;
}

.preview-eq-bars .eq-bar-1 { height: 6px; animation-delay: 0.1s; }
.preview-eq-bars .eq-bar-2 { height: 14px; animation-delay: 0.3s; }
.preview-eq-bars .eq-bar-3 { height: 9px; animation-delay: 0.2s; }

@keyframes eqBounce {
    0% { height: 3px; }
    100% { height: 14px; }
}

.badge-preview-tag {
    font-family: var(--font-accent);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-on-surface-muted);
    border: 1px solid var(--color-divider);
}

.song-preview-item.active .badge-preview-tag {
    background: rgba(255, 215, 0, 0.1);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

html[data-theme="cosmic"] .song-preview-item.active .badge-preview-tag {
    background: rgba(141, 108, 224, 0.15);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.song-track-duration {
    font-family: var(--font-accent);
    font-size: 12px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    min-width: 36px;
}

/* Reduced Motion Override */
@media (prefers-reduced-motion: reduce) {
    .preview-active-title,
    .preview-active-title.title-transitioning,
    .preview-status-text,
    .btn-preview-master-play,
    .btn-preview-skip,
    .btn-preview-vol-toggle,
    .preview-wave-bar,
    .song-preview-item {
        transition: none !important;
        transform: none !important;
    }
    .preview-status-dot.is-active,
    .preview-wave-bar.is-active,
    .preview-eq-bars .eq-bar {
        animation: none !important;
    }
}
