:root {
    --bg-color: #000;
    --accent-color: #111;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --transition-speed: 1000ms;
    --easing: cubic-bezier(0.65, 0.05, 0.36, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: #000;
    color: var(--text-primary);
    overflow: hidden;
    height: 100dvh;
    width: 100vw;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    /* Disable text selection */
}

img {
    -webkit-user-drag: none;
    /* Disable image dragging */
    pointer-events: none;
}

/* Premium Header Styles */
.main-header {
    position: fixed;
    top: 2rem;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    z-index: 1000;
}

.header-logo img {
    height: 100px;
    width: auto;
    filter: brightness(0) invert(1);
    /* Force pure white regardless of source */
    opacity: 0.95;
}

.pill-nav {
    background: rgba(245, 245, 235, 0.65);
    /* Soft beige glass */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 100px;
    padding: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 0.5rem;
}

.nav-menu li a {
    text-decoration: none;
    color: #4a4a4a;
    /* Moderate dark gray */
    font-size: 0.85rem;
    font-weight: 500;
    padding: 10px 24px;
    display: block;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.nav-menu li.active a {
    background: white;
    color: #000;
    border-radius: 100px;
    padding: 10px 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.header-icons {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.icon-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

.icon-btn svg {
    width: 20px;
    height: 20px;
}

#hero-slider {
    position: relative;
    width: 100%;
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
    /* Fallback */
}

#hero-slider::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, transparent 40%, rgba(0, 0, 0, 0.5) 100%);
    pointer-events: none;
    z-index: 5;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-speed) var(--easing), visibility var(--transition-speed);
    z-index: 1;
    overflow: hidden;
    /* Clip the sliding background */
}

.slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 10;
}

.slide.leaving {
    opacity: 1;
    visibility: visible;
    z-index: 5;
    transition: none !important;
    /* Prevent any fade-out during transition */
}

/* Pin elements during exit to prevent them "sliding away" */
.slide.leaving .slide-bg {
    transform: translateX(0) !important;
    transition: none !important;
}

.slide.leaving .product-container.tilted {
    transform: translateX(0) scale(1) rotate(-20deg) !important;
    transition: none !important;
}

/* Sliding Background */
.slide-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, var(--accent-color) 0%, var(--bg-color) 100%);
    z-index: -1;
    transform: translateX(100%);
    transition: transform var(--transition-speed) var(--easing);
}

.slide.active .slide-bg {
    transform: translateX(0);
}

/* Brand Backdrop */
.brand-backdrop {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    /* Scale the logo properly */
    opacity: 0.5;
    z-index: 1;
    pointer-events: none;
    user-select: none;
    transition: none !important;
    /* Keep it perfectly static */
}

.brand-backdrop img {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
    /* Ensure the logo is white */
}

/* Product Image Animations */
.product-container.tilted {
    position: relative;
    z-index: 10;
    /* Ensure it stays in front of the brand backdrop */
    transform: translateX(100%) scale(0.95) rotate(-20deg);
    transition: transform var(--transition-speed) var(--easing);
}

.active .product-container.tilted {
    transform: translateX(0) scale(1) rotate(-20deg);
}

.product-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.3));
    animation: float 6s ease-in-out infinite;
}

.product-shadow {
    position: absolute;
    bottom: -40px;
    width: 60%;
    height: 20px;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(10px);
    transform: scaleX(1.5);
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* Left Content (Title) */
.left-content {
    position: absolute;
    left: 8%;
    bottom: 12%;
    /* Raised from 8% */
    z-index: 20;
    pointer-events: none;
}

.product-title {
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 0.85;
    opacity: 0;
    transform: translateX(-50px);
    transition: all 1000ms var(--easing) 300ms;
}

.active .product-title {
    opacity: 1;
    transform: translateX(0);
}

/* Right Content (Details & Actions) */
.right-content {
    position: absolute;
    bottom: 8%;
    right: 8%;
    max-width: 400px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
}

.slogan {
    font-size: 1.1rem;
    font-weight: 300;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
    opacity: 0;
    transform: translateY(20px);
    transition: all 800ms var(--easing) 400ms;
}

.price {
    font-size: 2rem;
    font-weight: 700;
    /* Bold as requested */
    color: white;
    opacity: 0;
    transform: translateY(20px);
    transition: all 800ms var(--easing) 500ms;
}

/* Size Selector */
.size-selector {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 800ms var(--easing) 600ms;
}

.size-selector span {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: var(--text-secondary);
}

.size-options {
    display: flex;
    gap: 0.8rem;
}

.size-btn {
    width: 45px;
    height: 45px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.size-btn:hover,
.size-btn.active {
    background: white;
    color: black;
    border-color: white;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    width: 100%;
    opacity: 0;
    transform: translateY(20px);
    transition: all 800ms var(--easing) 700ms;
}

.btn-add,
.btn-buy {
    flex: 1;
    padding: 1.2rem;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.btn-add {
    background: transparent;
    border: 1px solid white;
    color: white;
}

.btn-add:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-buy {
    background: white;
    border: 1px solid white;
    color: black;
}

.btn-buy:hover {
    background: rgba(255, 255, 255, 0.8);
}

.active .slogan,
.active .price,
.active .size-selector,
.active .action-buttons {
    opacity: 1;
    transform: translateY(0);
}

/* Navigation */
.navigation {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 3%;
    z-index: 100;
    pointer-events: none;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0.7;
    pointer-events: auto;
}

.nav-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.nav-btn svg {
    width: 32px;
    height: 32px;
}

/* Progress Bar */
.progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 100;
}

.progress-line {
    height: 100%;
    width: 0%;
    background: white;
    transition: width var(--transition-speed) var(--easing);
}

/* Responsive */
@media (max-width: 768px) {
    .left-content {
        top: 16%;
        /* Lowered from 10% to avoid header overlap */
        bottom: auto;
        left: 5%;
        right: 5%;
        transform: none;
        text-align: center;
    }

    .product-title {
        font-size: 2.5rem;
        /* Reduced from 3.5rem */
    }

    .right-content {
        bottom: calc(2% + env(safe-area-inset-bottom));
        /* Lowered to the absolute bottom */
        left: 5%;
        right: 5%;
        max-width: none;
        align-items: center;
        text-align: center;
        gap: 0.3rem;
        /* Minimizing gaps between elements */
    }

    .slogan {
        font-size: 0.9rem;
        /* Slightly smaller to save space */
    }

    .price {
        font-size: 1.5rem;
    }

    .size-btn {
        width: 40px;
        height: 40px;
    }

    .product-container {
        width: 70%;
        /* Increased from 50% for visibility */
        margin-top: -70px;
        /* Lowered from -180px */
        margin-left: -20px;
        /* Shifted left to avoid arrow overlap */
    }

    .brand-backdrop {
        width: 90%;
        /* Larger logo behind on mobile */
        top: 40%;
        opacity: 0.3;
    }

    .brand-backdrop img {
        filter: brightness(0) invert(1) opacity(0.5);
    }

    .navigation {
        top: 40%;
        bottom: auto;
        width: 100%;
        justify-content: space-between;
        padding: 0 1rem;
        transform: translateY(-50%);
    }

    .pill-nav {
        display: none;
    }

    .main-header {
        top: 1rem;
    }
}