/* GlossySilks Premium (Mavuris Inspired) */
@import url('https://fonts.googleapis.com/css2?family=Tenor+Sans&family=Lato:wght@300;400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

:root {
    --primary-color: #000000;
    --accent-color: #5D1A60;
    /* Deep Royal Purple */
    --accent-light: #9d46ff;
    --white: #ffffff;
    --bg-grey: #f8f5f2;
    /* Warm sophisticated beige/grey */
    --border-color: #e5e5e5;
    --nav-bg: #000000;
    --nav-text: #ffffff;

    --font-heading: 'Tenor Sans', serif;
    --font-body: 'Lato', sans-serif;
    --font-admin: 'Inter', sans-serif;
}

body {
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
    color: var(--primary-color);
    background: var(--white);
    padding-bottom: 0;
    overflow-x: hidden;
    /* Performance Fix: Enable Hardware Acceleration */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

* {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* =========================================
   1. GLOBAL LAYOUT & UTILITIES
   ========================================= */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.text-center {
    text-align: center;
}

.uppercase {
    text-transform: uppercase;
}

/* Buttons */
.btn-primary {
    background: #000;
    color: #fff;
    padding: 12px 30px;
    text-transform: uppercase;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    border: 1px solid #000;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary:hover {
    background: #fff;
    color: #000;
}

/* Input Fields */
.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    font-family: var(--font-body);
    margin-bottom: 15px;
    outline: none;
}

.form-control:focus {
    border-color: var(--accent-color);
}

/* =========================================
   2. HEADER (STACKED LAYOUT)
   ========================================= */
/* Top Utility Bar (Black) - Matching Mavuris */
.top-bar {
    background: #000;
    color: #fff;
    text-align: center;
    font-size: 0.75rem;
    padding: 8px 20px;
    position: relative;
    letter-spacing: 1px;
    font-weight: 500;
    text-transform: uppercase;
}

.close-bar {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.2rem;
}

/* Main Header (Logo + Icons) */
.header-main {
    background: #fff;
    padding: 25px 0;
    border-bottom: 1px solid #f0f0f0;
}

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo a {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    /* Larger, more premium */
    letter-spacing: 3px;
    color: var(--accent-color);
    text-transform: uppercase;
    font-weight: 400;
    /* Tenor Sans is naturally bold */
    text-decoration: none;
}

.header-actions {
    display: flex;
    gap: 25px;
    align-items: center;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #000;
    padding: 5px;
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background: var(--accent-color);
    color: white;
    font-size: 0.65rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Navigation Bar (Desktop) */
.header-nav {
    background: #fff;
    /* Clean white nav, or can be black if desired */
    /* Mavuris Image 4 shows Home Shop etc in a bar. Let's stick to White for elegance unless user specs black bar */
    border-bottom: 1px solid #f0f0f0;
    padding: 15px 0;
}

/* Wait, user images show mixed. Image 4 has white bg for header. Let's try Clean Minimalist (White) */

.header-nav .container {
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    gap: 40px;
}

.nav-menu li a {
    display: block;
    color: #000;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    position: relative;
    padding-bottom: 5px;
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: #000;
    transition: width 0.3s;
}

.nav-menu li a:hover::after {
    width: 100%;
}

/* Mobile Header Elements */
.mobile-menu-toggle {
    display: none;
}

.mobile-bottom-nav {
    display: none;
}


/* =========================================
   3. HERO SECTION
   ========================================= */
.hero.main-slider {
    position: relative;
    height: 700px;
    overflow: hidden;
}

.hero-slide {
    height: 100%;
    width: 100%;
    position: relative;
}

.hero-overlay-dark {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Don't crop banners */
    background: #000;
}

.hero-content {
    position: absolute;
    top: 50%;
    /* Align Left or Center? Mavuris Image 3 is Left/Right. Let's center for impact */
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 2;
    color: #fff;
    width: 90%;
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    margin: 0 0 15px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    line-height: 1.1;
}

.hero-content p {
    font-size: 1.5rem;
    letter-spacing: 2px;
    margin-bottom: 40px;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
}

/* =========================================
   4. CATEGORY GRID
   ========================================= */
.section-title {
    font-family: var(--font-heading);
    text-align: center;
    font-size: 2.5rem;
    margin: 60px 0 40px;
    color: #111;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 4 cols like Mavuris */
    gap: 30px;
}

.cat-card {
    display: block;
    position: relative;
    height: 500px;
    /* Tall cards */
    overflow: hidden;
    background: #f0f0f0;
}

.cat-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.cat-card:hover img {
    transform: scale(1.05);
}

.cat-overlay {
    position: absolute;
    bottom: 30px;
    left: 0;
    width: 100%;
    text-align: center;
    pointer-events: none;
}

.cat-title {
    background: #fff;
    color: #000;
    padding: 12px 30px;
    font-family: var(--font-body);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    display: inline-block;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* =========================================
   5. PRODUCT GRID
   ========================================= */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 80px;
}

.product-card {
    background: #fff;
    transition: all 0.3s;
}

.product-image {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: #f9f9f9;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fdfdfd;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    backface-visibility: hidden;
    will-change: transform, opacity;
}

.product-card:hover .product-image img {
    transform: scale(1.05) translateZ(0);
}

/* Global Hover Fix for Cards */
.product-card:hover .front-img {
    opacity: 0;
}

.product-card:hover .back-img {
    opacity: 1;
}

.product-info {
    padding: 15px 0;
    text-align: center;
}

.product-name {
    font-size: 0.95rem;
    color: #444;
    margin: 0 0 5px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-price {
    font-family: var(--font-heading);
    color: #000;
    font-size: 1.1rem;
    font-weight: bold;
}

/* =========================================
   6. RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {

    .category-grid,
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .top-bar {
        display: none;
    }

    .header-nav {
        display: none;
    }

    /* Hide desktop nav */

    .header-main {
        padding: 15px 0;
        position: sticky;
        top: 0;
        z-index: 1000;
        border-bottom: 1px solid #eee;
    }

    .header-main .container {
        justify-content: center;
        /* Center Logo */
        position: relative;
    }

    .site-logo a {
        font-size: 1.8rem;
    }

    /* Reveal Mobile Toggle */
    .mobile-menu-toggle {
        display: block;
        position: absolute;
        left: 20px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 1.5rem;
        background: none;
        border: none;
        padding: 0;
    }

    .header-actions {
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        gap: 15px;
    }

    .header-actions .icon-btn:not(:last-child) {
        display: none;
    }

    /* Show only Cart? Or Search + Cart */

    /* Mobile Bottom Nav */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: #fff;
        height: 60px;
        border-top: 1px solid #eee;
        justify-content: space-around;
        align-items: center;
        z-index: 1000;
    }

    .nav-item {
        font-size: 1.2rem;
        color: #888;
    }

    .nav-item.active {
        color: var(--accent-color);
    }

    /* Grids */
    .category-grid {
        display: flex;
        overflow-x: auto;
        gap: 15px;
        padding-bottom: 15px;
        scroll-snap-type: x mandatory;
    }

    .cat-card {
        min-width: 250px;
        height: 350px;
        scroll-snap-align: center;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 0 15px;
    }

    .container {
        padding: 0 15px;
    }

    .hero.main-slider {
        height: 60vh;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }
}

/* =========================================
   7. ADMIN STYLES (PRESERVED)
   ========================================= */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-layout .sidebar {
    width: 250px;
    background: #1a1a2e;
    color: #fff;
    flex-shrink: 0;
}

.admin-layout .main-content {
    flex-grow: 1;
    padding: 20px;
    background: #f4f6f9;
}

/* Ensure admin layout isn't affected by global body padding */
.admin-body {
    padding-bottom: 0 !important;
    background: #f4f6f9;
}