/* =========================================
   VARIABLES & RESETS
   ========================================= */
:root {
    /* Colors */
    --black: #000000;
    --white: #ffffff;
    --text-dark: #474747;
    --text-light: #b3b3b3;
    --bg-offwhite: #f4f4f4;
    --bg-beige: #f1ece6;
    --bg-footer: hsl(262, 30%, 8%);
    --accent: #B5FF00;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Cormorant', serif;
    --transition: 0.35s ease;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 18px;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    color: var(--black);
    font-weight: 400;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* =========================================
   BUTTON STYLES
   ========================================= */
.btn {
    display: inline-block;
    padding: 15px 35px;
    font-family: var(--font-body);
    font-size: 14px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--transition);
    border: 1px solid var(--black);
    text-align: center;
}

.primary-btn, .solid-btn {
    background-color: var(--black);
    color: var(--white);
}

.primary-btn:hover, .solid-btn:hover {
    background-color: var(--white);
    color: var(--black);
}

.outline-btn {
    background-color: transparent;
    color: var(--black);
}

.outline-btn:hover {
    background-color: var(--black);
    color: var(--white);
}

/* =========================================
   HEADER & NAVIGATION
   ========================================= */
.announcement-bar {
    background-color: var(--black);
    color: var(--white);
    text-align: center;
    padding: 12px;
    font-family: sans-serif;
    font-size: 13px;
    letter-spacing: 0.06em;
    cursor: pointer;
}

.announcement-bar:hover {
    text-decoration: underline;
}

.main-header {
    padding: 20px 5%;
    background-color: var(--white);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-nav a {
    font-family: sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1.8px;
    position: relative;
    padding: 5px 0;
}

/* Modern Hover Underline Effect */
.main-nav a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--black);
    transition: width var(--transition);
}

.main-nav a:hover::after {
    width: 100%;
}

.header-icons {
    display: flex;
    gap: 20px;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--black);
    transition: color var(--transition);
}

.icon-btn:hover {
    color: gray;
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    background: linear-gradient(to right, rgba(0,0,0,0.4), rgba(0,0,0,0.1)), url('../images/Image_-_Theme_-_Desktop_-_Sun_care_skincare_2400x_crop_center.webp') center/cover no-repeat;
    background-attachment: fixed; /* THIS creates the parallax 3D effect! */
    height: 70vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    padding: 0 5%;
}

.hero-content {
    color: var(--white);
    max-width: 600px;
}

.hero-content h1 {
    color: var(--white);
    font-size: clamp(2.5rem, 5vw, 4rem); /* Responsive font sizing */
    margin-bottom: 15px;
}

.hero-content p {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    margin-bottom: 30px;
}

/* =========================================
   CATEGORY NAV & PRODUCT GRID (REDESIGNED)
   ========================================= */
.category-nav {
    padding: 40px 5% 20px;
}

.category-nav ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    list-style: none;
    gap: 40px;
}

.category-nav a {
    font-size: 1.5rem;
    color: var(--text-dark);
    position: relative;
    padding: 5px 0;
    transition: color var(--transition);
}

.category-nav a.active,
.category-nav a:hover {
    color: var(--black);
}

/* Sleek underline for the active/hovered category */
.category-nav a::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background-color: var(--black);
    transition: width 0.3s ease;
}

.category-nav a.active::after,
.category-nav a:hover::after {
    width: 100%;
}

.divider {
    border: 0;
    height: 1px;
    background: rgba(0, 0, 0, 0.1); /* Softer, thinner divider */
    margin: 0 10% 50px;
}

.product-showcase {
    padding: 0 5% 60px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Improved responsiveness that handles grid wrapping automatically */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px; 
}

/* Elegant Hover Animation Container */
.image-card {
    position: relative;
    overflow: hidden; /* Keeps the zoomed image cleanly contained */
    cursor: pointer;
    background-color: var(--bg-beige); /* Fills space if images load slowly */
}

.image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 1 / 1; /* Forces a perfect square */
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Very smooth, premium easing */
}

/* The actual image zoom */
.image-card:hover img {
    transform: scale(1.05); 
}

/* Overlay that holds the slide-up text */
.card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0); 
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 30px;
    transition: background 0.4s ease;
}

.image-card:hover .card-overlay {
    background: rgba(255, 255, 255, 0.1); /* Very slight white tint to make text pop */
}

/* The slide-up "Shop" button */
.card-overlay span {
    background-color: var(--white);
    color: var(--black);
    padding: 12px 28px;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0; /* Hidden by default */
    transform: translateY(20px); /* Pushed down by default */
    transition: all 0.4s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.image-card:hover .card-overlay span {
    opacity: 1;
    transform: translateY(0); /* Slides up to normal position */
}
/* =========================================
   SPLIT SECTIONS (Image + Text)
   ========================================= */
.split-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 5%;
    gap: 50px;
}

.split-image, .split-text {
    flex: 1;
    width: 100%;
}

.split-text {
    text-align: center;
}

.split-text h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-style: italic;
    margin-bottom: 25px;
    line-height: 1.2;
}

.split-text p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 500px;
    margin-inline: auto;
}

.signature {
    max-width: 250px;
    margin: 0 auto 30px;
}

.quality-symbols {
    max-width: 100%;
    margin: 0 auto;
}

.skin-quiz-prompt {
    margin-top: 30px;
}

.skin-quiz-prompt p {
    margin-bottom: 15px;
}

/* =========================================
   PROMO BLOCKS
   ========================================= */
.promo-blocks {
    display: flex;
    flex-direction: column;
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 5%;
    gap: 30px;
}

.promo-card {
    flex: 1;
    padding: 60px 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.promo-card:first-child {
    background-color: var(--bg-beige);
}

.app-promo {
    background-color: var(--bg-offwhite);
}

.promo-card h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.promo-card p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.login-prompt {
    margin-top: 20px;
    font-family: sans-serif;
    font-size: 14px;
}

.app-promo img {
    max-width: 300px;
    margin-top: 40px;
}

/* =========================================
   FOOTER (EDITORIAL THEME)
   ========================================= */
.site-footer {
    background-color: var(--bg-offwhite); /* Matches the light, airy theme */
    color: var(--black);
    padding: 80px 5% 40px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-top {
    display: flex;
    flex-direction: column;
    gap: 60px;
    max-width: 1400px;
    margin: 0 auto;
    padding-bottom: 60px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Newsletter Section */
.footer-brand {
    max-width: 400px;
}

.footer-heading {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-style: italic;
    margin-bottom: 15px;
}

.footer-brand p {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 25px;
}

/* Minimalist Editorial Input */
.editorial-newsletter {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--black); /* Only a bottom border */
    padding: 10px 0;
    margin-bottom: 15px;
    transition: border-color var(--transition);
}

.editorial-newsletter:focus-within {
    border-width: 2px;
}

.editorial-newsletter input {
    all: unset;
    flex: 1;
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--black);
}

.editorial-newsletter input::placeholder {
    color: var(--text-light);
    font-style: italic;
}

.editorial-newsletter button {
    background: none;
    border: none;
    color: var(--black);
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform var(--transition);
}

.editorial-newsletter button:hover {
    transform: translateX(5px);
}

.privacy-note {
    font-size: 0.8rem !important;
    color: var(--text-light) !important;
}

/* Links Section */
.footer-links-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    flex: 1;
}

.footer-nav h4 {
    font-family: sans-serif;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 20px;
    color: var(--black);
}

.footer-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-nav a {
    font-family: sans-serif;
    font-size: 0.9rem;
    color: var(--text-dark);
    transition: color var(--transition);
}

.footer-nav a:hover {
    color: var(--black);
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Footer Bottom (Socials, Logo, Copyright) */
.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    max-width: 1400px;
    margin: 40px auto 0;
    text-align: center;
}

.footer-socials {
    display: flex;
    gap: 20px;
}

.footer-socials a {
    color: var(--black);
    font-size: 1.2rem;
    transition: transform var(--transition), opacity var(--transition);
}

.footer-socials a:hover {
    transform: translateY(-3px);
    opacity: 0.6;
}

.footer-logo {
    width: 120px;
}

.footer-copyright p {
    font-family: sans-serif;
    font-size: 0.8rem;
    color: var(--text-light);
    letter-spacing: 0.05em;
}

/* Desktop Enhancements */
@media (min-width: 769px) {
    .footer-top {
        flex-direction: row;
        justify-content: space-between;
        gap: 80px;
    }
    
    .footer-links-wrapper {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
    
    /* Center the logo precisely on desktop */
    .footer-logo-center {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* =========================================
   PREMIUM EXTRA TOUCHES (ANIMATIONS & POLISH)
   ========================================= */

/* 1. Smooth Scrolling & Custom Text Selection */
html {
    scroll-behavior: smooth;
}

::selection {
    background-color: var(--bg-beige); /* Soft brand color */
    color: var(--black);
}

/* 2. Glassmorphism Scrolled Header State */
.main-header {
    transition: padding 0.4s ease, background-color 0.4s ease, box-shadow 0.4s ease;
}

.main-header.scrolled {
    padding: 20px 5%; /* Shrinks the header slightly */
    background-color: rgba(255, 255, 255, 0.85); /* Slightly transparent */
    backdrop-filter: blur(8px); /* Frosted glass blur effect */
    -webkit-backdrop-filter: blur(8px); /* Safari support */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* 3. Luxury Lifestyle Image "Breathe" Hover */
.split-image {
    overflow: hidden; /* Keeps the zoom contained */
}

.split-image img {
    transition: transform 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Ultra-slow transition */
}

.split-section:hover .split-image img {
    transform: scale(1.04); /* Very subtle zoom */
}

/* =========================================
   MEDIA QUERIES (Mobile-First Responsiveness)
   ========================================= */

/* Tablet & Smaller Desktops */
@media (max-width: 1024px) {
    .header-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Mobile Devices */
@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    /* Disables the complex hover effect on mobile */
    .grid-container:has(img:nth-child(1):hover) { grid-template-columns: 1fr; }
    .grid-container:has(img:nth-child(2):hover) { grid-template-columns: 1fr; }
    .grid-container:has(img:nth-child(3):hover) { grid-template-columns: 1fr; }

    .split-section {
        padding: 40px 5%;
        text-align: center;
    }
    
    .promo-blocks {
        padding: 40px 5%;
    }
}

/* Desktop Layout Enhancements */
@media (min-width: 769px) {
    .split-section {
        flex-direction: row;
        text-align: left;
    }

    .split-section.reverse {
        flex-direction: row-reverse;
    }

    .split-text {
        text-align: left;
        padding: 0 50px;
    }

    .split-text p {
        margin-inline: 0;
    }

    .signature {
        margin-left: 0;
    }

    .promo-blocks {
        flex-direction: row;
    }

    .app-promo {
        flex-direction: row;
        text-align: left;
        justify-content: space-between;
        padding: 40px 50px;
    }

    .app-promo img {
        margin-top: 0;
        margin-left: 30px;
    }

    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
    
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* =========================================
   ANIMATIONS
   ========================================= */
.animation {    
    animation: transitionIn 0.75s ease-out forwards;  
}

@keyframes transitionIn {
    from {
        opacity: 0;
        transform: translateY(20px); /* Switched to Y for a smoother upward fade */
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   SCROLL REVEAL ANIMATIONS
   ========================================= */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, transform;
}

.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}

/* Staggers grid items so they don't all pop in at the exact same millisecond */
.product-card:nth-child(2n) { transition-delay: 0.1s; }
.product-card:nth-child(3n) { transition-delay: 0.2s; }

/* =========================================
   SIGN IN SLIDING DRAWER STYLES
   ========================================= */

/* Dark background that dims the site */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px); /* Premium blur effect */
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 9998;
}

.auth-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* The sliding panel itself */
.auth-sidebar {
    position: fixed;
    top: 0;
    right: -450px; /* Hidden off-screen by default */
    width: 100%;
    max-width: 420px;
    height: 100vh;
    background-color: var(--bg-offwhite);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Smooth decelerating slide */
}

.auth-sidebar.active {
    right: 0; /* Slides into view */
}

/* Header area with close button */
.auth-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 40px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.auth-header h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--black);
}

.close-auth {
    background: none;
    border: none;
    font-size: 2.5rem;
    color: var(--text-light);
    cursor: pointer;
    transition: color var(--transition);
    line-height: 1;
}

.close-auth:hover {
    color: var(--black);
}

/* Form Body Area */
.auth-body {
    padding: 40px;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
}

.auth-welcome {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 30px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Floating Label Input Design */
.floating-input-group {
    position: relative;
    width: 100%;
}

.float-input {
    width: 100%;
    padding: 18px 15px;
    border: 1px solid #ccc;
    background: transparent;
    font-family: var(--font-body);
    font-size: 1rem;
    border-radius: 2px;
    transition: border-color 0.3s;
}

.float-input:focus {
    outline: none;
    border-color: var(--black);
}

.float-label {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-family: sans-serif;
    font-size: 0.95rem;
    pointer-events: none;
    transition: 0.2s ease all;
    background-color: var(--bg-offwhite);
    padding: 0 5px;
}

/* Float the label up when focused or typed in */
.float-input:focus ~ .float-label,
.float-input:valid ~ .float-label {
    top: 0;
    font-size: 0.8rem;
    color: var(--black);
}

.forgot-password {
    font-family: sans-serif;
    font-size: 0.85rem;
    color: var(--text-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
    align-self: flex-start;
}

.forgot-password:hover {
    color: var(--black);
}

.auth-submit-btn {
    margin-top: 10px;
    padding: 18px;
    background-color: var(--black);
    color: var(--white);
    border: none;
    font-family: var(--font-body);
    font-size: 1rem;
    letter-spacing: 0.15em;
    cursor: pointer;
    transition: all 0.45s ease;
}

.auth-submit-btn:hover {
    box-shadow: inset -10.5em 0 0 0 white, inset 10.5em 0 0 0 white;
    color: black;
    border: 1px solid var(--black);
}

/* Footer (Switch to Create Account) */
.auth-footer {
    margin-top: auto; /* Pushes this to the bottom of the drawer */
    padding-top: 40px;
    border-top: 1px solid rgba(0,0,0,0.1);
    text-align: center;
}

.auth-footer p {
    font-family: sans-serif;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 15px;
}

.create-account-btn {
    width: 100%;
    padding: 18px;
    background-color: transparent;
    color: var(--black);
    border: 1px solid var(--black);
    font-family: var(--font-body);
    font-size: 1rem;
    letter-spacing: 0.15em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.create-account-btn:hover {
    background-color: var(--black);
    color: var(--white);
}

/* =========================================
   SEARCH OVERLAY STYLES
   ========================================= */

/* The full screen slide-down panel */
.search-overlay {
    position: fixed;
    top: -100%; /* Hidden above the screen by default */
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.98); /* Almost solid white */
    backdrop-filter: blur(5px);
    z-index: 10000; /* Stays above everything, even the header */
    display: flex;
    justify-content: center;
    padding-top: 15vh; /* Pushes the search bar down from the top */
    transition: top 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Smooth decelerating slide */
}

.search-overlay.active {
    top: 0; /* Slides down into view */
}

.search-container {
    width: 90%;
    max-width: 800px;
    position: relative;
}

/* Massive X button */
.close-search {
    position: absolute;
    top: -60px;
    right: 0;
    background: none;
    border: none;
    font-size: 3.5rem;
    color: var(--black);
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    line-height: 1;
}

.close-search:hover { 
    color: gray; 
    transform: rotate(90deg); /* Cool spin effect on hover */
}

/* The giant input field */
.search-form {
    display: flex;
    align-items: center;
    border-bottom: 2px solid var(--black);
    padding-bottom: 15px;
}

.search-icon-inside {
    font-size: 2rem;
    color: var(--black);
    margin-right: 20px;
}

#searchInput {
    width: 100%;
    border: none;
    background: transparent;
    font-size: clamp(2rem, 4vw, 3.5rem); /* Responsive giant text */
    font-family: var(--font-heading);
    color: var(--black);
    outline: none;
}

#searchInput::placeholder { 
    color: #cccccc; 
    font-style: italic;
}

/* Popular Searches Suggestions */
.popular-searches {
    margin-top: 40px;
    text-align: left;
}

.popular-searches p {
    font-family: sans-serif;
    font-size: 0.85rem;
    font-weight: bold;
    letter-spacing: 0.15em;
    color: var(--text-light);
    margin-bottom: 20px;
}

.popular-searches ul {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.popular-searches a {
    font-family: var(--font-body);
    font-size: 1.2rem;
    color: var(--text-dark);
    text-decoration: underline;
    text-underline-offset: 6px;
    text-decoration-color: transparent; /* Hides underline initially */
    transition: all 0.3s ease;
}

.popular-searches a:hover {
    color: var(--black);
    text-decoration-color: var(--black); /* Underline appears on hover */
}

/* =========================================
   SHOPPING CART DRAWER STYLES
   ========================================= */

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 9998;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* The Sliding Panel */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -450px; /* Hidden off-screen */
    width: 100%;
    max-width: 420px;
    height: 100vh;
    background-color: var(--bg-offwhite);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.cart-sidebar.active {
    right: 0; /* Slides in */
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 30px 20px;
}

.cart-header h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--black);
}

.close-cart {
    background: none;
    border: none;
    font-size: 2.5rem;
    color: var(--text-light);
    cursor: pointer;
    transition: color var(--transition);
    line-height: 1;
}

.close-cart:hover { color: var(--black); }

/* Shipping Progress Bar */
.shipping-motivator {
    padding: 0 30px 20px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.shipping-motivator p {
    font-family: sans-serif;
    font-size: 0.85rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.shipping-bar {
    width: 100%;
    height: 6px;
    background-color: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.shipping-progress {
    height: 100%;
    background-color: #d5a70f; /* DIME Gold */
    border-radius: 3px;
}

/* Cart Items */
.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

.cart-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.cart-item-img {
    width: 90px;
    height: 100px;
    background-color: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(0,0,0,0.05);
}

.cart-item-img img {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.item-title-price {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.item-title-price h3 {
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.3;
}

.remove-item {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.2s;
}

.remove-item:hover { color: red; }

.item-desc {
    font-family: sans-serif;
    font-size: 0.85rem;
    color: var(--text-light);
}

.item-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.qty-btn {
    background: none;
    border: none;
    padding: 5px 12px;
    cursor: pointer;
    font-size: 1.1rem;
}

.qty-num {
    font-family: sans-serif;
    font-size: 0.9rem;
    padding: 0 10px;
}

.item-price {
    font-weight: bold;
    font-family: sans-serif;
}

/* Cart Footer */
.cart-footer {
    padding: 30px;
    border-top: 1px solid rgba(0,0,0,0.1);
    background-color: var(--white);
}

.cart-subtotal {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-body);
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.cart-taxes {
    font-family: sans-serif;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 20px;
    text-align: center;
}

.checkout-btn {
    width: 100%;
    padding: 18px;
    margin-bottom: 15px;
}

.continue-shopping {
    display: block;
    text-align: center;
    font-family: sans-serif;
    font-size: 0.9rem;
    color: var(--text-dark);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.continue-shopping:hover { color: var(--black); }

/* THIS MUST BE ABOVE THE @media QUERY TO HIDE THEM ON DESKTOP */
.mobile-menu-btn { display: none !important; }
.close-mobile-menu { display: none !important; }
.mobile-overlay { display: none !important; }

@media (max-width: 1025px) {
    /* 1. Force the Header to be 100% wide and act as a row */
    .main-header {
        width: 100% !important;
        display: block !important;
    }

    .header-container {
        display: flex !important;
        flex-direction: row !important; 
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important; 
        box-sizing: border-box !important;
        padding: 15px 20px !important; 
        height: 70px !important;
        position: relative !important;
    }

    /* 2. Put the Hamburger firmly on the left */
    .mobile-menu-btn {
        display: block !important;
        background: none !important;
        border: none !important;
        font-size: 1.5rem !important;
        color: #000000 !important;
        cursor: pointer !important;
        padding: 0 !important;
        margin: 0 !important;
        z-index: 10 !important;
    }

    /* 3. Dead-center the Logo */
    .header-container .logo {
        position: absolute !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        margin: 0 !important;
        padding: 0 !important;
        z-index: 5 !important;
    }

    /* 4. Keep icons strictly in a row on the right */
    .header-icons {
        display: flex !important;
        flex-direction: row !important; 
        align-items: center !important;
        gap: 15px !important;
        margin: 0 !important;
        padding: 0 !important;
        z-index: 10 !important;
    }

    /* 5. THE FIX: Solid White Background & Larger Hitboxes */
    .main-nav {
        position: fixed !important;
        top: 0 !important;
        left: -100% !important; 
        width: 300px !important;
        height: 100vh !important;
        background-color: #ffffff !important; /* FIXED: Solid pure white */
        z-index: 9999 !important;
        padding: 80px 40px !important;
        box-shadow: 5px 0 25px rgba(0,0,0,0.15) !important;
        transition: left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .main-nav.active {
        left: 0 !important;
    }

    .main-nav ul {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        margin-top: 20px !important;
        padding: 0 !important;
        width: 100% !important;
    }

    /* FIXED: Massive, easy-to-tap links that don't let clicks fall through */
    .main-nav ul a {
        display: block !important; 
        width: 100% !important;
        padding: 15px 0 !important; 
        font-size: 1.2rem !important;
        color: #000000 !important;
        text-decoration: none !important;
    }

    /* The X close button inside the menu */
    .close-mobile-menu {
        display: block !important;
        position: absolute !important;
        top: 20px !important;
        right: 25px !important;
        background: none !important;
        border: none !important;
        font-size: 3rem !important;
        color: gray !important;
        cursor: pointer !important;
    }

    /* The dark background dimmer */
    .mobile-overlay {
        display: block !important;
        position: fixed !important;
        top: 0 !important; 
        left: 0 !important; 
        width: 100vw !important; 
        height: 100vh !important;
        background: rgba(0,0,0,0.5) !important;
        opacity: 0 !important; 
        visibility: hidden !important;
        z-index: 1 !important;
        transition: all 0.3s !important;
    }

    .mobile-overlay.active {
        opacity: 1 !important; 
        visibility: visible !important;
    }
}

/* =========================================
   CUSTOM SCROLLBAR (WEBKIT BROWSERS)
   ========================================= */

/* 1. Styles the entire scrollbar container */
::-webkit-scrollbar {
    width: 8px; /* Makes it slim and elegant, not bulky */
    background-color: transparent; /* Makes the background of the track invisible */
}

/* 2. Styles the background track */
::-webkit-scrollbar-track {
    background-color: rgba(0,0,0,0.03); /* Adds a very, very faint gray behind the thumb */
    border-radius: 10px;
}

/* 3. Styles the part you actually grab and drag (the "thumb") */
::-webkit-scrollbar-thumb {
    background-color: var(--text-dark); /* Reuses that grey #5b5a5a you love from the text! */
    border-radius: 10px; /* Makes it look rounded and smooth */
    border: 1px solid transparent; /* Adds a tiny transparent border for a premium gap effect */
    transition: background-color var(--transition);
}

/* 4. Styles the thumb when the user hovers or clicks it */
::-webkit-scrollbar-thumb:hover {
    background-color: var(--black); /* Thumb turns pure black on hover for feedback */
}

::-webkit-scrollbar-thumb:active {
    background-color: #333; /* A slightly lighter black when clicked */
}

/* =========================================
   PAGE PRELOADER STYLES
   ========================================= */

/* The solid white background that covers the screen */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #ffffff;
    z-index: 99999; /* Highest possible layer to hide the site */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease, visibility 0.8s ease, transform 0.8s ease;
}

/* When JS adds the .fade-out class, it disappears smoothly */
.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-30px); /* Elegant slight slide-up effect as it fades */
}

.preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

/* The DIME text pulsing animation */
.preloader-logo {
    font-family: 'Times New Roman', Times, serif;
    font-size: 2.5rem;
    color: #000000;
    letter-spacing: 0.3em;
    margin-right: -0.3em; /* Centers the text properly with letter-spacing */
    font-weight: 500;
    animation: pulseText 1.5s infinite alternate ease-in-out;
}

/* The elegant expanding line beneath the text */
.preloader-line {
    width: 0px;
    height: 1px;
    background-color: #000000;
    animation: drawLine 1.5s infinite alternate cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Keyframe Animations */
@keyframes pulseText {
    0% { opacity: 0.4; }
    100% { opacity: 1; }
}

@keyframes drawLine {
    0% { width: 0px; opacity: 0; }
    50% { opacity: 1; }
    100% { width: 120px; opacity: 1; }
}