.productos-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0 40px;
    justify-content: center;
}

.producto-item {
    position: relative;
    cursor: pointer;
    width: calc(33.33% - 80px / 3);
}

.producto-imagenes {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.producto-imagenes img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity .65s ease;
    -webkit-transition: opacity .65s ease;
    -moz-transition: opacity .65s ease;
    -ms-transition: opacity .65s ease;
    -o-transition: opacity .65s ease;
}

.imagen-hover {
    opacity: 0;
}

.producto-item:hover .imagen-hover {
    opacity: 1;
}

.producto-item:hover .imagen-principal {
    opacity: 0;
}

@media only screen and (max-width: 1239px) {
    .producto-item {
        width: calc(50% - 40px);
    }
}

@media only screen and (max-width: 550px) {
    .producto-item {
        width: 100%;
    }
}

/* Estilos del Popup */
.producto-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0;
    transform: scale(0);
    -webkit-transform: scale(0);
    -moz-transform: scale(0);
    -ms-transform: scale(0);
    -o-transform: scale(0);
    transition: all 0.65s ease-in-out;
    -webkit-transition: all 0.65s ease-in-out;
    -moz-transition: all 0.65s ease-in-out;
    -ms-transition: all 0.65s ease-in-out;
    -o-transition: all 0.65s ease-in-out;
}

.producto-popup.open {
    z-index: 1000;
    opacity: 1;
    transform: scale(1);
    -webkit-transform: scale(1);
    -moz-transform: scale(1);
    -ms-transform: scale(1);
    -o-transform: scale(1);
}

.popup-contenido {
    position: relative;
    width: 100%;
    height: 100%;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 300px;
    overflow: hidden;
    background: url(/wp-content/uploads/2025/02/fondo-portada-2025-02-11-fondo-portada.jpg) center center/cover no-repeat;
}

.cerrar-popup {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
}

.cerrar-popup-izquierda {
    background: none;
    color: var(--secundario);
    display: flex;
    align-items: center;
    gap: 10px;
    border: 0;
    padding: 0;
    text-transform: uppercase;
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    -webkit-transform: translateX(-50%);
    -moz-transform: translateX(-50%);
    -ms-transform: translateX(-50%);
    -o-transform: translateX(-50%);
    border-radius: 0;
    -webkit-border-radius: 0;
    -moz-border-radius: 0;
    -ms-border-radius: 0;
    -o-border-radius: 0;
}

.cerrar-popup-izquierda:hover {
    color: var(--principal);
    background: none !important;
}

.cerrar-popup-izquierda .icon {
    font-size: 1.5em;
}

.popup-izquierda {
    position: relative;
    padding: 80px;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    scrollbar-width: thin;
    scrollbar-color: var(--principal) transparent;
    direction: rtl;
    box-sizing: border-box;
}

.popup-izquierda .popup-izquierda-contenido {
    max-width: 700px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    direction: ltr;
}

.popup-imagen img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.popup-titulo {
    color: var(--blanco);
    margin: 0 0 10px;
    font-size: var(--size-h3);
    line-height: 1.2;
    font-weight: 400;
    font-family: var(--font-title);
}

.popup-meta {
    margin: 0;
    color: var(--secundario);
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    line-height: 1;
}

.popup-meta > span:not(:last-child) {
    padding-right: 15px;
    border-right: 1px solid var(--secundario);
}

.popup-descripcion {
    margin-top: 25px;
    color: var(--secundario);
}

.popup-derecha {
    background: rgb(0 0 0 / 50%);
    height: 100%;
    box-sizing: border-box;
}

.slider-productos {
    height: 100%;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-productos .slick-list {
    height: 100%;
    overflow: visible;
}

.slider-productos .slick-track {
    display: block;
}

.slider-productos .slider-item {
    position: relative;
    cursor: pointer;
    transition: all .3s ease-in-out;
    -webkit-transition: all .3s ease-in-out;
    -moz-transition: all .3s ease-in-out;
    -ms-transition: all .3s ease-in-out;
    -o-transition: all .3s ease-in-out;
}

.slider-productos .slider-item img {
    transition: all .3s ease-in-out;
    -webkit-transition: all .3s ease-in-out;
    -moz-transition: all .3s ease-in-out;
    -ms-transition: all .3s ease-in-out;
    -o-transition: all .3s ease-in-out;
}

.slider-productos .slider-item:hover img {
    transform: scale(1.1);
    -webkit-transform: scale(1.1);
    -moz-transform: scale(1.1);
    -ms-transform: scale(1.1);
    -o-transform: scale(1.1);
}

.slider-productos .slider-item:before {
    content: "";
    position: absolute;
    display: block;
    height: 1px;
    top: 50%;
    right: calc(100% + 80px);
    background: var(--secundario);
    width: 0;
    transition: all .3s ease-in-out;
    -webkit-transition: all .3s ease-in-out;
    -moz-transition: all .3s ease-in-out;
    -ms-transition: all .3s ease-in-out;
    -o-transition: all .3s ease-in-out;
}

.slider-productos .slider-item.active:before {
    width: 100px;
}

body .slick-slider.slider-productos .slick-arrow {
    top: auto;
    left: 0 !important;
    right: auto;
    width: 100%;
    height: 100px;
    opacity: 1;
    transform: none;
    -webkit-transform: none;
    -moz-transform: none;
    -ms-transform: none;
    -o-transform: none;
    align-items: center;
    justify-content: center;
}

body .slick-slider.slider-productos .slick-arrow .icon {
    opacity: 0;
    transition: all .3s ease-in-out;
    -webkit-transition: all .3s ease-in-out;
    -moz-transition: all .3s ease-in-out;
    -ms-transition: all .3s ease-in-out;
    -o-transition: all .3s ease-in-out;
}

body .slick-slider.slider-productos .slick-arrow.prevArrow {
    top: 0;
    background: linear-gradient(to bottom, #000, transparent);
}

body .slick-slider.slider-productos .slick-arrow.prevArrow .icon {
    margin-top: -30px;
    transform: translateY(-100px) rotate(90deg);
    -webkit-transform: translateY(-100px) rotate(90deg);
    -moz-transform: translateY(-100px) rotate(90deg);
    -ms-transform: translateY(-100px) rotate(90deg);
    -o-transform: translateY(-100px) rotate(90deg);
}

body .slick-slider.slider-productos:hover .slick-arrow.prevArrow .icon {
    opacity: 1;
    transform: translateY(0) rotate(90deg);
    -webkit-transform: translateY(0) rotate(90deg);
    -moz-transform: translateY(0) rotate(90deg);
    -ms-transform: translateY(0) rotate(90deg);
    -o-transform: translateY(0) rotate(90deg);
}

body .slick-slider.slider-productos .slick-arrow.nextArrow {
    bottom: 0;
    background: linear-gradient(to top, #000, transparent);
}

body .slick-slider.slider-productos .slick-arrow.nextArrow .icon {
    margin-bottom: -30px;
    transform: translateY(100px) rotate(90deg);
    -webkit-transform: translateY(100px) rotate(90deg);
    -moz-transform: translateY(100px) rotate(90deg);
    -ms-transform: translateY(100px) rotate(90deg);
    -o-transform: translateY(100px) rotate(90deg);
}

body .slick-slider.slider-productos:hover .slick-arrow.nextArrow .icon {
    opacity: 1;
    transform: translateY(0) rotate(90deg);
    -webkit-transform: translateY(0) rotate(90deg);
    -moz-transform: translateY(0) rotate(90deg);
    -ms-transform: translateY(0) rotate(90deg);
    -o-transform: translateY(0) rotate(90deg);
}

@media only screen and (max-width: 1239px) {
    .popup-contenido {
        grid-template-columns: 1fr 200px;
    }

    .slider-productos .slider-item:before {
        right: calc(100% + 50px);
    }

    .slider-productos .slider-item.active:before {
        width: 50px;
    }
}

@media only screen and (max-width: 767px) {
    .popup-contenido {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 120px;
        height: 100%;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .popup-izquierda {
        padding: 40px 33px;
        overflow-y: auto;
        width: 100%;
    }

    .popup-izquierda .popup-imagen {
        max-width: 400px;
    }

    .cerrar-popup-izquierda {
        display: flex;
        top: 20px;
    }

    .popup-derecha {
        width: 100%;
    }

    .slider-productos {
        height: 100%;
        padding: 0;
        width: 100%;
        max-width: 100vw;
    }

    .slider-productos .slick-list {
        width: 150px;
    }

    .slider-productos .slider-item {
        margin: 0 15px;
    }

    .slider-productos .slider-item:before {
        display: none;
    }

    body .popup-derecha .slider-productos.slick-slider .slick-arrow {
        width: 40px;
        height: 100%;
    }

    body .popup-derecha .slider-productos.slick-slider .slick-arrow.prevArrow {
        top: 0;
        background: linear-gradient(to right, #000, transparent);
    }

    body .popup-derecha .slider-productos.slick-slider .slick-arrow.nextArrow {
        top: 0;
        left: auto !important;
        right: 0;
        background: linear-gradient(to left, #000, transparent);
    }

    body .popup-derecha .slider-productos.slick-slider .slick-arrow .icon {
        opacity: 1;
        margin: 0;
        transform: none !important;
        -webkit-transform: none !important;
        -moz-transform: none !important;
        -ms-transform: none !important;
        -o-transform: none !important;
}

    .slider-productos .slider-item img {
        opacity: .5;
    }

    .slider-productos .slider-item:hover img,
    .slider-productos .slider-item.active img {
        opacity: 1;
        transform: scale(1.2);
        -webkit-transform: scale(1.2);
        -moz-transform: scale(1.2);
        -ms-transform: scale(1.2);
        -o-transform: scale(1.2);
    }
}

/* Estilos para el loader */
.loader-contenido {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #003399; /* Color principal de FRINSA */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Estilos para el body cuando el popup está abierto */
html.popup-abierto {
    overflow: hidden;
} 