/* =========================================
   1. GLOBAL STYLES & RESET
   ========================================= */
body {
    font-family: 'Lato', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    color: #333;
    background-color: #fff;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* =========================================
   2. DYNAMIC SIDEBAR (ASHENSORI)
   ========================================= */
/* The side navigation menu */
.sidebar {
    height: 100%;
    width: 0; /* Initially hidden (width 0) */
    position: fixed;
    z-index: 2000; /* Stays on top of everything */
    top: 0;
    left: 0;
    background-color: #111; /* Elegant Black Background */
    overflow-x: hidden;
    transition: 0.5s; /* Smooth sliding animation */
    padding-top: 60px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.5);
}

/* Links inside the sidebar */
.sidebar a {
    padding: 10px 15px 10px 32px;
    text-decoration: none;
    font-size: 18px;
    color: #818181;
    display: block;
    transition: 0.3s;
    font-family: 'Lato', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #222; /* Subtle divider */
}

/* Hover effect for sidebar links */
.sidebar a:hover {
    color: #f1f1f1;
    padding-left: 40px; /* Slight movement effect */
    background-color: #222;
}

/* Position and style the close button (top right corner) */
.sidebar .closebtn {
    position: absolute;
    top: 0;
    right: 25px;
    font-size: 36px;
    margin-left: 50px;
    border: none;
}

/* The button to open the sidebar */
.openbtn {
    font-size: 24px;
    cursor: pointer;
    background-color: transparent;
    color: black;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
}

.openbtn:hover {
    background-color: #f1f1f1;
}

/* =========================================
   3. NAVIGATION BAR (NAVBAR)
   ========================================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    background-color: white;
    border-bottom: 1px solid #eee;
    position: sticky; /* Sticks to top when scrolling */
    top: 0;
    z-index: 1000;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 15px;
}

.nav-links li a {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.nav-links li a:hover {
    color: #777;
    border-bottom: 1px solid #333;
}

/* Icons (Search, Cart, User) */
.nav-icons {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-icons input {
    font-family: 'Lato', sans-serif;
}

/* =========================================
   4. HERO SECTION (MAIN BANNER)
   ========================================= */
.hero {
    height: 85vh; /* Takes 85% of screen height */
    width: 100%;
    background-size: cover; /* Zooms image to cover space */
    background-position: center; /* Centers image */
    background-repeat: no-repeat; /* Prevents tiling */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

/* Dark overlay for text readability */
.hero::after {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.25);
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
}

.brand-title {
    font-size: 4em;
    margin: 0;
    letter-spacing: 8px;
    text-transform: uppercase;
}

.btn-main {
    padding: 15px 40px;
    background-color: white;
    color: black;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: none;
    cursor: pointer;
    transition: 0.3s;
    display: inline-block;
    margin-top: 25px;
}

.btn-main:hover {
    background-color: black;
    color: white;
}

/* =========================================
   5. PRODUCT GRID (AUTO LAYOUT)
   ========================================= */
.container {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 50px;
    letter-spacing: 1px;
}

.product-grid {
    display: grid;
    /* MAGIC LINE: Fits as many columns as possible based on screen width */
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 40px;
}

.product-card {
    background: white;
    text-align: center;
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px); /* Slight lift effect */
}

/* --- IMAGE CONTAINER FIX (Laptop & Mobile) --- */
.image-container {
    width: 100%;
    height: 450px; /* Increased height so tall dresses fit better */
    overflow: hidden;
    background-color: white; /* Clean white background */
    
    /* Flexbox rules to perfectly center the image */
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-container img {
    width: 100%;
    height: 100%;
    /* 'contain' ensures the full image is visible (no cropping heads/feet) */
    object-fit: contain; 
    transition: transform 0.5s;
}

.product-card:hover .image-container img {
    transform: scale(1.05); /* Slight zoom on hover */
}

.product-details {
    padding: 20px 10px;
}

.category {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 5px;
}

.product-details h3 {
    margin: 5px 0;
    font-size: 18px;
    font-weight: 400;
}

.description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.price {
    font-weight: bold;
    font-size: 18px;
    display: block;
    margin-bottom: 15px;
}

.btn-buy {
    background: black;
    color: white;
    border: none;
    padding: 12px 30px;
    cursor: pointer;
    width: 100%;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 2px;
    transition: 0.3s;
}

.btn-buy:hover {
    background-color: #333;
}

/* =========================================
   6. FOOTER
   ========================================= */
#footer {
    background: #f9f9f9;
    padding: 50px 20px;
    text-align: center;
    margin-top: 80px;
    border-top: 1px solid #eee;
    font-size: 14px;
    color: #777;
}

.payment-methods strong {
    color: #333;
    margin: 0 5px;
}

/* =========================================
   7. MOBILE RESPONSIVENESS (Phone Rules)
   ========================================= */
@media (max-width: 768px) {
    /* Navbar adjustments */
    .navbar {
        padding: 15px;
    }
    
    /* HIDE standard menu links on mobile (Use Sidebar instead) */
    .nav-links {
        display: none; 
    }

    /* Hero adjustments */
    .brand-title {
        font-size: 2.5em; /* Smaller title */
        letter-spacing: 3px;
    }
    
    .hero {
        height: 65vh; /* Shorter banner */
    }

    /* Grid adjustments */
    .container {
        padding: 40px 15px;
    }
    
    .product-grid {
        gap: 20px; /* Smaller gaps */
    }
}