:root {
    --bg: #0a0a0a;
    --card-bg: #141414;
    --gold: #d4af37;
    --rose-gold: #e0ac9d;
    --text: #ffffff;
    --text-dim: #a0a0a0;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif; /* Clean font */
    margin: 0;
    overflow-x: hidden;
}

h1, h2 {
    font-family: 'Playfair Display', serif; /* Elegant serif for logos/headers */
    letter-spacing: 2px;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    
    /* NEW: A 'Smoked Charcoal' that noticeably stands out from the pitch-black page */
    background: rgba(26, 26, 26, 0.85); 
    
    /* NEW: A slightly brighter, sharper gold line to separate the nav from the page */
    border-bottom: 1px solid rgba(212, 175, 55, 0.4); 
    
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 500;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem; /* This magically spaces out all your text and icons perfectly */
}

.nav-links a {
    color: var(--text); /* Fixes the blue color, turns them white again */
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    transition: color 0.3s;
    display: flex;
    align-items: center; /* Ensures the text and the new icons sit perfectly level */
}

.nav-links a:hover {
    color: var(--gold); /* Switched to your signature gold on hover! */
}

/* --- EDITORIAL SEARCH BAR --- */
.nav-search {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex: 1; /* Allows it to dynamically fill the empty space */
    max-width: 350px; /* Prevents it from getting too wide on huge screens */
    margin: 0 3rem; /* Pushes it away from the logo and the links */
    border-bottom: 1px solid #444; /* Sleek underline */
    padding: 0.4rem 0;
    transition: border-color 0.3s;
}

.nav-search:focus-within {
    border-bottom-color: var(--gold); /* Glows gold when typing! */
}

.nav-search svg {
    color: var(--text-dim);
    transition: color 0.3s;
}

.nav-search:focus-within svg {
    color: var(--gold);
}

.nav-search input {
    background: transparent;
    border: none;
    color: var(--text);
    width: 100%;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    outline: none;
}

.nav-search input::placeholder {
    color: var(--text-dim);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1.5px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 3rem 5%;
}

.product-card {
    background: var(--card-bg);
    border: 1px solid #222;
    padding: 1rem;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: var(--rose-gold);
}

.product-card img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
}

.btn {
    background: var(--gold);
    color: black;
    border: none;
    padding: 0.8rem 1.5rem;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    margin-top: 1rem;
}

/* --- NEW STYLES TO FIX THE LAYOUT --- */

/* --- HOMEPAGE LUXURY POLISH --- */
.hero {
    height: 75vh; /* Makes the image grander and taller */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    background: linear-gradient(rgba(10,10,10,0.4), rgba(10,10,10,0.9)), url('https://images.unsplash.com/photo-1615397329986-7cb502f924de?auto=format&fit=crop&q=80&w=2000') center/cover;
    border-bottom: 1px solid #222;
}

.hero h1 {
    color: var(--text); /* Crisp white instead of gold */
    font-size: 3.5rem; /* Larger */
    letter-spacing: 10px; /* High-fashion spacing */
    margin-bottom: 1rem;
    font-weight: 300;
}

.hero p {
    color: var(--gold);
    letter-spacing: 3px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 4rem 5%;
    max-width: 1600px;
    margin: 0 auto;
}

.cat-card {
    position: relative;
    height: 450px; /* Tall editorial look */
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    overflow: hidden;
    border: none; /* Stripped the grey border */
}

/* Pseudo-elements for the backgrounds so we can zoom them on hover */
.cat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1;
}

.cat-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(10, 10, 10, 0.3);
    transition: background 0.4s ease;
    z-index: 2;
}

.cat-card:hover::before { transform: scale(1.05); }
.cat-card:hover::after { background: rgba(10, 10, 10, 0.6); }

.cat-card span {
    position: relative;
    z-index: 3;
    color: white;
    font-size: 2rem;
    font-family: 'Playfair Display', serif;
    letter-spacing: 4px;
    text-transform: uppercase;
}

/* Custom background images for your 3 categories */
.cat-beauty::before { background-image: url('https://images.unsplash.com/photo-1560130055-e3306e04884b?q=80&w=1802&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D'); }
.cat-fashion::before { background-image: url('https://images.unsplash.com/photo-1490481651871-ab68de25d43d?auto=format&fit=crop&q=80&w=800'); }
.cat-skincare::before { background-image: url('https://images.unsplash.com/photo-1556228578-0d85b1a4d571?auto=format&fit=crop&q=80&w=800'); }

/* Page Containers & Titles */
.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem 5% 4rem; /* Changed the top padding from 4rem to 2rem */
    min-height: 75vh; /* <--- NEW: Forces the content area to be tall! */
}

.section-title {
    text-align: left; 
    color: var(--gold);
    font-size: 1.6rem; 
    margin-top: 0.5rem; /* Pulls it up tight to the navbar */
    margin-bottom: 2.5rem; /* Reduces the gap above the products */
    text-transform: uppercase;
    letter-spacing: 5px; 
    font-weight: 400; 
}

/* Profile / Login Forms */
.auth-form {
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-form input {
    padding: 1rem;
    background: transparent;
    border: 1px solid #333;
    color: white;
    font-family: 'Inter', sans-serif;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--rose-gold);
}

.gold-outline {
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--gold);
}

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

/* Utility Classes */
.hidden {
    display: none !important;
}

.error {
    color: #ff6b6b;
    text-align: center;
}

/* Logo Styling */
.logo-img {
    height: 60px; /* Adjust this to make it bigger or smaller */
    border-radius: 50%; /* This makes the square image a perfect circle */
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2); /* Subtle gold glow */
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

/* --- PRODUCT DETAIL PAGE --- */
.product-detail-layout {
    display: grid;
    grid-template-columns: 4fr 6fr;
    gap: 5rem;
    align-items: start;
    margin-top: 2rem;
}

.product-detail-img {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover; 
    background: transparent; 
    border: none;        
}

.product-detail-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.product-title {
    font-size: 3rem;
    margin: 0;
    color: var(--gold);
}

.product-price {
    font-size: 1.5rem;
    color: var(--text-dim);
    margin: 0;
}

.divider {
    height: 1px;
    background: #333;
    width: 100%;
}

.product-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text);
}

.large-btn {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .product-detail-layout {
        grid-template-columns: 1fr;
    }
}

/* --- CART DRAWER & OVERLAY --- */
.cart-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 999;
}

.cart-drawer {
    position: fixed;
    top: 0; right: -450px; /* Hidden off-screen by default */
    width: 400px; max-width: 100%;
    height: 100vh;
    background: var(--card-bg);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    border-left: 1px solid #222;
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.cart-drawer.open {
    right: 0; /* Slides in */
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #222;
}

.cart-header h2 { margin: 0; font-size: 1.5rem; color: var(--gold); }
.close-cart { background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; transition: color 0.3s; }
.close-cart:hover { color: var(--rose-gold); }

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.empty-cart-msg { text-align: center; color: var(--text-dim); margin-top: 2rem; }

.cart-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #1a1a1a;
    padding: 0.5rem;
    border: 1px solid #333;
}

.cart-item img { width: 60px; height: 60px; object-fit: cover; border: 1px solid #222; }
.cart-item-details { flex: 1; }
.cart-item-details h4 { margin: 0 0 0.2rem 0; font-size: 0.9rem; }
.cart-item-details p { margin: 0; color: var(--gold); font-size: 0.9rem; }

.remove-item { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 1rem; }
.remove-item:hover { color: #ff6b6b; }

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid #222;
    background: var(--bg);
}

.promo-box { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; }
.promo-box input { flex: 1; padding: 0.8rem; background: transparent; border: 1px solid #333; color: white; }
.promo-box input:focus { outline: none; border-color: var(--gold); }

.cart-subtotal {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    font-weight: bold;
}

/* --- CHECKOUT MODAL --- */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background: var(--card-bg);
    padding: 3rem;
    text-align: center;
    border: 1px solid var(--gold);
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.modal-content h2 { color: var(--gold); margin-bottom: 1rem; }
.modal-content p { margin-bottom: 2rem; color: var(--text-dim); }

/* --- UPGRADED CART STYLES --- */
.promo-banner {
    background: var(--gold);
    color: black;
    text-align: center;
    padding: 0.8rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.qty-badge {
    background: #222;
    color: var(--text-dim);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-left: 10px;
    border: 1px solid #333;
}

.cart-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.breakdown-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-dim);
}

.discount-line {
    color: var(--rose-gold);
}

.total-line {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text);
    margin-top: 0.5rem;
}

/* --- CHECKOUT PAGE STYLES --- */
.checkout-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.checkout-form-section textarea {
    padding: 1rem;
    background: transparent;
    border: 1px solid #333;
    color: white;
    font-family: 'Inter', sans-serif;
    resize: vertical;
    width: 100%;
    box-sizing: border-box;
}

.checkout-form-section textarea:focus {
    outline: none;
    border-color: var(--rose-gold);
}

.payment-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1.5rem;
    border: 1px solid var(--gold);
    background: rgba(212, 175, 55, 0.05);
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .checkout-layout {
        grid-template-columns: 1fr;
    }
}

/* --- PROFILE DASHBOARD STYLES --- */
.profile-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 4rem;
    margin-top: 2rem;
    align-items: start;
}

/* --- LUXURY PROFILE TABS --- */
.profile-tabs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid #333;
    padding: 1rem;
}

.tab-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-dim);
    text-align: left;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.8rem 1rem;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
}

.tab-btn.active {
    background: rgba(212, 175, 55, 0.05);
    border-color: var(--gold);
    color: var(--gold);
}

.tab-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text);
}

.text-danger { 
    color: #ff6b6b; 
    margin-top: 1rem; 
    border-top: 1px solid #333; 
    padding-top: 1.5rem;
}
.text-danger:hover { color: #ff4c4c; }

@media (max-width: 768px) {
    .profile-tabs {
        flex-direction: row;
        overflow-x: auto;
    }
    .text-danger { 
        margin-top: 0; 
        border-top: none; 
        padding-top: 0.8rem; 
        border-left: 1px solid #333; 
        margin-left: 0.5rem;
    }
}

.tab-pane h3 {
    color: var(--gold);
    margin-top: 0;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    border-bottom: 1px solid #333;
    padding-bottom: 1rem;
}

.tab-pane p { font-size: 1.1rem; }

/* Order Cards */
.order-card {
    border: 1px solid #333;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background: rgba(20, 20, 20, 0.8);
    transition: border-color 0.3s;
}

.order-card:hover { border-color: var(--rose-gold); }

.order-card h4 { margin: 0 0 1rem 0; color: var(--text); letter-spacing: 1px;}

.order-card-meta { 
    display: flex; 
    justify-content: space-between; 
    font-size: 0.9rem; 
    margin-bottom: 1.5rem; 
    border-bottom: 1px solid #333; 
    padding-bottom: 1rem; 
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .profile-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .profile-tabs {
        flex-direction: row;
        overflow-x: auto;
        border-right: none;
        border-bottom: 1px solid #333;
        padding-bottom: 1rem;
        padding-right: 0;
    }
    .tab-btn { white-space: nowrap; padding: 0.5rem 1.5rem; }
    .text-danger { margin-top: 0; border-top: none; padding-top: 0.5rem; border-left: 1px solid #333; padding-left: 1.5rem; margin-left: 1rem;}
}
/*hereeee*/
/* --- NEW: SIZE SELECTOR POSITIONING --- */
.grid-size-selector {
    position: absolute; 
    top: 12px; 
    left: 12px; 
    z-index: 100; /* Ensures it stays above the image */
}

.grid-size-selector select {
    background: rgba(10, 10, 10, 0.75); 
    color: var(--gold); 
    border: 1px solid rgba(212, 175, 55, 0.5); 
    padding: 0.3rem 0.5rem; 
    font-size: 0.7rem; 
    border-radius: 4px; 
    outline: none; 
    cursor: pointer; 
    backdrop-filter: blur(10px); 
    font-weight: bold;
}

/* --- MOBILE PROFILE FIXES --- */
@media (max-width: 768px) {
    .profile-layout { 
        flex-direction: column !important; 
        gap: 1.5rem !important;
    }
    
    /* 1. Force a strict, perfectly symmetrical 2-column grid */
    .profile-tabs {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important; /* Two equal columns */
        gap: 0.5rem !important;
        
        /* THE FIX: Restoring the full box border and uniform padding! */
        border: 1px solid #333 !important; 
        padding: 1rem !important; 
        width: 100% !important; 
        box-sizing: border-box !important;
    }
    
    .tab-btn {
        width: 100% !important; /* Fill the grid cell perfectly */
        box-sizing: border-box !important;
        text-align: center !important;
        padding: 0.8rem 0.5rem !important;
        font-size: 0.85rem !important;
        border: 1px solid #333 !important;
        border-radius: 4px;
        white-space: nowrap !important; /* Stops text from awkward stacking inside the button */
    }

    /* Make the Logout button stretch across the entire bottom row */
    .tab-btn.text-danger {
        grid-column: 1 / -1 !important; 
        margin: 0 !important; /* Kills the old sneaky left margin */
        padding: 0.8rem 0.5rem !important; /* Matches the exact padding of the other buttons */
        border: 1px solid #333 !important; /* Restores the uniform box border */
    }
    
    /* 2. Stop the Profile Display Card from overflowing */
    .profile-content {
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
        padding: 0 !important;
    }

    #profile-display {
        padding: 1.5rem !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Stack the Email/Name labels on top of the text for mobile */
    #profile-display > div {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.5rem !important;
    }
    
    /* Allow long emails to break to the next line safely */
    #prof-email {
        word-break: break-all !important;
        width: 100% !important;
    }

    /* Prevent the Title & Edit Button from colliding */
    .tab-pane > div:first-child {
        flex-wrap: wrap !important;
        gap: 1rem !important;
    }
}

/* --- MOBILE CHECKOUT REFINEMENTS --- */
@media (max-width: 768px) {
    /* Tighten the massive gap between checkout sections */
    .checkout-layout {
        gap: 2rem !important; /* Shrinks the empty space */
    }

    /* Make the section titles sleeker and more editorial */
    .checkout-layout h2, 
    .checkout-layout h3 {
        font-size: 1.3rem !important; /* Smaller, app-like sizing */
        letter-spacing: 2px !important;
        font-weight: 400 !important; /* Removes the heavy bold look */
        margin-top: 1.5rem !important;
        margin-bottom: 1rem !important;
        border-bottom: 1px solid #222; /* Adds a sleek underline */
        padding-bottom: 0.5rem;
    }

    /* Make the payment box blend in better */
    .payment-method {
        padding: 1rem !important;
        font-size: 1rem !important;
        margin-top: 0.5rem !important;
    }
    
    /* Make the address box text a bit tighter */
    .address-card, .checkout-layout .cart-item {
        font-size: 0.85rem !important;
    }
}