/* ==========================================================================
   PINTURAS ELIPSA - ESTILOS PARA PRODUCTOS.PHP
   Diseño de rejilla vertical con columnas deslizantes y centro interactivo
   ========================================================================== */

.productos-page {
    background-color: #fbfbfb;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* ==========================================================================
   ESTRUCTURA DE REJILLA CON LÍNEAS GUÍA VERTICALES (IDÉNTICO A LA REFERENCIA)
   ========================================================================== */
.productos-layout {
    position: relative;
    flex: 1;
    display: grid;
    grid-template-columns: 190px 190px 1fr 190px 190px;
    height: calc(100vh - 86px);
    overflow: hidden;
    background: #ffffff;
}

/* Líneas verticales sutiles de fondo */
.grid-lines-bg {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 190px 190px 1fr 190px 190px;
    pointer-events: none;
    z-index: 1;
}

.grid-line {
    border-right: 1px solid rgba(0, 0, 0, 0.07);
    height: 100%;
}

.grid-line:last-child {
    border-right: none;
}

/* ==========================================================================
   COLUMNAS LATERALES DESLIZANTES (SCROLL UP / SCROLL DOWN)
   ========================================================================== */
.side-column {
    position: relative;
    z-index: 2;
    height: calc(100vh - 86px);
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.side-track {
    display: flex;
    flex-direction: column;
    gap: 46px;
    padding: 30px 10px;
    will-change: transform;
}

/* Animaciones infinitas continuas */
.scroll-up {
    animation: scrollInfiniteUp 32s linear infinite;
}

.scroll-down {
    animation: scrollInfiniteDown 32s linear infinite;
}

.scroll-up-alt {
    animation: scrollInfiniteUp 38s linear infinite;
}

.scroll-down-alt {
    animation: scrollInfiniteDown 36s linear infinite;
}

.side-column:hover .side-track {
    animation-play-state: paused; /* Pausa al pasar el mouse para facilitar el clic */
}

@keyframes scrollInfiniteUp {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

@keyframes scrollInfiniteDown {
    0% { transform: translateY(-50%); }
    100% { transform: translateY(0); }
}

/* Tarjetas de productos en las columnas laterales - SOLO IMAGEN, SIN TEXTO */
.side-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 8px 6px;
    border-radius: 14px;
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    background: transparent;
    user-select: none;
    text-align: center;
    width: 172px;
}

.side-item:hover {
    transform: scale(1.1);
    background: rgba(0, 0, 0, 0.03);
}

.side-item.active {
    background: rgba(227, 27, 35, 0.06);
    box-shadow: 0 4px 16px rgba(227, 27, 35, 0.15);
}

/* Imagen del producto en las columnas laterales (GRANDE, SIN TEXTO) */
.side-item img {
    width: 145px;
    height: 145px;
    object-fit: contain;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.22));
    transition: transform 0.28s ease, filter 0.28s ease;
}

.side-item:hover img {
    transform: translateY(-5px);
    filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.3));
}

/* Ocultar completamente el texto de los items laterales */
.side-item-name,
.side-item-line {
    display: none;
}

/* ==========================================================================
   ÁREA CENTRAL (INFORMACIÓN PRINCIPAL, COTIZAR, FICHA TÉCNICA)
   ========================================================================== */
.center-showcase {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 30px;
    height: calc(100vh - 86px);
    overflow-y: auto;
    scrollbar-width: none; /* Oculta barra de desplazamiento en Firefox */
    -ms-overflow-style: none; /* IE y Edge */
    text-align: center;
}

.center-showcase::-webkit-scrollbar {
    display: none; /* Oculta barra en Chrome / Safari */
}

/* Contenedor de la lata central */
.center-product-visual {
    position: relative;
    max-width: 440px;
    width: 100%;
    margin-bottom: 6px;
    perspective: 1000px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.center-product-img {
    width: 100%;
    height: auto;
    max-height: 52vh;
    object-fit: contain;
    filter: drop-shadow(0 22px 32px rgba(0, 0, 0, 0.34));
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    cursor: grab;
}

/* Título SEO encima de la imagen central */
.center-visual-title {
    font-family: var(--font-heading);
    font-size: clamp(1.1rem, 1.8vw, 1.4rem);
    font-weight: 900;
    color: #111;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
    margin-top: 0;
    text-align: center;
    line-height: 1.15;
    /* Gradiente rojo-negro elegante */
    background: linear-gradient(135deg, #0c0c0c 40%, var(--elipsa-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.center-product-img:active {
    cursor: grabbing;
}

/* Información del producto central */
.center-product-info {
    max-width: 580px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.product-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(227, 27, 35, 0.1);
    color: var(--elipsa-red);
    font-weight: 800;
    font-size: 0.78rem;
    padding: 4px 12px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

.product-main-title {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 2.8vw, 2.4rem);
    font-weight: 900;
    color: #0c0c0c;
    text-transform: uppercase;
    line-height: 1.05;
    margin-bottom: 4px;
}

.product-main-subtitle {
    font-size: 0.95rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 10px;
}

.product-main-desc {
    font-size: 0.88rem;
    color: #444;
    line-height: 1.5;
    margin-bottom: 14px;
    max-width: 520px;
}

/* Ficha de especificaciones resumidas */
.specs-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 18px;
    width: 100%;
}

.spec-pill {
    background: #f4f4f4;
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
}

.spec-pill strong {
    color: #000;
    font-weight: 700;
}

/* Botones de acción (Cotizar y Ficha Técnica) */
.product-actions-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    width: 100%;
}

.btn-cotizar {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background-color: #25D366; /* Verde WhatsApp profesional */
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 11px 28px;
    border-radius: 9999px;
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35);
    transition: all 0.28s ease;
}

.btn-cotizar:hover {
    background-color: #20bd5a;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(37, 211, 102, 0.45);
}

.btn-cotizar svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.btn-ficha-tecnica {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #111111;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 11px 26px;
    border-radius: 9999px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.18);
    transition: all 0.28s ease;
    cursor: pointer;
    border: none;
}

.btn-ficha-tecnica:hover {
    background-color: var(--elipsa-red);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(227, 27, 35, 0.35);
}

.btn-ficha-tecnica svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2.2;
    fill: none;
}

/* ==========================================================================
   MODAL DE FICHA TÉCNICA
   ========================================================================== */
.ficha-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.ficha-card {
    background: #fff;
    width: 100%;
    max-width: 650px;
    border-radius: 18px;
    padding: 34px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.ficha-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.ficha-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: #111;
    text-transform: uppercase;
}

.ficha-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #777;
    line-height: 1;
}

.ficha-close:hover {
    color: #000;
}

.ficha-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
    font-size: 0.92rem;
}

.ficha-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #eee;
}

.ficha-table td:first-child {
    font-weight: 700;
    color: #222;
    width: 38%;
    background: #fafafa;
}

/* ==========================================================================
   RESPONSIVO
   ========================================================================== */
@media (max-width: 1100px) {
    .productos-layout {
        grid-template-columns: 110px 110px 1fr 110px 110px;
    }
    .side-item {
        width: 100px;
    }
    .side-item img {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 900px) {
    .productos-layout {
        grid-template-columns: 90px 1fr 90px;
    }
    .grid-lines-bg {
        grid-template-columns: 90px 1fr 90px;
    }
    .side-col-2, .side-col-3 {
        display: none;
    }
    .center-showcase {
        padding: 20px;
    }
}

@media (max-width: 640px) {
    .productos-layout {
        display: flex;
        flex-direction: column;
        height: auto;
        min-height: auto;
    }
    .grid-lines-bg {
        display: none;
    }
    .side-column {
        height: 120px;
        width: 100%;
        overflow-x: auto;
    }
    .side-track {
        flex-direction: row;
        animation: none;
        padding: 10px;
    }
    .center-showcase {
        height: auto;
        min-height: auto;
        padding: 30px 16px;
    }
    .product-actions-group {
        flex-direction: column;
        width: 100%;
    }
    .btn-cotizar, .btn-ficha-tecnica {
        width: 100%;
    }
}
