/* ==========================================================================
   PINTURAS ELIPSA - ESTILOS PRINCIPALES
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,700;1,900&family=Oswald:wght@600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --elipsa-red: #e31b23;
    --elipsa-red-dark: #b81219;
    --elipsa-black: #050505;
    --header-bg: #c7c7c7;
    --header-text: #1a1a1a;
    --font-heading: 'Montserrat', 'Oswald', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: #222;
    background-color: #f8f9fa;
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   HEADER / NAVBAR (IDÉNTICO A LA IMAGEN DE REFERENCIA)
   ========================================================================== */
.main-header {
    background-color: #c7c7c7;
    height: 86px;
    width: 100%;
    position: relative;
    z-index: 100;
}

.header-container {
    max-width: 1680px;
    height: 100%;
    margin: 0 auto;
    padding: 0 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo ELIPSA */
.header-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.header-logo-img {
    height: 56px;
    width: auto;
    display: block;
    object-fit: contain;
}

/* Menú de navegación central */
.header-nav {
    display: flex;
    align-items: center;
    margin-left: -50px; /* Centrado visual */
}

.nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 40px;
}

.nav-link {
    font-family: var(--font-body);
    font-size: 1.15rem; /* ~18px */
    font-weight: 500;
    color: #1a1a1a;
    text-decoration: none;
    text-transform: lowercase;
    transition: color 0.2s ease;
    padding: 6px 0;
}

.nav-link:hover {
    color: #000;
}

/* Botón / Input de Búsqueda */
.header-actions {
    display: flex;
    align-items: center;
}

.search-btn {
    background-color: #ffffff;
    border: none;
    outline: none;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 24px 8px 18px;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: #2b2b2b;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
}

.search-btn:hover {
    background-color: #fafafa;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    color: #000;
}

.search-btn svg {
    width: 16px;
    height: 16px;
    stroke: #2b2b2b;
    stroke-width: 2.4;
    fill: none;
}

/* Botón menú móvil */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
}

.mobile-menu-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background-color: #111;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ==========================================================================
   SECCIÓN HERO (IDÉNTICO AL DISEÑO DE LA IMAGEN)
   ========================================================================== */
.hero-section {
    position: relative;
    width: 100%;
    min-height: calc(100vh - 86px);
    display: flex;
    align-items: center;
    background-color: #1a2a3a;
    background-image: url('../img/fondo-puente.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    overflow: hidden;
}

/* Overlay sutil para realzar el contraste y los textos */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg, 
        rgba(255, 255, 255, 0.42) 0%, 
        rgba(255, 255, 255, 0.18) 40%, 
        rgba(255, 255, 255, 0) 75%
    );
    pointer-events: none;
    z-index: 1;
}

.hero-container {
    max-width: 1680px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 50px 0 60px;
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    min-height: calc(100vh - 86px);
}

/* Contenido Izquierdo: Título y Botón */
.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding-bottom: 40px;
}

.hero-title {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: clamp(3.8rem, 6.8vw, 6.2rem);
    line-height: 1.0;
    letter-spacing: -0.015em;
    color: #000000;
    text-transform: uppercase;
    margin-bottom: 38px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
}

.hero-title span {
    display: block;
}

/* Botón VER MAS */
.btn-ver-mas {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #000000;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 13px 46px;
    border-radius: 9999px; /* Forma de píldora */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    transition: all 0.25s ease;
}

.btn-ver-mas:hover {
    background-color: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

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

/* Contenido Derecho: Lata de Pintura Esmalte Sintético */
.hero-product-showcase {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    height: 100%;
    padding-bottom: 0;
}

.product-can-wrapper {
    position: relative;
    width: 100%;
    max-width: 650px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

.product-can-img {
    width: 100%;
    height: auto;
    max-height: 86vh;
    object-fit: contain;
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.45));
    user-select: none;
    margin-bottom: -15px; /* Alínea la lata con el borde inferior como en la maqueta */
}

/* ==========================================================================
   SELECTOR INTERACTIVO DE PRODUCTOS (LÍNEA INDUSTRIAL Y DERIVADOS)
   ========================================================================== */
.hero-product-selector {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 8px 14px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.selector-thumb {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    background: #fff;
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.selector-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.selector-thumb.active {
    border-color: var(--elipsa-red);
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(227, 27, 35, 0.35);
}

.selector-thumb:hover:not(.active) {
    transform: scale(1.08);
    border-color: #999;
}

/* ==========================================================================
   SECCIÓN INFORMATIVA / CATÁLOGO DESTACADO
   ========================================================================== */
.catalog-section {
    padding: 100px 40px;
    max-width: 1500px;
    margin: 0 auto;
}

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

.section-tag {
    display: inline-block;
    color: var(--elipsa-red);
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3.5vw, 3.2rem);
    font-weight: 800;
    color: #111;
    text-transform: uppercase;
    line-height: 1.15;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 36px;
}

.product-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 36px 24px;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.04);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: rgba(227, 27, 35, 0.2);
}

.product-card-img-wrap {
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    width: 100%;
}

.product-card-img-wrap img {
    max-height: 100%;
    max-width: 85%;
    object-fit: contain;
    transition: transform 0.35s ease;
    filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.15));
}

.product-card:hover .product-card-img-wrap img {
    transform: scale(1.06);
}

.product-card-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: #111;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.product-card-category {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--elipsa-red);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 14px;
}

.product-card-desc {
    font-size: 0.92rem;
    color: #666;
    margin-bottom: 24px;
    flex-grow: 1;
}

.product-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 28px;
    border-radius: 50px;
    background: #111;
    color: #fff;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: all 0.25s ease;
    width: 100%;
}

.product-card:hover .product-card-btn {
    background: var(--elipsa-red);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.main-footer {
    background: #111;
    color: #fff;
    padding: 60px 40px 30px;
    border-top: 4px solid var(--elipsa-red);
}

.footer-container {
    max-width: 1500px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
    height: 48px;
}

.footer-copy {
    text-align: center;
    padding-top: 30px;
    color: #888;
    font-size: 0.88rem;
}

/* ==========================================================================
   MODAL DE BÚSQUEDA
   ========================================================================== */
.search-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: flex-start;
    justify-content: center;
    padding-top: 100px;
}

.search-modal.active {
    display: flex;
}

.search-box-card {
    background: #fff;
    width: 90%;
    max-width: 600px;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    animation: modalIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.search-input-group {
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 2px solid #eee;
    padding-bottom: 12px;
}

.search-input-group input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 1.25rem;
    font-family: var(--font-body);
}

.search-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #888;
}

/* ==========================================================================
   RESPONSIVE DESIGN (TABLETS Y MÓVILES)
   ========================================================================== */
@media (max-width: 1024px) {
    .header-container {
        padding: 0 24px;
    }
    .nav-list {
        gap: 28px;
    }
    .hero-container {
        padding: 30px;
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .header-nav {
        position: fixed;
        top: 82px;
        left: 0;
        width: 100%;
        background: var(--header-bg);
        padding: 20px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        display: none;
    }

    .header-nav.open {
        display: block;
    }

    .nav-list {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 30px 20px 80px;
    }

    .hero-content {
        align-items: center;
        padding-left: 0;
        order: 1;
    }

    .hero-product-showcase {
        order: 2;
        margin-top: 20px;
    }

    .hero-title {
        font-size: 2.8rem;
        margin-bottom: 20px;
    }

    .product-can-img {
        max-height: 48vh;
    }

    .hero-overlay {
        background: rgba(255, 255, 255, 0.55);
    }
}
