/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Default Variables (will be overridden by JS) */
    --font-logo: 'Playfair Display', serif;
    --font-brand: 'Inter', sans-serif;
    --bg-color: #ffffff;
    --text-color: #000000;
    --accent-color: #000000;
    --overlay-color: rgba(255, 255, 255, 0.8);
    --nav-height: 80px;

    /* Theme Structural Variables */
    --line-display: none;
    --circle-display: none;
    --mono-display: none;
    --nav-link-padding: 0;
    --nav-link-radius: 0;
    --nav-link-bg: transparent;
    --nav-link-color: inherit;
    --bg-opacity: 0;
    /* Fully Transparent Default */
    /* Controlled by Slider */
    --base-bg-rgb: 255, 255, 255;
    /* RGB components for opacity manipulation */
}

body {
    background-color: rgba(var(--base-bg-rgb), var(--bg-opacity));
    color: var(--text-color);
    font-family: var(--font-brand);
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
    transition: background-color 0.5s ease, color 0.5s ease;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
    /* Stronger shadow for better contrast */
}

/* Add subtle background to text containers for readability */
.product-info,
#hero-content {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, transparent 100%);
    padding: 10px;
    border-radius: 8px;
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 400;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Layout Containers */
section {
    position: relative;
    width: 100%;
}

/* Hero Section */
#hero {
    height: 100vh;
    overflow: hidden;
    position: relative;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

#bg-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.2;
    /* Controlled by JS */
    transition: opacity 1s ease;
}

.video-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    /* Let clicks pass through to video/bg */
    z-index: 1;
    /* Ensure simple layering over video */
    background: var(--overlay-color);
    transition: background 0.5s ease;
    transition: background 0.5s ease;
}

/* Decorative Layer */
#decorative-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.theme-decoration {
    position: absolute;
    transition: all 0.5s ease;
}

/* Dark Theme Lines */
.line-left,
.line-right {
    display: var(--line-display);
    width: 1px;
    height: 100%;
    top: 0;
    background: linear-gradient(to bottom, transparent, rgba(212, 175, 55, 0.3), transparent);
}

.line-left {
    left: 8%;
}

.line-right {
    right: 8%;
}

/* Feminine Theme Circles */
.circle-top {
    display: var(--circle-display);
    top: -15%;
    right: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(ellipse, var(--accent-color) 0%, transparent 70%);
    opacity: 0.2;
    border-radius: 50%;
}

.circle-bottom {
    display: var(--circle-display);
    bottom: -20%;
    left: -15%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(ellipse, var(--accent-color) 0%, transparent 70%);
    opacity: 0.15;
    border-radius: 50%;
}

/* Nav Links - Generic but stylable (pill shape vs plain) */
#nav-links a {
    padding: var(--nav-link-padding);
    border-radius: var(--nav-link-radius);
    background: var(--nav-link-bg);
    color: var(--nav-link-color);
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1px;
    opacity: 0.8;
    transition: all 0.3s;
}

#nav-links a:hover {
    opacity: 1;
    filter: brightness(1.1);
}

/* Navbar */
#navbar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    z-index: 100;
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeInDown 1s forwards 0.5s;
}

#logo {
    font-family: var(--font-logo);
    font-size: 24px;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
}

#nav-links {
    display: flex;
    gap: 30px;
}

#nav-links a {
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1px;
    opacity: 0.6;
    transition: opacity 0.3s;
}

#nav-links a:hover {
    opacity: 1;
    color: var(--accent-color);
}

/* Mobile Menu */
#mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

#mobile-menu {
    position: fixed;
    inset: 0;
    background: var(--bg-color);
    z-index: 99;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

#mobile-menu.active {
    opacity: 1;
    pointer-events: auto;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0;
    animation: fadeIn 1s forwards 1.5s;
}

.scroll-indicator .line {
    width: 1px;
    height: 50px;
    background: var(--text-color);
}

/* Products Section */
#products {
    padding: 100px 5%;
    min-height: 100vh;
    z-index: 10;
    background: var(--bg-color);
    /* Ensure opacity doesn't show hero underneath */
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 60px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 20px;
}

#section-title {
    font-family: var(--font-logo);
    font-size: 32px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

/* Product Card */
.product-card {
    cursor: pointer;
    transition: transform 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    aspect-ratio: 3/4;
    background: var(--bg-color);
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;

    /* Dynamic Theme Styles */
    border-radius: var(--border-radius-card);
    border: var(--border-width) solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, var(--card-bg-opacity));
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.product-image:hover img {
    transform: scale(1.05);
}

.product-info h3 {
    font-size: 14px;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-info p {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-color);
}

/* Brand Grid */
.brand-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 0 5% 100px;
}

/* Admin Panel */
#admin-trigger {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    /* Larger */
    font-size: 24px;
    background: rgba(255, 255, 255, 0.9);
    /* More visible */
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 2000;
    /* Highest priority */
    transition: transform 0.3s, background 0.3s;
}

#admin-trigger:hover {
    transform: rotate(90deg) scale(1.1);
    background: #fff;
}

#admin-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100vh;
    background: #fff;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    color: #333;
    /* Always dark text inside panel */
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

#admin-panel.active {
    transform: translateX(0);
}

.hidden {
    display: none;
}

.panel-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
}

.panel-content {
    padding: 20px;
}

.theme-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.theme-options button {
    padding: 10px;
    border: 1px solid #ddd;
    background: #f9f9f9;
    cursor: pointer;
    border-radius: 5px;
}

.theme-options button:hover {
    background: #eee;
}

.theme-options button.active {
    background: #333;
    color: #fff;
}

/* Animations */
@keyframes fadeInDown {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    #nav-links {
        display: none;
    }

    #mobile-menu-btn {
        display: block;
    }

    .brand-grid {
        grid-template-columns: 1fr;
    }
}