:root {
    --color-bg: #050505;
    --color-surface: #101010;
    --color-surface-hover: #1a1a1a;
    --color-primary: #ffffff;
    --color-accent: #d4af37;
    /* Metallic Gold */
    --color-text: #e0e0e0;
    --color-text-muted: #888888;
    --color-border: #333333;

    --font-main: 'Outfit', sans-serif;
    --font-display: 'Playfair Display', serif;

    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text);
    overflow-y: auto;
    /* Enable Scroll */
    min-height: 100vh;
    /* App-like feel */
    -webkit-font-smoothing: antialiased;
}

/* Force scrollability */
body::after {
    content: '';
    display: block;
    height: 1px;
    width: 1px;
    margin-top: 1px;
}

#app {
    position: relative;
    width: 100vw;
    /* Allow content to grow */
    min-height: 100vh;
    padding-bottom: 50px;
    /* Spacer */
}

#webgl {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    outline: none;
}

#ui-layer {
    position: relative;
    /* Changed from absolute to allow scroll flow */
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    /* Allow growing */
    z-index: 10;
    pointer-events: none;
    /* Let clicks pass through to 3D */
    display: flex;
    flex-direction: column;
}

/* Enable pointer events on interactive UI elements */
#ui-layer>* {
    pointer-events: auto;
}

/* Loader */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s var(--ease-premium);
}

.loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.logo-loader {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 3rem;
    letter-spacing: 0.5rem;
    margin-bottom: 2rem;
    background: linear-gradient(45deg, var(--color-accent), #fff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.progress-bar {
    width: 200px;
    height: 2px;
    background: #222;
    border-radius: 4px;
    overflow: hidden;
}

.progress {
    width: 0%;
    height: 100%;
    background: #fff;
    transition: width 0.2s linear;
}

/* Utilities */
.btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid var(--color-border);
    color: #fff;
    padding: 1rem 2rem;
    font-family: var(--font-main);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s var(--ease-premium);
}

.btn:hover {
    background: #fff;
    color: #000;
}

.hidden {
    display: none !important;
}

/* 3D Helpers */
.product-card {
    transform-style: preserve-3d;
    will-change: transform;
}

/* --- RESPONSIVE & MOBILE OPTIMIZATION --- */

/* Android & Mobile Tweaks */
html,
body {
    overflow-x: hidden;
    /* Prevent horizontal scroll on small screens */
    -webkit-tap-highlight-color: transparent;
    /* Remove blue tap highlight on Android */
}

/* Responsive Typography */
h1 {
    font-size: clamp(2.5rem, 5vw, 5rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
}

p {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
}

/* Mobile Breakpoint */
@media (max-width: 768px) {
    :root {
        --spacing-md: 1rem;
        --spacing-lg: 2rem;
        --spacing-xl: 4rem;
        /* Reduced from 8rem */
        --font-display: 'Playfair Display', serif;
    }

    #app {
        padding-bottom: 80px;
        /* Space for potential bottom nav if added later */
    }

    /* Navbar Mobile */
    .navbar {
        padding: 1rem !important;
        /* Override inline style */
        flex-wrap: wrap;
        gap: 1rem;
    }

    .navbar img {
        height: 40px !important;
        /* Smaller Logo */
    }

    /* Stack links on very small screens if needed */
    .navbar>div:last-child {
        gap: 1rem !important;
    }

    /* Checkout Page Mobile */
    .page-checkout {
        padding: 5rem 1rem 2rem !important;
        /* Adjust top padding for navbar */
        flex-direction: column;
        gap: 2rem !important;
    }

    .page-checkout>div {
        flex: 1 1 100% !important;
        min-width: 0 !important;
        /* Prevent overflow */
    }

    /* Buttons */
    .btn {
        width: 100%;
        text-align: center;
        padding: 1rem;
    }

    /* Inputs */
    input {
        font-size: 16px !important;
        /* Prevent iOS zoom */
    }
}