/* PALETA DE COLORES (Basada en el logo "Notte & Giorno") */
:root {
    --color-bg-dark: #22201e; /* Gris muy oscuro del logo */
    --color-text-light: #d1c3b2; /* Beige/Dorado claro del logo */
    --color-accent-gold: #b8860b; /* Dorado vibrante para CTAs */
    --color-secondary-beige: #4a4540; /* Tono medio para fondos secundarios */
    --color-border-dark: #3a3835; /* Borde oscuro */
    --font-serif: 'Playfair Display', serif; /* Fuente elegante */
    --font-sans: 'Roboto', sans-serif; /* Fuente limpia */
}

/* RESET Y ESTILOS GLOBALES */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    background-color: var(--color-bg-dark); 
    color: var(--color-text-light); 
}

a {
    text-decoration: none;
    color: var(--color-text-light);
}

/* ---------------------------------------------------- */
/* 1. CABECERA (HEADER) - ESTRUCTURA CENTRADA Y FLEXIBLE */
/* ---------------------------------------------------- */
header {
    background-color: var(--color-bg-dark);
    border-bottom: 1px solid var(--color-border-dark);
    padding: 10px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    position: relative; /* Necesario para el centrado absoluto del logo en escritorio */
}

/* 1.1 LOGO (Centrado visualmente en móvil) */
.logo {
    flex-grow: 1; 
    text-align: center;
}

.logo a {
    font-family: var(--font-serif);
    font-size: 1.7rem;
    font-weight: bold;
    color: var(--color-text-light);
    text-transform: uppercase;
}

/* 1.2 ELEMENTOS DE LA IZQUIERDA (Menú Hamburguesa + Navegación) */
.header-left-elements {
    display: flex;
    align-items: center;
    min-width: 100px; 
    justify-content: flex-start;
}

/* 1.3 ICONOS DE LA DERECHA (Búsqueda, Usuario, Carrito) */
.header-right-icons {
    display: flex;
    align-items: center;
    justify-content: flex-end; 
    min-width: 100px; 
}

.header-right-icons button {
    background: none;
    border: none;
    font-size: 1.25rem;
    margin-left: 10px;
    cursor: pointer;
    color: var(--color-text-light);
}

/* 1.4 Menú Móvil */
.menu-toggle {
    display: block; 
    font-size: 1.5rem;
}
.desktop-nav {
    display: none; /* Oculto en móvil */
}

.mobile-nav {
    display: none;
    background-color: var(--color-secondary-beige);
    position: absolute;
    width: 100%;
    left: 0;
    padding: 10px 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.mobile-nav.open {
    display: block;
}

.mobile-nav ul {
    list-style: none;
}

.mobile-nav li a {
    display: block;
    padding: 10px 20px;
    color: var(--color-text-light);
}

.mobile-nav li a:hover {
    background-color: var(--color-border-dark);
}

/* ---------------------------------------------------- */
/* 2. CUERPO PRINCIPAL */
/* ---------------------------------------------------- */

/* HERO SECTION - IMAGEN DESDE HTML */
.hero {
    height: 60vh;
    background-size: cover; /* Las imágenes ahora vienen del HTML */
    background-position: center; /* Se mantiene aquí para todas las imágenes del Hero */
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-text-light);
    text-shadow: 0 2px 4px rgba(0,0,0,0.7);
    position: relative; 
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-family: var(--font-serif);
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.cta-button {
    display: inline-block;
    background-color: var(--color-accent-gold); 
    color: var(--color-bg-dark); 
    padding: 10px 30px;
    border-radius: 5px;
    text-transform: uppercase;
    font-weight: bold;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: #a37209; 
}

/* CATEGORÍAS DESTACADAS - IMAGEN DESDE HTML */
.categories-grid {
    display: grid;
    grid-template-columns: 1fr; 
    gap: 15px;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.category-item {
    height: 250px;
    background-size: cover; /* Las imágenes vienen del HTML */
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3); 
    display: flex;
    align-items: flex-end;
}

.category-item a {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: rgba(34, 32, 30, 0.7); 
    color: var(--color-text-light); 
    font-weight: bold;
    text-align: center;
    border-radius: 0 0 8px 8px;
}

/* PRODUCTOS DESTACADOS - IMAGEN DESDE HTML */
.featured-products {
    padding: 40px 20px;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.featured-products h2 {
    font-family: var(--font-serif);
    margin-bottom: 25px;
    color: var(--color-text-light); 
}

.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); 
    gap: 20px;
}

.product-card {
    background-color: var(--color-secondary-beige); 
    border: 1px solid var(--color-border-dark);
    padding: 50px 10px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    color: var(--color-text-light);
    height: 200px; /* Dale una altura para que se vea el fondo */
    display: flex;
    justify-content: center;
    align-items: center;
    background-size: cover; /* Las imágenes vienen del HTML */
    background-position: center;
    background-repeat: no-repeat;
    background-blend-mode: multiply; /* Mezcla la imagen con el color de fondo para un efecto oscuro */
}

/* Agregamos una capa oscura para que el texto sea legible sobre la imagen del producto */
.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3); 
    border-radius: 5px;
    z-index: 1; 
}

.product-card {
    position: relative; 
}

.product-card > * { 
    z-index: 2;
    position: relative;
}

/* ---------------------------------------------------- */
/* 3. CARRITO MODAL (CHECKOUT) */
/* ---------------------------------------------------- */
.cart-modal {
    display: none; 
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
}

.cart-modal.visible {
    display: block;
}

.cart-content {
    background-color: var(--color-secondary-beige);
    margin: 15% auto; 
    padding: 20px;
    border: 1px solid var(--color-border-dark);
    width: 90%;
    max-width: 400px; 
    border-radius: 10px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    color: var(--color-text-light);
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    color: var(--color-text-light);
    font-size: 28px;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
}

.shipping-options {
    border-top: 1px solid var(--color-border-dark);
    padding-top: 15px;
    margin-top: 15px;
    text-align: left;
}

.shipping-options label {
    display: block;
    margin-bottom: 10px;
    font-size: 1rem;
    font-weight: 500;
}

.checkout-button {
    width: 100%;
    text-align: center;
    margin-top: 20px;
    color: var(--color-bg-dark); 
}

/* ---------------------------------------------------- */
/* 4. FOOTER */
/* ---------------------------------------------------- */
footer {
    background-color: var(--color-bg-dark);
    color: var(--color-text-light);
    text-align: center;
    padding: 20px;
    border-top: 1px solid var(--color-border-dark);
    margin-top: 50px;
}

footer img {
    width: 250px;
    filter: invert(75%)
}

footer hr {
    border: 0;
    height: 1px;
    background: var(--color-border-dark);
    margin: 15px 0;
}

/* ---------------------------------------------------- */
/* 5. ADAPTACIÓN A ESCRITORIO (Media Queries) */
/* ---------------------------------------------------- */
@media (min-width: 768px) {
    
    /* 1. LAYOUT DE CABECERA EN ESCRITORIO */
    .header-container {
        justify-content: flex-start; 
    }

    /* Ocultamos la hamburguesa y mostramos el menú */
    .menu-toggle {
        display: none; 
    }
    
    .desktop-nav {
        display: block; 
    }

    /* Ajuste de navegación a la izquierda */
    .desktop-nav ul {
        list-style: none;
        display: flex;
        padding-left: 0;
    }

    .desktop-nav li a {
        padding: 0 15px;
    }

    .desktop-nav li a:hover {
        color: var(--color-accent-gold); 
    }
    
    /* Centrado del Logo (Solución con absolute) */
    .logo {
        position: absolute; 
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%); 
        flex-grow: 0; 
        text-align: center;
    }
    
    /* Iconos a la derecha */
    .header-right-icons {
        margin-left: auto; 
    }

    /* Mantenemos el mismo ancho a los lados para un mejor centrado visual */
    .header-left-elements {
        min-width: 300px; 
    }
    .header-right-icons {
        min-width: 300px;
    }

    /* RESTO DEL CUERPO EN ESCRITORIO */
    .hero {
        height: 70vh;
    }
    
    .hero-content h1 {
        font-size: 3.5rem;
    }

    .categories-grid {
        grid-template-columns: repeat(3, 1fr); 
    }

    .product-list {
        grid-template-columns: repeat(4, 1fr); 
    }

}

/* ESTILOS ADICIONALES PARA EL CONTADOR DEL CARRITO */
#cart-count {
    position: absolute;
    top: -5px;
    right: -10px;
    background-color: var(--color-accent-gold);
    color: var(--color-bg-dark);
    font-size: 0.7rem;
    font-weight: bold;
    border-radius: 50%;
    padding: 2px 5px;
    line-height: 1;
}

/* Asegura que el botón del carrito sea relativo para que el contador se posicione */
.header-icons .cart-btn {
    position: relative;
}

html {
    scroll-behavior: smooth; /* Hace el desplazamiento a los IDs más suave */

}
