/* ===== PÁGINA DE PRODUCTO ===== */

/* Breadcrumb estilo catálogo */
.breadcrumb-catalogo ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb-catalogo li {
    display: inline;
}

/* Separador > entre items */
.breadcrumb-catalogo li:not(:last-child)::after {
    content: ">";
    margin: 0 0.5rem;
    color: #999;
}

.breadcrumb-catalogo a {
    color: var(--color-primario);
    text-decoration: none;
}

.breadcrumb-catalogo a:hover {
    text-decoration: underline;
}

.breadcrumb-catalogo .active {
    color: #999;
}

/* ===== SECCIÓN PRINCIPAL ===== */
.producto-container {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.producto-imagenes-col {
    flex: 1 1 400px;
}

.producto-info-col {
    flex: 1 1 400px;
}

/* ===== IMAGEN PRINCIPAL ===== */
.producto-imagen-principal {
    height: 450px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    mix-blend-mode: multiply;
}

.producto-imagen-principal img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    mix-blend-mode: multiply;
}

/* ===== GALERÍA CON SCROLL HORIZONTAL ===== */
.producto-galeria-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
    scrollbar-width: thin;
    scrollbar-color: var(--color-primario);
}

.producto-galeria-wrapper::-webkit-scrollbar {
    height: 6px;
}

.producto-galeria-wrapper::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 10px;
}

.producto-galeria-wrapper::-webkit-scrollbar-thumb {
    background: var(--color-primario);
    border-radius: 10px;
}

.producto-galeria {
    display: flex;
    gap: 0.5rem;
    width: max-content;
    min-width: 100%;
    padding-bottom: 0.25rem;
}

.galeria-thumb {
    flex: 0 0 auto;
    width: 70px;
    height: 70px;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s;
}

.galeria-thumb:hover,
.galeria-thumb.active {
    border-color: var(--color-primario);
}

.galeria-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: multiply;
}
/* ===== CONTENEDOR DE VIDEO ===== */
.video-container {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.formato-16-9 {
    aspect-ratio: 16 / 9;
}

.formato-9-16 {
    aspect-ratio: 9 / 16;
    max-width: 420px;
    margin: 0 auto;
}

.video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}
/* overlay */
.video-thumb {
    position: relative;
}

.video-thumb-overlay {
    position: relative;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.play-icon svg {
    width: 36px;
    height: 36px;
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    padding: 8px;
}


/* ===== SKU Y MARCA ===== */
.producto-sku-marca {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.sku-badge {
    background: var(--color-primario);
    color: white;
    padding: 0.1rem 1.1rem;
    border-radius: 5px;
    font-weight: 600;
    font-size: 1.1rem;
    display: inline-block;
}

.marca-logo {
    height: 52px;
    width: auto;
}

.marca-nombre {
    font-weight: 500;
    color: #4a5568;
}

/* ===== NOMBRE ===== */
.producto-nombre {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #4a5568;
}

/* ===== STOCK Y PRECIO ALINEADOS ===== */
.producto-stock-precio {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Stock mejorado */
.producto-stock {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 500;
}

.producto-stock svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

.stock-disponible { 
    color: #10b981; 
}

.stock-bajo { 
    color: #f59e0b; 
}

.stock-agotado { 
    color: #9ca3af; 
}

/* ===== PRECIO ===== */
.producto-precio-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.5rem;
}

.producto-precio-etiquetas {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1;
    gap: 0;
}

.precio-label,
.precio-moneda-label {
    font-size: 0.9rem;
    color: #718096;
    margin: 0;
    padding: 0;
    font-weight: 500;
}

.producto-precio-valor {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primario);
    line-height: 1.2;
    white-space: nowrap;
}

/* ===== BOTONES ===== */
.btn-consulta {
    display: block;
    width: 100%;
    background: var(--color-primario);
    color: white;
    text-align: center;
    padding: 0.75rem;
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
    margin-bottom: 1.5rem;
}

.btn-consulta:hover {
    background: white;
        color: var(--color-primario);
        border: 2px solid var(--color-primario);
}

.btn-documentacion {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    width: 100%;
    padding: 0.6rem;
    border: 2px solid #4a5568;
    border-radius: 5px;
    color: #4a5568;
    text-decoration: none;
    transition: all 0.2s;
    margin-bottom: 1.5rem;
}

.btn-documentacion:hover {
    border-color: var(--color-primario);
    color: var(--color-primario);
}

.btn-documentacion svg {
    width: 16px;
    height: 16px;
}

/* ===== PESTAÑAS ===== */
.tabs-header {
    display: flex;
    gap: 2rem;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 1.5rem;
}

.tab-button {
    background: none;
    border: none;
    padding: 0.5rem 0;
    font-size: 1rem;
    font-weight: 500;
    color: #718096;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tab-button.active {
    color: var(--color-primario);
    border-bottom-color: var(--color-primario);
}

.tab-pane {
    line-height: 1.6;
    color: #4a5568;
}

/* ===== ESPECIFICACIONES ===== */
.especificaciones-lista {
    list-style: none;
    padding: 0;
    margin: 0;
}

.especificaciones-lista li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #edf2f7;
    color: #4a5568;
}

.especificaciones-lista li:last-child {
    border-bottom: none;
}

/* ===== PRODUCTOS RELACIONADOS ===== */
.related-products {
    margin-top: 3rem;
}

.related-title {
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    color: #4a5568;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .related-grid {
        grid-template-columns: repeat(4, 1fr);  /* 4 columnas en pantallas medianas */
    }
}

@media (max-width: 992px) {
    .related-grid {
        grid-template-columns: repeat(3, 1fr);  /* 3 columnas en tablets */
    }
}

@media (max-width: 768px) {
    .producto-imagen-principal {
        height: 400px;
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr);  /* 2 columnas en móvil */
        gap: 1rem;
    }
    
    .tabs-header {
        gap: 1rem;
    }
    /* CORRECCIÓN: Evitar que la galería genere overflow horizontal en el body */
    .producto-galeria-wrapper {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 1rem;
        /* Asegurar que no empuja el layout */
        position: relative;
        left: 0;
        right: 0;
    }
    
    .producto-galeria {
        display: flex;
        gap: 0.5rem;
        width: max-content;
        min-width: 100%;
        padding-bottom: 0.25rem;
    }
    
    /* Forzar que el body no tenga overflow horizontal */
    body {
        overflow-x: hidden !important;
        position: relative;
        width: 100%;
    }
    
    /* Asegurar que el contenedor principal no genere scroll */
    .container,
    .producto-container,
    .producto-imagenes-col {
        overflow-x: hidden !important;
    }
    
    .formato-9-16 {
        width: 100%;
/*        height: 85vh;  más grande */
        max-width: none;
        margin: 0;
    }

    .video-container iframe {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }   
    
    .producto-imagen-principal.video-activo {
        height: auto !important;
        background: #000;
        padding: 0;
    }

    .producto-imagen-principal.video-activo .video-container {
        width: 100%;
        height: 85vh;
        max-width: none;
        margin: 0;
    }    
}

@media (max-width: 480px) {
    .producto-imagen-principal {
        height: 300px;
    }
    
    .producto-galeria {
        gap: 0.3rem;
    }
    
    .galeria-thumb {
        width: 50px;
        height: 50px;
    }
    
    .producto-precio-wrapper {
        gap: 1rem;
    }
    
    .producto-precio-valor {
        font-size: 1.6rem;
    }
    
    .tabs-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .related-grid {
        gap: 0.75rem;
    }
}