/* productos.css - Estilos para la página de Productos - MCA Ingeniería */

/* ========== VARIABLES (heredadas de style.css) ========== */
:root {
    --azul-mca: #003f8c;
    --azul-oscuro: #002856;
    --rojo-mca: #e30613;
    --gris-claro: #f5f7fa;
    --blanco: #ffffff;
    --negro: #1e1e2a;
    --sombra: 0 15px 35px rgba(0,63,140,0.08);
    --sombra-hover: 0 20px 40px rgba(0,63,140,0.15);
    --border-radius: 20px;
}

/* ========== HERO DE PÁGINA INTERNA ========== */
.page-hero {
    background: linear-gradient(135deg, var(--azul-oscuro) 0%, var(--azul-mca) 100%);
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--blanco);
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.page-hero::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 400px;
    height: 400px;
    background: rgba(227,6,19,0.1);
    border-radius: 50%;
}

.page-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.page-hero h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 3.2rem;
    font-weight: 800;
    margin-bottom: 10px;
    text-transform: uppercase;
    line-height: 1.2;
    color: var(--blanco);
}

.page-hero p {
    font-size: 1.2rem;
    opacity: 0.95;
    font-weight: 400;
    color: rgba(255,255,255,0.95);
}

/* ========== GRID DE PRODUCTOS ========== */
.products-grid-section {
    padding: 80px 0;
    background: var(--gris-claro);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 35px;
    margin-top: 20px;
}

/* Tarjeta de producto (versión detalle, para evitar conflicto con .product-card del index) */
.product-card-detalle {
    background: var(--blanco);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--sombra);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    opacity: 1;
    transform: translateY(0);
}

.product-card-detalle:hover {
    transform: translateY(-10px) scale(1.01);
    box-shadow: var(--sombra-hover);
    z-index: 10;
}

.product-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background-color: #ffffff; /* Fondo gris suave para imágenes que no cargan */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Cambiado a 'contain' para que la imagen del producto no se recorte */
    transition: transform 0.5s ease;
}

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

.product-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-content h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--azul-mca);
    margin-bottom: 12px;
    line-height: 1.3;
}

.product-description {
    color: #4a4a5a;
    line-height: 1.7;
    margin-bottom: 20px;
    flex-grow: 1;
    font-size: 0.95rem;
}

.product-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 15px 0 20px;
    padding-top: 15px;
    border-top: 1px dashed rgba(0,63,140,0.15);
}

.product-specs span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--azul-mca);
    font-weight: 700;
}

.product-specs i {
    font-size: 0.9rem;
    color: var(--rojo-mca);
}

.product-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--azul-mca);
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: auto;
    font-size: 0.95rem;
}

.product-link:hover {
    color: var(--rojo-mca);
    gap: 12px;
}

.product-link i {
    transition: transform 0.3s ease;
}

.product-link:hover i {
    transform: translateX(4px);
}

/* ========== CTA CONTACTO - COMPACTO Y SEPARADO ========== */
.products-cta {
    padding: 60px 0;
    background: transparent;
    color: var(--azul-mca);
    text-align: center;
    margin: 40px 20px 30px;
}

.cta-wrapper {
    background: linear-gradient(135deg, var(--azul-oscuro) 0%, var(--azul-mca) 100%);
    border-radius: 24px;
    padding: 60px 40px;
    margin: 0 auto;
    box-shadow: 0 20px 40px rgba(0,63,140,0.25);
    position: relative;
    overflow: hidden;
}

.cta-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    pointer-events: none;
}

.cta-wrapper::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -30%;
    width: 150px;
    height: 150px;
    background: rgba(227,6,19,0.15);
    border-radius: 50%;
    pointer-events: none;
}

.cta-content {
    position: relative;
    z-index: 2;
    max-width: 650px;
    margin: 0 auto;
    padding: 0 10px;
}

.cta-content h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.3;
    color: white;
}

.cta-content p {
    font-size: 1.05rem;
    margin-bottom: 25px;
    opacity: 0.95;
    line-height: 1.6;
    color: rgba(255,255,255,0.95);
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-cotizar-grande {
    display: inline-flex;
    align-items: center;
    background: var(--rojo-mca);
    color: white;
    padding: 18px 50px;
    border-radius: 60px;
    font-weight: 800;
    font-size: 1.4rem;
    text-decoration: none;
    transition: 0.3s;
    border: 2px solid transparent;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.btn-cotizar-grande i {
    margin-right: 15px;
    font-size: 1.6rem;
}

.btn-cotizar-grande:hover {
    background: white;
    color: var(--rojo-mca);
    border-color: var(--rojo-mca);
    transform: scale(1.05);
}

/* ========== ANIMACIONES ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card-detalle {
    animation: fadeInUp 0.5s ease forwards;
    animation-delay: calc(var(--i, 0) * 0.1s);
}

.products-grid .product-card-detalle:nth-child(1) { --i: 1; }
.products-grid .product-card-detalle:nth-child(2) { --i: 2; }
.products-grid .product-card-detalle:nth-child(3) { --i: 3; }
.products-grid .product-card-detalle:nth-child(4) { --i: 4; }
.products-grid .product-card-detalle:nth-child(5) { --i: 5; }
.products-grid .product-card-detalle:nth-child(6) { --i: 6; }
.products-grid .product-card-detalle:nth-child(7) { --i: 7; }
.products-grid .product-card-detalle:nth-child(8) { --i: 8; }
.products-grid .product-card-detalle:nth-child(9) { --i: 9; }

/* ========== RESPONSIVE ========== */
@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .page-hero {
        height: 220px;
    }
    
    .page-hero h1 {
        font-size: 2.4rem;
    }
    
    .page-hero p {
        font-size: 1.05rem;
    }
    
    .products-grid-section {
        padding: 60px 0;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .product-image {
        height: 200px;
    }
    
    .product-content {
        padding: 22px;
    }
    
    .product-content h3 {
        font-size: 1.3rem;
    }
    
    .products-cta {
        margin: 30px 15px 20px;
        padding: 40px 0;
    }
    
    .cta-wrapper {
        border-radius: 20px;
        padding: 30px 20px;
    }
    
    .cta-content h2 {
        font-size: 1.7rem;
    }
    
    .cta-content p {
        font-size: 1rem;
    }
    
    .btn-cotizar-grande {
        padding: 14px 30px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .product-specs {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    
    .page-hero h1 {
        font-size: 2rem;
    }
}