/* ============================================
   ESTILOS GENERALES Y COMUNES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    color: #333;
    line-height: 1.6;
    background-color: #f9f9f9;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   ENCABEZADO - IDÉNTICO PARA TODAS LAS PÁGINAS
   ============================================ */

header {
    background-color: #000;
    color: white;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-icon {
    color: #eb2c25;
    font-size: 28px;
}

/* ============================================
   NAVEGACIÓN DESKTOP
   ============================================ */

.desktop-nav {
    display: block;
}

.desktop-nav ul {
    display: flex;
    list-style: none;
}

.desktop-nav ul li {
    position: relative;
}

.desktop-nav ul li a {
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    display: block;
    transition: all 0.3s ease;
    font-weight: 500;
}

.desktop-nav ul li a:hover {
    color: #eb2c25;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Dropdown Desktop */
.desktop-nav .dropdown {
    position: absolute;
    background-color: #000;
    min-width: 220px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: none;
    left: 0;
    top: 100%;
}

.desktop-nav .dropdown li {
    width: 100%;
}

.desktop-nav .dropdown li a {
    padding: 12px 20px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.desktop-nav .dropdown li:last-child a {
    border-bottom: none;
}

.desktop-nav ul li:hover .dropdown {
    display: block;
}

/* Submenú Desktop */
.desktop-nav .submenu {
    position: absolute;
    left: 100%;
    top: 0;
    background-color: #111;
    min-width: 200px;
    display: none;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.desktop-nav .dropdown li:hover .submenu {
    display: block;
}

/* ============================================
   NAVEGACIÓN MÓVIL
   ============================================ */

/* Botón hamburguesa */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

/* Menú hamburguesa */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background-color: #000;
    z-index: 1002;
    transition: right 0.3s ease;
    overflow-y: auto;
    padding-top: 80px;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav ul {
    list-style: none;
}

.mobile-nav ul li {
    width: 100%;
    border-bottom: 1px solid #333;
}

.mobile-nav ul li a {
    color: white;
    text-decoration: none;
    padding: 15px 20px;
    display: block;
    font-weight: 500;
    transition: all 0.3s ease;
}

.mobile-nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #eb2c25;
}

.mobile-nav ul li a i {
    float: right;
    transition: transform 0.3s ease;
}

.mobile-nav ul li a i.rotated {
    transform: rotate(180deg);
}

/* Submenús en Móvil */
.mobile-dropdown {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background-color: #111;
}

.mobile-dropdown.active {
    max-height: 500px;
}

.mobile-dropdown li {
    border-bottom: none;
}

.mobile-dropdown li a {
    padding-left: 40px;
    font-size: 14px;
}

/* Overlay para fondo oscuro */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
}

.overlay.active {
    display: block;
}

/* ============================================
   SLIDER (SOLO PARA HOME)
   ============================================ */

.slider {
    position: relative;
    height: 500px;
    overflow: hidden;
    margin-bottom: 50px;
}

.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;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 0 20px;
}

.slide.active {
    opacity: 1;
}

.slide1 {
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/slide.jpg');
}

.slide2 {
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/slide_3.jpg');
}

.slide3 {
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/slide2.jpg');
}

.slide h2 {
    font-size: 48px;
    margin-bottom: 15px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7);
}

.slide p {
    font-size: 22px;
    max-width: 700px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

/* ============================================
   FILTROS DE PRODUCTOS (SOLO PARA HOME)
   ============================================ */

.product-filters {
    background-color: #f5f5f5;
    padding: 20px 0;
    margin: 30px 0;
    border-top: 3px solid #eb2c25;
    border-bottom: 1px solid #ddd;
}

.filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.filter-label {
    font-weight: 600;
    color: #333;
}

.filter-select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    font-size: 14px;
    min-width: 180px;
}

.filter-select:focus {
    outline: none;
    border-color: #eb2c25;
}

.filter-btn {
    background-color: #000;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.filter-btn:hover {
    background-color: #333;
}

.clear-filter {
    background-color: #666;
}

.active-filter {
    background-color: #eb2c25;
    color: white;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 4px;
}

/* ============================================
   SECCIÓN PRODUCTOS (SOLO PARA HOME)
   ============================================ */

.section-title {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 15px;
    position: relative;
}

.section-title h2 {
    font-size: 36px;
    color: #000;
    margin-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 3px;
    background-color: #eb2c25;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 60px;
}

.product-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.product-img {
    height: 180px;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #666;
    overflow: hidden;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

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

.product-img i {
    font-size: 50px;
    color: #999;
}

.product-info {
    padding: 15px;
}

.product-code {
    font-size: 12px;
    color: #666;
    background-color: #f5f5f5;
    padding: 3px 8px;
    border-radius: 3px;
    display: inline-block;
    margin-bottom: 8px;
}

.product-info h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: #000;
    min-height: 40px;
}

.product-info p {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 10px;
    min-height: 60px;
}

.product-category {
    font-size: 12px;
    color: #eb2c25;
    background-color: rgba(235, 44, 37, 0.1);
    padding: 3px 8px;
    border-radius: 3px;
    display: inline-block;
    margin-top: 8px;
}

/* Contador de productos */
.product-count {
    text-align: center;
    margin-bottom: 20px;
    color: #666;
    font-size: 16px;
}

.product-count span {
    font-weight: 700;
    color: #000;
}

/* ============================================
   SECCIÓN SERVICIOS (SOLO PARA HOME)
   ============================================ */

.services-section {
    margin-bottom: 60px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.service-card {
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-icon {
    font-size: 48px;
    color: #eb2c25;
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #000;
}

.service-card p {
    color: #666;
    line-height: 1.6;
}

/* ============================================
   SECCIÓN CONTACTO (PARA HOME Y INTERNAS)
   ============================================ */

.contact-section {
    margin-bottom: 60px;
}

.contact-form {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.submit-btn {
    background-color: #000;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background-color: #333;
}

.btn-red {
    background-color: #eb2c25;
}

.btn-red:hover {
    background-color: #d0251f;
}

/* ============================================
   PIE DE PÁGINA - IDÉNTICO PARA TODAS
   ============================================ */

footer {
    background-color: #000;
    color: white;
    padding: 40px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.footer-column {
    flex: 1;
    padding: 0 20px;
}

.footer-column h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #eb2c25;
}

.footer-column p, 
.footer-column a {
    color: #ccc;
    margin-bottom: 10px;
    display: block;
    text-decoration: none;
}

.footer-column a:hover {
    color: #eb2c25;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-icons a {
    font-size: 20px;
    color: #ccc;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: #eb2c25;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
    color: #999;
    font-size: 14px;
}

/* ============================================
   ESTILOS PARA PÁGINAS INTERNAS DE PRODUCTOS
   ============================================ */

.product-detail-section {
    padding-top: 60px;
    padding-bottom: 80px;
    background-color: #f8f9fa;
}

/* Contenedores principales */
.product-image-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    margin-bottom: 30px;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image-container img {
    max-height: 250px;
    width: auto;
}

.product-details-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    height: 100%;
}

.specifications-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-top: 30px;
}

/* Títulos y textos internos */
.product-title {
    color: #333;
    font-weight: 700;
    font-size: 2.2rem;
}

.product-ref {
    color: #eb2c25;
    font-weight: 600;
    font-size: 1.2rem;
    display: block;
}

.product-description {
    font-size: 1rem;
    line-height: 1.6rem;
    color: #555;
    margin-bottom: 30px;
    padding-top: 20px;
}

.product-description ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

.product-description li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.specifications-title {
    color: #333;
    margin-bottom: 25px;
    font-weight: 600;
    font-size: 1.5rem;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.specifications-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: #eb2c25;
}

.specifications {
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid #eb2c25;
}

.spec-list {
    list-style: none;
    padding: 0;
}

.spec-list li {
    padding: 5px 0;
    border-bottom: 1px solid #e9ecef;
}

.spec-list li:last-child {
    border-bottom: none;
}

.spec-name {
    font-weight: 600;
    color: #333;
}

.spec-value {
    color: #666;
}

/* Botón volver a productos */
.back-to-products {
    background-color: #eb2c25;
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
    margin-top: 30px;
}

.back-to-products:hover {
    background-color: #d0251f;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(235, 44, 37, 0.3);
}

.back-to-products i {
    margin-right: 10px;
}

/* Productos relacionados */
.related-products {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #e9ecef;
}

.related-title {
    text-align: center;
    margin-bottom: 40px;
    color: #333;
    font-weight: 700;
    font-size: 1.8rem;
    position: relative;
    padding-bottom: 15px;
}

.related-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #eb2c25;
}

.related-product-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
    border: 1px solid transparent;
}

.related-product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    border-color: #eb2c25;
}

.related-product-image {
    text-align: center;
    margin-bottom: 15px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-product-image img {
    max-height: 120px;
    width: auto;
}

.related-product-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    font-size: 1rem;
    text-align: center;
}

.related-product-ref {
    color: #eb2c25;
    font-size: 0.9rem;
    text-align: center;
    font-weight: 500;
}

/* Contenedor del botón centrado */
.button-container {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e9ecef;
}

/* ============================================
   ESTILOS PARA VIDEOS EN PÁGINAS INTERNAS DE PRODUCTOS
   ============================================ */

/* Contenedor del video */
.product-video-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-top: 30px;
    margin-bottom: 30px;
    text-align: center;
}

.product-video-container .video-title {
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
    font-size: 1.2rem;
    text-align: center;
}

.product-video-container .product-video {
    width: 100%;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.product-video-container video {
    width: 100%;
    display: block;
    max-height: 300px;
    border-radius: 8px;
}

/* Ajuste para el diseño de dos columnas en escritorio */
@media (min-width: 992px) {
    .image-spec-col {
        display: flex;
        flex-direction: column;
    }
    
    .product-video-container {
        order: 2; /* Video debajo de la imagen */
        margin-top: 30px;
        margin-bottom: 30px;
    }
    
    .specifications-container {
        order: 3; /* Especificaciones debajo del video */
    }
}

/* Video en móvil */
@media (max-width: 768px) {
    .product-video-container {
        padding: 15px;
        margin-top: 20px;
        margin-bottom: 20px;
    }
    
    .product-video-container video {
        max-height: 200px;
    }
}

/* ============================================
   MEDIA QUERIES RESPONSIVAS
   ============================================ */

@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        flex-wrap: wrap;
    }
    
    .footer-column {
        flex-basis: 50%;
        margin-bottom: 30px;
    }
    
    /* Layout interno para pantallas medianas */
    .product-details-row {
        display: flex;
        flex-wrap: wrap;
    }
    
    .image-spec-col {
        width: 100%;
        padding-right: 0;
        margin-bottom: 30px;
    }
    
    .details-col {
        width: 100%;
        padding-left: 0;
    }
}

@media (max-width: 768px) {
    /* Mostrar botón hamburguesa y ocultar navegación desktop */
    .hamburger-btn {
        display: block;
    }
    
    .desktop-nav {
        display: none;
    }
    
    .header-container {
        flex-direction: row;
        justify-content: space-between;
    }
    
    /* Slider */
    .slide h2 {
        font-size: 36px;
    }
    
    .slide p {
        font-size: 18px;
    }
    
    /* Productos */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    /* Formulario */
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    /* Páginas internas */
    .product-detail-section {
        padding-top: 100px;
        padding-bottom: 50px;
    }
    
    .product-title {
        font-size: 1.8rem;
    }
    
    .product-details-container,
    .specifications-container {
        padding: 25px;
    }
    
    .product-image-container {
        height: 250px;
        padding: 20px;
    }
    
    .product-image-container img {
        max-height: 180px;
    }
    
    /* Footer */
    .footer-column {
        flex-basis: 100%;
    }
    
    /* Filtros */
    .filter-container {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 992px) {
    /* Layout interno para escritorio */
    .product-details-row {
        display: flex;
        flex-wrap: wrap;
    }
    
    .image-spec-col {
        width: 40%;
        padding-right: 30px;
    }
    
    .details-col {
        width: 60%;
        padding-left: 30px;
    }
    
    .specifications-container {
        margin-top: 0;
    }
}