:root {
    /* --- PALETA LUXURY FOREST --- */
    --primary: #D4AF37;       
    --primary-hover: #F8D96D; 
    --accent: #E1306C;        
    --bg-dark: #050a07;       
    --bg-card: #0e1a14;       
    --text-main: #f0f0f0;     
    --text-muted: #aabeb6;    
    --header-height: 70px;
    --radius: 16px;
}

* { box-sizing: border-box; }

body, html {
    margin: 0; padding: 0;
    font-family: 'Montserrat', sans-serif;
    background: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* --- TOPBAR --- */
#topbar {
    position: fixed; top: 0; left: 0; width: 100%; height: var(--header-height);
    background: rgba(10, 15, 13, 0.9);
    backdrop-filter: blur(12px);
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 20px; z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.logo-title { font-size: 1.4rem; font-weight: 700; letter-spacing: 1px; color: var(--text-main); }
button { background: none; border: none; cursor: pointer; color: white; }

.cart-icon-header {
    position: relative; display: flex; align-items: center;
    background: rgba(255,255,255,0.1); padding: 8px; border-radius: 50%;
}
.cart-icon-header span {
    position: absolute; top: -5px; right: -5px;
    background: var(--accent); color: white;
    font-size: 0.7rem; font-weight: bold;
    width: 18px; height: 18px; border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
}

/* --- SIDEBAR & OVERLAY --- */
.overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.7);
    z-index: 1500; opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.overlay.active { opacity: 1; pointer-events: auto; }

#sidebar {
    position: fixed; top: 0; left: 0; width: 280px; height: 100%;
    background: var(--bg-card); z-index: 2000;
    transform: translateX(-100%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px; display: flex; flex-direction: column;
    border-right: 1px solid rgba(255,255,255,0.05);
}
#sidebar.active { transform: translateX(0); }

#sidebar a {
    color: var(--text-muted); text-decoration: none;
    padding: 15px; font-size: 1.1rem; border-radius: 8px;
    transition: 0.2s; display: block; margin-bottom: 5px;
}
#sidebar a:hover, #sidebar a.active {
    background: rgba(37, 211, 102, 0.1); color: var(--primary);
}
#closeMenu { align-self: flex-end; font-size: 2rem; padding: 10px; }

/* --- MAIN CONTENT --- */
#main-content {
    padding: calc(var(--header-height) + 20px) 20px 80px 20px;
    max-width: 1200px; margin: 0 auto; min-height: 100vh;
}

section { display: none; animation: fadeIn 0.6s ease; }
section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* --- HERO BANNER (VERSIÓN COMPACTA/SLIM) --- */
.hero-banner {
    position: relative;
    text-align: center;
    /* PADDING REDUCIDO PARA QUE SEA MÁS PEQUEÑO */
    padding: 15px 20px 30px 20px; 
    
    background: linear-gradient(135deg, #1B4D3E 0%, #050a07 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(11, 61, 46, 0.3);
}

/* LOGO: Pegado al texto y centrado */
.mini-logo {
    position: relative;
    display: block;
    margin: 20px auto 35px auto; /* Sin margen inferior */
    width: 220px; 
    max-width: 80%;
    height: auto;
    mix-blend-mode: multiply;
    filter: contrast(1.2);
}

/* Forzar al título a subir y pegarse al logo */
.hero-banner .section-title {
    margin-top: 5px !important; 
    padding-top: 0 !important;
}

.section-title {
    font-size: 2.2rem; margin-bottom: 20px; font-weight: 700;
    background: linear-gradient(90deg, #BF953F, #FCF6BA, #D4AF37, #FBF5B7, #AA771C);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    text-transform: uppercase; letter-spacing: 2px;
}
.hero-banner p {
    font-size: 1.1rem; color: var(--text-muted); max-width: 700px; margin: 0 auto 35px auto; line-height: 1.6;
}

/* --- BOTONES --- */
.cta-btn {
    padding: 14px 30px; border-radius: 30px; font-weight: 700; letter-spacing: 1px;
    background: var(--primary); color: #050a07; margin: 5px; transition: 0.3s;
    text-transform: uppercase; font-size: 0.9rem; border: none; cursor: pointer;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}
.cta-btn:hover {
    background: var(--primary-hover); transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
}
.cta-btn.secondary { 
    background: transparent; border: 2px solid var(--primary); color: var(--primary); box-shadow: none;
}
.cta-btn.secondary:hover {
    background: rgba(212, 175, 55, 0.1); color: var(--primary-hover);
}

/* --- FILTROS --- */
.filters-wrapper { margin-bottom: 30px; display: flex; flex-direction: column; gap: 15px; }
.search-box { position: relative; max-width: 100%; }
.search-box input {
    width: 100%; padding: 14px 14px 14px 45px;
    border-radius: 25px; border: 1px solid rgba(255, 255, 255, 0.1);
    background: #1a1a1a; color: #fff; font-size: 1rem; outline: none;
}
.search-box svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #666; }

.category-filters {
    display: flex; gap: 10px; overflow-x: auto; padding-bottom: 5px; scrollbar-width: none;
}
.filter-btn {
    padding: 8px 18px; border-radius: 20px; background: #222;
    color: #aaa; border: 1px solid #333; font-size: 0.9rem; white-space: nowrap; cursor: pointer; transition: all 0.3s;
}
.filter-btn.active, .filter-btn:hover { 
    background: var(--primary); color: #050a07; border-color: var(--primary); font-weight: bold;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

/* --- GRID PRODUCTOS --- */
.products-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px;
}
/* --- TARJETA DE PRODUCTO INDIVIDUAL (Verde Oscuro) --- */
.product {
    /* Fondo Verde Bosque Profundo */
    background: #0f2216;
    
    /* Borde sutil a juego */
    border: 1px solid #1e3a29;
    
    border-radius: var(--radius);
    padding: 15px;
    display: flex; 
    flex-direction: column; 
    justify-content: space-between;
    position: relative; 
    transition: transform 0.2s;
    
    /* Sombra para profundidad */
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

/* Efecto al pasar el ratón */
.product:hover {
    transform: translateY(-5px);
    border-color: var(--primary); /* Se ilumina en dorado */
    box-shadow: 0 8px 25px rgba(0,0,0,0.6);
}

.badge-cat {
    position: absolute; top: 10px; right: 10px;
    padding: 4px 8px; border-radius: 6px; font-size: 0.7rem; text-transform: uppercase; font-weight: 600;
}
.product img {
    width: 100%; height: 200px; object-fit: contain;
    background: #fff; border-radius: 12px; margin-bottom: 15px;
}
.price-tag { font-size: 1.1rem; font-weight: bold; color: var(--primary); margin: 5px 0 15px 0; }
.product h3, .pack h3 { font-size: 1rem; margin: 0; line-height: 1.4; color: #fff; }

.add-btn {
    width: 100%; padding: 12px; border-radius: 8px;
    background: #fff; color: #000; font-weight: 700; transition: 0.2s; margin-top: auto; border:none; cursor: pointer;
}
.add-btn:hover { 
    background: #2ecc71; color: #ffffff;
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.5); transform: translateY(-2px) scale(1.02);
}

/* --- SELECTS PACKS --- */
/* --- CÓDIGO NUEVO (CON LÁPIZ PARA PC/IPAD) --- */
.pack select {
    width: 100%; 
    background-color: #050a07; /* Fondo oscuro elegante */
    color: #ddd;
    
    /* Borde dorado y Lápiz SVG incluido */
    border: 1px solid #D4AF37;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg fill='%23D4AF37' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e%3cpath d='M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a1 1 0 0 0 0-1.41l-2.34-2.34a1 1 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px; /* Lápiz un pelín más discreto en PC */
    
    padding: 10px 35px 10px 10px; /* Hueco a la derecha para el icono */
    margin-bottom: 8px;
    border-radius: 8px; 
    font-size: 0.85rem; 
    transition: all 0.3s ease;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}
.pack select:hover {
    transform: translateY(-2px) scale(1.01); border-color: var(--primary);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.2); cursor: pointer;
}

/* --- CARRITO --- */
.cart-panel {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    z-index: 3000; display: flex; justify-content: flex-end;
    opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.cart-panel.active { opacity: 1; pointer-events: auto; }
.cart-content {
    width: 100%; max-width: 400px; background: var(--bg-card);
    height: 100%; display: flex; flex-direction: column; padding: 25px;
    box-shadow: -5px 0 30px rgba(0,0,0,0.8);
    transform: translateX(100%); transition: transform 0.3s ease;
}
.cart-panel.active .cart-content { transform: translateX(0); }

.cart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.close-cart-icon { font-size: 2rem; color: var(--text-muted); border:none; background:none; cursor:pointer;}

.cart-items { flex-grow: 1; overflow-y: auto; padding-right: 5px; margin-bottom: 20px; list-style: none; padding-left: 0; }
.cart-items li {
    display: flex; gap: 15px; background: rgba(255,255,255,0.03);
    padding: 10px; border-radius: 10px; margin-bottom: 10px; align-items: center;
}
.cart-thumb { width: 50px; height: 50px; border-radius: 8px; object-fit: contain; background: #fff; }

.cart-pack-miniatures {
    display: grid; grid-template-rows: repeat(3, min-content); grid-auto-flow: column;
    gap: 2px; margin-right: 10px; width: fit-content;
}
.cart-pack-miniatures img {
    width: 25px; height: 25px; object-fit: cover; border-radius: 3px; border: 1px solid rgba(255,255,255,0.1); background-color: #fff;
}

.cart-info { flex-grow: 1; }
.cart-name { font-weight: 600; display: block; font-size: 0.9rem; }
.cart-details { font-size: 0.75rem; color: var(--text-muted); }
.remove-btn { color: var(--accent); font-weight: bold; padding: 5px 10px; font-size: 1.2rem; background: none; border: none; cursor: pointer; }

.total-row { display: flex; justify-content: space-between; font-size: 1.3rem; font-weight: bold; margin-bottom: 20px; }
.checkout-btn {
    width: 100%; background: var(--primary); color: #000;
    padding: 16px; border-radius: 12px; font-weight: bold; font-size: 1rem;
    margin-bottom: 10px; display: flex; align-items: center; justify-content: center; gap: 10px;
    transition: 0.3s; border: none; cursor: pointer;
}
.checkout-btn:hover { background: var(--primary-hover); }
.continue-btn { width: 100%; color: var(--text-muted); padding: 10px; text-decoration: underline; font-size: 0.9rem; background: none; border: none; cursor: pointer;}

/* --- ANIMACIÓN FLYING IMAGE --- */
.flying-img {
    position: fixed; z-index: 9999; width: 100px; height: 100px;
    object-fit: cover; border-radius: 50%; pointer-events: none;
    box-shadow: 0 0 25px rgba(37, 211, 102, 0.9);
    transition: top 0.8s cubic-bezier(0.5, 0, 0.5, 1), left 0.8s linear, transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.8s ease-in;
}
/* Estilo para los Selects Fijos (Bloqueados) */
.pack select:disabled {
    background: #151515;       /* Un poco más oscuro que el normal */
    background-image: none;
    color: #aabeb6;            /* Color texto legible */
    border: 1px solid #333;    /* Borde sutil */
    opacity: 1;                /* Evita que se vea transparente/borroso */
    cursor: default;           /* El ratón no cambia a mano */
    font-style: italic;        /* Un toque elegante para diferenciarlo */
    appearance: none;          /* Intenta ocultar la flechita en algunos navegadores */
    -webkit-appearance: none;
}
/* 1. EL CONTENEDOR: Para que los packs no se peguen */
#packs-container {
    display: flex;
    flex-wrap: wrap;         /* IMPORTANTE: Si no caben, bajan a la siguiente fila */
    justify-content: center; /* Los centra en la pantalla */
    gap: 30px;               /* Espacio de separación entre tarjetas (Vertical y Horizontal) */
    padding: 20px 10px;      /* Un poco de aire alrededor */
}

/* 2. LA TARJETA DEL PACK: Verde Oscuro con Animación */
.pack {
    background: #0f2216;
    border: 1px solid #1e3a29;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    
    /* ANCHURA */
    width: 100%;             
    max-width: 400px;        
    min-width: 300px;

    display: flex;                  
    flex-direction: column;         
    justify-content: space-between;

    /* AÑADIDO: Para que la animación sea suave */
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* AÑADIDO: EL EFECTO AL PASAR EL RATÓN */
.pack:hover {
    transform: translateY(-5px);            /* Se levanta */
    border-color: #D4AF37;                  /* Borde dorado */
    box-shadow: 0 8px 25px rgba(0,0,0,0.6); /* Sombra más fuerte */
}

/* --- VERSIÓN MÓVIL DEFINITIVA (3 COLUMNAS + PACKS MEJORADOS) --- */
@media screen and (max-width: 600px) {
    
    /* === 1. INICIO CENTRADO VERTICALMENTE === */
    .hero-banner {
        /* Forzamos que el banner ocupe el 75% de la altura de la pantalla */
        min-height: 75vh !important; 
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important; /* Esto centra todo verticalmente */
        padding: 20px !important;
        margin-top: 0 !important;
    }

    .mini-logo {
        width: 140px !important; /* Un pelín más grande para que luzca */
        margin: 0 auto 20px auto !important; 
    }

    .section-title {
        font-size: 1.6rem !important;
        margin-bottom: 15px !important;
    }
    
    /* Botones del banner grandes y separados */
    .hero-banner .cta-btn {
        width: 100% !important;
        display: block !important;
        margin: 10px 0 !important;
        padding: 15px !important;
    }


    /* === 2. PACKS: INDICADOR VISUAL (LÁPIZ) Y BOTÓN ANCHO === */
    
    /* El Selector (Donde eliges perfume) */
    .pack select {
        /* Borde Dorado para llamar la atención */
        border: 1px solid #D4AF37 !important; 
        background-color: #050a07 !important;
        
        /* Añadimos un ICONO DE LÁPIZ al fondo con código puro (SVG) */
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg fill='%23D4AF37' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e%3cpath d='M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a1 1 0 0 0 0-1.41l-2.34-2.34a1 1 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z'/%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right 10px center; /* Icono a la derecha */
        background-size: 18px;
        
        padding: 12px 35px 12px 12px !important; /* Espacio para el texto y el icono */
        font-size: 0.9rem !important;
        margin-bottom: 10px !important;
    }

    /* Quitamos el lápiz en los que están bloqueados (Fijos) */
    .pack select:disabled {
        background-image: none !important;
        border: 1px solid #333 !important;
        opacity: 0.7;
    }

    /* El Botón de AÑADIR PACK (Grande y Ancho) */
    .pack .add-btn {
        width: 100% !important;      /* Ocupa todo el ancho */
        padding: 15px !important;    /* Más gordito */
        font-size: 1rem !important;  /* Letra más grande */
        font-weight: 800 !important;
        margin-top: 15px !important;
    }


    /* === 3. GRID DE PERFUMES SUELTOS (3 COLUMNAS - SIN TOCAR) === */
    .products-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 5px !important;
    }

    .product {
        padding: 5px !important;
        border-radius: 8px !important;
    }

    /* Aquí mantenemos el botón PEQUEÑO solo para los perfumes sueltos */
    .product .add-btn {
        padding: 4px 0 !important;
        font-size: 0.55rem !important;
        width: 100% !important;
        border-radius: 4px !important;
    }

    .product img {
        height: 85px !important;
        object-fit: contain !important;
        margin-bottom: 5px !important;
        border-radius: 6px !important;
        background: #fff;
    }

    .product h3 {
        font-size: 0.6rem !important;
        line-height: 1.1 !important;
        height: 22px !important;
        overflow: hidden;
        margin-bottom: 2px !important;
    }

    .price-tag {
        font-size: 0.75rem !important;
        margin: 2px 0 4px 0 !important;
    }
    
    .badge-cat {
        font-size: 0.4rem !important;
        padding: 2px 3px !important;
        top: 4px !important;
        right: 4px !important;
        border-radius: 3px !important;
    }
/* --- PRECIO GIGANTE SOLO PARA PACKS (MÓVIL) --- */
    .pack .price-tag {
        font-size: 1.5rem !important; /* Letra mucho más grande (antes era 0.75) */
        margin: 10px 0 15px 0 !important; /* Un poco de aire arriba y abajo */
        font-weight: 800 !important; /* Más negrita */
    }
}