/* ===== VARIABLES GLOBALES Y PALETA DE COLORES ===== */
:root {
    --verde-bosque: #2E3A2F;
    --verde-salvia: #8B9A7B;
    --beige-calido: #F4F1EA;
    --terracota: #A85842;
    --blanco: #ffffff;
    --texto-oscuro: #333333;
    --texto-gris: #777777;
    --sombra-suave: 0 10px 30px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--beige-calido);
    font-family: 'Montserrat', sans-serif;
    color: var(--texto-oscuro);
    line-height: 1.6;
}

/* ===== ENCABEZADO (Todas las páginas) ===== */
header {
    background-color: var(--blanco);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo h1 {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    color: var(--verde-bosque);
    letter-spacing: 2px;
}

.logo h1 span {
    font-weight: 300;
    color: var(--verde-salvia);
}

nav {
    display: flex;
    gap: 30px;
}

nav a {
    text-decoration: none;
    color: var(--texto-oscuro);
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--terracota);
}

.iconos-header {
    display: flex;
    gap: 20px;
    font-size: 18px;
    cursor: pointer;
}

/* ===== SECCIÓN HERO (Solo index.html) ===== */
.hero {
    height: 450px;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.5)), 
                url('https://images.unsplash.com/photo-1541625602330-2277a4c46182?q=80&w=1500&auto=format&fit=crop') center/cover no-repeat;
    display: flex;
    align-items: center;
    padding-left: 10%;
    color: var(--blanco);
}

.hero h2 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    margin-bottom: 10px;
}

.btn-principal {
    display: inline-block;
    background-color: var(--blanco);
    color: var(--verde-bosque);
    padding: 15px 30px;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.btn-principal:hover {
    background-color: var(--terracota);
    color: var(--blanco);
}

/* ===== TÍTULOS DE SECCIÓN (Todas las páginas) ===== */
.titulo-seccion {
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--verde-bosque);
    margin: 40px 0 20px 0;
}

/* ===== CATÁLOGO DE INICIO (index.html) ===== */
.contenedor-productos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    padding: 0 5% 80px 5%;
}

.caja-producto {
    background-color: var(--blanco);
    width: 250px;
    border-radius: 10px;
    box-shadow: var(--sombra-suave);
    text-align: center;
    padding: 20px;
    transition: transform 0.3s ease;
}

.caja-producto:hover {
    transform: translateY(-10px);
}

.caja-producto img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.caja-producto h3 {
    font-family: 'Playfair Display', serif;
    color: var(--verde-bosque);
}

.btn-ver-mas {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background-color: var(--verde-bosque);
    color: var(--blanco);
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    transition: background 0.3s;
}

.btn-ver-mas:hover {
    background-color: var(--terracota);
}

/* ===== PÁGINA DE CATÁLOGO (catalogo.html) ===== */
.catalogo-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--blanco);
    margin: 30px 5%;
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--sombra-suave);
}

.catalogo-banner img {
    width: 400px;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
}

/* Cajas de promociones superiores */
.contenedor-promociones {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 0 5%;
    margin-bottom: 40px;
}

.caja-promo {
    width: 300px;
    height: 200px;
    background-color: var(--blanco);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: var(--sombra-suave);
    overflow: hidden;
}

.caja-promo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.caja-x {
    background-color: #e0e0e0;
    color: #999;
    font-size: 4rem;
    font-weight: bold;
}

/* ===== ANIMACIONES DE LAS CAJAS INFERIORES (catalogo.html) ===== */
.contenedor-catalogo {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    padding: 0 5% 80px 5%;
}

.caja-animada {
    background-color: var(--blanco);
    width: 220px;
    border-radius: 10px;
    box-shadow: var(--sombra-suave);
    text-align: center;
    padding: 15px;
    overflow: hidden;
    transition: transform 0.4s ease;
}

.imagen-caja {
    width: 100%;
    height: 150px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 15px;
}

.imagen-caja img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease; /* Transición para las animaciones */
}

/* Animación 1: Escala (Hacer grande y pequeña) */
.caja-escala:hover .imagen-caja img {
    transform: scale(1.2); /* Se agranda al pasar el cursor */
}

/* Animación 2: Rotación (Girar en su mismo sitio) */
.caja-rotacion:hover .imagen-caja img {
    transform: rotate(5deg) scale(1.05); /* Gira un poco y se agranda ligeramente */
}

.btn-detalle {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 15px;
    background-color: var(--terracota);
    color: var(--blanco);
    text-decoration: none;
    border-radius: 5px;
    font-size: 12px;
    transition: background 0.3s;
}

.btn-detalle:hover {
    background-color: var(--verde-bosque);
}

/* ===== PÁGINA DE DETALLE DE PRODUCTO (producto_*.html) ===== */
.detalle-producto {
    display: flex;
    flex-wrap: wrap;
    max-width: 1000px;
    margin: 50px auto;
    background-color: var(--blanco);
    border-radius: 10px;
    box-shadow: var(--sombra-suave);
    padding: 40px;
    gap: 40px;
}

.imagen-detalle {
    flex: 1;
    min-width: 300px;
}

.imagen-detalle img {
    width: 100%;
    border-radius: 10px;
    transition: transform 0.4s ease;
    cursor: pointer;
}

.info-detalle {
    flex: 1.2;
    min-width: 300px;
}

.info-detalle h1 {
    font-family: 'Playfair Display', serif;
    color: var(--verde-bosque);
    font-size: 2rem;
}

.info-detalle h3 {
    margin-top: 15px;
    color: var(--verde-bosque);
}

.info-detalle ul {
    list-style-type: none;
    padding-left: 0;
}

.info-detalle ul li::before {
    content: '✓ ';
    color: var(--verde-salvia);
    font-weight: bold;
}

.precio {
    font-size: 1.5rem;
    color: var(--terracota);
    font-weight: bold;
    margin: 10px 0;
}

/* Bloque del mensaje de envío gratis */
.bloque-mensaje {
    min-height: 25px;
    margin-bottom: 10px;
}

.mensaje {
    color: var(--verde-salvia);
    font-weight: bold;
    font-size: 0.9rem;
}

/* Sección de compra */
.compra-seccion {
    background-color: var(--beige-calido);
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.compra-seccion select {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-family: 'Montserrat', sans-serif;
}

.total-compra {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--verde-bosque);
    margin-bottom: 15px;
}

.btn-comprar {
    width: 100%;
    padding: 15px;
    background-color: var(--terracota);
    color: var(--blanco);
    border: none;
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-comprar:hover {
    background-color: var(--verde-bosque);
}

/* ===== PIE DE PÁGINA (Todas las páginas) ===== */
footer {
    background-color: var(--verde-bosque);
    color: var(--blanco);
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

/* ===== DISEÑO RESPONSIVO (Para celulares) ===== */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .hero {
        padding-left: 5%;
        text-align: center;
        justify-content: center;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .catalogo-banner {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .catalogo-banner img {
        width: 100%;
    }

    .contenedor-promociones {
        flex-direction: column;
        align-items: center;
    }

    .detalle-producto {
        padding: 20px;
    }
}