/**
 * productos.css - Estilos para páginas de productos y rubros
 * Basado en 4.2.1-tabla-efectos-productos.md
 */

/* ==========================================================================
   Hero Rubro/Producto
   ========================================================================== */
.hero-productos {
    position: relative;
    min-height: 40vh;
    display: flex;
    align-items: center;
    background: #1a1a1a;
    overflow: hidden;
    color: white;
    text-align: center;
}

.hero-productos::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--hero-bg) center center/cover no-repeat;
    opacity: 0.5;
    z-index: 0;
    transition: all 0.5s ease;
}

.hero-productos:hover::before {
    transform: scale(1.05);
}

.hero-productos h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-productos p {
    font-size: 1.25rem;
    opacity: 0.95;
    max-width: 800px;
    margin: 0 auto;
}

/* ==========================================================================
   Grid de Productos (Página de Rubro)
   ========================================================================== */
.productos-grid {
    padding: 5rem 0;
}

.producto-card {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    height: 400px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.producto-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.producto-card:hover img {
    transform: scale(1.1);
}

/* Overlay rojo que se desliza desde la izquierda */
.producto-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(220, 53, 69, 0.92);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    transform: translateX(-100%);
    transition: all 0.4s ease;
}

.producto-card:hover .producto-overlay {
    transform: translateX(0);
}

.producto-overlay h3 {
    color: white;
    font-weight: 700;
    font-size: 1.75rem;
    margin-bottom: 1rem;
    text-align: center;
}

.producto-overlay p {
    color: rgba(255, 255, 255, 0.95);
    text-align: center;
    margin-bottom: 1.5rem;
}

.producto-overlay .btn-light {
    padding: 0.75rem 2rem;
    font-weight: 600;
}

/* ==========================================================================
   Página de Producto Individual
   ========================================================================== */
.producto-intro {
    padding: 5rem 0;
}

.producto-intro h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.producto-intro .lead {
    font-size: 1.25rem;
    color: var(--donosti-gray);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.producto-intro .btn-group-producto .btn {
    margin-right: 1rem;
    margin-bottom: 0.75rem;
    padding: 0.875rem 2rem;
    font-weight: 600;
}

.producto-intro .producto-image {
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.producto-intro .producto-image img {
    width: 100%;
    height: auto;
    transition: all 0.5s ease;
}

.producto-intro .producto-image:hover img {
    transform: scale(1.05);
}

.caracteristicas-producto {
    background-color: #F1F1F1 !important;
}

/* ==========================================================================
   Tabs de Producto (Info Técnica y Galería)
   ========================================================================== */
.producto-tabs {
    background: var(--donosti-light-gray);
    padding: 5rem 0;
}

.producto-tabs .nav-tabs {
    border: none;
    margin-bottom: 3rem;
    justify-content: center;
}

.producto-tabs .nav-tabs .nav-link {
    border: none;
    background: white;
    color: var(--donosti-dark);
    font-weight: 600;
    padding: 1rem 2.5rem;
    border-radius: 0.5rem;
    margin: 0 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.producto-tabs .nav-tabs .nav-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.producto-tabs .nav-tabs .nav-link.active {
    background: var(--donosti-red);
    color: white !important;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.producto-tabs .tab-content {
    background: white;
    padding: 3rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Info Técnica */
.info-tecnica h4 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--donosti-red);
}

.info-tecnica h5 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.info-tecnica ul {
    list-style: none;
    padding: 0;
}

.info-tecnica ul li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
}

.info-tecnica ul li:last-child {
    border-bottom: none;
}

.info-tecnica ul li i {
    color: var(--donosti-red);
    margin-right: 1rem;
    font-size: 1.25rem;
}

.info-tecnica .specs-table {
    width: 100%;
    margin-top: 2rem;
}

.info-tecnica .specs-table th,
.info-tecnica .specs-table td {
    padding: 1rem;
    border: 1px solid #e9ecef;
}

.info-tecnica .specs-table th {
    background: var(--donosti-light-gray);
    font-weight: 600;
    text-align: left;
}

/* ==========================================================================
   Galería de Producto (Thumbnails)
   ========================================================================== */
.galeria-producto .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.galeria-producto .gallery-thumbnail {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    cursor: pointer;
    height: 250px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.galeria-producto .gallery-thumbnail:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.galeria-producto .gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s ease;
}

.galeria-producto .gallery-thumbnail:hover img {
    transform: scale(1.1);
}

/* Overlay rojo en thumbnails */
.galeria-producto .thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(220, 53, 69, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.galeria-producto .gallery-thumbnail:hover .thumbnail-overlay {
    opacity: 1;
}

.galeria-producto .thumbnail-overlay i {
    color: white;
    font-size: 3rem;
}

/* ==========================================================================
   Modal de Galería
   ========================================================================== */
.modal-gallery .modal-dialog {
    max-width: 90%;
    margin: 2rem auto;
}

.modal-gallery .modal-content {
    background: transparent;
    border: none;
}

.modal-gallery .modal-body {
    padding: 0;
    position: relative;
}

.modal-gallery img {
    width: 100%;
    height: auto;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 0.5rem;
}

.modal-gallery .btn-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: white;
    opacity: 1;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   CTA Final de Productos
   ========================================================================== */
.cta-productos {
    position: relative;
    background: #1a1a1a;
    padding: 10rem 0;
    overflow: hidden;
    text-align: center;
}

.cta-productos::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--cta-bg) center center/cover no-repeat;
    background-attachment: fixed;
    opacity: 0.5;
    z-index: 0;
}

.cta-productos .container {
    position: relative;
    z-index: 1;
}

.cta-productos h3,
.cta-productos p {
    color: white !important;
}

@media (max-width: 991.98px) {
    .cta-productos::before {
        background-attachment: scroll;
    }
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */
@media (max-width: 768px) {
    .hero-productos h1 {
        font-size: 2.25rem;
    }

    .producto-card {
        height: 350px;
        margin-bottom: 1.5rem;
    }

    .producto-intro h1 {
        font-size: 2rem;
    }

    .producto-intro .btn-group-producto .btn {
        display: block;
        width: 100%;
        margin-right: 0;
    }

    .producto-tabs .nav-tabs {
        flex-direction: column;
    }

    .producto-tabs .nav-tabs .nav-link {
        margin: 0 0 0.5rem 0;
        width: 100%;
    }

    .producto-tabs .tab-content {
        padding: 2rem 1.5rem;
    }

    .galeria-producto .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }

    .galeria-producto .gallery-thumbnail {
        height: 200px;
    }
}