/* =========================================
   1. RESET Y VARIABLES GLOBALES
   ========================================= */
   * {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

:root {
    /* Paleta Industrial ITEX */
    --navy-blue-deep: #1B263B;
    --olive-green-soft: #556B2F;
    --off-white: #F0F2F5;
    --pure-white: #FFFFFF;
    --light-warm-gray: #E2E8F0;
    --blueish-gray-accent: #6A7B8E;
    
    /* Funcionales */
    --whatsapp-green: #25d366;
    --dark-gray: #2d3748;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: var(--off-white);
    scroll-behavior: smooth;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    color: var(--navy-blue-deep);
}

/* =========================================
   2. HEADER Y NAVEGACIÓN
   ========================================= */
.header {
    background: var(--navy-blue-deep);
    color: var(--off-white);
    padding: 1.2rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--off-white);
    font-family: 'Playfair Display', serif;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo img {
    height: 30px;
    width: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    font-family: 'Open Sans', sans-serif;
    color: var(--off-white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    padding-bottom: 5px;
}

.nav-links a:hover {
    color: var(--olive-green-soft);
    border-bottom: 2px solid var(--olive-green-soft);
}

.mobile-menu {
    display: none;
    background: none;
    border: none;
    color: var(--off-white);
    font-size: 1.8rem;
    cursor: pointer;
}

/* =========================================
   3. HERO (PORTADA)
   ========================================= */
.hero {
    background-image: url('images/hero-background.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    color: #fff;
    padding: 150px 0 100px;
    text-align: center;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(41, 56, 78, 0.7);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero h1 {
    font-size: 3.8rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    color: var(--off-white);
    line-height: 1.1;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    color: var(--light-warm-gray);
}

/* =========================================
   4. BOTONES (CTA)
   ========================================= */
.cta-button {
    background: var(--olive-green-soft);
    color: var(--off-white);
    padding: 18px 40px;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 5px 15px rgba(139, 158, 119, 0.3);
}

.cta-button:hover {
    background: var(--navy-blue-deep);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(106, 123, 142, 0.4);
}

.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
    background-color: var(--whatsapp-green);
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* =========================================
   5. SECCIÓN NOSOTROS (Confianza)
   ========================================= */
.about-section {
    padding: 80px 20px;
    background-color: #fff;
}

.about-header {
    text-align: center;
    margin-bottom: 50px;
}

.about-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.about-header .divider {
    width: 60px;
    height: 3px;
    background-color: var(--olive-green-soft);
    margin: 0 auto;
}

.about-content-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.about-text-column, .about-image-column {
    flex: 1;
    min-width: 300px;
}

.about-text-column ul {
    list-style: none;
    padding: 0;
}

.about-text-column li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    color: var(--dark-gray);
}

.about-text-column i {
    color: var(--olive-green-soft);
    margin-right: 10px;
}

.photo-placeholder {
    background-color: #f0f0f0;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 2px dashed #ccc;
    text-align: center;
    padding: 20px;
}

/* =========================================
   6. PRODUCTOS (Grid y Carrusel)
   ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 80px 0;
    display: none;
}

.section.active {
    display: block;
}

.section h2 {
    font-size: 3rem;
    margin-bottom: 3rem;
    text-align: center;
    font-weight: 700;
}

.products-intro-text {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.category-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 20px;
    padding-bottom: 20px;
}

.category-item {
    flex: 0 0 auto;
    scroll-snap-align: center;
    width: 250px;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.category-item:hover {
    transform: translateY(-5px);
}

.category-image-container {
    position: relative;
    height: 250px;
}

.category-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));
}

.category-item h3 {
    color: white;
    margin: 0;
    font-size: 1.5rem;
}

.view-products-button {
    display: block;
    background-color: var(--olive-green-soft);
    color: white;
    text-align: center;
    padding: 12px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.view-products-button:hover {
    background-color: var(--navy-blue-deep);
}

.view-all-products-button {
    display: block;
    width: fit-content;
    margin: 4rem auto 0;
    background: var(--navy-blue-deep);
    color: var(--off-white);
    padding: 15px 30px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.view-all-products-button:hover {
    background: var(--olive-green-soft);
    transform: translateY(-3px);
}

/* =========================================
   7. SECCIÓN TÉCNICA (SEO)
   ========================================= */
.tech-specs-section {
    padding: 60px 20px;
    background-color: #fff;
    border-top: 1px solid var(--light-warm-gray);
}

.tech-specs-content {
    max-width: 1000px;
    margin: 0 auto;
}

.tech-specs-content h2 {
    color: var(--navy-blue-deep);
    margin-bottom: 20px;
    font-size: 2.2rem;
}

.tech-specs-content h3 {
    color: var(--navy-blue-deep);
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.5rem;
    font-family: 'Playfair Display', serif;
}

.tech-specs-content p {
    margin-bottom: 20px;
    color: var(--dark-gray);
    line-height: 1.7;
}

.tech-specs-content ul {
    padding-left: 20px;
    line-height: 1.7;
    color: var(--dark-gray);
}

.tech-specs-content li {
    margin-bottom: 12px;
}

.tech-specs-content strong {
    color: var(--navy-blue-deep);
    font-weight: 700;
}

/* =========================================
   8. BLOG
   ========================================= */
.blog {
    background-color: var(--off-white);
    text-align: center;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.blog-post {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    text-align: left;
    transition: transform 0.3s ease;
}

.blog-post:hover {
    transform: translateY(-5px);
}

.blog-post img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-post-content {
    padding: 2rem;
}

.blog-post h3 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
}

.blog-post .read-more {
    color: var(--olive-green-soft);
    text-decoration: none;
    font-weight: 600;
}

/* =========================================
   9. CONTACTO
   ========================================= */
.contact-content {
    background: var(--off-white);
    padding: 3.5rem;
    border-radius: 15px;
    margin-top: 2.5rem;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.contact-list {
    list-style: none;
    padding: 0;
    display: inline-block;
    text-align: left;
}

.contact-list li {
    margin-bottom: 1.2rem;
    font-size: 1.15rem;
    color: var(--navy-blue-deep);
}

.contact-list li a {
    color: var(--olive-green-soft);
    text-decoration: none;
}

.map-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    margin-top: 2.5rem;
}

.map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* =========================================
   10. NUEVO FORMULARIO COTIZACIÓN (B2B)
   ========================================= */
.quote-container-b2b {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.quote-subtitle {
    text-align: center;
    color: var(--olive-green-soft);
    margin-bottom: 30px;
    font-weight: 600;
}

.form-row-compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group-b2b label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--navy-blue-deep);
    font-size: 0.95rem;
}

.form-group-b2b input,
.form-group-b2b textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: 'Open Sans', sans-serif;
    transition: border-color 0.3s;
}

.form-group-b2b input:focus, 
.form-group-b2b textarea:focus {
    border-color: var(--olive-green-soft);
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 158, 119, 0.1);
}

.form-hint {
    font-size: 0.85rem;
    color: #888;
    margin-top: 5px;
}

.upload-simple {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 6px;
    border: 1px dashed #ccc;
    text-align: center;
    margin-bottom: 25px;
}

.upload-label {
    cursor: pointer;
    color: var(--navy-blue-deep);
    display: block;
}

.submit-btn-b2b {
    width: 100%;
    font-size: 1.1rem;
    padding: 15px;
}

/* =========================================
   11. FOOTER
   ========================================= */
.footer {
    background: var(--navy-blue-deep);
    color: var(--light-warm-gray);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
    text-align: left;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.footer-column h3 {
    color: var(--off-white);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-column p, .footer-column a, .footer-column li {
    color: var(--light-warm-gray);
    text-decoration: none;
    margin-bottom: 0.8rem;
}

.footer-column a:hover {
    color: var(--olive-green-soft);
}

.footer-social-icons {
    display: flex;
    gap: 1.2rem;
    margin-top: 1.5rem;
}

.footer-social-icons a {
    color: var(--off-white);
    font-size: 1.5rem;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    font-size: 0.9rem;
}

/* =========================================
   12. UTILIDADES Y SUBPÁGINAS (Por si las usas)
   ========================================= */
.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--navy-blue-deep);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
    display: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modales */
.confirmation-modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
}

.confirmation-modal-content {
    background-color: var(--off-white);
    padding: 30px;
    border-radius: 10px;
    width: 80%;
    max-width: 400px;
    text-align: center;
    position: relative;
}

.confirmation-modal-close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
}

/* Estilos de Subpáginas (Mantenidos por precaución) */
.subpage-section {
    padding-top: 120px;
    padding-bottom: 4rem;
    background-color: #ffffff;
    text-align: center;
}

.subpage-section h1 {
    font-size: 3.2rem;
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
}

.subpage-section h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--olive-green-soft);
}

.product-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.product-card-subpage {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.product-card-subpage:hover {
    transform: translateY(-5px);
}

.product-card-subpage img {
    max-width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

/* =========================================
   13. RESPONSIVE (Móvil)
   ========================================= */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--navy-blue-deep);
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu {
        display: block;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .quote-container-b2b {
        padding: 20px;
    }
    
    .form-row-compact {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-social-icons {
        justify-content: center;
    }
    
    .about-content-grid {
        flex-direction: column;
    }
}
/* =========================================
   ESTILOS ESPECÍFICOS DE SUB-PÁGINAS (PRODUCTOS)
   ========================================= */
   .main-product {
    background-color: var(--off-white);
    padding-top: 100px;
    padding-bottom: 60px;
}

.product-page-title {
    margin-bottom: 20px;
    color: var(--navy-blue-deep);
    text-align: left;
}

.product-page-description {
    margin-bottom: 40px;
    color: var(--dark-gray);
    text-align: left;
}

/* Sección de Especificaciones (La "Carne" Técnica) */
.specs-container {
    margin-top: 60px;
    border-top: 1px solid #ddd;
    padding-top: 40px;
}

.specs-title {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--navy-blue-deep);
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.spec-item h3 {
    font-size: 1.2rem;
    color: var(--navy-blue-deep);
    margin-bottom: 10px;
    font-family: 'Playfair Display', serif;
}

.spec-item p, 
.spec-item ul {
    font-size: 0.95rem;
    color: var(--dark-gray);
}

/* Contenedor del Formulario Integrado */
.quote-section-integrated {
    max-width: 800px;
    margin: 60px auto 0;
    padding: 0 20px;
}

/* Spinner Overlay (Para que aparezca al centro) */
.spinner-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
}
/* =========================================
   CORRECCIÓN VISUAL: CONTENEDOR CENTRAL
   ========================================= */

/* 1. El Fondo General (Gris claro para contraste) */
.main-product {
    background-color: var(--off-white);
    padding-top: 120px; /* Espacio para que el header no lo tape */
    padding-bottom: 80px;
    min-height: 100vh;
}

/* 2. La "Hoja de Papel" (Donde va el contenido) */
.subpage-paper-container {
    max-width: 1100px;      /* ANCHO MÁXIMO: Esto evita que se estire al infinito */
    margin: 0 auto;         /* CENTRADO AUTOMÁTICO: Esto lo pone al medio */
    background-color: #fff; /* Fondo blanco limpio */
    padding: 60px;          /* Márgenes internos (Aire) */
    border-radius: 12px;    /* Bordes suaves */
    box-shadow: 0 5px 25px rgba(0,0,0,0.05); /* Sombrita elegante */
}

/* 3. Títulos y Textos más ordenados */
.product-page-title {
    font-size: 2.5rem;
    color: var(--navy-blue-deep);
    margin-bottom: 25px;
    text-align: center; /* Centramos el título principal */
    font-weight: 700;
}

.product-page-description {
    font-size: 1.1rem;
    color: var(--dark-gray);
    line-height: 1.8;
    max-width: 800px; /* Limitamos el ancho del texto para que sea legible */
    margin: 0 auto 50px auto; /* Centrado */
    text-align: center;
}

/* 4. Arreglo de la Galería (Tarjetas que no se estiren) */
.product-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive inteligente */
    gap: 30px;
    margin-bottom: 60px;
}

.product-card-subpage {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease;
    /* Corrección de altura */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-card-subpage:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-color: var(--olive-green-soft);
}

.product-card-subpage img {
    width: 100%;
    height: 250px;
    object-fit: cover; /* Evita que la foto se deforme */
    border-radius: 6px;
    margin-bottom: 15px;
}

/* 5. Sección Técnica (Aire y Orden) */
.specs-container {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}

.specs-title {
    text-align: center;
    margin-bottom: 40px;
}