/* =========================================================
   ESTILOS SINGLE PRODUCT REESTRUCTURADO - BEATLATIN
   Look & Feel: Glassmorphism Ultra Premium Tipo Apple Music
   ========================================================= */

:root {
    --apple-red: #D90C0C; 
    --glass-border: rgba(255, 255, 255, 0.08);
}

.remix-hero-container-glass {
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 24px !important;
    padding: 25px 35px !important;
    margin-bottom: 50px;
    font-family: 'Sora', sans-serif;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6) !important;
}

.remix-hero-row { 
    display: flex; 
    align-items: center; 
    gap: 30px; 
    flex-wrap: nowrap; 
}

/* AVATAR INTERACTIVO DEL HERO */
.col-play-avatar {
    flex: 0 0 100px;
    width: 100px;
    height: 100px;
}

.dj-avatar-interactive {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #111;
    cursor: pointer;
}

.avatar-img-single {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: all 0.3s ease;
}

.dj-avatar-interactive .dj-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.dj-avatar-interactive:hover .dj-play-overlay {
    opacity: 1 !important;
}

.dj-avatar-interactive .dj-play-overlay i {
    color: #ffffff !important;
    font-size: 20px !important;
}

/* Sincronización del avatar con el reproductor global */
.remix-hero-row.now-playing:not(.is-paused) .dj-play-overlay { opacity: 1 !important; }
.remix-hero-row.now-playing:not(.is-paused) .dj-play-overlay .pause-icon { display: block !important; }
.remix-hero-row.now-playing:not(.is-paused) .dj-play-overlay .play-icon { display: none !important; }
.remix-hero-row.is-paused .dj-play-overlay { opacity: 1 !important; }
.remix-hero-row.is-paused .dj-play-overlay .play-icon { display: block !important; }
.remix-hero-row.is-paused .dj-play-overlay .pause-icon { display: none !important; }

/* FORZAR VISIBILIDAD EN HOVER EXCLUSIVO DEL AVATAR */
.dj-avatar-interactive:hover .dj-play-overlay .play-icon { display: block !important; }
.remix-hero-row.now-playing:not(.is-paused) .dj-avatar-interactive:hover .dj-play-overlay .pause-icon { display: block !important; }
.remix-hero-row.now-playing:not(.is-paused) .dj-avatar-interactive:hover .dj-play-overlay .play-icon { display: none !important; }
.remix-hero-row.is-paused .dj-avatar-interactive:hover .dj-play-overlay .play-icon { display: block !important; }
.remix-hero-row.is-paused .dj-avatar-interactive:hover .dj-play-overlay .pause-icon { display: none !important; }

/* TEXTOS DEL HERO */
.hero-title { 
    font-size: 20px !important; 
    color: #ffffff !important; 
    font-weight: 700 !important; 
    margin: 0 !important;
}
.hero-dj { 
    color: var(--apple-red) !important; 
    font-weight: 700 !important; 
    font-size: 12px !important; 
    text-transform: uppercase; 
    display: block; 
    margin-bottom: 4px; 
}

.col-meta { display: flex; gap: 30px; margin-left: auto; align-items: center; }
.meta-item { text-align: center; color: #aaaaaa; font-size: 14px; font-weight: 600; }
.meta-item span { display: block; color: #444; font-size: 9px; margin-bottom: 5px; text-transform: uppercase; }

/* =========================================================
   --- TITULO INTERMEDIO DE VERSIONES MEJORADO ---
   ========================================================= */
.rel-title-custom {
    text-align: center !important;
    font-size: 22px !important; 
    font-weight: 500 !important; 
    margin: 50px 0 35px 0 !important;
    color: rgba(255, 255, 255, 0.6) !important; 
    font-family: 'Sora', sans-serif !important;
    text-transform: none !important; 
    letter-spacing: 0.5px;
}

.rel-title-custom span { 
    color: #ffffff !important; 
    font-weight: 800 !important;
}
.rel-title-custom::after { display: none !important; }

/* =========================================================
   --- ESTRUCTURA NATIVA Y PROPIA DE LA TABLA SINGLE ---
   ========================================================= */
#dj-remix-table {
    width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    margin-top: 15px;
}

#dj-remix-table th {
    color: rgba(255, 255, 255, 0.3) !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    padding: 15px 10px !important;
    border-bottom: 1px solid var(--glass-border) !important;
    text-align: center;
    font-weight: 600;
}

/* Alineaciones específicas de los encabezados text-align */
#dj-remix-table th:nth-child(2) { text-align: left; } /* REMIXER */
#dj-remix-table th:nth-child(3) { text-align: left; } /* TITLE */

#dj-remix-table tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    transition: background 0.2s ease;
}

#dj-remix-table td {
    padding: 18px 10px !important;
    font-size: 13px !important;
    vertical-align: middle !important;
    text-align: center; /* Centrado general de datos técnicos */
}

/* Comportamiento de las columnas de texto */
#dj-remix-table td:nth-child(2) { text-align: left; } /* Columna Remixer */
#dj-remix-table td:nth-child(3) { text-align: left; } /* Columna Title */

/* =========================================================
   --- CONTROL DE ICONOS EN LA TABLA (COMPORTAMIENTO SEGURO) ---
   ========================================================= */
.remix-table .remix-row:hover .dj-play-overlay { opacity: 1 !important; }
.remix-table .remix-row:not(.now-playing):hover .dj-play-overlay .play-icon { display: block !important; }
.remix-table .remix-row.now-playing:not(.is-paused) .dj-play-overlay .pause-icon { display: block !important; }
.remix-table .remix-row.now-playing:not(.is-paused) .dj-play-overlay .play-icon { display: none !important; }
.remix-table .remix-row.is-paused .dj-play-overlay .play-icon { display: block !important; }
.remix-table .remix-row.is-paused .dj-play-overlay .pause-icon { display: none !important; }

/* =========================================================
   ANCHOS AISLADOS EXCLUSIVOS PARA LA TABLA DE VERSIONES DEL SINGLE
   (Estructura de 8 Columnas - Contenedor: .Related-version-table)
   ========================================================= */
@media (min-width: 1024px) {
    /* Forzamos que estas medidas se apliquen ÚNICAMENTE a la tabla de abajo del single */
    .Related-version-table #dj-remix-table th:nth-child(1),
    .Related-version-table #dj-remix-table td:nth-child(1) { width: 75px !important; text-align: center; } /* PLAY */
    
    .Related-version-table #dj-remix-table th:nth-child(2),
    .Related-version-table #dj-remix-table td:nth-child(2) { width: 15% !important; text-align: left; }   /* REMIXER */
    
    .Related-version-table #dj-remix-table th:nth-child(3),
    .Related-version-table #dj-remix-table td:nth-child(3) { width: 25% !important; text-align: left; }   /* TITLE */
    
    .Related-version-table #dj-remix-table th:nth-child(4),
    .Related-version-table #dj-remix-table td:nth-child(4) { width: 145px !important; text-align: center; } /* VERSION */
    
    .Related-version-table #dj-remix-table th:nth-child(5),
    .Related-version-table #dj-remix-table td:nth-child(5) { width: 80px !important; text-align: center; }  /* BPM */
    
    .Related-version-table #dj-remix-table th:nth-child(6),
    .Related-version-table #dj-remix-table td:nth-child(6) { width: 120px !important; text-align: center; } /* GENRE */
    
    .Related-version-table #dj-remix-table th:nth-child(7),
    .Related-version-table #dj-remix-table td:nth-child(7) { width: 110px !important; text-align: center; } /* DATE */
    
    .Related-version-table #dj-remix-table th:nth-child(8),
    .Related-version-table #dj-remix-table td:nth-child(8) { width: 120px !important; text-align: center; } /* PURCHASE */
}

/* RESALTADO EXCLUSIVO PARA LA COLUMNA DE VERSIONES */
.cell-version-highlight {
    color: #ffffff !important; 
    font-weight: 700 !important;
}

/* =========================================================
   ESTADO BASE DE LAS CELDAS DE LA TABLA
   ========================================================= */

/* Todas las celdas (Título, BPM, Género, Fecha, etc.) van en gris fijo */
#dj-remix-table td,
.remix-title-text {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* El Remixer (DJ) empieza en gris pero preparado para moverse */
.remixer-link {
    color: rgba(255, 255, 255, 0.5) !important;
    display: inline-block !important;
    text-decoration: none !important;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), color 0.3s ease !important;
    will-change: transform, color;
}

/* COLUMNA VERSIÓN: Resaltada siempre en Blanco Total Fijo */
.cell-version-highlight {
    color: #ffffff !important; 
    font-weight: 600 !important;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
}

/* =========================================================
   COMPORTAMIENTO EXCLUSIVO EN EL HOVER DE LA FILA
   ========================================================= */

/* ÚNICAMENTE el Remixer se desliza 6px y cambia a rojo corporativo en hover */
.remix-row:hover .remixer-link {
    color: var(--apple-red) !important;
    transform: translateX(6px) !important; 
}

/* El Título y las demás celdas se quedan completamente quietas y en su color gris */
.remix-row:hover .remix-title-text,
.remix-row:hover td {
    transform: none !important;
}

/* =========================================================
   ESTADO CUANDO EL TRACK ESTÁ SONANDO (REPRODUCTOR GLOBAL)
   ========================================================= */

/* Se mantiene el fondo sutil para saber cuál está seleccionada */
.remix-row.now-playing { 
    background: rgba(217, 12, 12, 0.08) !important; 
}

/* ¡CORREGIDO! Bloqueamos por completo el color rojo en el título al reproducir.
   Se queda fijado en el mismo gris sutil que los demás */
.remix-row.now-playing .remix-title-text,
.remix-row.now-playing td {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* =========================================================
   --- RESTRUCTURACIÓN COMPLETA DE PAGINACIÓN ---
   ========================================================= */
.dj-pagination {
    display: flex !important;
    justify-content: center !important;
    padding: 40px 0 !important;
    width: 100% !important;
}

.dj-pagination .pagination-wrapper {
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
    align-items: center !important;
    background: transparent !important; 
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 auto !important;
    width: auto !important;
}

.single-pag-btn {
    min-width: 40px !important;
    height: 40px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 10px !important; 
    color: #888 !important; 
    font-family: 'Sora', sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    transform: none !important;
}

.single-pag-btn.prev, 
.single-pag-btn.next {
    width: 40px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #888 !important;
    font-size: 14px !important;
}

.single-pag-btn:hover:not(:disabled) {
    background: #ffffff !important;
    color: #000000 !important;
    border-color: #ffffff !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2) !important;
}

.single-pag-btn.active {
    background: #ffffff !important;
    color: #000000 !important;
    border-color: #ffffff !important;
    box-shadow: none !important;
    transform: none !important; 
}

.single-pag-btn:disabled {
    opacity: 0.15 !important;
    cursor: not-allowed !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    transform: none !important;
}

/* =========================================================
   --- ADAPTACIÓN MÓVIL SÓLO EN PLAY | TITLE | PURCHASE ---
   ========================================================= */
@media screen and (max-width: 768px) {
    .remix-hero-container-glass { padding: 30px 20px !important; margin-bottom: 35px !important; border-radius: 20px !important; }
    .remix-hero-row { flex-direction: column !important; align-items: center !important; text-align: center !important; gap: 25px !important; width: 100% !important; }
    .col-play-avatar { flex: 0 0 85px !important; width: 85px !important; height: 85px !important; margin-bottom: 5px !important; }
    .col-main-info { width: 100% !important; padding: 0 !important; }
    .hero-dj { font-size: 12px !important; margin-bottom: 8px !important; letter-spacing: 1px !important; }
    .hero-title { font-size: 21px !important; line-height: 1.4 !important; font-weight: 700 !important; color: #ffffff !important; white-space: normal !important; word-break: normal !important; }
    .col-meta { display: grid !important; grid-template-columns: repeat(3, 1fr) !important; gap: 20px 10px !important; width: 100% !important; margin: 10px 0 !important; padding: 0 !important; background: transparent !important; border: none !important; }
    .meta-item { text-align: center !important; font-size: 13px !important; font-weight: 700 !important; color: #ffffff !important; }
    .meta-item span { font-size: 9px !important; color: rgba(255, 255, 255, 0.3) !important; margin-bottom: 5px !important; text-transform: uppercase !important; }
    .item-highlighted { grid-column: span 3 !important; padding-bottom: 12px !important; border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important; margin-bottom: 5px !important; }
    .col-buy { width: 100% !important; display: flex !important; flex-direction: column !important; align-items: center !important; margin-top: 5px !important; }
    .col-buy .edd-add-to-cart, .col-buy .edd-submit { display: inline-flex !important; width: 100% !important; max-width: 290px !important; height: 46px !important; align-items: center !important; justify-content: center !important; border-radius: 50px !important; font-size: 13px !important; font-weight: 600 !important; margin: 0 !important; box-sizing: border-box !important; }
    .col-buy input.edd-no-js, .col-buy .edd_go_to_checkout, .col-buy .edd-cart-added-alert, .col-buy span.edd-cart-added-alert { display: none !important; }
    
    .remix-table tr { display: table-row !important; }
    #dj-remix-table th:nth-child(2), #dj-remix-table td:nth-child(2), #dj-remix-table th:nth-child(4), #dj-remix-table td:nth-child(4), #dj-remix-table th:nth-child(5), #dj-remix-table td:nth-child(5), #dj-remix-table th:nth-child(6), #dj-remix-table td:nth-child(6), #dj-remix-table th:nth-child(7), #dj-remix-table td:nth-child(7) { display: none !important; }
    #dj-remix-table th:nth-child(1), #dj-remix-table td:nth-child(1) { width: 75px !important; display: table-cell !important; text-align: center !important; vertical-align: middle !important; }
    #dj-remix-table th:nth-child(3), #dj-remix-table td:nth-child(3) { width: auto !important; display: table-cell !important; text-align: left !important; font-size: 13px !important; white-space: normal !important; line-height: 1.4 !important; }
    #dj-remix-table th:nth-child(8), #dj-remix-table td:nth-child(8) { width: 100px !important; display: table-cell !important; text-align: center !important; vertical-align: middle !important; }
    #dj-remix-table td:last-child .edd-add-to-cart { font-size: 11px !important; padding: 6px 10px !important; min-width: 65px !important; height: auto !important; border-radius: 50px !important; }
}