/* CSS Reset & Variables */
:root {
    --color-bg: #ffffff;
    --color-text: #111111;
    --color-text-muted: #666666;
    --color-white: #ffffff;
    --color-black: #000000;
    --color-glass: rgba(255, 255, 255, 0.8);

    --font-main: 'Montserrat', sans-serif;
    --font-heading: 'Bodoni Moda', serif;
    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Utilities */
.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 3%;
    /* Reducido de 5% para que el logo quede más a la izquierda */
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    border-radius: 4px;
    /* Less rounded for minimalist look */
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    transition: var(--transition);
    cursor: pointer;
}

.btn-dark {
    background-color: var(--color-black);
    color: var(--color-white);
    border: 1px solid var(--color-black);
}

.btn-dark:hover {
    background-color: transparent;
    color: var(--color-black);
}

.btn-orange {
    background-color: #E47219;
    /* Naranja del logo */
    color: var(--color-white);
    border: 1px solid #E47219;
}

.btn-orange:hover {
    background-color: transparent;
    color: #E47219;
}

.btn-outline {
    background-color: transparent;
    color: var(--color-black);
    border: 1px solid var(--color-black);
}

.btn-outline:hover {
    background-color: var(--color-black);
    color: var(--color-white);
}

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* HEADER & NAVIGATION */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.2rem 0;
    background: rgba(228, 114, 25, 0.25);
    /* Transparente naranja */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    max-height: 56px;
    /* Aumentado de 48px a 56px para mayor presencia */
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    /* Reducido de 2.5rem para acomodar más items */
    align-items: center;
}

.nav-link {
    font-size: 0.8rem;
    /* Reducido de 0.9rem */
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    white-space: nowrap;
    /* Fuerza a que los items no quiebren línea internamente */
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 1px;
    bottom: -4px;
    left: 0;
    background-color: var(--color-black);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

/* 
=====================================================
ESTILO CRÍTICO OBLIGATORIO PARA EL BOTÓN AEROPUERTO 
=====================================================
*/
#btn-animado {
    font-family: monospace, monospace;
    text-transform: uppercase;
    min-width: 180px;
    /* Reducido de 250px para evitar que empuje todo */
    text-align: center;
    letter-spacing: 1px;
    transition: all 0.3s ease;

    /* Extra UI styling */
    background-color: var(--color-black);
    color: var(--color-white);
    border: 1px solid var(--color-black);
    padding: 0.6rem 1rem;
    /* Padding más ajustado */
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.8rem;
    /* 0.9 a 0.8 */
}

#btn-animado:hover {
    background-color: transparent;
    color: var(--color-black);
}

.nav-actions {
    display: flex;
    align-items: center;
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1002;
}

/* Mobile Menu */
@media (max-width: 1024px) {
    .hamburger {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--color-white);
        flex-direction: column;
        justify-content: center;
        transition: right 0.5s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 1001;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-link {
        font-size: 2rem;
        margin: 1rem 0;
    }

    #btn-animado {
        margin-top: 2rem;
    }
}

/* HERO SECTION */
.hero {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 0;
}

.hero>.container {
    width: 100%;
}

.hero-visual {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.carousel-wrapper {
    width: 100%;
    height: 100%;
    transition: opacity 0.4s ease-in-out;
    position: relative;
    opacity: 1;
}

.carousel-wrapper.fade {
    opacity: 0;
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    background: #111;
    z-index: 1;
}

.carousel-item.active {
    opacity: 1;
    z-index: 2;
}

/* Oscurecer un poco las imágenes para que el texto principal destaque bien */
.carousel-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.2) 45%, rgba(255, 255, 255, 0) 100%);
    z-index: 1;
    pointer-events: none;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.carousel-item:hover img {
    transform: scale(1.03);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min-content;
    /* Fuerza al contenedor a medir exactamente lo que mide el texto sin saltos no deseados */
    padding-top: 180px;
    /* Offset aumentado for the fixed header and to push text down into the space */
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-weight: 400;
    font-style: italic;
    font-size: clamp(2.5rem, 4.5vw, 5rem);
    line-height: 1;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    color: var(--color-black);
    white-space: nowrap;
    /* Evita que el título se rompa libremente, respetando solo el <br> */
}

.hero-content p {
    font-size: clamp(1rem, 1.1vw, 1.15rem);
    color: var(--color-text);
    margin-bottom: 3rem;
    max-width: 90%;
    line-height: 1.6;
    font-weight: 500;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* SECTIONS */
section {
    padding: 8rem 0;
}

.section-header {
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: clamp(2rem, 3.5vw, 3.5rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
    max-width: 800px;
}

/* SERVICES */
.services-section {
    background-color: var(--color-white);
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 4rem;
    }
}

.service-card {
    border-top: 1px solid #e0e0e0;
    padding-top: 2rem;
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.service-card p {
    color: var(--color-text-muted);
    font-size: 1rem;
    line-height: 1.7;
}

/* ABOUT */
.about-section {
    background-color: #fafafa;
    text-align: center;
}

.about-section .section-header {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.about-section .section-header h2 {
    max-width: 1200px;
}

.about-section p {
    font-size: clamp(1.2rem, 1.8vw, 1.6rem);
    line-height: 1.6;
    color: var(--color-text-muted);
    max-width: 900px;
    margin: 0 auto;
    font-weight: 400;
}

/* GALERÍA DINÁMICA / OWL CAROUSEL */
.gallery-section {
    background-color: var(--color-white);
    padding: 8rem 0;
}

.marcas-wrapper {
    margin-bottom: 4rem;
    /* Un poco más de margen por el tamaño de imágenes */
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.marcas-flex {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    /* Alinea los ítems sobrantes al centro */
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.marca-img-btn {
    /* Calculo para 5 elementos max por fila: 100% / 5 = 20%, menos el gap total */
    width: calc(20% - 16px);
    max-width: 160px;
    /* Tamaño tope razonable para un logo en desktop */
    min-width: 100px;
    /* Tamaño mínimo razonable en mobile */
    flex-grow: 0;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.marca-img-btn img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* Estado Activo o Hover */
.marca-img-btn:hover,
.marca-img-btn.active {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Ajustes Responsive Marcas */
@media (max-width: 768px) {
    .marca-img-btn {
        width: calc(33.333% - 14px);
        /* 3 por fila en tablet */
    }
}

@media (max-width: 480px) {
    .marca-img-btn {
        width: calc(50% - 10px);
        /* 2 por fila en móviles dándole buen tamaño a los logos */
    }
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 4rem;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-label {
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.filter-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 0.5rem 1.2rem;
    border: 1px solid #ddd;
    background: transparent;
    color: var(--color-text-muted);
    border-radius: 4px;
    font-family: var(--font-main);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--color-black);
    color: var(--color-white);
    border-color: var(--color-black);
}

.productos-wrapper {
    position: relative;
    padding: 2rem 0;
    /* Updated padding for Grid */
}

/* PRODUCT GRID (Isotope Container) */
.productos-grid {
    /* Isotope manages positions; we don't need CSS Grid anymore to avoid conflicts */
    width: 100%;
    position: relative;
    /* Remover auto-fill para usar anchos porcentuales */
    display: block;
}

/* PRODUCT CARD (Isotope Item) */
.lente-item {
    padding: 15px;
    /* Margin equivalent for Isotope */
    width: 33.333%;
    /* 3 columnas por defecto */
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    /* Curva de aceleración/desaceleración orgánica */
}

/* Responsive Isotope Columns */
@media (max-width: 1024px) {
    .lente-item {
        width: 50%;
    }
}

@media (max-width: 600px) {
    .lente-item {
        width: 100%;
    }
}

/* Animación de entrada para nuevos elementos (Staggered Effect) */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 20px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.lente-item.showing {
    animation: fadeInUp 0.5s ease-out forwards;
}

.lente-item.fade-out {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

.producto-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #f9f9f9;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.producto-img-container {
    position: relative;
    aspect-ratio: 4 / 3;
    /* 800x600 horizontal ratio */
    overflow: hidden;
    width: 100%;
}

.img-main,
.img-hover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.5s ease;
}

.img-hover {
    opacity: 0;
}

/* OVERLAY (Efecto Velo Hover) */
.producto-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 10;
}

/* Hover interacciones */
.producto-card:hover .img-main {
    opacity: 0;
}

.producto-card:hover .img-hover {
    opacity: 1;
}

.producto-card:hover .producto-overlay {
    opacity: 1;
}

.producto-info-hover {
    text-align: center;
    color: var(--color-white);
    padding: 2rem;
    transform: translateY(20px);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 100%;
}

.producto-card:hover .producto-info-hover {
    transform: translateY(0);
}

.prod-nombre {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
    color: var(--color-white);
}

.prod-marca {
    display: block;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
}

.prod-caract {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.6);
}


.no-results {
    text-align: center;
    padding: 4rem;
    color: var(--color-text-muted);
    font-size: 1.2rem;
    width: 100%;
    grid-column: 1 / -1;
    /* Ocupar todas las columnas */
}

/* CONTACT */
.contact-section {
    background-color: var(--color-bg);
    text-align: center;
    padding: 10rem 0;
    border-top: 1px solid #f0f0f0;
}

.contact-section h2 {
    font-size: clamp(2.5rem, 4vw, 4rem);
    margin-bottom: 1.5rem;
}

.contact-section p {
    font-size: 1.15rem;
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto 3rem auto;
}

.btn-whatsapp {
    background-color: #25D366;
    color: white;
    border: 1px solid #25D366;
}

.btn-whatsapp:hover {
    background-color: transparent;
    color: #25D366;
}

.btn-whatsapp i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.btn-messages {
    background-color: transparent;
    color: var(--color-black);
    border: 1px solid var(--color-black);
}

.btn-messages:hover {
    background-color: var(--color-black);
    color: var(--color-white);
}

.contact-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* FOOTER */
.site-footer {
    background: rgba(228, 114, 25, 0.25);
    /* Transparente naranja como el header */
    padding: 5rem 0 2rem;
    color: var(--color-black);
    font-size: 0.95rem;
}

.footer-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .footer-layout {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 1024px) {
    .footer-layout {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

.footer-col h3 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

/* Brand Col */
.footer-brand p {
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.footer-logo {
    margin-bottom: 1.5rem;
}

.footer-logo img {
    max-height: 50px;
    object-fit: contain;
    /* Removed grayscale since logo should be color */
}

/* Contact Col */
.footer-contact ul {
    list-style: none;
    padding: 0;
}

.footer-contact li {
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.footer-contact li i {
    margin-top: 4px;
    /* Align icon with first line of wrapped text */
    color: var(--color-black);
}

/* Map Col */
.map-container {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
}

/* Google Reviews Widget */
.google-reviews-widget {
    background: #fff;
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #e0e0e0;
}

.gr-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

.gr-logo {
    font-size: 2rem;
    color: #4285F4;
    /* Google Blue */
}

.gr-rating-info strong {
    display: block;
    font-size: 1.1rem;
    color: var(--color-black);
}

.gr-stars {
    color: #FBBC04;
    /* Google Yellow */
    font-size: 0.9rem;
    margin: 4px 0;
}

.gr-rating-info span {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.gr-reviews-carousel {
    position: relative;
    min-height: 80px;
}

.gr-review {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-in-out, visibility 0.6s;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    font-style: italic;
}

.gr-review.active {
    opacity: 1;
    visibility: visible;
    position: relative;
    /* Allows container to size based on active content */
}

.gr-author-name {
    display: block;
    margin-top: 8px;
    font-weight: 600;
    color: var(--color-black);
    font-style: normal;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--color-white);
    color: var(--color-black);
    border-radius: 50%;
    transition: var(--transition);
    border: 1px solid #e0e0e0;
}

.social-links a:hover {
    background-color: var(--color-black);
    color: var(--color-white);
    border-color: var(--color-black);
}

/* Copyright & TiendaNube */
.footer-copy-wrapper {
    background-color: #e0e0e0;
    /* 10% oscuro de #f5f5f5 */
    width: 100%;
}

.footer-copy {
    text-align: center;
    padding: 1.5rem 0;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-copy p {
    margin-bottom: 0.5rem;
}

.footer-copy .credits a {
    color: var(--color-black);
    font-weight: 600;
}

.footer-copy .credits a:hover {
    text-decoration: underline;
}

/* ============================================================================
   MODAL FLOTANTE DE CONTACTO
   ============================================================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background-color: var(--color-white);
    padding: 3rem;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    position: relative;
    transform: translateY(30px);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: color 0.3s ease;
    line-height: 1;
}

.modal-close:hover {
    color: var(--color-black);
}

.modal-content h3 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--color-black);
    font-weight: 500;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-black);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}