/**
 * resenas.css
 * Estilos Modernos de Lujo para la Página de Reseñas de Clientes (IORO Joyería)
 * Paleta: Obsidiana Profundo (#0b101e, #0f172a) y Acentos Oro (#d4af37, #f59e0b)
 */

/* ============================================================== */
/* 1. RESET Y ESTRUCTURA BASE                                     */
/* ============================================================== */
body.pagina-resenas {
    background-color: #0b101e !important;
    color: #e2e8f0;
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
}

.main-content {
    margin-top: 10px;
    padding-bottom: 60px;
}

.reseñas-container {
    max-width: 1040px;
    width: 92%;
    margin: 20px auto;
    padding: 30px 35px;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55), 0 0 30px rgba(212, 175, 55, 0.05);
}

/* ============================================================== */
/* 1.1 MODAL OVERLAY Y CONTENEDOR FLUIDO SPA                      */
/* ============================================================== */
.modal-resenas-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(4, 9, 20, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 2300;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-resenas-overlay.activo {
    display: flex;
    opacity: 1;
    visibility: visible;
}

body.modal-resenas-abierto {
    overflow: hidden !important;
    touch-action: none;
}

.modal-resenas-container {
    max-width: 1060px;
    width: 94%;
    max-height: 90vh;
    background: #0f172a;
    background: linear-gradient(180deg, #131d31 0%, #0d1524 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 22px;
    box-shadow: 0 25px 75px rgba(0, 0, 0, 0.8), 0 0 40px rgba(212, 175, 55, 0.09);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px 32px 36px 32px;
    box-sizing: border-box;
    position: relative;
    color: #e2e8f0;
    font-family: 'Montserrat', sans-serif;
    transform: translateY(22px) scale(0.97);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-resenas-overlay.activo .modal-resenas-container {
    transform: translateY(0) scale(1);
}

/* Scrollbar personalizado de lujo */
.modal-resenas-container::-webkit-scrollbar {
    width: 7px;
}
.modal-resenas-container::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 10px;
}
.modal-resenas-container::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.28);
    border-radius: 10px;
}
.modal-resenas-container::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.5);
}

.modal-resenas-drag-handle {
    display: none;
}

/* Barra superior sticky dentro del modal */
.modal-resenas-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    position: sticky;
    top: -24px;
    z-index: 30;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin: -24px -32px 22px -32px;
    padding: 16px 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-resenas-top-acciones {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-carrito-modal-resenas {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.35);
    color: #d4af37;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0;
}

.btn-carrito-modal-resenas:hover {
    background: rgba(212, 175, 55, 0.25);
    border-color: #d4af37;
    color: #ffd700;
    transform: scale(1.06);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.btn-carrito-modal-resenas:active {
    transform: scale(0.94);
}

.badge-carrito-modal {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    background: #ef4444;
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 700;
    border-radius: 999px;
    border: 2px solid #0b101e;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    pointer-events: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    animation: pulseBadgeCart 0.3s ease-out;
}

.badge-carrito-modal.badge-pill {
    padding: 0 5px;
    font-size: 10px;
}

@keyframes pulseBadgeCart {
    0% { transform: scale(0.6); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.modal-resenas-close-x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-resenas-close-x:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.45);
    color: #ef4444;
    transform: rotate(90deg);
}

/* Indicador de carga */
.modal-resenas-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 70px 20px;
    color: #94a3b8;
    gap: 16px;
    text-align: center;
}

.loader-spinner-resenas {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(212, 175, 55, 0.2);
    border-top-color: #d4af37;
    border-radius: 50%;
    animation: spinModalResenas 0.8s linear infinite;
}

@keyframes spinModalResenas {
    to { transform: rotate(360deg); }
}

.modal-resenas-content {
    animation: fadeInModalContent 0.25s ease-out;
}

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

/* ============================================================== */
/* 2. BARRA SUPERIOR DE NAVEGACIÓN Y RETORNO                      */
/* ============================================================== */
.resenas-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 20px;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    gap: 15px;
}

.btn-volver-catalogo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    color: #cbd5e1;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-volver-catalogo:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.45);
    color: #ffffff;
    transform: translateX(-3px);
}

.btn-volver-catalogo i {
    font-size: 13px;
    color: #d4af37;
    transition: transform 0.2s ease;
}

.btn-volver-catalogo:hover i {
    transform: translateX(-2px);
}

.migaja-categoria {
    font-size: 13px;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.03);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.migaja-categoria i {
    color: #d4af37;
    font-size: 12px;
}

/* ============================================================== */
/* 3. HERO DEL PRODUCTO (VITRINA DE LUJO)                         */
/* ============================================================== */
.producto-hero-wrapper {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 35px;
    align-items: start;
    padding: 24px;
    background: linear-gradient(145deg, rgba(22, 33, 56, 0.45) 0%, rgba(15, 23, 42, 0.75) 100%);
    border: 1px solid rgba(212, 175, 55, 0.22);
    border-radius: 18px;
    margin-bottom: 35px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.producto-hero-media {
    width: 100%;
}

.info-producto-imagen {
    width: 100%;
}

.media-container {
    position: relative;
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    background: #080d1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.media-container img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.media-container:hover img {
    transform: scale(1.03);
}

.producto-hero-media .video-badge,
.media-container .video-badge {
    position: absolute !important;
    top: auto !important;
    bottom: 12px !important;
    right: 12px !important;
    left: auto !important;
    height: auto !important;
    max-height: 32px !important;
    background: rgba(11, 16, 30, 0.85);
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: #ffd700;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(6px);
    z-index: 2;
    pointer-events: none;
}

/* Columna de Información Hero */
.producto-hero-info {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.producto-hero-badges {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.badge-tienda-hero {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 6px;
    color: #d4af37;
    font-size: 11.5px;
    font-weight: 700;
}

.badge-stock-hero {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
    flex-wrap: wrap;
    transition: all 0.25s ease;
}

.badge-stock-hero.en-stock {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
}

.badge-stock-hero.agotado {
    background: rgba(239, 68, 68, 0.18);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
}

.badge-stock-sep {
    color: rgba(52, 211, 153, 0.5);
    margin: 0 1px;
    font-weight: 700;
}

.badge-stock-var-item {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: all 0.2s ease;
}

.badge-stock-var-item strong {
    font-weight: 700;
    color: #6ee7b7;
}

.badge-stock-var-item.var-seleccionada {
    color: #ffffff;
    background: rgba(16, 185, 129, 0.28);
    padding: 1px 7px;
    border-radius: 5px;
    border: 1px solid rgba(52, 211, 153, 0.55);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}

.badge-stock-var-item.var-seleccionada strong {
    color: #ffffff;
}

.badge-stock-var-item.var-agotada {
    color: #f87171;
    opacity: 0.85;
}

.badge-stock-var-item.var-agotada strong {
    color: #fca5a5;
}

.producto-nombre-titulo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.25;
    margin: 0;
    letter-spacing: -0.3px;
}

.producto-hero-rating-preview {
    display: flex;
    align-items: center;
    gap: 10px;
}

.estrellas-hero-preview {
    color: #ffc107;
    font-size: 15px;
    display: inline-flex;
    gap: 3px;
}

.conteo-hero-preview {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 500;
}

/* Caja de Precio Hero */
.producto-hero-precio-box {
    margin-top: 4px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    display: inline-block;
    max-width: max-content;
}

.label-precio-hero {
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    display: block;
    margin-bottom: 2px;
}

.precio-hero-valor {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #d4af37;
    line-height: 1.1;
}

/* Selector de Variantes / Medidas / Tallas en Hero */
.producto-hero-variantes-box {
    margin-top: 6px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    max-width: 480px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.producto-hero-variantes-box.shake-animation {
    animation: shake-variantes-hero 0.45s ease-in-out;
    border-color: rgba(239, 68, 68, 0.6) !important;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.25);
}

@keyframes shake-variantes-hero {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.variantes-hero-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.variantes-hero-title {
    font-size: 12.5px;
    font-weight: 600;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.variantes-hero-title i {
    color: #d4af37;
    font-size: 12px;
}

.variantes-hero-status-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.variantes-hero-seleccionada-txt {
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
    transition: color 0.2s ease;
}

.variantes-hero-seleccionada-txt.active {
    color: #34d399;
}

.btn-quitar-seleccion-variante {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.32);
    border-radius: 6px;
    color: #fca5a5;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.btn-quitar-seleccion-variante:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: #ef4444;
    color: #ffffff;
    transform: translateY(-1px);
}

.variantes-hero-pills-wrap {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.variante-hero-btn {
    padding: 7px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.variante-hero-btn:hover:not(:disabled) {
    background: rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.45);
    color: #ffffff;
    transform: translateY(-2px);
}

.variante-hero-btn.selected {
    background: rgba(212, 175, 55, 0.22);
    border-color: #d4af37;
    color: #ffd700;
    font-weight: 700;
    box-shadow: 0 0 14px rgba(212, 175, 55, 0.35);
    transform: translateY(-1px);
}

.variante-hero-btn:disabled,
.variante-hero-btn.agotada {
    opacity: 0.42;
    background: rgba(239, 68, 68, 0.06);
    border-color: rgba(239, 68, 68, 0.25);
    color: #f87171;
    text-decoration: line-through;
    cursor: not-allowed;
    transform: none !important;
}

.variante-hero-btn .variante-precio-tag {
    font-size: 0.78rem;
    color: #d4af37;
    margin-left: 6px;
    font-weight: 500;
}

.variante-hero-btn.selected .variante-precio-tag {
    color: #fef08a;
    font-weight: 700;
}

.variante-hero-btn .variante-agotada-tag {
    font-size: 0.75rem;
    color: #f87171;
    margin-left: 5px;
}

/* Botón Comprar Hero */
.producto-hero-acciones {
    margin-top: 10px;
}

.btn-comprar-hero {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 320px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #d4af37 0%, #aa820a 100%);
    color: #0b101e;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 15.5px;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.35);
    transition: all 0.22s ease;
}

.btn-comprar-hero:hover:not(:disabled) {
    background: linear-gradient(135deg, #e5c158 0%, #be9416 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(212, 175, 55, 0.45);
}

.btn-comprar-hero:active:not(:disabled) {
    transform: translateY(0);
}

.btn-comprar-hero:disabled {
    background: #475569;
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-comprar-hero.btn-servicio-whatsapp {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.35);
}

.btn-comprar-hero.btn-servicio-whatsapp:hover {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.45);
}

/* ============================================================== */
/* 4. FICHA TÉCNICA Y DETALLES EXTENDIDOS (IA)                    */
/* ============================================================== */
.ficha-tecnica-card {
    background: linear-gradient(145deg, rgba(17, 24, 39, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 16px;
    padding: 26px 30px;
    margin-bottom: 35px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.ficha-tecnica-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 20px;
}

.ficha-tecnica-header i {
    color: #d4af37;
    font-size: 20px;
}

.ficha-tecnica-header h3 {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18.5px;
    font-weight: 700;
    color: #ffffff;
}

.ficha-tecnica-contenido {
    font-size: 14.5px;
    line-height: 1.8;
    color: #cbd5e1;
    white-space: pre-line;
}

.ficha-tecnica-contenido strong,
.ficha-tecnica-contenido b {
    color: #f8fafc;
    font-weight: 600;
}

/* ============================================================== */
/* 5. DASHBOARD DE CALIFICACIONES (SCOREBOARD)                    */
/* ============================================================== */
.resumen-calificacion-card {
    background: linear-gradient(145deg, rgba(22, 33, 56, 0.5) 0%, rgba(15, 23, 42, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 28px;
    margin-bottom: 35px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.resumen-header-titulo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.resumen-header-titulo i {
    color: #d4af37;
    font-size: 16px;
}

.resumen-body-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: center;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.resumen-general {
    flex: 1 1 220px;
    text-align: center;
    padding-right: 25px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.calificacion-promedio-numero {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 3.8rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    letter-spacing: -1px;
}

.calificacion-promedio-estrellas {
    margin-top: 8px;
    font-size: 1.35rem;
    color: #ffc107;
    display: inline-flex;
    gap: 4px;
}

.total-reseñas-texto {
    margin-top: 8px;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 500;
}

.distribucion-calificaciones {
    flex: 2 1 280px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fila-distribucion {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.18s ease;
    user-select: none;
}

.fila-distribucion:hover {
    background: rgba(255, 255, 255, 0.04);
}

.etiqueta-calificacion {
    flex-basis: 42px;
    font-size: 13px;
    font-weight: 600;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 4px;
}

.etiqueta-calificacion i {
    color: #ffc107;
    font-size: 12px;
}

.barra-contenedor {
    flex-grow: 1;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    overflow: hidden;
}

.barra-progreso {
    height: 100%;
    background: linear-gradient(90deg, #d4af37 0%, #f59e0b 100%);
    border-radius: 6px;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.porcentaje-calificacion {
    flex-basis: 36px;
    font-size: 12.5px;
    font-weight: 600;
    color: #94a3b8;
    text-align: right;
    font-family: 'Space Grotesk', sans-serif;
}

/* Filtro interactivo por estrellas */
.filtros-resenas-row {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.filtros-label {
    font-size: 12.5px;
    color: #94a3b8;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.filtros-label i {
    color: #d4af37;
}

.filtros-pills-container {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filtro-pill {
    padding: 5px 13px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.18s ease;
}

.filtro-pill:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.4);
    color: #ffffff;
}

.filtro-pill.active {
    background: #d4af37;
    border-color: #d4af37;
    color: #0b101e;
    font-weight: 700;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.35);
}

/* ============================================================== */
/* 6. FORMULARIO PARA AÑADIR UNA NUEVA RESEÑA                     */
/* ============================================================== */
.form-reseña-wrapper {
    background: linear-gradient(145deg, rgba(22, 33, 56, 0.6) 0%, rgba(15, 23, 42, 0.85) 100%);
    border: 1px solid rgba(212, 175, 55, 0.28);
    border-radius: 18px;
    padding: 30px;
    margin-bottom: 35px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

.form-reseña-header h2 {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-reseña-header h2 i {
    color: #d4af37;
}

.form-reseña-subtitulo {
    font-size: 13.5px;
    color: #94a3b8;
    margin: 6px 0 20px 0;
}

.campo-form {
    margin-bottom: 20px;
}

.campo-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 13.5px;
    font-weight: 600;
    color: #f1f5f9;
}

/* Selector de Estrellas Interactivo */
.rating-input-container {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.rating-input {
    display: inline-flex;
    gap: 6px;
}

.rating-input .fa-star {
    font-size: 30px;
    color: #475569;
    cursor: pointer;
    transition: color 0.18s, transform 0.18s;
}

.rating-input .fa-star:hover {
    transform: scale(1.22);
}

.rating-input .fa-star.filled {
    color: #ffc107;
    filter: drop-shadow(0 0 4px rgba(255, 193, 7, 0.4));
}

.rating-feedback-badge {
    font-size: 12.5px;
    font-weight: 700;
    color: #ffd700;
    background: rgba(212, 175, 55, 0.14);
    border: 1px solid rgba(212, 175, 55, 0.3);
    padding: 4px 12px;
    border-radius: 14px;
    transition: all 0.2s ease;
}

.campo-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background-color: #0b101e;
    color: #f1f5f9;
    font-family: inherit;
    font-size: 14.5px;
    line-height: 1.6;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    resize: vertical;
}

.campo-form textarea:focus {
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.btn-publicar-resena {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #d4af37 0%, #aa820a 100%);
    color: #0b101e;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
}

.btn-publicar-resena:hover {
    background: linear-gradient(135deg, #e5c158 0%, #be9416 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.45);
}

/* Tarjetas de Autenticación / Compra Requerida */
.mensaje-auth-card {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 35px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.auth-card-icono {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: #d4af37;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.auth-card-texto {
    flex: 1;
    min-width: 0;
}

.auth-card-texto h3 {
    margin: 0 0 4px 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 16.5px;
    font-weight: 700;
    color: #ffffff;
}

.auth-card-texto p {
    margin: 0;
    font-size: 13.5px;
    color: #94a3b8;
}

.btn-auth-accion {
    padding: 10px 20px;
    background: #d4af37;
    color: #0b101e;
    font-weight: 700;
    font-size: 13.5px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-auth-accion:hover {
    background: #ffd700;
    transform: translateY(-1px);
}

.mensaje-compra-card .auth-card-icono {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.3);
    color: #38bdf8;
}

/* ============================================================== */
/* 7. LISTADO DE RESEÑAS                                          */
/* ============================================================== */
.lista-reseñas-wrapper {
    margin-top: 10px;
}

.lista-reseñas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 24px;
}

.lista-reseñas-header h2 {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lista-reseñas-header h2 i {
    color: #d4af37;
}

.total-resenas-counter-badge {
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.lista-reseñas-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Tarjeta individual de reseña */
.reseña-card {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 22px;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.reseña-card:hover {
    background: rgba(255, 255, 255, 0.055);
    border-color: rgba(212, 175, 55, 0.3);
    transform: translateY(-2px);
}

.reseña-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.reseña-usuario-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reseña-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #d4af37;
    background: #1e293b;
    flex-shrink: 0;
}

.reseña-avatar-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 2px solid #d4af37;
    color: #d4af37;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.reseña-meta-col {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.reseña-autor-nombre {
    font-weight: 700;
    font-size: 15px;
    color: #ffffff;
}

.badge-verificado {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #34d399;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.28);
    padding: 1px 7px;
    border-radius: 4px;
    width: max-content;
}

.reseña-fecha-tag {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
}

.reseña-estrellas-row {
    color: #ffc107;
    font-size: 14px;
    margin-bottom: 12px;
    display: inline-flex;
    gap: 3px;
}

.reseña-comentario-texto {
    font-size: 14px;
    line-height: 1.65;
    color: #cbd5e1;
    margin: 0;
    white-space: pre-line;
}

/* ============================================================== */
/* 8. PRODUCTOS RELACIONADOS                                      */
/* ============================================================== */
.productos-relacionados-seccion {
    margin-top: 45px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.relacionados-titulo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.relacionados-titulo i {
    color: #d4af37;
}

.relacionados-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.producto-relacionado-card {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.2s ease;
}

.producto-relacionado-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(212, 175, 55, 0.4);
    transform: translateY(-3px);
}

.producto-relacionado-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 12px;
    background: #080d1a;
}

.producto-relacionado-nombre {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 8px 0;
    line-height: 1.3;
    height: 36px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.producto-relacionado-precio {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #d4af37;
    margin-bottom: 12px;
}

.btn-ver-relacionado {
    width: 100%;
    padding: 8px 14px;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 8px;
    color: #ffd700;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-ver-relacionado:hover {
    background: #d4af37;
    color: #0b101e;
    font-weight: 700;
}

/* ============================================================== */
/* 9. RESPONSIVIDAD PARA TABLETS Y MÓVILES                        */
/* ============================================================== */
@media (max-width: 850px) {
    /* Barra de navegación inferior móvil visible sobre el modal de reseñas */
    body.modal-resenas-abierto .bottom-nav-bar {
        display: flex !important;
        z-index: 100030 !important;
    }

    /* Overlay 100% pantalla completa en móviles sin ningún espacio */
    .modal-resenas-overlay {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        width: 100vw !important;
        height: 100% !important;
        height: 100vh !important;
        height: 100dvh !important;
        padding: 0 !important;
        margin: 0 !important;
        align-items: stretch !important;
        justify-content: stretch !important;
        z-index: 100020 !important;
    }

    /* Contenedor 100% de alto y ancho en móviles (con espacio para la barra de navegación) */
    .modal-resenas-container {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        width: 100vw !important;
        max-width: 100% !important;
        height: 100% !important;
        height: 100vh !important;
        height: 100dvh !important;
        min-height: 100% !important;
        min-height: 100vh !important;
        min-height: 100dvh !important;
        max-height: 100% !important;
        max-height: 100vh !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 16px calc(76px + env(safe-area-inset-bottom, 20px)) 16px !important;
        margin: 0 !important;
        transform: translateY(100%);
        transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        background: #0b101e !important;
    }

    .modal-resenas-overlay.activo .modal-resenas-container {
        transform: translateY(0) !important;
    }

    .modal-resenas-drag-handle {
        display: none !important;
    }

    .modal-resenas-top-bar {
        position: sticky !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 50 !important;
        background: rgba(11, 16, 30, 0.98) !important;
        backdrop-filter: blur(14px) !important;
        -webkit-backdrop-filter: blur(14px) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        margin: 0 -16px 16px -16px !important;
        padding: max(12px, env(safe-area-inset-top, 12px)) 16px 12px 16px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    .reseñas-container {
        width: 95%;
        padding: 20px 18px;
        border-radius: 16px;
    }

    .producto-hero-wrapper {
        grid-template-columns: 1fr;
        gap: 22px;
        padding: 18px;
    }

    .media-container {
        max-width: 320px;
        margin: 0 auto;
    }

    .producto-hero-info {
        text-align: center;
        align-items: center;
    }

    .producto-nombre-titulo {
        font-size: 22px;
    }

    .producto-hero-badges {
        justify-content: center;
    }

    .producto-hero-rating-preview {
        justify-content: center;
    }

    .resumen-body-grid {
        flex-direction: column;
    }

    .resumen-general {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        padding-right: 0;
        padding-bottom: 20px;
        width: 100%;
    }

    .distribucion-calificaciones {
        width: 100%;
    }
}

@media (max-width: 680px) {
    /* Adaptación vertical y centrada de tarjetas de autenticación / compra requerida en móviles */
    .mensaje-auth-card {
        flex-direction: column !important;
        text-align: center !important;
        align-items: center !important;
        padding: 22px 18px !important;
        gap: 14px !important;
        margin-bottom: 24px !important;
    }

    .auth-card-icono {
        width: 48px !important;
        height: 48px !important;
        font-size: 20px !important;
        margin: 0 auto !important;
        flex-shrink: 0 !important;
    }

    .auth-card-texto {
        width: 100% !important;
        text-align: center !important;
    }

    .auth-card-texto h3 {
        font-size: 16.5px !important;
        margin-bottom: 6px !important;
        line-height: 1.35 !important;
        text-align: center !important;
    }

    .auth-card-texto p {
        font-size: 13.5px !important;
        line-height: 1.45 !important;
        color: #94a3b8 !important;
        text-align: center !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
    }

    .btn-auth-accion {
        width: 100% !important;
        max-width: 260px !important;
        padding: 11px 20px !important;
        font-size: 14px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin-top: 4px !important;
        border-radius: 10px !important;
    }
}

@media (max-width: 480px) {
    .modal-resenas-container {
        padding: 0 12px calc(76px + env(safe-area-inset-bottom, 20px)) 12px !important;
    }

    .modal-resenas-top-bar {
        margin: 0 -12px 14px -12px !important;
        padding: max(10px, env(safe-area-inset-top, 10px)) 12px 10px 12px !important;
    }

    .btn-volver-catalogo {
        width: 38px !important;
        height: 38px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        justify-content: center !important;
    }

    .btn-volver-catalogo span {
        display: none !important;
    }

    .btn-volver-catalogo i {
        font-size: 15px !important;
        margin: 0 !important;
    }

    .migaja-categoria {
        font-size: 12px !important;
        padding: 5px 10px !important;
        max-width: 140px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .modal-resenas-top-acciones {
        gap: 8px !important;
    }

    .btn-carrito-modal-resenas,
    .modal-resenas-close-x {
        width: 38px !important;
        height: 38px !important;
    }

    .reseñas-container {
        width: 100%;
        margin: 10px auto;
        padding: 16px 14px;
        border-radius: 12px;
    }

    .mensaje-auth-card {
        padding: 18px 14px !important;
        gap: 12px !important;
        border-radius: 14px !important;
    }

    .auth-card-icono {
        width: 44px !important;
        height: 44px !important;
        font-size: 18px !important;
    }

    .auth-card-texto h3 {
        font-size: 15.5px !important;
    }

    .auth-card-texto p {
        font-size: 13px !important;
    }

    .btn-auth-accion {
        max-width: 100% !important;
        width: 100% !important;
    }

    .producto-nombre-titulo {
        font-size: 19px;
    }

    .precio-hero-valor {
        font-size: 24px;
    }

    .btn-comprar-hero {
        width: 100%;
        max-width: 100%;
    }

    .calificacion-promedio-numero {
        font-size: 3.2rem;
    }

    .rating-input .fa-star {
        font-size: 26px;
    }
}
