/* --- VARIABLES INICIALES (TEMA CLARO) --- */
:root {
    --rojo: #C62828;
    --rojo-oscuro: #8E0000;
    --blanco: #FFFFFF;
    --fondo: #FAFAFA;
    --tarjeta: #FFFFFF;
    --texto-oscuro: #2C3E50;
    --texto-claro: #546E7A;
    --sombra: 0 8px 24px rgba(0, 0, 0, 0.06);
    --sombra-hover: 0 12px 32px rgba(198, 40, 40, 0.2);
    --borde: rgba(0, 0, 0, 0.05);
    --radio-borde: 16px;
}

/* --- RESET Y ESTRUCTURA --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

.theme-checkbox { display: none; }

/* TEMA OSCURO */
.theme-checkbox:checked ~ .page-wrapper {
    --fondo: #121212;
    --tarjeta: #1E1E1E;
    --texto-oscuro: #F0F0F0;
    --texto-claro: #B0BEC5;
    --blanco: #1E1E1E;
    --sombra: 0 8px 24px rgba(0, 0, 0, 0.4);
    --borde: rgba(255, 255, 255, 0.05);
}

.page-wrapper {
    background-color: var(--fondo);
    color: var(--texto-oscuro);
    font-family: 'Montserrat', sans-serif;
    min-height: 100vh;
    transition: background-color 0.4s ease, color 0.4s ease;
    background-image: radial-gradient(var(--texto-claro) 0.5px, transparent 0.5px);
    background-size: 24px 24px;
    line-height: 1.6;
}

h1, h2, h3, .logo { font-family: 'Playfair Display', serif; }

/* --- NAVEGACIÓN --- */
.main-header {
    background-color: var(--blanco);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.4s ease;
}

.navbar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo { font-size: 1.8rem; font-weight: 700; }
.red-accent { color: var(--rojo); }

.nav-actions { display: flex; align-items: center; gap: 2rem; }
.nav-links { list-style: none; display: flex; gap: 2rem; }

.nav-links a {
    text-decoration: none;
    color: var(--texto-oscuro);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s;
}

.nav-links a:hover { color: var(--rojo); }

.nav-links a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    bottom: -2px;
    left: 0;
    background-color: var(--rojo);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    border-radius: 2px;
}

.nav-links a:hover::after { transform: scaleX(1); }

body:has(#productos:target) a[href="#productos"]::after,
body:has(#ofertas:target) a[href="#ofertas"]::after,
body:has(#contacto:target) a[href="#contacto"]::after { transform: scaleX(1); }
body:not(:has(:target)) a[href="#inicio"]::after,
body:has(#inicio:target) a[href="#inicio"]::after { transform: scaleX(1); }

/* --- INTERRUPTOR TEMA --- */
.theme-switch {
    width: 60px; height: 30px;
    background-color: var(--texto-oscuro);
    border-radius: 50px;
    position: relative;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 8px; cursor: pointer;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.2);
    transition: background-color 0.4s; flex-shrink: 0;
}
.theme-switch i { font-size: 14px; z-index: 1; }
.fa-sun { color: #F1C40F; }
.fa-moon { color: #F39C12; }

.slider-ball {
    position: absolute; width: 24px; height: 24px;
    background-color: #FFF; border-radius: 50%;
    top: 3px; left: 3px;
    transition: transform 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3); z-index: 2;
}

.theme-checkbox:checked ~ .page-wrapper .slider-ball { transform: translateX(30px); background-color: #2C3E50; }
.theme-checkbox:checked ~ .page-wrapper .theme-switch { background-color: #E0E0E0; }

/* --- ANIMACIONES --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeInUp 0.8s ease-out forwards; }
.delay-1 { animation-delay: 0.1s; } .delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; } .delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; } .delay-6 { animation-delay: 0.6s; }
.delay-7 { animation-delay: 0.7s; } .delay-8 { animation-delay: 0.8s; }
.delay-9 { animation-delay: 0.9s; }

/* --- HÉROE --- */
.hero {
    height: 70vh;
    background-image: url('https://images.unsplash.com/photo-1578916171728-46686eac8d58?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80');
    background-size: cover; background-position: center;
}
.hero-overlay {
    background: linear-gradient(to right, rgba(0,0,0,0.85), rgba(0,0,0,0.4));
    height: 100%; display: flex; align-items: center; padding: 0 2rem;
}
.hero-content { max-width: 1200px; margin: 0 auto; color: #FFFFFF; width: 100%; }
.hero h1 { font-size: 4rem; margin-bottom: 1rem; line-height: 1.1; }
.hero p { font-size: 1.2rem; max-width: 600px; margin-bottom: 2.5rem; color: #E0E0E0; }

.btn-primary {
    background-color: var(--rojo); color: #FFFFFF;
    padding: 1rem 2.5rem; text-decoration: none; font-weight: 600;
    border-radius: 50px; display: inline-block; transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(198, 40, 40, 0.4);
}
.btn-primary:hover {
    background-color: var(--rojo-oscuro); transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(198, 40, 40, 0.6);
}

/* --- PRODUCTOS (NUEVO DISEÑO CON HOVER) --- */
.container { max-width: 1200px; margin: 0 auto; padding: 6rem 2rem; }
.section-title { text-align: center; margin-bottom: 4rem; }
.section-title h2 { font-size: 2.8rem; }
.divider { height: 4px; width: 60px; background-color: var(--rojo); margin: 1rem auto; border-radius: 2px; }
.left-divider { margin: 1rem 0 2rem 0; }
.subtitle { color: var(--texto-claro); font-size: 1.1rem; }

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card {
    background-color: var(--tarjeta);
    border-radius: var(--radio-borde);
    box-shadow: var(--sombra);
    text-align: center;
    border: 1px solid var(--borde);
    opacity: 0; 
    animation: fadeInUp 0.8s ease-out forwards;
    position: relative; /* Clave para que la imagen se quede adentro */
    overflow: hidden;   /* Clave para bordes redondeados en la foto */
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s;
}

/* El contenido (Icono y letras) debe ir encima de la foto */
.card-content {
    position: relative;
    z-index: 2;
    padding: 2.5rem 2rem;
    transition: all 0.4s ease;
}

/* La imagen de fondo oculta */
.card-image {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
    z-index: 1;
    transform: scale(1.1);
}

/* Capa oscura sobre la imagen para que se lean las letras */
.card-image::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.8));
}

/* EFECTOS AL PASAR EL MOUSE (HOVER) */
.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--sombra-hover);
    border-color: transparent;
}

.product-card:hover .card-image {
    opacity: 1;
    transform: scale(1);
}

.product-card:hover .card-content h3,
.product-card:hover .card-content p,
.product-card:hover .card-content i {
    color: #FFFFFF; /* Letras e icono se vuelven blancos */
}

/* Estilos de letras e iconos por defecto */
.product-card i { font-size: 2.5rem; margin-bottom: 1.5rem; transition: transform 0.3s, color 0.4s; }
.product-card:hover i { transform: scale(1.2); }
.icon-red { color: var(--rojo); }
.product-card h3 { font-size: 1.3rem; margin-bottom: 1rem; transition: color 0.4s; }
.product-card p { color: var(--texto-claro); font-size: 0.95rem; transition: color 0.4s; }

/* Tarjeta especial "Mucho Más" */
.highlight-card { background-color: var(--rojo); color: #FFFFFF; }
.highlight-card p { color: rgba(255, 255, 255, 0.9); }
.icon-white { color: #FFFFFF; }
.highlight-card .card-image::after {
    background: linear-gradient(to bottom, rgba(198, 40, 40, 0.6), rgba(198, 40, 40, 0.95));
}

/* --- OFERTAS --- */
.offers-section { background-color: var(--tarjeta); padding: 3rem 0; border-top: 1px solid var(--borde); border-bottom: 1px solid var(--borde); }
.offers-box { background-color: rgba(198, 40, 40, 0.05); border-left: 5px solid var(--rojo); border-radius: var(--radio-borde); padding: 3rem; text-align: center; }
.offers-content h2 { color: var(--rojo); margin-bottom: 1rem; }
.offers-content p { margin-bottom: 1.5rem; }
.badge-soon { background-color: var(--rojo); color: #FFFFFF; padding: 0.4rem 1rem; border-radius: 20px; font-size: 0.85rem; font-weight: 600; text-transform: uppercase; }
.badge-soon.small { font-size: 0.7rem; padding: 0.2rem 0.6rem; background-color: var(--texto-claro); }

/* --- CONTACTO --- */
.info-section { padding-bottom: 4rem; }
.info-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.info-item { display: flex; align-items: flex-start; margin-bottom: 2rem; }
.info-item i { font-size: 1.5rem; color: var(--rojo); margin-right: 1.5rem; margin-top: 0.3rem; }
.info-item strong { display: block; font-size: 1.1rem; margin-bottom: 0.3rem; }
.map-container iframe { border-radius: var(--radio-borde); box-shadow: var(--sombra); transition: box-shadow 0.3s; }
.map-container iframe:hover { box-shadow: var(--sombra-hover); }

/* --- FOOTER --- */
footer { background-color: #121212; color: #FFFFFF; text-align: center; padding: 2rem; }

/* --- WHATSAPP --- */
.whatsapp-btn {
    position: fixed; bottom: 30px; right: 30px;
    background-color: #25D366; color: #FFFFFF; padding: 0.8rem 1.5rem;
    border-radius: 50px; display: flex; align-items: center; text-decoration: none;
    font-weight: 600; box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
    z-index: 1000; transition: transform 0.3s, background-color 0.3s;
}
.whatsapp-btn i { font-size: 1.8rem; margin-right: 0.8rem; }
.whatsapp-btn:hover { transform: translateY(-5px); background-color: #20BA56; }

/* --- RESPONSIVO --- */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero h1 { font-size: 2.5rem; }
    .info-wrapper { grid-template-columns: 1fr; }
    .wa-text { display: none; }
    .whatsapp-btn { padding: 1rem; border-radius: 50%; }
    .whatsapp-btn i { margin-right: 0; }
    .nav-actions { gap: 1rem; }
}
