/* Estilos para detalle de producto (nuevo diseño) */

/* Sección completa de detalle de producto */
.product-detail-section {
    padding: 40px 0;
    background-color: #fff;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
}

/* Forzar layout de dos columnas en todas las pantallas excepto móviles */
.product-detail-row {
    display: flex;
}

/* Columnas de detalle de producto */
.product-detail-left-column {
    padding-right: 30px;
}

.product-detail-right-column {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-left: 30px;
}

/* Reglas para forzar el layout en dos columnas en pantallas grandes */
@media (min-width: 992px) {
    .product-detail-left-column,
    .product-detail-right-column {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Contenedor principal para la imagen */
.product-detail-image {
    margin-bottom: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    position: relative;
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9;
    max-width: 100%;
}

.main-product-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

/* Contenedor de miniaturas */
.thumbnails-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    margin-bottom: 30px;
}

.thumbnail-item {
    width: 80px;
    height: 80px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.thumbnail-item:hover {
    border-color: #1976d2;
    transform: scale(1.05);
}

.thumbnail-item.active {
    border: 2px solid #1976d2;
    box-shadow: 0 0 5px rgba(25, 118, 210, 0.5);
}

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

/* Thumbnail de video */
.thumbnail-video {
    background-color: #f0f0f0;
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #1976d2;
}

.video-thumbnail i {
    font-size: 24px;
    margin-bottom: 5px;
}

.video-thumbnail span {
    font-size: 10px;
    text-align: center;
}

/* Contenedor del video cuando está en vista principal */
.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    display: none; /* Inicialmente oculto */
    z-index: 5;
    border-radius: 8px;
    overflow: hidden;
}

.video-container.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.youtube-embed-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.youtube-embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Botón para cerrar el video */
.close-video {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.8);
    color: #333;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s ease;
}

.close-video:hover {
    background-color: rgba(255, 255, 255, 1);
}

/* Información del producto */
.product-detail-info {
    padding: 20px 20px 20px 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-detail-info h1 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: #333;
    font-weight: 700;
    line-height: 1.2;
}

.product-category {
    margin-bottom: 20px;
}

.product-category span {
    background-color: #e3f2fd;
    color: #1976d2;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.additional-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Estilos para el video de YouTube */
.product-video {
    margin-top: 30px;
    margin-bottom: 30px;
}

.product-video h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #333;
    font-weight: 600;
}

.youtube-embed-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.youtube-embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

/* Acciones del producto */
.product-actions {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Selector de cantidad */
.quantity-selector {
    display: flex;
    align-items: center;
    max-width: 150px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.quantity-btn {
    background-color: #f5f5f5;
    border: none;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.quantity-btn:hover {
    background-color: #e0e0e0;
}

.quantity-input {
    flex: 1;
    height: 40px;
    border: none;
    text-align: center;
    font-size: 1rem;
    padding: 0 5px;
}

.quantity-input:focus {
    outline: none;
}

/* Botones de acción */
.btn-add-cart, .btn-share, .btn-whatsapp {
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.btn-add-cart {
    background-color: #1976d2;
    color: white;
}

.btn-add-cart:hover {
    background-color: #1565c0;
}

.btn-share {
    background-color: #f5f5f5;
    color: #333;
}

.btn-share:hover {
    background-color: #e0e0e0;
}

.btn-whatsapp {
    background-color: #25D366;
    color: white;
    text-decoration: none;
    margin-bottom: 10px;
}

.btn-whatsapp:hover {
    background-color: #128C7E;
    color: white;
}

/* Estilos para la sección de descargas */
.product-downloads {
    margin: 15px 0;
}

.btn-downloads {
    background-color: #ff9800;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.btn-downloads:hover {
    background-color: #f57c00;
}

/* Estilos para el modal de descargas */
.downloads-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.download-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 10px;
    background-color: #f5f5f5;
    color: #333;
    text-decoration: none;
    transition: all 0.2s;
}

.download-item:hover {
    background-color: #e0e0e0;
    color: #1976d2;
}

.download-item i {
    font-size: 1.5rem;
    margin-right: 15px;
    color: #1976d2;
}

.download-name {
    flex-grow: 1;
    font-weight: 500;
    font-size: 0.95rem;
}

.download-size {
    color: #757575;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Media queries para responsividad */
@media (min-width: 1200px) {
    /* Estilos específicos para pantallas grandes */
    .product-detail-left-column {
        padding-right: 40px;
    }
    
    .product-detail-right-column {
        padding-left: 40px;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    /* Estilos específicos para pantallas medianas-grandes */
    .product-detail-left-column {
        padding-right: 30px;
    }
    
    .product-detail-right-column {
        padding-left: 30px;
    }
}

@media (max-width: 991px) {
    /* Estilos para tablets y móviles */
    .product-detail-left-column,
    .product-detail-right-column {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0 15px;
    }
    
    .product-detail-image {
        height: 400px;
    }
    
    .product-detail-info {
        padding: 20px 0;
        margin-top: 20px;
    }
}

@media (max-width: 768px) {
    .thumbnail-item {
        width: 60px;
        height: 60px;
    }
    
    .product-detail-image {
        height: 350px;
    }
    
    .product-detail-info h1 {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .thumbnails-container {
        justify-content: center;
    }
    
    .thumbnail-item {
        width: 50px;
        height: 50px;
    }
    
    .video-thumbnail i {
        font-size: 18px;
    }
    
    .video-thumbnail span {
        font-size: 8px;
    }
    
    .product-detail-image {
        height: 300px;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .btn-add-cart, .btn-share, .btn-whatsapp {
        width: 100%;
    }
}

/* Estilos para slider de productos relacionados */
.related-products-section {
    padding: 40px 0;
    background-color: #f9f9f9;
    margin-top: 30px;
}

.related-products-section h2 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    text-align: center;
    color: #333;
    position: relative;
}

.related-products-section h2:after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background-color: #1976d2;
    margin: 10px auto 0;
}

.related-products-slider {
    padding-bottom: 50px;
    position: relative;
}

.related-products-slider .swiper-slide {
    height: auto;
}

.related-products-slider .product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
}

.related-products-slider .product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.related-products-slider .product-image {
    height: 200px;
    overflow: hidden;
    position: relative;
    background-color: #f5f5f5;
}

.related-products-slider .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.related-products-slider .product-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.related-products-slider .product-info h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    line-height: 1.3;
}

.related-products-slider .product-category {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 8px;
    display: inline-block;
    background-color: #f0f0f0;
    padding: 3px 8px;
    border-radius: 4px;
}

.related-products-slider .product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1976d2;
    margin-bottom: 12px;
}

.related-products-slider .product-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
    flex-grow: 1;
}

.related-products-slider .product-actions {
    display: flex;
    justify-content: space-between;
    margin-top: auto;
}

.related-products-slider .btn-view,
.related-products-slider .btn-cart {
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.related-products-slider .btn-view {
    background-color: #fff;
    color: #1976d2;
    border: 1px solid #1976d2;
    flex: 1;
    margin-right: 8px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-products-slider .btn-cart {
    background-color: #1976d2;
    color: #fff;
    border: none;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-products-slider .btn-view:hover {
    background-color: #f0f7ff;
}

.related-products-slider .btn-cart:hover {
    background-color: #1565c0;
}

.related-products-slider .btn-cart i {
    margin-right: 5px;
}

/* Estilos para los controles del slider */
.related-products-slider .swiper-button-next,
.related-products-slider .swiper-button-prev {
    color: #1976d2;
    background-color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    transition: all 0.2s;
}

.related-products-slider .swiper-button-next:hover,
.related-products-slider .swiper-button-prev:hover {
    background-color: #1976d2;
    color: #fff;
}

.related-products-slider .swiper-button-next:after,
.related-products-slider .swiper-button-prev:after {
    font-size: 1.2rem;
    font-weight: bold;
}

.related-products-slider .swiper-pagination-bullet {
    background-color: #1976d2;
    opacity: 0.6;
}

.related-products-slider .swiper-pagination-bullet-active {
    opacity: 1;
}

/* Media query para dispositivos móviles */
@media (max-width: 767px) {
    .related-products-slider .product-image {
        height: 180px;
    }
    
    .related-products-slider .product-info h3 {
        font-size: 1rem;
    }
    
    .related-products-slider .product-description {
        font-size: 0.85rem;
    }
    
    .related-products-slider .product-actions {
        flex-direction: column;
    }
    
    .related-products-slider .btn-view,
    .related-products-slider .btn-cart {
        width: 100%;
        margin-right: 0;
    }
    
    .related-products-slider .btn-view {
        margin-bottom: 8px;
    }
}
