/* ========================================
   PRODUCTOS - ESTILOS PRINCIPALES
   ======================================== */

/* ========================================
   LAYOUT PRINCIPAL DEL PRODUCTO
   ======================================== */
.product-conteiner {
    display: grid;
    grid-gap: 2rem;
    margin: 4rem auto 2rem auto;
}

@media (min-width: 900px) {
    .product-conteiner {
        grid-template-columns: 6fr 4fr;
        align-items: flex-start;
        grid-gap: 4rem;
    }
}

/* ========================================
   CONTENEDOR DE IMÁGENES DEL PRODUCTO
   ======================================== */
.product-image-conteiner {
    background-color: var(--color-blanco);
    overflow: hidden;
    position: relative;
    height: auto;
    border-radius: 2rem;
}

.product-image-conteiner img {
    display: block;
}

.product-image-conteiner video {
    display: block;
    max-width: 100%;
}

/* ========================================
   SLIDER DE PRODUCTOS (SWIPER)
   ======================================== */
.swiper-container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.swiper-slide {
    background-size: cover;
    background-position: center;
}

.gallery-top {
    width: 100%;
    border-radius: 2rem;
    overflow: hidden;
    border: 1px solid var(--color-gris);
    position: relative;
}

.gallery-top .swiper-slide {
    border-radius: 2rem;
    overflow: hidden;
}

.gallery-top .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 2rem;
}

/* ========================================
   BOTONES DE NAVEGACIÓN DEL SLIDER
   ======================================== */
.gallery-top .swiper-button-next,
.gallery-top .swiper-button-prev {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 248, 248, 0.95) 100%);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    backdrop-filter: blur(10px);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.gallery-top .swiper-button-next {
    right: 25px;
}

.gallery-top .swiper-button-prev {
    left: 25px;
}

.gallery-top .swiper-button-next:after,
.gallery-top .swiper-button-prev:after {
    color: var(--color-verde-famatex);
    font-size: 48px;
    font-weight: 700;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   THUMBNAILS DEL SLIDER
   ======================================== */
.thumbnails-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    padding: 10px;
    flex-wrap: wrap;
}

.thumbnail-item {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.thumbnail-item:hover {
    opacity: 1;
    transform: scale(1.05);
}

.thumbnail-item.active {
    opacity: 1;
    border-color: var(--color-verde-famatex);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========================================
   SISTEMA DE TABS
   ======================================== */
.product-tabs-container {
    background-color: var(--color-blanco);
    border: solid 1px var(--color-gris);
    border-radius: 2rem;
    overflow: hidden;
    margin-top: 2rem;
    grid-column: 1 / -1;
    width: 100%;
}

.tabs-navigation {
    display: flex;
    background-color: #f8f8f8;
    border-bottom: 1px solid var(--color-gris);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    position: relative;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
}


.tabs-navigation::-webkit-scrollbar {
    display: none;
}

.tab-button {
    flex: 1;
    min-width: 120px;
    padding: 1.5rem 2rem;
    background: none;
    border: none;
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--color-gris-famatex);
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
}

.tab-button:hover {
    background-color: #e8e8e8;
    color: var(--color-verde-famatex);
}

.tab-button.active {
    background-color: var(--color-blanco);
    color: var(--color-verde-famatex);
    border-bottom-color: var(--color-verde-famatex);
}

.tabs-content {
    padding: 4rem;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-panel.active {
    display: block;
}

.tab-panel h3 {
    margin-top: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   CONTENIDO DE TABS - VIDEOS
   ======================================== */
.videos-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.video-item {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    border-radius: 1rem;
    overflow: hidden;
}

.video-item iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ========================================
   CONTENIDO DE TABS - CLIENTES
   ======================================== */
.clientes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.cliente-item {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 100%; /* Hace que sea cuadrado */
    border-radius: 1rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cliente-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.cliente-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cliente-item:hover img {
    transform: scale(1.05);
}

/* ========================================
   CONTENIDO DE TABS - VENTAJAS
   ======================================== */
.ventajas-conclusion {
    background: linear-gradient(135deg, var(--color-verde-famatex), #2d8f6b);
    color: white;
    padding: 2rem;
    border-radius: 1rem;
    margin-top: 2rem;
    text-align: center;
}

.ventajas-conclusion p {
    margin: 0;
    font-size: 1.6rem;
    line-height: 1.5;
}

.ventajas-conclusion strong {
    font-weight: 700;
    font-size: 1.8rem;
}

/* ========================================
   CONTENIDO DE TABS - TABLA DE CARACTERÍSTICAS
   ======================================== */
.table-product-detail {
    margin: 2rem 0 0 0;
    width: 100%;
    border: 1px solid var(--color-gris);
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
}

.table-product-detail tr:nth-child(2n + 1) {
    background-color: #f8f8f8;
}

.table-product-detail tr {
    display: grid;
    grid-template-columns: 30% 70%;
    border-bottom: 1px solid var(--color-gris);
}

.table-product-detail tr:last-child {
    border-bottom: none;
}

.table-product-detail tr td {
    padding: 1.8rem;
    font-size: 1.4rem;
    border-right: 1px solid var(--color-gris);
}

.table-product-detail tr td:last-child {
    border-right: none;
}

.table-product-detail tr .property-name {
    font-weight: 600;
}

/* ========================================
   INFORMACIÓN DEL PRODUCTO
   ======================================== */
.product-tittle-conteiner {
    background-color: var(--color-blanco);
    color: var(--color-gris-famatex);
    border-radius: 2rem;
    margin-top: 2rem;
    position: relative;
}

.product-tittle {
    padding-bottom: 2rem;
}

.product-tittle h1 {
    font-size: 2.8rem;
    line-height: 1.3;
    margin: 0;
}

.product-tittle-conteiner .descripcion {
    padding-bottom: 2rem;
}

.product-tittle-conteiner .descripcion p {
    margin: 0;
}

.product-tittle-conteiner .caracteristicas-destacadas {
    padding: 1rem 0;
}

.product-tittle-conteiner .caracteristicas-destacadas h4 {
    margin: 0.5rem 0;
}

.product-tittle-conteiner .caracteristicas-destacadas span {
    font-weight: 700;
}

.product-tittle-conteiner .caracteristicas-destacadas p {
    margin: 0.5rem 0;
}

.precio-contenedor {
    font-size: 2.2rem;
    vertical-align: baseline;
    margin: 1.5rem auto;
}

/* ========================================
   BOTONES DE ACCIÓN
   ======================================== */
.product-call-action {
    padding: 0 2rem 2rem 2rem;
}

.product-call-action-dos {
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    grid-gap: 1rem;
    border-top: solid 0.1rem var(--color-gris);
    align-items: center;
}

.button .fab.fa-whatsapp {
    margin-right: 1rem;
    font-size: 2rem;
}

.descargar-ficha {
    border: solid .1rem var(--color-verde-famatex);
    padding: 0.8rem 1.8rem;
    text-decoration: none;
    display: block;
    font-size: 1.5rem;
    color: var(--color-verde-famatex);
    font-weight: 500;
    transition: all ease .5s;
    text-align: center;
    border-radius: 3rem;
}

.descargar-ficha.youtube {
    color: var(--color-rojo-famatex);
    border: solid .1rem var(--color-rojo-famatex);
}

.fa-file-download,
.fa-youtube {
    margin-right: 1rem;
}

/* ========================================
   ICONOS Y ELEMENTOS GENERALES
   ======================================== */
.fas.fa-check {
    margin-right: 1rem;
    color: var(--color-amarillo-famatex);
}

.ventajas span {
    font-weight: 700;
}

/* ========================================
   CARACTERÍSTICAS INTERNAS
   ======================================== */
.caracteristicas.interno {
    border: solid 0.1rem var(--color-gris);
    padding: 2rem;
    border-radius: 2rem;
    margin-bottom: 2rem;
}

.interno .item__caracteristicas .item__clave h4 {
    font-size: 1.4rem;
}

.interno .item__caracteristicas .item__clave img {
    width: 2.5rem;
    height: 2.5rem;
}

.interno .item__caracteristicas .item__valor p {
    font-size: 1.5rem;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Botones del slider */
@media (max-width: 768px) {
    .gallery-top .swiper-button-next,
    .gallery-top .swiper-button-prev {
        width: 50px;
        height: 50px;
    }
    
    .gallery-top .swiper-button-next {
        right: 15px;
    }
    
    .gallery-top .swiper-button-prev {
        left: 15px;
    }
    
    .gallery-top .swiper-button-next:after,
    .gallery-top .swiper-button-prev:after {
        font-size: 40px;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .gallery-top .swiper-button-next,
    .gallery-top .swiper-button-prev {
        width: 45px;
        height: 45px;
    }
    
    .gallery-top .swiper-button-next {
        right: 10px;
    }
    
    .gallery-top .swiper-button-prev {
        left: 10px;
    }
    
    .gallery-top .swiper-button-next:after,
    .gallery-top .swiper-button-prev:after {
        font-size: 36px;
        width: 36px;
        height: 36px;
    }
}

/* Thumbnails */
@media (max-width: 768px) {
    .thumbnail-item {
        width: 70px;
        height: 70px;
    }
    
    .thumbnails-container {
        gap: 8px;
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    .thumbnail-item {
        width: 60px;
        height: 60px;
    }
    
    .thumbnails-container {
        gap: 6px;
    }
}

/* Tabs */
@media (max-width: 768px) {
    .tab-button {
        min-width: 120px;
        padding: 1.2rem 1.5rem;
        font-size: 1.4rem;
        flex-shrink: 0;
    }
    
    .tabs-content {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .tab-button {
        min-width: 125px;
        padding: 1rem 1.2rem;
        font-size: 1.4rem;
        flex-shrink: 0;
    }
    
    .tabs-content {
        padding: 1rem;
    }
    
    .video-item,
    .cliente-item {
        border-radius: 0.5rem;
    }
    
    /* Mejoras para deslizamiento en móvil */
    .tabs-navigation {
        scroll-snap-type: x mandatory;
        scroll-padding: 1rem;
    }
    
    .tab-button {
        scroll-snap-align: start;
        scroll-snap-stop: normal;
        -webkit-tap-highlight-color: rgba(54, 162, 135, 0.1);
        touch-action: manipulation;
    }
    
    .tab-button:active {
        transform: scale(0.98);
        background-color: rgba(54, 162, 135, 0.1);
    }
    
    .tab-button.active {
        background-color: var(--color-blanco);
        box-shadow: 0 2px 8px rgba(54, 162, 135, 0.15);
    }
}

@media (max-width: 360px) {
    .tab-button {
        min-width: 100px;
        padding: 0.8rem 1rem;
        font-size: 1.3rem;
        flex-shrink: 0;
    }
}

/* Layout principal */
@media (min-width: 768px) {
    .product-tittle-conteiner {
        margin-top: 0;
    }
}

@media (min-width: 768px) {
    .product-call-action-dos {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Videos y clientes */
@media (min-width: 768px) {
    .videos-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 3rem;
    }
    
    .clientes-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .videos-container {
        gap: 4rem;
    }
    
    .clientes-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .clientes-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Tabla de características */
@media (max-width: 768px) {
    .table-product-detail tr {
        grid-template-columns: 35% 65%;
    }
    
    .table-product-detail tr td {
        padding: 1.2rem;
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .table-product-detail tr {
        grid-template-columns: 40% 60%;
    }
    
    .table-product-detail tr td {
        padding: 1rem;
        font-size: 1.4rem;
    }
}