/* ============================================ */
/* DETALLE DE PRODUCTO - Qorimia        */
/* VERSIÓN MEJORADA CON MÚLTIPLES IMÁGENES     */
/* ============================================ */

/* ============================================ */
/* CONTENEDOR PRINCIPAL                         */
/* ============================================ */
.container-producto {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px 40px;
    min-height: 100vh;
}

/* ============================================ */
/* BREADCRUMB                                   */
/* ============================================ */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 30px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.3);
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.breadcrumb a:hover {
    color: #ec4899;
}

.breadcrumb .separador {
    color: rgba(255, 255, 255, 0.15);
    font-size: 12px;
}

.breadcrumb .actual {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

/* ============================================ */
/* DETALLE PRODUCTO - GRID                      */
/* ============================================ */
.producto-detalle {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 40px;
}

@media (max-width: 992px) {
    .producto-detalle {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 20px;
    }
}

@media (max-width: 576px) {
    .producto-detalle {
        padding: 15px;
        border-radius: 12px;
    }
}

/* ============================================ */
/* GALERÍA                                      */
/* ============================================ */
.galeria {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    align-self: start; /* la galería mide lo que la imagen principal, no lo que la columna de info */
    gap: 15px;
}

/* Columna de la imagen principal (los badges se posicionan sobre ella) */
.galeria-principal {
    position: relative;
    flex: 1;
    min-width: 0;
}

/* Badges */
.badges {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 6px;
    pointer-events: none;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    animation: fadeInBadge 0.5s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.badge-oferta {
    background: linear-gradient(135deg, #ec4899, #c0392b);
}

.badge-nuevo {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.badge-destacado {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.badge-agotado {
    background: linear-gradient(135deg, #7f8c8d, #95a5a6);
}

@keyframes fadeInBadge {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Imagen principal */
.imagen-principal-wrapper {
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    aspect-ratio: 1 / 1;
    cursor: zoom-in;
}

.imagen-principal-wrapper.agotado {
    opacity: 0.6;
    position: relative;
}

.imagen-principal-wrapper.agotado::after {
    content: 'AGOTADO';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-25deg);
    font-size: 48px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.1);
    letter-spacing: 8px;
    pointer-events: none;
}

.imagen-principal {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    padding: 20px;
}

.imagen-principal:hover {
    transform: scale(1.02);
}

/* ============================================ */
/* MINIATURAS                                    */
/* ============================================ */
.miniaturas {
    /* Columna vertical a la izquierda; su alto sigue al de la imagen principal
       (contain: size) y hace scroll si hay muchas miniaturas */
    display: flex;
    flex-direction: column;
    flex: 0 0 88px;
    width: 88px;
    box-sizing: border-box;
    padding: 4px;
    gap: 10px;
    contain: size;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
}

.miniaturas .miniatura-wrapper {
    flex: 0 0 auto;
    width: 100%;
}

.miniatura-wrapper {
    position: relative;
    aspect-ratio: 1 / 1;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.miniatura-wrapper:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.miniatura-wrapper.active {
    border-color: #ec4899;
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.2);
}

.miniatura-wrapper .miniatura {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.miniatura-wrapper:hover .miniatura {
    transform: scale(1.05);
}

/* ============================================ */
/* INFORMACIÓN DEL PRODUCTO                     */
/* ============================================ */
.info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info .categoria {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.info .categoria a {
    color: #ec4899;
    text-decoration: none;
    transition: color 0.3s;
}

.info .categoria a:hover {
    color: #f472b6;
}

.info h1 {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.2;
}

@media (max-width: 576px) {
    .info h1 {
        font-size: 22px;
    }
}

.info .sku {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.2);
}

/* Descripción corta (resumen/SEO) mostrada como subtítulo bajo el nombre */
.descripcion-corta {
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.75);
    margin: 2px 0 10px;
    font-weight: 400;
}

/* Precios */
.precios {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.precio-actual {
    font-size: 32px;
    font-weight: 800;
    color: #ec4899;
}

.precio-oferta {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.3);
    text-decoration: line-through;
}

.descuento-badge {
    background: rgba(236, 72, 153, 0.15);
    color: #ec4899;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
}

/* Descripción */
.descripcion {
    font-size: 15px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.6);
    margin: 4px 0;
}

/* Stock */
.stock-info-container {
    margin: 4px 0;
}

.stock-info {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.stock-info.disponible {
    color: #2ecc71;
    background: rgba(46, 204, 113, 0.08);
}

.stock-info.disponible i {
    font-size: 16px;
}

.alerta-agotado {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(231, 76, 60, 0.08);
    border-left: 3px solid #e74c3c;
    border-radius: 8px;
    color: #e74c3c;
    font-size: 14px;
}

.alerta-agotado i {
    font-size: 18px;
}

.alerta-stock-bajo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(243, 156, 18, 0.08);
    border-left: 3px solid #f39c12;
    border-radius: 8px;
    color: #f39c12;
    font-size: 14px;
}

.alerta-stock-bajo i {
    font-size: 18px;
}

/* ============================================ */
/* CARACTERÍSTICAS                              */
/* ============================================ */
.caracteristicas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
    padding: 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

@media (max-width: 576px) {
    .caracteristicas {
        grid-template-columns: 1fr;
    }
}

.caracteristicas .item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

.caracteristicas .item i {
    color: #2ecc71;
    font-size: 14px;
}

.caracteristicas .item strong {
    color: rgba(255, 255, 255, 0.7);
}

/* ============================================ */
/* ACCIONES                                      */
/* ============================================ */
.acciones {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 4px;
}

.acciones-fila {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.acciones-fila .cantidad-wrapper {
    flex-shrink: 0;
}

.acciones-fila .botones-accion {
    flex: 1;
    flex-wrap: nowrap;
    min-width: 0;
}

.acciones-fila .botones-accion button {
    min-width: 0;
    padding-left: 14px;
    padding-right: 14px;
}

/* Favorito dentro de la fila: botón cuadrado con solo el corazón
   (el texto sigue en el DOM para el JS y los lectores de pantalla) */
.acciones-fila .favorito {
    position: relative;
    flex: 0 0 auto;
    width: 52px;
    min-height: 48px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(236, 72, 153, 0.12);
    border: 1.5px solid rgba(236, 72, 153, 0.65);
    border-radius: 10px;
    color: #f472b6;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.2s, box-shadow 0.25s;
    -webkit-tap-highlight-color: transparent;
}

.acciones-fila .favorito i {
    font-size: 20px;
    line-height: 1;
    pointer-events: none;
}

.acciones-fila .favorito:hover:not(:disabled) {
    background: rgba(236, 72, 153, 0.22);
    border-color: #f472b6;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(236, 72, 153, 0.25);
}

.acciones-fila .favorito:active:not(:disabled) {
    transform: scale(0.96);
}

.acciones-fila .favorito:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.acciones-fila .favorito:disabled {
    opacity: 0.7;
    cursor: wait;
}

.acciones-fila .favorito span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

/* Activo: corazón lleno, fondo sólido para que se distinga a simple vista */
.acciones-fila .favorito.activo {
    background: linear-gradient(135deg, #ec4899, #c0392b);
    border-color: #ec4899;
    color: #fff;
    box-shadow: 0 4px 14px rgba(236, 72, 153, 0.35);
}

.acciones-fila .favorito.activo:hover:not(:disabled) {
    background: linear-gradient(135deg, #f472b6, #d63a4f);
}

.acciones-fila .favorito.activo i {
    animation: heartBeat 0.5s ease;
}

/* Producto agotado: el corazón va en una fila propia, con texto visible */
.acciones-fila--agotado {
    flex-wrap: wrap;
}

.acciones-fila--agotado .botones-accion {
    flex: 1 1 260px;
}

.acciones-fila.acciones-fila--agotado .favorito {
    flex: 1 1 100%;
    width: 100%;
}

.acciones-fila.acciones-fila--agotado .favorito span {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: nowrap;
}

.cantidad-wrapper {
    display: flex;
    align-items: center;
    gap: 0;
    max-width: 140px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.btn-cantidad {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.btn-cantidad:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.btn-cantidad:disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

.cantidad-wrapper input {
    width: 60px;
    height: 40px;
    background: transparent;
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    color: #fff;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

.cantidad-wrapper input::-webkit-inner-spin-button,
.cantidad-wrapper input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cantidad-wrapper input[type="number"] {
    -moz-appearance: textfield;
}

/* Botones de acción */
.botones-accion {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.botones-accion button {
    flex: 1;
    min-width: 160px;
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-agregar-carrito {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.btn-agregar-carrito:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.btn-agregar-carrito:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-comprar-ahora {
    background: #ec4899;
    color: #fff;
}

.btn-comprar-ahora:hover:not(:disabled) {
    background: #be185d;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(236, 72, 153, 0.3);
}

.btn-comprar-ahora:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-agotado {
    background: rgba(127, 140, 141, 0.1);
    color: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    cursor: not-allowed;
}

.btn-notificarme {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.2) !important;
}

.btn-notificarme:hover {
    background: rgba(52, 152, 219, 0.15);
    transform: translateY(-2px);
}

/* ============================================ */
/* ACCIONES RÁPIDAS                             */
/* ============================================ */
.acciones-rapidas {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.acciones-rapidas button {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
}

.acciones-rapidas button:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.03);
}

.acciones-rapidas .favorito.activo {
    color: #ec4899;
}

.acciones-rapidas .favorito.activo i {
    animation: heartBeat 0.5s ease;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(0.9); }
    75% { transform: scale(1.1); }
}

/* ============================================ */
/* PESTAÑAS DEL PRODUCTO (bajo galería + info) */
/* ============================================ */
.descripcion-seccion .descripcion-corta {
    margin-top: 0;
}

/* Pestañas: Descripción / Especificaciones / Cambios y devoluciones */
.producto-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    overflow-x: auto;
    scrollbar-width: none;
}

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

.producto-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    margin-bottom: -1px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: rgba(255, 255, 255, 0.5);
    font-size: 15px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s;
}

.producto-tab:hover {
    color: #fff;
}

.producto-tab.active {
    color: #fff;
    border-bottom-color: #ec4899;
}

.producto-tab.active i {
    color: #ec4899;
}

.producto-tab-panel {
    display: none;
}

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

/* Características (check verde) dentro de la pestaña Especificaciones */
.producto-tab-panel .caracteristicas {
    padding: 0;
    border-top: none;
}

/* Cambios y devoluciones: datos de contacto */
.devoluciones-contacto {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.devoluciones-contacto i {
    color: #ec4899;
    width: 18px;
    margin-right: 6px;
    text-align: center;
}

.devoluciones-contacto a {
    color: #ec4899;
    text-decoration: none;
}

.devoluciones-contacto a:hover {
    color: #f472b6;
}

@media (max-width: 576px) {
    .producto-tab {
        padding: 10px 14px;
        font-size: 14px;
    }

}

@media (max-width: 576px) {
    .descripcion-seccion {
        padding: 20px 16px;
    }
}

/* ============================================ */
/* OPINIONES                                     */
/* ============================================ */
.opiniones-seccion,
.descripcion-seccion {
    margin-top: 40px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.opiniones-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.opiniones-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.opiniones-header h2 i {
    color: #f1c40f;
}

.opiniones-resumen {
    display: flex;
    align-items: center;
    gap: 12px;
}

.promedio-estrellas {
    font-size: 20px;
    color: #f1c40f;
    letter-spacing: 2px;
}

.promedio-texto {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.3);
}

.opiniones-lista {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 8px;
}

.opiniones-lista::-webkit-scrollbar {
    width: 4px;
}

.opiniones-lista::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}

.opiniones-lista::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.opinion-item {
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.3s;
}

.opinion-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.opinion-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.opinion-autor {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.opinion-autor i {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.2);
}

.opinion-estrellas {
    color: #f1c40f;
    letter-spacing: 1px;
    font-size: 14px;
}

.opinion-fecha {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.15);
}

.opinion-comentario {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.6;
    margin: 6px 0 0;
}

.opiniones-vacio {
    text-align: center;
    color: rgba(255, 255, 255, 0.2);
    padding: 30px 0;
    font-size: 15px;
}

.opiniones-cargando {
    text-align: center;
    color: rgba(255, 255, 255, 0.2);
    padding: 20px 0;
}

/* ============================================ */
/* FORMULARIO OPINIÓN                           */
/* ============================================ */
.opinion-form-wrapper {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.opinion-form {
    max-width: 500px;
}

.opinion-form h4 {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.opinion-form h4 i {
    color: #ec4899;
}

.opinion-estrellas-input {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
}

.opinion-estrellas-input i {
    font-size: 28px;
    color: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.2s;
}

.opinion-estrellas-input i:hover {
    transform: scale(1.1);
}

.opinion-estrellas-input i.fas {
    color: #f1c40f;
}

.opinion-form textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    resize: vertical;
    transition: all 0.3s;
    min-height: 80px;
}

.opinion-form textarea:focus {
    outline: none;
    border-color: #ec4899;
    background: rgba(255, 255, 255, 0.05);
}

.opinion-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.15);
}

.opinion-mensaje {
    margin-top: 8px;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 8px;
    display: none;
}

.opinion-mensaje.error {
    display: block;
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.06);
}

.opinion-mensaje.exito {
    display: block;
    color: #2ecc71;
    background: rgba(46, 204, 113, 0.06);
}

.btn-enviar-opinion {
    margin-top: 12px;
    padding: 10px 24px;
    background: #ec4899;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-enviar-opinion:hover:not(:disabled) {
    background: #be185d;
    transform: translateY(-2px);
}

.btn-enviar-opinion:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.opinion-login-aviso {
    color: rgba(255, 255, 255, 0.2);
    font-size: 14px;
    text-align: center;
    padding: 20px 0;
}

.opinion-login-aviso a {
    color: #ec4899;
    text-decoration: none;
    font-weight: 600;
}

.opinion-login-aviso a:hover {
    text-decoration: underline;
}

/* ============================================ */
/* PRODUCTOS RELACIONADOS                       */
/* ============================================ */
.productos-relacionados {
    margin-top: 40px;
}

.relacionados-header,
.seccion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.relacionados-header h2,
.seccion-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.relacionados-header h2 i,
.seccion-header h2 i {
    color: #ec4899;
}

.relacionados-header a {
    color: rgba(255, 255, 255, 0.3);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.relacionados-header a:hover {
    color: #ec4899;
}

.relacionados-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.producto-relacionado-card {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.producto-relacionado-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.relacionado-imagen {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.02);
}

.relacionado-info {
    padding: 12px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.relacionado-info h3 {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.relacionado-precio {
    font-size: 16px;
    font-weight: 700;
    color: #ec4899;
}

.relacionado-precio-oferta {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.2);
    text-decoration: line-through;
}

/* ============================================ */
/* MODAL ZOOM                                   */
/* ============================================ */
.modal-zoom {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.modal-zoom.active {
    display: flex;
    animation: fadeInModal 0.3s ease;
}

@keyframes fadeInModal {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-zoom .close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    background: none;
    border: none;
    transition: color 0.3s;
    font-family: 'Inter', sans-serif;
}

.modal-zoom .close:hover {
    color: #fff;
}

.modal-zoom img {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
}

/* ============================================ */
/* MODALES - CARRITO / AGOTADO                 */
/* ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 9998;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-carrito,
.modal-agotado {
    background: #3a1631;
    border-radius: 16px;
    padding: 30px;
    max-width: 480px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    animation: slideUpModal 0.3s ease;
}

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

.btn-cerrar-modal {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.2);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.3s;
    font-family: 'Inter', sans-serif;
}

.btn-cerrar-modal:hover {
    color: #fff;
}

.icono-check {
    font-size: 48px;
    color: #2ecc71;
    text-align: center;
    margin-bottom: 12px;
}

.icono-agotado {
    font-size: 48px;
    color: #f39c12;
    text-align: center;
    margin-bottom: 12px;
}

.modal-titulo {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    text-align: center;
    margin: 0 0 4px;
}

.modal-titulo-agotado {
    font-size: 22px;
    font-weight: 700;
    color: #f39c12;
    text-align: center;
    margin: 0 0 4px;
}

.modal-mensaje {
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 14px;
    margin: 0 0 16px;
}

.modal-mensaje-agotado {
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 14px;
    margin: 0 0 4px;
}

.modal-submensaje-agotado {
    text-align: center;
    color: rgba(255, 255, 255, 0.15);
    font-size: 13px;
    margin: 0 0 16px;
}

.modal-producto-info {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    margin-bottom: 16px;
}

.modal-producto-info-agotado {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    margin-bottom: 16px;
}

.modal-producto-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
}

.modal-producto-detalles {
    flex: 1;
}

.modal-producto-marca {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-producto-nombre {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
}

.modal-producto-precio {
    font-size: 18px;
    font-weight: 700;
    color: #ec4899;
}

.modal-producto-stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.08);
    padding: 2px 10px;
    border-radius: 12px;
}

.modal-botones {
    display: flex;
    gap: 10px;
}

.modal-botones button,
.modal-botones a {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-seguir-comprando {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.5);
}

.btn-seguir-comprando:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.btn-ir-carrito {
    background: #ec4899;
    color: #fff;
}

.btn-ir-carrito:hover {
    background: #be185d;
    transform: translateY(-2px);
}

.modal-botones-agotado {
    display: flex;
    gap: 10px;
}

.modal-botones-agotado button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-cerrar {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.5);
}

.btn-cerrar:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.btn-suscribir {
    background: #3498db;
    color: #fff;
}

.btn-suscribir:hover:not(:disabled) {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-suscribir:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.input-email {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    margin-bottom: 12px;
    transition: all 0.3s;
}

.input-email:focus {
    outline: none;
    border-color: #ec4899;
    background: rgba(255, 255, 255, 0.05);
}

.input-email::placeholder {
    color: rgba(255, 255, 255, 0.15);
}

.mensaje-notificacion {
    margin-bottom: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    display: none;
}

.mensaje-notificacion.error {
    display: block;
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.06);
}

.mensaje-notificacion.success {
    display: block;
    color: #2ecc71;
    background: rgba(46, 204, 113, 0.06);
}

.mensaje-notificacion.loading {
    display: block;
    color: rgba(255, 255, 255, 0.3);
}

/* Las notificaciones flotantes se estilizan en includes/header.php (mismo diseño en todo el sitio) */

/* ============================================ */
/* RESPONSIVE                                   */
/* ============================================ */
@media (max-width: 768px) {
    .container-producto {
        padding: 12px 12px 30px;
    }

    .breadcrumb {
        font-size: 12px;
        padding: 10px 14px;
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .breadcrumb a,
    .breadcrumb span {
        white-space: nowrap;
    }

    .galeria {
        flex-direction: column;
        gap: 10px;
    }

    .galeria-principal {
        order: 1;
        flex: none;
        width: 100%;
    }

    .badges {
        top: 8px;
        left: 8px;
        gap: 4px;
    }

    .badge {
        font-size: 9px;
        padding: 3px 10px;
    }

    .imagen-principal-wrapper {
        aspect-ratio: 1 / 1;
    }

    .miniaturas {
        order: 2;
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        flex: none;
        width: auto;
        padding: 0;
        gap: 8px;
        contain: none;
        overflow: visible;
    }

    .precio-actual {
        font-size: 26px;
    }

    .botones-accion {
        flex-direction: column;
    }

    .botones-accion button {
        min-width: auto;
        width: 100%;
    }

    /* Móvil: [- 1 +] [♡] en una línea y "Agregar al carrito" a ancho completo debajo */
    .acciones-fila {
        flex-wrap: wrap;
    }

    .acciones-fila .cantidad-wrapper {
        flex: 1;
        max-width: none;
    }

    .acciones-fila .cantidad-wrapper input {
        flex: 1;
        width: auto;
        min-width: 0;
    }

    .acciones-fila .favorito {
        width: 46px;
        min-height: 44px;
    }

    .acciones-fila .cantidad-wrapper .btn-cantidad,
    .acciones-fila .cantidad-wrapper input {
        height: 42px;
    }

    .acciones-fila .cantidad-wrapper ~ .botones-accion {
        order: 3;
        flex: 1 1 100%;
    }

    .modal-carrito,
    .modal-agotado {
        padding: 20px;
        margin: 10px;
    }

    .modal-botones,
    .modal-botones-agotado {
        flex-direction: column;
    }

    .modal-botones button,
    .modal-botones a,
    .modal-botones-agotado button {
        width: 100%;
    }

    .opiniones-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .relacionados-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .producto-detalle {
        padding: 12px;
        border-radius: 10px;
    }

    .info h1 {
        font-size: 20px;
    }

    .precio-actual {
        font-size: 22px;
    }

    .miniaturas {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
        gap: 6px;
    }

    .relacionados-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .acciones-rapidas button {
        font-size: 12px;
        padding: 4px 8px;
    }

    .modal-zoom {
        padding: 16px;
    }

    .modal-zoom img {
        max-width: 100%;
        max-height: 80vh;
    }
}


/* ============================================ */
/* AJUSTES RESPONSIVE ADICIONALES               */
/* ============================================ */

/* Pantallas grandes */
@media (min-width: 1600px) {
    .container-producto {
        max-width: 1360px;
    }
}

/* Laptop pequeña / tablet horizontal: dos columnas muy ajustadas */
@media (min-width: 993px) and (max-width: 1160px) {
    .producto-detalle {
        gap: 28px;
        padding: 24px;
    }

    .acciones-fila {
        gap: 8px;
    }

    .acciones-fila .cantidad-wrapper input {
        width: 46px;
    }

    .acciones-fila .botones-accion button {
        padding-left: 10px;
        padding-right: 10px;
        font-size: 14px;
        white-space: nowrap;
    }

    .acciones-fila .favorito {
        width: 48px;
    }
}

/* Móviles muy pequeños (≤ 360px) */
@media (max-width: 360px) {
    .container-producto {
        padding: 10px 8px 24px;
    }

    .acciones-fila {
        gap: 8px;
    }

    .acciones-fila .cantidad-wrapper .btn-cantidad {
        width: 34px;
    }

    .acciones-fila .favorito {
        width: 44px;
    }

    .botones-accion button {
        font-size: 14px;
        padding: 12px 14px;
    }
}

/* Pantallas táctiles: sin "hover pegado" y zonas de toque cómodas */
@media (hover: none) {
    .acciones-fila .favorito:hover:not(:disabled) {
        transform: none;
        box-shadow: none;
    }

    .acciones-fila .favorito.activo:hover:not(:disabled) {
        background: linear-gradient(135deg, #ec4899, #c0392b);
        box-shadow: 0 4px 14px rgba(236, 72, 153, 0.35);
    }
}

/* Usuarios con animaciones reducidas */
@media (prefers-reduced-motion: reduce) {
    .acciones-fila .favorito,
    .acciones-fila .favorito.activo i {
        animation: none;
        transition: none;
    }
}

/* ============================================ */
/* GALERÍA: arrastrar con mouse / deslizar con el dedo */
/* ============================================ */
.imagen-principal-wrapper.galeria-multi {
    cursor: grab;
    touch-action: pan-y;            /* el scroll vertical de la página sigue funcionando; el horizontal lo maneja la galería */
    -webkit-user-select: none;
    user-select: none;
}

.imagen-principal-wrapper.galeria-multi.arrastrando {
    cursor: grabbing;
}

.imagen-principal-wrapper.galeria-multi .imagen-principal {
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
}

.imagen-principal-wrapper.arrastrando .imagen-principal {
    transition: none;
    transform: none;                /* el desplazamiento lo aplica el script mientras se arrastra */
}

.galeria-puntos {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10px;
    display: flex;
    justify-content: center;
    gap: 6px;
    pointer-events: none;
    z-index: 5;
}

.galeria-puntos span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    transition: all 0.2s ease;
}

.galeria-puntos span.activo {
    width: 18px;
    border-radius: 4px;
    background: #ec4899;
}

.miniaturas {
    -webkit-user-select: none;
    user-select: none;
}


/* ============================================ */
/* GALERÍA: flechas anterior / siguiente         */
/* ============================================ */
.galeria-flecha {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(17, 17, 27, 0.65);
    color: #fff;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 6;
    padding: 0;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.galeria-flecha-prev { left: 10px; }
.galeria-flecha-next { right: 10px; }

.galeria-flecha:hover:not(:disabled) {
    background: #ec4899;
    border-color: #ec4899;
    transform: translateY(-50%) scale(1.08);
}

.galeria-flecha:focus-visible {
    outline: 2px solid #ec4899;
    outline-offset: 2px;
}

.galeria-flecha:disabled {
    opacity: 0.3;
    cursor: default;
}

@media (max-width: 768px) {
    .galeria-flecha { width: 36px; height: 36px; font-size: 13px; }
    .galeria-flecha-prev { left: 6px; }
    .galeria-flecha-next { right: 6px; }
}


/* ============================================ */
/* ZOOM: flechas y contador                      */
/* ============================================ */
.zoom-flecha {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    z-index: 2;
    transition: background 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}
.zoom-flecha[hidden] { display: none; }
.zoom-flecha-prev { left: 24px; }
.zoom-flecha-next { right: 24px; }
.zoom-flecha:hover:not(:disabled) { background: #ec4899; border-color: #ec4899; transform: translateY(-50%) scale(1.08); }
.zoom-flecha:focus-visible { outline: 2px solid #ec4899; outline-offset: 2px; }
.zoom-flecha:disabled { opacity: 0.25; cursor: default; }

.zoom-contador {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    letter-spacing: 1px;
}
.zoom-contador[hidden] { display: none; }

@media (max-width: 768px) {
    .zoom-flecha { width: 40px; height: 40px; font-size: 15px; }
    .zoom-flecha-prev { left: 8px; }
    .zoom-flecha-next { right: 8px; }
}