/* ================= VARIABLES ================= */
:root {
    --bg-main: #f8f9fa;
    --bg-white: #ffffff;
    --text-dark: #2b2d42;
    --text-muted: #6c757d;
    --accent-blue: #1e3a8a;
    --accent-hover: #172a6b;
    --border-light: #e9ecef;
    --shadow-soft: 0 10px 30px rgba(0,0,0,0.04);
    --shadow-hover: 0 15px 40px rgba(0,0,0,0.08);
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body { 
    font-family: 'Helvetica Neue', Arial, sans-serif; 
    background-color: var(--bg-main); 
    color: var(--text-dark); 
    line-height: 1.6; 
    -webkit-font-smoothing: antialiased; 
}

a { 
    text-decoration: none; 
    color: inherit; 
}

/* ================= LAZY LOAD ================= */
.lazy-section { 
    opacity: 0; 
    transform: translateY(30px); 
    transition: opacity 0.8s ease-out, transform 0.8s ease-out; 
}

.lazy-section.visible { 
    opacity: 1; 
    transform: translateY(0); 
}

/* ================= NAVEGACIÓN ================= */
.navbar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 20px 8%; 
    background-color: var(--bg-white); 
    border-bottom: 1px solid var(--border-light); 
    position: sticky; 
    top: 0; 
    z-index: 100; 
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 95px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

.nav-links a { 
    margin-left: 25px; 
    font-weight: 500; 
    font-size: 14px; 
    color: var(--text-dark); 
    transition: color 0.3s; 
}

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

.lang-selector { 
    display: inline-block; 
    margin-left: 30px; 
    padding-left: 20px; 
    border-left: 1px solid var(--border-light); 
}

.lang-selector a { 
    margin-left: 5px; 
    color: var(--text-muted); 
}

.lang-selector a.active-lang { 
    color: var(--accent-blue); 
    font-weight: bold; 
    text-decoration: underline; 
}

/* ================= HERO SECTION ================= */
.hero { 
    position: relative; 
    height: 80vh; 
    min-height: 600px; 
    background-image: url('../fotos/encabezado.png'); 
    background-size: cover; 
    background-position: center bottom; 
    display: flex; 
    align-items: center; 
    padding: 0 8%; 
}

.hero::before { 
    content: ""; 
    position: absolute; 
    top: 0; left: 0; right: 0; bottom: 0; 
    background: linear-gradient(to right, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0) 100%); 
    z-index: 1; 
}

.hero-content { 
    position: relative; 
    z-index: 2; 
    max-width: 550px; 
    animation: fadeIn 1s ease-out forwards; 
}

.hero-content h1 { 
    font-size: 4rem; 
    font-weight: 300; 
    color: var(--text-dark); 
    line-height: 1.1; 
    margin-bottom: 20px; 
}

.hero-content p { 
    font-size: 1.2rem; 
    color: var(--text-muted); 
    margin-bottom: 40px; 
}

.btn-hero { 
    background-color: var(--accent-blue); 
    color: var(--bg-white); 
    padding: 16px 40px; 
    border-radius: 50px; 
    font-weight: 600; 
    font-size: 1rem; 
    letter-spacing: 1px; 
    transition: all 0.3s ease; 
    display: inline-block; 
}

.btn-hero:hover { 
    background-color: var(--accent-hover); 
    transform: translateY(-2px); 
    box-shadow: 0 8px 20px rgba(30, 58, 138, 0.3); 
}

@keyframes fadeIn { 
    from { opacity: 0; transform: translateX(-20px); } 
    to { opacity: 1; transform: translateX(0); } 
}

/* ================= PRODUCTOS ================= */
.productos-section { 
    padding: 100px 8%; 
    background-color: var(--bg-white); 
}

.section-header { 
    text-align: center; 
    margin-bottom: 60px; 
}

.section-header h2 { 
    font-size: 2.5rem; 
    font-weight: 400; 
    color: var(--text-dark); 
    margin-bottom: 10px; 
}

.section-header .subtitle { 
    color: var(--text-muted); 
    font-size: 1.1rem; 
}

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

.producto-card { 
    background-color: var(--bg-white); 
    border-radius: 12px; 
    overflow: hidden; 
    box-shadow: var(--shadow-soft); 
    transition: all 0.4s ease; 
    display: flex; 
    flex-direction: column; 
}

.producto-card:hover { 
    transform: translateY(-10px); 
    box-shadow: var(--shadow-hover); 
}

.img-container { 
    padding: 0; 
    width: 100%; 
    height: 320px; 
    overflow: hidden; 
    border-bottom: 1px solid var(--border-light); 
    background-color: #fcfcfc; 
}

.img-container img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    object-position: center; 
    cursor: pointer; 
    transition: transform 0.4s ease; 
}

.img-container img:hover { 
    transform: scale(1.08); 
}

.card-body { 
    padding: 30px; 
    text-align: center; 
    display: flex; 
    flex-direction: column; 
    flex-grow: 1; 
}

.card-body h3 { 
    font-size: 1.5rem; 
    font-weight: 600; 
    margin-bottom: 10px; 
    color: var(--text-dark); 
}

.card-body p { 
    color: var(--text-muted); 
    font-size: 0.95rem; 
    margin-bottom: 25px; 
    flex-grow: 1; 
}

.btn-catalogo {
    display: inline-block;
    padding: 14px 35px;
    background-color: var(--dark, #1e293b);
    color: #ffffff;
    font-weight: bold;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn-catalogo:hover {
    background-color: var(--accent, #e65c00);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.btn-ficha {
    width: 100%;
    padding: 10px 16px;
    margin-bottom: 12px;
    background-color: #ffffff;
    color: #1e293b;
    border: 1.5px solid #cbd5e1;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s ease;
}

.btn-ficha:hover {
    background-color: #f8fafc;
    border-color: #1e293b;
    color: #0f172a;
    transform: translateY(-1px);
}

.btn-ficha:active {
    transform: translateY(0);
}

.btn-add-cart { 
    background: var(--text-dark); 
    color: white; 
    padding: 12px 25px; 
    border: none; 
    border-radius: 50px; 
    cursor: pointer; 
    font-size: 1rem; 
    width: 100%; 
    transition: background 0.3s; 
}

.btn-add-cart:hover { 
    background: #0f172a; 
}

/* ================= RESEÑAS ================= */
.resenas-section { 
    padding: 100px 8%; 
    background-color: var(--bg-main); 
    text-align: center; 
}

.resenas-section h2 { 
    font-size: 2.2rem; 
    font-weight: 400; 
    margin-bottom: 50px; 
    color: var(--text-dark); 
}

.resenas-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 30px; 
}

.resena-card { 
    background: var(--bg-white); 
    border-radius: 12px; 
    overflow: hidden; 
    text-align: left; 
    box-shadow: var(--shadow-soft); 
    transition: transform 0.4s ease; 
}

.resena-card:hover { 
    transform: translateY(-8px); 
}

.resena-img-container { 
    width: 100%; 
    height: 220px; 
    overflow: hidden; 
    background-color: #eee; 
}

.resena-img-container img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    cursor: pointer; 
    transition: transform 0.4s ease; 
}

.resena-img-container img:hover { 
    transform: scale(1.05); 
}

.resena-content { 
    padding: 25px; 
}

.estrellas { 
    color: #eab308; 
    font-size: 1.2rem; 
    margin-bottom: 12px; 
    letter-spacing: 2px; 
}

.resena-content p { 
    font-size: 0.95rem; 
    color: var(--text-muted); 
    font-style: italic; 
    margin-bottom: 20px; 
    line-height: 1.6; 
}

.resena-content .autor { 
    font-weight: 600; 
    color: var(--text-dark); 
    font-size: 0.9rem; 
}

/* ================= FOOTER PREMIUM ================= */
footer { 
    background-color: var(--text-dark); 
    color: var(--bg-white); 
    padding: 70px 8% 30px; 
    margin-top: 60px;
}

.footer-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 40px; 
    margin-bottom: 50px; 
}

.footer-col h4 { 
    font-size: 1.1rem; 
    margin-bottom: 25px; 
    color: var(--bg-white); 
    letter-spacing: 1px; 
}

.footer-col a { 
    display: block; 
    color: #a0aec0; 
    margin-bottom: 12px; 
    font-size: 0.95rem; 
    transition: color 0.3s, transform 0.3s; 
}

.footer-col a:hover { 
    color: var(--bg-white); 
    transform: translateX(3px); 
}

.footer-bottom { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding-top: 30px; 
    border-top: 1px solid rgba(255, 255, 255, 0.1); 
    flex-wrap: wrap; 
    gap: 20px; 
}

.copyright { 
    color: #718096; 
    font-size: 0.85rem; 
}

.socials { 
    display: flex; 
    gap: 20px; 
    align-items: center; 
}

.socials a { 
    color: #a0aec0; 
    transition: color 0.3s ease, transform 0.3s ease; 
    display: inline-block; 
}

.socials a:hover { 
    color: var(--bg-white); 
    transform: translateY(-3px); 
}

.pagos { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
}

.pago-icono { 
    height: 35px; 
    width: auto; 
    object-fit: contain; 
    border-radius: 4px; 
    opacity: 0.8; 
    transition: opacity 0.3s, transform 0.3s; 
}

.pago-icono:hover { 
    opacity: 1; 
    transform: scale(1.05); 
}

/* ================= MODAL DE IMÁGENES ================= */
.modal { 
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0; top: 0; 
    width: 100%; height: 100%; 
    background-color: rgba(255,255,255,0.95); 
}

.modal-content { 
    margin: auto; 
    display: block; 
    width: auto; 
    max-width: 90%; 
    max-height: 90vh; 
    margin-top: 5vh; 
    animation: zoom 0.3s; 
}

@keyframes zoom { 
    from { transform: scale(0.95); opacity: 0; } 
    to { transform: scale(1); opacity: 1; } 
}

.close { 
    position: absolute; 
    top: 30px; right: 40px; 
    color: var(--text-dark); 
    font-size: 40px; 
    font-weight: 300; 
    cursor: pointer; 
    transition: color 0.3s; 
}

.close:hover { 
    color: var(--accent-blue); 
}

/* ================= MODAL FICHA TÉCNICA ================= */
.modal-ficha {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
}

.modal-ficha-content {
    background: #ffffff;
    max-width: 650px;
    margin: 40px auto;
    border-radius: 16px;
    padding: 30px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    max-height: 90vh;
    overflow-y: auto;
}

.close-modal {
    position: sticky;
    top: 0;
    float: right;
    z-index: 100;
    font-size: 26px;
    cursor: pointer;
    color: #64748b;
    background: #ffffff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    margin-top: -10px;
    margin-right: -10px;
    transition: all 0.2s ease;
}

.close-modal:hover {
    color: #0f172a;
    background: #f1f5f9;
    transform: scale(1.08);
}

.ficha-header {
    display: flex;
    gap: 20px;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.ficha-header img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    background: #f8fafc;
    border-radius: 10px;
    padding: 5px;
    border: 1px solid #e2e8f0;
}

.ficha-title h2 { 
    margin: 0; 
    color: #0f172a; 
    font-size: 1.5rem; 
}

.ficha-title span { 
    color: #e65c00; 
    font-weight: bold; 
    font-size: 1.1rem; 
}

.ficha-sec { 
    margin-bottom: 20px; 
}

.ficha-sec h4 { 
    color: #334155; 
    font-size: 0.95rem; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    margin-bottom: 8px; 
}

.ficha-sec p { 
    color: #64748b; 
    font-size: 0.95rem; 
    line-height: 1.5; 
    margin: 0; 
}

.tabla-activos {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.tabla-activos th, 
.tabla-activos td {
    padding: 10px 12px;
    text-align: left;
    font-size: 0.9rem;
    border-bottom: 1px solid #f1f5f9;
}

.tabla-activos th { 
    background: #f8fafc; 
    color: #475569; 
}

.tabla-activos td strong { 
    color: #0f172a; 
}

.badge-dosis {
    background: #fef3c7;
    color: #92400e;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-block;
    margin-top: 5px;
}

/* ================= CHECKOUT ================= */
.checkout-container { 
    max-width: 900px; 
    margin: 40px auto; 
    padding: 0 20px; 
    display: grid; 
    grid-template-columns: 1.5fr 1fr; 
    gap: 40px; 
}

.resumen-caja { 
    background: var(--bg-white); 
    padding: 30px; 
    border-radius: 8px; 
    box-shadow: var(--shadow-soft); 
}

.resumen-caja h2 { 
    margin-bottom: 20px; 
    color: var(--text-dark); 
    border-bottom: 1px solid var(--border-light); 
    padding-bottom: 15px; 
}

.item-checkout { 
    display: flex; 
    justify-content: space-between; 
    margin-bottom: 15px; 
    padding-bottom: 15px; 
    border-bottom: 1px dashed #e2e8f0; 
}

.item-info strong { 
    display: block; 
    color: var(--text-dark); 
}

.item-info span { 
    font-size: 0.9rem; 
    color: #64748b; 
}

.item-precio { 
    font-weight: bold; 
    color: var(--text-dark); 
}

.total-checkout { 
    font-size: 1.5rem; 
    font-weight: bold; 
    display: flex; 
    justify-content: space-between; 
    margin-top: 30px; 
    padding-top: 20px; 
    border-top: 2px solid var(--text-dark); 
}

.pago-caja { 
    padding: 30px; 
    background: #f8fafc; 
    border-radius: 8px; 
    border: 1px solid var(--border-light); 
    height: fit-content; 
}

.loader { 
    text-align: center; 
    color: #64748b; 
    padding: 20px; 
}

/* ================= PREGUNTAS FRECUENTES (FAQ) ================= */
.faq-section { 
    padding: 100px 8%; 
    background-color: var(--bg-white); 
    min-height: 60vh; 
}

.faq-container { 
    max-width: 800px; 
    margin: 0 auto; 
}

.faq-container h2 { 
    text-align: center; 
    font-size: 2.5rem; 
    font-weight: 400; 
    margin-bottom: 50px; 
    color: var(--text-dark); 
}

.accordion-item { 
    border-bottom: 1px solid var(--border-light); 
}

.accordion-header { 
    width: 100%; 
    text-align: left; 
    background: none; 
    border: none; 
    padding: 25px 0; 
    font-size: 1.1rem; 
    font-weight: 500; 
    color: var(--text-dark); 
    cursor: pointer; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    transition: color 0.3s; 
}

.accordion-header:hover, 
.accordion-header.active { 
    color: var(--accent-blue); 
}

.accordion-header svg.chevron { 
    transition: transform 0.4s ease; 
}

.accordion-header.active svg.chevron { 
    transform: rotate(180deg); 
}

.accordion-header.active i { 
    transform: rotate(180deg); 
}

.accordion-content { 
    max-height: 0; 
    overflow: hidden; 
    transition: max-height 0.4s ease; 
}

.accordion-content p { 
    padding-bottom: 25px; 
    color: var(--text-muted); 
    font-size: 0.95rem; 
    line-height: 1.7; 
}

/* ================= PÁGINAS LEGALES ================= */
.legal-section { 
    padding: 80px 8%; 
    background-color: var(--bg-white); 
    min-height: 70vh; 
}

.legal-container { 
    max-width: 800px; 
    margin: 0 auto; 
    color: var(--text-dark); 
}

.legal-container h1 { 
    font-size: 2.5rem; 
    font-weight: 300; 
    margin-bottom: 20px; 
    text-align: center; 
}

.legal-container .ultima-act { 
    text-align: center; 
    color: var(--text-muted); 
    font-size: 0.9rem; 
    margin-bottom: 50px; 
    font-style: italic; 
}

.legal-container h2 { 
    font-size: 1.5rem; 
    font-weight: 500; 
    margin-top: 40px; 
    margin-bottom: 15px; 
    color: var(--text-dark); 
}

.legal-container p { 
    font-size: 1rem; 
    line-height: 1.8; 
    color: var(--text-muted); 
    margin-bottom: 20px; 
}

.legal-container ul { 
    margin-bottom: 20px; 
    padding-left: 20px; 
    color: var(--text-muted); 
    line-height: 1.8; 
}

.legal-container li { 
    margin-bottom: 10px; 
}

/* ================= CARRITO LATERAL & ICONO ================= */
.cart-icon-header {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 25px;
    color: var(--text-dark);
    transition: color 0.3s, transform 0.3s;
}

.cart-icon-header:hover {
    color: var(--accent-blue);
    transform: scale(1.1);
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -12px;
    background-color: #dc2626;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    height: 18px;
    min-width: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.cart-overlay { 
    position: fixed; 
    top: 0; left: 0; 
    width: 100%; height: 100%; 
    background: rgba(0,0,0,0.5); 
    z-index: 1000; 
    opacity: 0; 
    visibility: hidden; 
    transition: 0.3s ease; 
}

.cart-overlay.active { 
    opacity: 1; 
    visibility: visible; 
}

.cart-panel { 
    position: fixed; 
    top: 0; right: -400px; 
    width: 100%; max-width: 400px; 
    height: 100vh; 
    background: var(--bg-white); 
    z-index: 1001; 
    transition: 0.4s ease; 
    display: flex; 
    flex-direction: column; 
    box-shadow: -5px 0 15px rgba(0,0,0,0.1); 
}

.cart-panel.active { 
    right: 0; 
}

.cart-header { 
    padding: 20px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 1px solid var(--border-light); 
}

.cart-header h3 { 
    font-size: 1.2rem; 
    color: var(--text-dark); 
}

.close-cart { 
    font-size: 28px; 
    cursor: pointer; 
    color: var(--text-muted); 
    transition: 0.2s; 
}

.close-cart:hover { 
    color: #000; 
}

.cart-body { 
    flex: 1; 
    overflow-y: auto; 
    padding: 20px; 
}

.carrito-vacio { 
    text-align: center; 
    color: var(--text-muted); 
    margin-top: 20px; 
}

.cart-item { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 15px; 
    padding-bottom: 15px; 
    border-bottom: 1px solid #f0f0f0; 
}

.cart-item-info h4 { 
    margin-bottom: 5px; 
    font-size: 1rem; 
    color: var(--text-dark); 
}

.cart-item-price { 
    color: #64748b; 
    font-weight: 500; 
    font-size: 0.95rem; 
}

.btn-remove { 
    color: #dc2626; 
    font-size: 0.8rem; 
    cursor: pointer; 
    border: none; 
    background: none; 
    margin-top: 5px; 
    text-decoration: underline; 
}

.cart-footer { 
    padding: 20px; 
    border-top: 1px solid var(--border-light); 
    background: #fafafa; 
}

.cart-total { 
    font-size: 1.2rem; 
    font-weight: bold; 
    margin-bottom: 15px; 
    text-align: right; 
    color: var(--text-dark); 
}

.btn-checkout { 
    width: 100%; 
    padding: 15px; 
    background: var(--text-dark); 
    color: white; 
    border: none; 
    border-radius: 5px; 
    font-size: 1rem; 
    font-weight: bold; 
    cursor: pointer; 
    transition: 0.3s; 
}

.btn-checkout:hover { 
    background: #000; 
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1024px) {
    .resenas-grid { 
        grid-template-columns: repeat(4, 280px); 
        overflow-x: auto; 
        padding-bottom: 15px; 
        scroll-snap-type: x mandatory; 
        -webkit-overflow-scrolling: touch; 
    }
    .resena-card { 
        scroll-snap-align: start; 
    }
}

@media (max-width: 768px) {
    .navbar { 
        flex-direction: column; 
        padding: 15px; 
    }
    .nav-links { 
        margin-top: 15px; 
        display: flex; 
        flex-wrap: wrap; 
        justify-content: center; 
        gap: 10px; 
    }
    .nav-links a { 
        margin-left: 0; 
        padding: 5px; 
    }
    .hero { 
        background-position: 70% center; 
    }
    .hero::before { 
        background: rgba(255, 255, 255, 0.85); 
    }
    .hero-content h1 { 
        font-size: 2.8rem; 
    }
    .socials, .pagos { 
        margin-bottom: 10px; 
    }
    .checkout-container { 
        grid-template-columns: 1fr; 
        margin: 20px auto; 
    }
}