:root {
    --bg-ultra-light: #FCFAFA;
    --text-main: #18181B;
    --text-muted: #65656D;
    --rose-gold-primary: #B76E79;
    --rose-gold-light: #F5E6E8;
    --rose-gold-dark: #8C4E57;
    --border-light: rgba(183, 110, 121, 0.25);
    --surface-glass: rgba(255, 255, 255, 0.75);
}

/* Ensure all buttons and cards inherit these variables */
.btn-primary { background-color: var(--rose-gold-primary); }
.product-card:hover { border-color: var(--rose-gold-primary); }

html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
    margin: 0;
    padding: 0;
    position: relative;
}

/* Prevents images and absolute shapes from bleeding off-screen */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: transparent;
    color: #18181B;
    overflow-x: hidden;
}

main {
    perspective: 1200px;
    overflow-x: hidden;
}

/* Glass and Cards */
.glass-panel {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 20px 40px rgba(183, 110, 121, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.product-card {
    background: #FFFFFF;
    border: 1px solid rgba(183, 110, 121, 0.15);
    box-shadow: 0 15px 35px rgba(183, 110, 121, 0.08);
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    height: 100%; 
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 35px 60px rgba(183, 110, 121, 0.2);
    border-color: var(--rose-gold-primary);
}

.btn-primary {
    background-color: #B76E79;
    color: #FFFFFF;
    box-shadow: 0 8px 20px rgba(183, 110, 121, 0.35);
    transition: all 0.4s ease;
}

.btn-primary:hover {
    background-color: #8C4E57;
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(140, 78, 87, 0.4);
}

/* Custom Splide Arrows */
.splide__arrow {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(183, 110, 121, 0.25) !important;
    color: #B76E79 !important;
    box-shadow: 0 4px 12px rgba(183, 110, 121, 0.15) !important;
    transition: all 0.3s ease !important;
}
.splide__arrow:hover {
    background: #B76E79 !important;
    color: white !important;
}
.splide__arrow svg { fill: currentColor !important; }

.gsap-reveal { opacity: 0; transform: translateY(40px); }

footer {
    background-color: #18181B; /* Charcoal Black */
    color: #FFFFFF;
    border-top: 4px solid var(--rose-gold-primary);
    padding-top: 5rem;
    padding-bottom: 2.5rem;
    position: relative;
    z-index: 10;
}

/* Footer Headings - High Contrast */
footer h4 {
    color: #FFFFFF;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

/* Footer Links - Readable Gray to White hover */
footer a {
    color: #A1A1AA; /* Light gray for base contrast */
    transition: 0.3s ease;
}

footer a:hover {
    color: var(--rose-gold-primary); /* Rose Gold accent */
}

/* Footer Paragraphs */
footer p {
    color: #A1A1AA;
    line-height: 1.8;
}

@media (max-width: 768px) {
    /* Improve glass rendering on iOS Safari */
    .bg-surface-glass {
        background: rgba(255, 255, 255, 0.85);
        -webkit-backdrop-filter: blur(20px) saturate(150%);
        backdrop-filter: blur(20px) saturate(150%);
    }

    /* Disable the default grey tap highlight on mobile for a cleaner UI */
    * {
        -webkit-tap-highlight-color: transparent;
    }

    /* Tweak hero spacing for smaller screens to prevent overflow */
    .hero-title {
        font-size: clamp(2rem, 8vw, 3rem);
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }

    /* Stack the stats correctly on very narrow phones (under 360px) */
    @media (max-width: 360px) {
        .hero-stats {
            grid-template-columns: repeat(2, 1fr);
            gap: 1rem;
        }
        .hero-stats > div:last-child {
            grid-column: span 2;
            text-align: center;
        }
    }
}

/* Ensure the peer-checked logic animates smoothly */
#mobile-menu-toggle:checked ~ div.absolute {
    visibility: visible;
}

/* Safegaurd for Splide arrows on touch devices (move them slightly out or make them bigger) */
@media (max-width: 640px) {
    .splide__arrow {
        width: 2.5em !important;
        height: 2.5em !important;
    }
    .splide__arrow--prev {
        left: 0.5rem !important;
    }
    .splide__arrow--next {
        right: 0.5rem !important;
    }
}
