/* Variables de Diseño (Aesthetics) */
@font-face {
    font-family: 'ISOCP';
    src: local('ISOCP'), local('Arial');
}

:root {
    --primary-color: #2c2c2c;
    --secondary-color: #f7f7f7;
    --accent-color: #d1b99a; 
    --text-color: #333333;
    --text-light: #777777;
    --bg-color: #f6f3eb; 
    --white: #ffffff;
    --black: #000000;
    --transition-fast: 0.3s ease;
    --transition-slow: 0.6s ease;
    
    --font-primary: 'Outfit', sans-serif;
    --font-secondary: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-secondary);
    color: var(--text-color);
    background-color: var(--bg-color);
    background-image: url('../assets/Fondo.png');
    background-size: cover;
    background-attachment: fixed;
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 80%; 
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 400;
    color: var(--primary-color);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

img {
    max-width: 100%;
    display: block;
}

.btn-primary {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 12px 24px;
    border: none;
    font-family: 'ISOCP', var(--font-primary);
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-primary:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 4% 10px 1%; 
    position: absolute; 
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent);
    color: #fff;
    transition: background 0.4s ease, padding 0.4s ease, align-items 0.4s ease;
}

.header.solid-bg {
    position: fixed; 
    background: var(--bg-color);
    color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 10px 4%; 
    align-items: center; 
}

.logo {
    height: 150px; 
    cursor: pointer;
    transition: height 0.4s ease;
}

.header.solid-bg .logo {
    height: 50px; 
}

/* Botón menú móvil (Oculto en Desktop) */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: inherit;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 2000;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    font-size: 0.85rem; 
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

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

.cart-icon {
    font-size: 1.8rem;
    position: relative;
    cursor: pointer;
}

#cart-count {
    position: absolute;
    top: -5px;
    right: -10px;
    background: var(--accent-color);
    color: var(--white);
    font-size: 0.8rem;
    padding: 2px 6px;
    border-radius: 50%;
    font-weight: bold;
}

/* Home - Hero Section */
.hero {
    height: 100vh;
    width: 100vw;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: background-image 1s ease-in-out;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.2);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--white);
}

.hero-title-img {
    width: 78vw; 
    max-width: 1170px;
    height: auto;
    filter: drop-shadow(4px 4px 15px rgba(0,0,0,0.5));
}

/* Linea Panel */
.linea-panel {
    padding: 60px 5%; 
    display: flex;
    align-items: center;
    overflow: hidden; 
    min-height: auto;
}

.linea-panel-content {
    display: flex;
    width: 100%;
    gap: 40px;
    align-items: flex-start;
}

.linea-panel-title {
    flex: 0 0 30%;
    padding-top: 40px;
}

.linea-panel-title h2 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.linea-panel-title p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 30px;
    line-height: 1.4;
}

.linea-panel-collage {
    flex: 1;
    position: relative;
    height: 500px; 
}

.linea-panel-collage img {
    position: absolute;
    cursor: pointer;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    transition: transform 0.4s ease, z-index 0.4s;
}

.linea-panel-collage img:hover {
    transform: scale(1.05) translateY(-10px);
    z-index: 10;
}

.collage-img-1 { width: 50%; top: 50px; left: 0; z-index: 2; }
.collage-img-2 { width: 45%; bottom: 20px; left: 30%; z-index: 3; }
.collage-img-3 { width: 40%; top: 10px; right: 0; z-index: 1; }
.collage-img-4 { display: none; }

/* Info sections */
.info-section {
    padding: 60px 5%;
    display: flex;
    align-items: center;
    min-height: auto; 
}

.info-section#sec-nosotros { padding-top: 100px; }
.info-section#sec-contacto { padding-bottom: 100px; }

/* Vistas de Línea (Catálogo Grid Completo) */
.catalogo-section {
    padding: 100px 0 0 0; 
}

.linea-title {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 20px;
    padding: 0 5%;
}

.linea-desc {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
    color: var(--text-light);
    font-size: 1.2rem;
    line-height: 1.4;
    padding: 0 5%;
}

.grid-productos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0; 
    width: 100%;
}

.producto-card {
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.producto-img {
    width: 100%;
    height: 600px; 
    object-fit: cover; 
    transition: transform var(--transition-slow);
    display: block;
}

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

.producto-card h4 {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.4rem;
    letter-spacing: 1px;
    background: rgba(255, 255, 255, 0.85);
    padding: 5px 20px;
    border-radius: 2px;
    pointer-events: none; 
}

/* Detalle Producto */
.detalle-container {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    padding: 100px 5% 60px; 
}

.detalle-galeria { flex: 1; min-width: 300px; }
.detalle-galeria-main { width: 100%; height: 600px; object-fit: contain; background: rgba(255,255,255,0.3); margin-bottom: 10px; }
.detalle-galeria-thumbs { display: flex; gap: 10px; }
.detalle-galeria-thumbs img { width: 100px; height: 100px; object-fit: cover; cursor: pointer; opacity: 0.6; transition: var(--transition-fast); }
.detalle-galeria-thumbs img:hover, .detalle-galeria-thumbs img.active { opacity: 1; }
.detalle-info { flex: 1; min-width: 300px; }
.detalle-info h2 { font-size: 3rem; margin-bottom: 10px; }
.detalle-precio { font-size: 2rem; font-weight: 300; color: var(--text-light); margin-bottom: 30px; }
.detalle-desc { margin-bottom: 20px; }
.detalle-especificaciones { margin-bottom: 30px; padding: 20px; background: rgba(255,255,255,0.4); font-size: 1.1rem; }
.detalle-especificaciones ul { list-style: none; }
.detalle-especificaciones li { margin-bottom: 10px; }
.detalle-especificaciones strong { color: var(--primary-color); }
.condiciones-box { margin-top: 30px; padding: 15px; border-left: 3px solid var(--accent-color); background: rgba(255,255,255,0.4); font-size: 1rem; color: #666; }

/* Nosotros Grid */
.nosotros-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    width: 100%;
}
.nosotros-grid h2 { font-size: 2.5rem; margin-bottom: 20px; }
.nosotros-grid p { font-size: 1.2rem; color: #555; text-align: justify; }

/* Contacto */
.contacto-container { max-width: 600px; margin: 0 auto; width: 100%; }
.contacto-container h2 { font-size: 3rem; text-align: center; margin-bottom: 10px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 500; font-size: 1.1rem; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 15px; border: 1px solid rgba(0,0,0,0.1); background: rgba(255,255,255,0.6); font-family: var(--font-secondary); font-size: 1.1rem; }

/* Carrito Drawer */
.cart-drawer {
    position: fixed; top: 0; right: -400px; width: 100%; max-width: 400px; height: 100vh; background: var(--bg-color); z-index: 2000; box-shadow: -5px 0 15px rgba(0,0,0,0.1); transition: right var(--transition-fast); display: flex; flex-direction: column;
}
.cart-drawer.open { right: 0; }
.cart-header { padding: 20px; border-bottom: 1px solid rgba(0,0,0,0.05); display: flex; justify-content: space-between; align-items: center; }
.cart-header h2 { font-size: 1.5rem; }
.close-btn { background: none; border: none; font-size: 2rem; cursor: pointer; }
.cart-items { flex: 1; overflow-y: auto; padding: 20px; }
.cart-item { display: flex; gap: 15px; margin-bottom: 20px; border-bottom: 1px solid rgba(0,0,0,0.05); padding-bottom: 15px; }
.cart-item img { width: 80px; height: 80px; object-fit: cover; }
.cart-item-details { flex: 1; }
.cart-item-details h4 { font-size: 1.1rem; margin-bottom: 5px; }
.cart-item-remove { color: red; font-size: 0.9rem; cursor: pointer; }
.cart-footer { padding: 20px; border-top: 1px solid rgba(0,0,0,0.05); }
.cart-total { font-size: 1.5rem; font-weight: 400; margin-bottom: 15px; text-align: right; }
.checkout-btn { width: 100%; }
.cart-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1500; display: none; }
.cart-overlay.open { display: block; }

/* Footer */
.footer { background: #e5e3db; color: #666; padding: 20px 5% 10px; margin-top: auto; border-top: 1px solid rgba(0,0,0,0.05); }
.footer-content { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; margin-bottom: 15px; }
.footer-section h3 { color: var(--primary-color); margin-bottom: 8px; font-size: 1rem; }
.footer-section a { display: block; margin-bottom: 4px; color: #777; font-size: 0.85rem; }
.footer-section a:hover { color: var(--primary-color); }
.footer-bottom { text-align: center; border-top: 1px solid rgba(0,0,0,0.05); padding-top: 8px; font-size: 0.8rem; color: #888; }

/* Animaciones Antiguas (Se eliminan o conservan por si acaso, usaremos GSAP) */
.gsap-reveal { opacity: 0; visibility: hidden; }

/* RESPONSIVE UI UX PRO MAX */
@media (max-width: 992px) {
    .header { align-items: center; padding: 15px 5%; }
    
    .mobile-menu-btn { display: block; }
    
    /* Menú Lateral para Móvil */
    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 45%; /* Aún más delgado */
        max-width: 180px;
        height: 100vh;
        background: var(--bg-color);
        flex-direction: column;
        justify-content: center;
        align-items: flex-start; /* Alinear a la izquierda */
        padding-left: 30px; /* Separación del borde izquierdo */
        gap: 25px; /* Reducido el espacio entre items */
        transition: left 0.4s ease;
        box-shadow: 5px 0 15px rgba(0,0,0,0.1);
    }
    
    .nav-links.mobile-open {
        left: 0;
    }
    
    .nav-links a {
        color: var(--primary-color);
        font-size: 0.8rem; /* Reducido al 50% aprox */
        letter-spacing: 1px;
    }
    
    .cart-icon {
        color: var(--primary-color);
        margin-top: 20px;
        font-size: 2.2rem;
    }
    
    .logo { height: 117px; }
    .header.solid-bg .logo { height: 60px; }
    
    .linea-panel-content, .nosotros-grid {
        flex-direction: column;
        grid-template-columns: 1fr;
    }
    .linea-panel-title {
        text-align: center;
    }
    .grid-productos {
        grid-template-columns: repeat(2, 1fr);
    }
    .linea-panel-collage {
        width: 100%;
        height: 400px;
    }
    .hero-title-img {
        width: 90vw;
    }
}

@media (max-width: 600px) {
    .grid-productos {
        grid-template-columns: 1fr;
    }
    .producto-img { height: 400px; }
    .detalle-galeria-main { height: 400px; }
    
    .linea-panel {
        padding: 40px 0; /* Quitar padding lateral para la sección completa */
    }
    .linea-panel-title {
        padding: 0 5%; /* Mantener padding lateral solo para los textos */
    }
    .linea-panel-title h2 { 
        font-size: 1.6rem; 
    }
    .linea-panel-title p {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    .linea-panel-title button {
        font-size: 0.9rem !important;
        padding: 10px 20px !important;
    }
    .linea-panel-collage { 
        height: auto; 
        display: grid; 
        grid-template-columns: 1fr 1fr; 
        gap: 0; /* Sin espacio entre fotos */
        width: 100%;
        margin-top: 30px;
    }
    .linea-panel-collage img {
        position: static;
        width: 100%;
        height: 50vw; /* Ajuste automático para hacer cuadrados perfectos aprox */
        object-fit: cover;
        box-shadow: none; /* Sin sombras que estorben en los bordes */
        border-radius: 0; /* Bordes rectos */
    }
    .collage-img-4 { 
        display: block; 
    }
    
    .linea-title { font-size: 2.5rem; }
    .linea-desc { font-size: 1rem; }
    
    .nosotros-grid p {
        font-size: 1rem;
    }
    
    /* Sección Contacto */
    .contacto-container {
        width: 75% !important; /* Más angosto para alinearse visualmente con el centro */
        max-width: 350px !important;
    }
    .form-group label {
        font-size: 0.9rem !important; /* Etiquetas un poco más chicas */
    }
    .contacto-container button[type="submit"] {
        font-size: 0.9rem !important;
        padding: 10px 15px !important;
    }
    
    /* Sección Clientes (3 años entregando diseño) */
    .clientes-section {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0 !important;
        padding: 40px 0 0 0 !important; /* Borde a borde, sin padding lateral */
    }
    .clientes-title-container {
        grid-column: 1 / -1; /* Ocupa todo el ancho */
        float: none !important;
        width: 100% !important;
        margin: 0 0 30px 0 !important;
        text-align: center !important;
        padding: 0 5% !important; /* Recupera el padding para los textos */
    }
    .clientes-title-container h2 {
        font-size: 2rem !important; /* Fuente más chica */
    }
    .clientes-title-container p {
        font-size: 1rem !important; /* Descripción más chica */
    }
    .clientes-section img, .clientes-section video {
        width: 100% !important;
        height: 33vw !important; /* Altura proporcional para que sean cuadradas en 3 columnas */
        margin: 0 !important;
        object-fit: cover !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        display: block !important;
    }
}
