/* ==========================================================================
   1. VARIABLES GLOBALES (Configuración Centralizada de Colores)
   ========================================================================== */
:root {
    /* Navbar / Header (Negro) */
    --nav-bg: #000000;
    --nav-text: #ffffff;
    --nav-border: #222222;
    --cart-badge-bg: #ffffff;
    --cart-badge-text: #000000;

    /* Superficies y Fondos General */
    --bg-main: #ffffff;
    --bg-surface: #f8f8f8;
    --border-color: #e5e5e5;

    /* Textos */
    --text-main: #111111;
    --text-muted: #666666;

    /* Acentos / Conversión */
    --accent-green: #25d366;
    --accent-green-hover: #1da851;

    /* Tipografías */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* ==========================================================================
   2. REPO Y ESTILOS BASE
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    touch-action: manipulation; /* Inhabilita el doble toque para zoom sin afectar el desplazamiento vertical */
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
}

/* ==========================================================================
   3. HEADER Y NAVEGACIÓN
   ========================================================================== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--nav-bg);
    color: var(--nav-text);
    z-index: 1000;
    border-bottom: 1px solid var(--nav-border);
}

/* Logo PNG */
.brand-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.brand-logo-img {
    height: 25px;
    width: auto;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.brand-logo-link:hover .brand-logo-img {
    transform: scale(1.03);
}

/* Enlaces del Menú */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--nav-text);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: opacity 0.2s;
}

.nav-menu a:hover {
    opacity: 0.7;
}

/* Grupo de Acciones Derecha (Carrito + Hamburguesa) */
.nav-right-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-icon-btn {
    position: relative;
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--nav-text);
    cursor: pointer;
    padding: 5px;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--cart-badge-bg);
    color: var(--cart-badge-text);
    font-size: 0.7rem;
    font-weight: 800;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hamburger-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--nav-text);
    cursor: pointer;
    padding: 5px;
    transition: transform 0.2s;
}

.hamburger-btn:active {
    transform: scale(0.9);
}

/* ==========================================================================
   4. HERO SLIDER (100vh / 100vw)
   ========================================================================== */
.hero-container {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slide.active {
    opacity: 1;
}

/* ==========================================================================
   ESTILOS HERO SLIDER UNIFORME
   ========================================================================== */

/* Hero Overlay con relleno lateral de seguridad */
.hero-overlay {
    background: rgba(0, 0, 0, 0.45);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--nav-text, #ffffff);
    padding: 0 25px; /* Relleno lateral base */
}

/* Forzado de altura constante para títulos y subtítulos */
.hero-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
    min-height: 3.8rem; /* Evita saltos verticales entre títulos de 1 o 2 líneas */
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-subtitle {
    font-size: 1.1rem;
    max-width: 580px;
    margin-bottom: 30px;
    min-height: 3.2rem; /* Reserva el mismo espacio para ambos subtítulos */
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9);
}

/* Botón con dimensiones fijas (Estructura idéntica) */
.btn-hero {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 230px;        /* Ancho exacto para ambos botones */
    height: 52px;        /* Altura fija para alineación exacta */
    background: #ffffff;
    color: #000000;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 1px;
    border: none;
    transition: all 0.3s ease;
}

.btn-hero:hover {
    background: #000000;
    color: #ffffff;
}

/* Ajuste Responsivo para Móviles (Márgenes cómodos y legibilidad) */
@media (max-width: 768px) {
    .hero-overlay {
        padding: 0 8%; /* Margen porcentual para dejar espacio claro con los bordes de la pantalla */
    }

    .hero-title {
        font-size: 1.75rem;
        line-height: 1.2;
        min-height: auto;
        margin-bottom: 12px;
        width: 100%;
        word-break: break-word; /* Evita que palabras largas se corten o sobrepasen el margen */
    }

    .hero-subtitle {
        font-size: 0.92rem;
        line-height: 1.4;
        min-height: auto;
        margin-bottom: 25px;
        width: 100%;
        max-width: 100%;
    }

    .btn-hero {
        width: 210px;
        height: 48px;
        font-size: 0.8rem;
    }
}
/* ==========================================================================
   5. SECCIONES Y CATÁLOGO GRID
   ========================================================================== */
.section-padding {
    padding: 100px 5% 60px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 900;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 40px;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    border: 1px solid var(--border-color);
    background: var(--bg-main);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.product-card img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    background: var(--bg-surface);
}

.product-card-info {
    padding: 20px;
    text-align: center;
}

.product-card-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 800;
    text-transform: uppercase;
}

.product-card-price {
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 8px;
    color: var(--text-main);
}

/* ==========================================================================
   MODAL DETALLE DE PRODUCTO (PROPORCIONES AJUSTADAS PC)
   ========================================================================== */
.product-detail-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    overflow-y: auto;
    padding: 20px;
}

/* PC / ESCRITORIO (3 Columnas Proporcionales) */
.detail-container {
    background: var(--bg-main, #ffffff);
    max-width: 1100px; /* Un poco más amplio para lucir las fotos */
    width: 92%;
    margin: 40px auto;
    padding: 30px;
    position: relative;
    display: grid;
    /* 75px para miniaturas | 1.8fr para la imagen grande (~45-50%) | 1.2fr para texto y opciones */
    grid-template-columns: 75px 1.8fr 1.2fr;
    gap: 30px;
    align-items: start;
    box-sizing: border-box;
}

.close-modal-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.8rem;
    border: none;
    background: none;
    color: var(--text-main, #111111);
    cursor: pointer;
    z-index: 20;
}

/* Galería de Miniaturas en PC */
.detail-thumbs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 520px;
    overflow-y: auto; /* Permite scroll vertical si hay más de 5 miniaturas */
}

.detail-thumbs img {
    width: 65px;
    height: 78px;
    object-fit: cover;
    cursor: pointer;
    border: 1px solid var(--border-color, #e5e5e5);
    transition: border-color 0.2s;
}

.detail-thumbs img.active,
.detail-thumbs img:hover {
    border-color: var(--text-main, #111111);
}

/* Contenedor e Imagen Principal Destacada en PC */
.zoom-container {
    position: relative;
    width: 100%;
    background: var(--bg-surface, #f8f8f8);
    overflow: hidden;
    cursor: zoom-in;
}

.detail-main-img {
    width: 100%;
    height: auto;
    max-height: 540px; /* Imagen más alta y amplia */
    object-fit: cover;
    display: block;
}

/* MÓVILES (Max-Width: 768px) */
@media (max-width: 768px) {
    .product-detail-modal {
        padding: 10px;
    }

    .detail-container {
        margin: 35px auto 20px auto;
        padding: 45px 15px 20px 15px;
        width: 100%;
        max-width: 100%;
        grid-template-columns: 1fr !important; /* 1 Columna en móviles */
        gap: 15px;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .close-modal-btn {
        top: 10px;
        right: 15px;
        font-size: 2.2rem;
    }

    .detail-thumbs {
        flex-direction: row !important;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 8px;
        width: 100%;
        max-height: none;
        -webkit-overflow-scrolling: touch;
    }

    .detail-thumbs img {
        width: 55px;
        height: 65px;
        flex-shrink: 0;
    }

    .detail-main-img {
        max-height: 380px;
    }

    .color-options-grid,
    .size-options-grid {
        flex-wrap: wrap;
        max-width: 100%;
    }

    .color-thumb-select {
        width: 40px;
        height: 50px;
    }

    #modal-title {
        font-size: 1.25rem;
        word-break: break-word;
    }

    .modal-description-text {
        font-size: 0.83rem;
        word-break: break-word;
    }
}

/*@media (min-width: 800px) {
    .detail-container {
        grid-template-columns: 80px 1fr 1fr;
    }
}*/

.close-modal-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.8rem;
    border: none;
    background: none;
    color: var(--text-main);
    cursor: pointer;
}

.detail-thumbs {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

@media (min-width: 800px) {
    .detail-thumbs {
        flex-direction: column;
    }
}

.detail-thumbs img {
    width: 70px;
    height: 85px;
    object-fit: cover;
    cursor: pointer;
    border: 1px solid var(--border-color);
}

.detail-thumbs img.active {
    border-color: var(--text-main);
}

.detail-main-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    background: var(--bg-surface);
}

/* Selectores de Color y Talla */
.color-options-grid,
.size-options-grid {
    display: flex;
    gap: 10px;
    margin: 10px 0;
}

.color-thumb-select {
    width: 45px;
    height: 55px;
    object-fit: cover;
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.color-thumb-select.selected {
    border: 2px solid var(--text-main);
}

.btn-size-select {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    background: var(--bg-main);
    color: var(--text-main);
    font-weight: 700;
    cursor: pointer;
}

.btn-size-select.selected {
    background: var(--text-main);
    color: var(--bg-main);
}

.btn-add-cart {
    background: var(--text-main);
    color: var(--bg-main);
    border: none;
    padding: 16px;
    width: 100%;
    font-family: var(--font-heading);
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 10px;
}

.btn-whatsapp-direct {
    background: var(--accent-green);
    color: var(--nav-text);
    border: none;
    padding: 16px;
    width: 100%;
    font-family: var(--font-heading);
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    transition: background-color 0.2s;
}

.btn-whatsapp-direct:hover {
    background-color: var(--accent-green-hover);
}

/* ==========================================================================
   7. CARRITO DRAWER Y CONTACTO
   ========================================================================== */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 100%;
    max-width: 380px;
    height: 100vh;
    background: var(--bg-main);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 2500;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.cart-drawer.open {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.cart-items-list {
    flex: 1;
    overflow-y: auto;
    margin: 20px 0;
}

/* Alineación y Botón de Eliminar en el Carrito */
.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.cart-item-info {
    flex: 1;
}

.cart-remove-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s;
}

.cart-remove-btn:hover {
    color: var(--price-offer, #e62e04);
}

.cart-item img {
    width: 60px;
    height: 70px;
    object-fit: cover;
}

.cart-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    text-align: center;
}

.contact-card {
    padding: 30px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
}

.contact-card i {
    font-size: 2rem;
    margin-bottom: 10px;
}

/* ==========================================================================
   ESTILOS FOOTER MODULAR
   ========================================================================== */
footer {
    background-color: var(--nav-bg, #000000);
    color: var(--nav-text, #ffffff);
    padding: 60px 5% 20px 5%;
    border-top: 1px solid var(--nav-border, #222222);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 40px;
    text-align: left;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-logo-img {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.footer-brand-desc {
    font-size: 0.85rem;
    color: var(--text-muted, #888888);
    line-height: 1.5;
}

.footer-socials {
    display: flex;
    gap: 12px;
    margin-top: 5px;
}

.footer-socials a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--nav-border, #333333);
    color: var(--nav-text, #ffffff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}

.footer-socials a:hover {
    background: var(--nav-border, #333333);
    border-color: var(--nav-text, #ffffff);
}

.footer-col-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.footer-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links-list a {
    color: var(--text-muted, #888888);
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.2s;
}

.footer-links-list a:hover {
    color: var(--nav-text, #ffffff);
}

.footer-guarantee-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.footer-guarantee-item i {
    font-size: 1rem;
    color: var(--accent-green, #25d366);
    margin-top: 3px;
}

.footer-guarantee-item p {
    font-size: 0.85rem;
    color: var(--text-muted, #888888);
    line-height: 1.4;
}

.footer-bottom-bar {
    max-width: 1200px;
    margin: 40px auto 0 auto;
    padding-top: 20px;
    border-top: 1px solid var(--nav-border, #222222);
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-muted, #666666);
}

/* Controles de Cantidad (+ / -) */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 10px 0 15px 0;
    width: fit-content;
    border: 1px solid var(--border-color);
}

.quantity-selector button {
    width: 36px;
    height: 36px;
    background: var(--bg-surface);
    border: none;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--text-main);
    transition: background 0.2s;
}

.quantity-selector button:hover {
    background: var(--border-color);
}

.quantity-selector input {
    width: 45px;
    height: 36px;
    border: none;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    text-align: center;
    font-weight: 700;
    font-size: 0.95rem;
    font-family: var(--font-body);
    background: var(--bg-main);
    color: var(--text-main);
}

/* Control de Cantidad compacto para el Carrito */
.cart-qty-controls {
    display: flex;
    align-items: center;
    margin-top: 6px;
    border: 1px solid var(--border-color);
    width: fit-content;
}

.cart-qty-btn {
    width: 26px;
    height: 26px;
    background: var(--bg-surface);
    border: none;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    color: var(--text-main);
}

.cart-qty-val {
    padding: 0 10px;
    font-size: 0.85rem;
    font-weight: 700;
}

/* Estilos para Descripción y Especificaciones en Modal */
.product-specs-box {
    margin: 15px 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.modal-description-text {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 10px;
}

.modal-specs-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modal-specs-list li {
    font-size: 0.8rem;
    color: var(--text-main);
    position: relative;
    padding-left: 16px;
    margin-bottom: 4px;
}

.modal-specs-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--text-muted);
    font-weight: bold;
}

/* Efecto Lupa Zoom para la Imagen Principal */
.zoom-container {
    position: relative;
    width: 100%;
    overflow: hidden; /* Evita que la imagen agrandada se salga del marco */
    background: var(--bg-surface);
    cursor: zoom-in;
}

.zoom-container img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transform-origin: center center;
    transition: transform 0.1s ease-out; /* Movimiento fluido del cursor */
}

/* Escala la imagen al pasar el mouse en escritorios */
@media (min-width: 769px) {
    .zoom-container:hover img {
        transform: scale(2.2); /* Nivel de aumento (puedes ajustarlo a 2 o 2.5) */
    }
}


/* ==========================================================================
   8. RESPONSIVE / MÓVILES (Max-Width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
    .brand-logo-img {
        height: 28px;
    }

    .hamburger-btn {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        background: var(--nav-bg);
        flex-direction: column;
        align-items: center;
        padding: 25px 0;
        gap: 20px;
        border-bottom: 1px solid var(--nav-border);
        
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease-in-out;
    }

    .nav-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-menu a {
        font-size: 1rem;
        letter-spacing: 1.5px;
    }
}