/* 1. RESETEO BÁSICO */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Helvetica', sans-serif; }
body { background-color: #000; color: #fff; }

/* 2. ENCABEZADO */
header {
    background-color: #000;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    position: sticky; top: 0; z-index: 100;
}
header a { color: #fff; text-decoration: none; margin-left: 15px; font-weight: bold; }

/* --- MENÚ DESPLEGABLE --- */
.dropdown { position: relative; display: inline-block; margin-left: 15px; }
.dropbtn { background-color: transparent; color: white; border: none; font-size: 16px; font-weight: bold; cursor: pointer; font-family: 'Helvetica', sans-serif; }
.dropdown-content { display: none; position: absolute; background-color: #222; min-width: 160px; box-shadow: 0px 8px 16px rgba(0,0,0,0.2); z-index: 1; border-radius: 5px; }
.dropdown-content a { color: white; padding: 12px 16px; text-decoration: none; display: block; margin-left: 0; }
.dropdown-content a:hover { background-color: #d32f2f; }
.dropdown:hover .dropdown-content { display: block; }

/* --- 3. BANNER TRÍPTICO (IDENTIDAD DE MARCA) --- */
.banner-triptico {
    display: flex;
    width: 100%;
    height: 400px;
    background-color: #1a1a1a;
    overflow: hidden;
}
.parte-banner { flex: 1; display: flex; justify-content: center; overflow: hidden; }
.parte-banner img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform 0.5s ease;
}
.parte-banner:hover img { transform: scale(1.05); }

/* --- 4. MOSAICO DE COLECCIONES (MENÚ VISUAL) --- */
.contenedor-colecciones {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}
.grid-mosaico {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr)); 
    gap: 20px;
}
.item-mosaico {
    height: 400px;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center; 
    justify-content: center;
    text-decoration: none;
    color: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.cortina-negra {
    background: rgba(0, 0, 0, 0.5);
    width: 100%; height: 100%;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    transition: all 0.3s ease;
}
.item-mosaico:hover .cortina-negra {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(2px);
}
.item-mosaico h3 {
    font-size: 3rem; text-transform: uppercase; font-weight: 900;
    letter-spacing: 5px; text-shadow: 2px 2px 10px rgba(0,0,0,0.8);
    margin-bottom: 5px;
}
.item-mosaico span {
    background-color: #d32f2f; padding: 5px 15px;
    font-weight: bold; text-transform: uppercase; font-size: 0.9rem; letter-spacing: 2px;
}

/* --- 5. GRID DE PRODUCTOS (DROPS) --- */
.contenedor { max-width: 1200px; margin: 0 auto; padding: 2rem; }
h2 { text-align: center; margin-bottom: 2rem; text-transform: uppercase; letter-spacing: 2px; margin-top: 2rem; font-size: 2rem; }

.grid-productos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}
.producto-card {
    background-color: #111; border-radius: 8px; overflow: hidden;
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.1); transition: transform 0.2s;
}
.producto-card:hover { transform: translateY(-5px); }
.imagen-container img { width: 100%; height: 350px; object-fit: cover; }
.producto-info { padding: 1rem; text-align: center; }
.btn-comprar {
    display: block; background-color: #d32f2f; color: white;
    padding: 10px; text-decoration: none; font-weight: bold;
    margin-top: 10px; border-radius: 4px; width: 100%; cursor: pointer; border: none;
}

/* AJUSTE MOVIL */
@media (max-width: 768px) {
    .banner-triptico { height: 180px; }
    .grid-mosaico { grid-template-columns: 1fr; }
    .item-mosaico { height: 250px; }
    .item-mosaico h3 { font-size: 2rem; }
}

/* --- 6. PÁGINA DE DETALLE (AGREGAR AL FINAL) --- */
.detalle-producto {
    display: flex;
    gap: 4rem;
    margin-top: 2rem;
    align-items: center; /* Centra verticalmente */
    max-width: 1200px;   /* Limita el ancho del contenedor */
    margin-left: auto;   /* Centra en pantalla */
    margin-right: auto;
    padding: 2rem;
}

.columna-img { 
    flex: 1; 
    display: flex;         
    justify-content: center; /* Centra la imagen horizontalmente */
}

.columna-img img { 
    width: 100%; 
    max-width: 450px;      /* <--- ESTE ES EL CANDADO: Evita que sea gigante */
    height: auto; 
    border-radius: 10px; 
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    object-fit: contain;
}

.columna-info { flex: 1; }

.columna-info h1 { 
    font-size: 2.5rem; 
    margin-bottom: 1rem; 
}

.precio-grande { 
    font-size: 2rem; 
    color: #d32f2f; 
    font-weight: bold; 
    margin-bottom: 1.5rem; 
}

.descripcion { 
    font-size: 1.1rem; 
    line-height: 1.6; 
    margin-bottom: 2rem; 
    color: #ccc; 
}

/* Ajuste para celular en la página de detalle */
@media (max-width: 768px) {
    .detalle-producto { 
        flex-direction: column; /* Una cosa arriba de la otra */
        gap: 2rem;
    }
    
    .columna-img img {
        max-width: 100%; /* En celular sí dejamos que aproveche el ancho */
    }
}

/* --- ESTILOS DEL CARRITO DE COMPRAS --- */
.tabla-carrito {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
    background-color: #111;
    border-radius: 8px;
    overflow: hidden;
}

.tabla-carrito th, .tabla-carrito td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #333;
}

.tabla-carrito th {
    background-color: #222;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.img-mini {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.btn-vaciar {
    display: inline-block;
    margin-top: 1rem;
    color: #999;
    text-decoration: underline;
    font-size: 0.9rem;
    cursor: pointer;
}

.resumen-total {
    background-color: #111;
    padding: 2rem;
    margin-top: 2rem;
    text-align: right;
    border-radius: 8px;
}

.total-grande {
    font-size: 2.5rem;
    font-weight: bold;
    color: #d32f2f;
    margin: 10px 0;
}

.btn-checkout {
    background-color: #fff;
    color: #000;
    padding: 15px 40px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
    display: inline-block;
    margin-top: 1rem;
    transition: background 0.3s;
    border-radius: 4px;
}

.btn-checkout:hover {
    background-color: #ccc;
}

/* Ajuste Carrito en Celular */
@media (max-width: 768px) {
    .img-mini { width: 50px; height: 50px; }
    .tabla-carrito th, .tabla-carrito td { padding: 0.5rem; font-size: 0.85rem; }
    .btn-checkout { width: 100%; text-align: center; }
}