/* =========================================
   VARIABLES Y BASES
   ========================================= */
:root {
    --primary-color: #d18d94; /* Rosa Palo */
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #fafafa;
    --wa-color: #25D366;
    --wa-hover: #1ebe5d;
    --yape: #742092;
    --plin: #00E4B2;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* =========================================
   PORTADA (HERO)
   ========================================= */
.hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), 
                url('https://images.unsplash.com/photo-1490481651871-ab68de25d43d?q=80&w=2070&auto=format&fit=crop') center/cover;
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 20px;
}

.hero h1 { font-size: 3rem; margin-bottom: 15px; text-transform: uppercase; letter-spacing: 2px; }
.hero p { font-size: 1.3rem; margin-bottom: 30px; }

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 40px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 50px;
    transition: 0.3s;
    display: inline-block;
}

/* =========================================
   BARRA DE CONFIANZA
   ========================================= */
.trust-bar {
    background-color: #ffffff;
    display: flex;
    justify-content: space-around;
    padding: 20px 10px;
    font-size: 0.9rem;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    flex-wrap: wrap;
    gap: 15px;
}

.trust-bar i { color: var(--primary-color); font-size: 1.2rem; margin-right: 5px; }

/* =========================================
   CARRUSEL (PASARELA LENTA Y ARRASTRABLE)
   ========================================= */
.carrusel-infinito {
    padding: 60px 0;
    background: #fff;
    overflow: hidden;
    cursor: grab;
    user-select: none;
}

.carrusel-infinito:active { cursor: grabbing; }

.carrusel-track {
    display: flex;
    gap: 25px;
    width: max-content;
    will-change: transform;
}

.carrusel-item {
    width: 260px;
    height: 360px;
    border-radius: 15px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.carrusel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none; /* Permite que el clic pase al contenedor padre */
}

/* =========================================
   CATÁLOGO (GRID)
   ========================================= */
.catalog { padding: 60px 20px; text-align: center; }
.catalog h2 { margin-bottom: 40px; font-size: 2.2rem; }

.grid-productos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.producto {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.img-container {
    position: relative;
    height: 450px;
    overflow: hidden;
    cursor: pointer;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0; left: 0;
    transition: opacity 0.5s ease;
}

.img-espalda { opacity: 0; z-index: 2; }
.producto:hover .img-frente { opacity: 0; }
.producto:hover .img-espalda { opacity: 1; }

.info-producto { padding: 25px; text-align: left; }
.precio { font-size: 1.5rem; font-weight: bold; color: var(--primary-color); }

/* BOTONES DE COLORES (SWATCHES) */
.swatches { display: flex; gap: 12px; margin: 15px 0; }
.swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 0 0 1px #ddd;
    transition: 0.2s;
}
.swatch.active { box-shadow: 0 0 0 2px var(--text-dark); }

.btn-whatsapp {
    width: 100%;
    background: var(--wa-color);
    color: white;
    padding: 15px;
    border: none;
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* =========================================
   MÉTODOS DE PAGO PERÚ
   ========================================= */
.metodos-pago-box { padding: 60px 20px; text-align: center; background: #fff; }
.pago-grid { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; margin-top: 25px; }
.pago-card { padding: 15px 30px; border-radius: 12px; color: white; font-weight: bold; min-width: 160px; }
.yape { background: var(--yape); }
.plin { background: var(--plin); color: #000; }
.banco { background: #004b98; }
.tarjeta { background: #333; }

/* =========================================
   MODAL DE DETALLE (POP-UP)
   ========================================= */
#modal-detalle {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
    padding: 20px;
}

#modal-detalle.visible { display: flex; }

.modal-contenido {
    background: white;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: 25px;
    padding: 40px;
    position: relative;
    overflow-y: auto;
}

.cerrar-modal {
    position: absolute;
    top: 20px; right: 25px;
    font-size: 2.8rem;
    cursor: pointer;
    color: var(--text-dark);
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

/* GALERÍA DEL MODAL */
.modal-galeria { display: flex; flex-direction: column; gap: 15px; }
#modal-img-principal { width: 100%; height: 500px; object-fit: cover; border-radius: 15px; }

.modal-miniaturas { 
    display: flex; 
    gap: 10px; 
    justify-content: center; 
}

.miniatura { 
    width: 70px; 
    height: 90px; 
    object-fit: cover; 
    border-radius: 8px; 
    cursor: pointer; 
    opacity: 0.5; 
    border: 2px solid transparent; 
    transition: 0.3s;
}

.miniatura.activa { opacity: 1; border-color: var(--primary-color); }

.precio-grande { font-size: 2.2rem; color: var(--primary-color); font-weight: bold; margin-bottom: 15px; }

.btn-whatsapp-grande {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--wa-color);
    color: white;
    padding: 20px;
    border-radius: 15px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
    margin-top: 20px;
}

/* BOTÓN WHATSAPP FLOTANTE */
.float-wa {
    position: fixed;
    bottom: 30px; right: 30px;
    background: var(--wa-color);
    color: white;
    width: 65px; height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    z-index: 1000;
}

/* RESPONSIVO */
@media (max-width: 768px) {
    .modal-grid { grid-template-columns: 1fr; }
    #modal-img-principal { height: 350px; }
    .hero h1 { font-size: 2.2rem; }
}