/* Estándar ISO El Nexo - Detalle PC */

:root {
    /* Color Tema Base (Azul por defecto) */
    --color-tema: var(--nexo-pc); 
    
    /* Herencia del General */
    --fondo-body: var(--fondo-body);
    --texto-negro: var(--texto-negro);
    --fondo-tarjeta: var(--fondo-tarjeta);
    --gris-fondo-btn: var(--gris-fondo-boton);
    --gris-borde-h1: #e0e0e0;
    --texto-gris: var(--texto-gris);
    
    /* Variables Locales */
    --bg-tech-notes: #f4f4f4;
    --bg-comp-action-mobile: #f9f9f9;
    --chart-bg: #1a1a1a;
    --chart-text: #ffffff;
}

/* Reset */
* {
    box-sizing: border-box;
}

html,
body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    overflow-x: hidden;
}

body {
    background-color: var(--fondo-body);
    color: var(--texto-negro);
    font-family: 'Montserrat', Arial, sans-serif;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Header y Navegación */
.header-detalle {
    padding: 2rem 20px;
    max-width: 1000px;
    margin: 0 auto;
    text-align: left;
    margin-top: 2rem;
}

.breadcrumb {
    font-size: 0.9rem;
    color: var(--texto-gris);
    font-weight: 600;
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: var(--color-tema);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.current-page {
    color: var(--texto-negro);
    font-weight: 800;
}

/* Contenedor Principal */
.detalle-container {
    max-width: 1000px;
    margin: 0 auto 5rem auto;
    padding: 0 20px;
    text-align: left;
}

/* Héroe de la Build */
.build-hero {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    align-items: center;
    margin-bottom: 4rem;
}

.build-image {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
}

.build-image img {
    width: 100%;
    height: auto;
    max-width: 450px;     
    border-radius: 20px;
    border: 2px solid #000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    object-fit: cover;     
}

.build-info {
    flex: 1.5;
    min-width: 300px;
}

.build-title {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 900;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    color: var(--color-tema);
    border-bottom: 2px solid var(--gris-borde-h1);
    display: inline-block;
    padding-bottom: 10px;
}

.badge-year {
    background: var(--color-tema);
    color: white;
    font-size: 0.4em;
    padding: 5px 12px;
    border-radius: 8px;
    vertical-align: middle;
    margin-left: 10px;
    position: relative;
    top: -10px;
}

.build-subtitle {
    font-size: 1.1rem;
    color: var(--texto-gris);
    margin-bottom: 2rem;
    font-weight: 500;
}

/* Estadísticas Rápidas */
.build-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.stat-box {
    background: var(--fondo-tarjeta);
    border: 2px solid #c1c1c1;
    padding: 1rem;
    border-radius: 12px;
    flex: 1;
    min-width: 120px;
    text-align: center;
    transition: transform 0.2s;
}

.stat-box:hover {
    transform: translateY(-3px);
    border-color: var(--color-tema);
}

.stat-box .label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--texto-gris);
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-box .value {
    display: block;
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--texto-negro);
}

/* Botón Comprar Todo */
.btn-buy-all {
    display: block;
    background: #FF9900;
    color: black;
    padding: 1.2rem 2rem;
    font-weight: 900;
    text-decoration: none;
    border-radius: 12px;
    border: 2px solid #000;
    text-transform: uppercase;
    font-size: 1.1rem;
    transition: all 0.2s;
    text-align: center;
    box-shadow: 4px 4px 0px rgba(0,0,0,1);
}

.btn-buy-all:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px rgba(0,0,0,1);
    background: #ffad33;
}

/* Lista de Componentes */
.divider {
    border: 0;
    border-top: 2px solid var(--gris-borde-h1);
    margin: 3rem 0;
}

h2 {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 900;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    color: var(--texto-negro);
}

.disclaimer {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    padding: 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    display: block;
}

.component-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    background: var(--fondo-tarjeta);
    border: 1px solid #c1c1c1;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    gap: 1.5rem;
    transition: all 0.2s;
}

.component-item:hover {
    border-color: var(--color-tema);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transform: translateX(5px);
}

.comp-type {
    font-weight: 900;
    font-size: 0.9rem;
    color: var(--color-tema);
    width: 120px;
    text-transform: uppercase;
    opacity: 0.8;
}

.comp-details {
    flex: 1;
    min-width: 200px;
}

.comp-name {
    font-weight: 800;
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
    color: var(--texto-negro);
    display: block;
}

.comp-specs {
    font-size: 0.9rem;
    color: var(--texto-gris);
    margin-bottom: 0.5rem;
    display: block;
}

.comp-reason {
    font-size: 0.85rem;
    border-left: 3px solid var(--color-tema);
    padding-left: 10px;
    margin-top: 8px;
    font-style: italic;
    color: var(--texto-gris);
    display: block;
}

.comp-action {
    text-align: right;
    min-width: 140px;
}

.comp-action .price {
    display: block;
    font-weight: 900;
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--texto-negro);
}

.btn-shop {
    display: inline-block;
    padding: 10px 20px;
    background: #fff;
    color: var(--texto-negro);
    text-decoration: none;
    border-radius: 8px;
    border: 2px solid #000;
    font-size: 0.85rem;
    font-weight: 800;
    transition: all 0.2s;
    text-transform: uppercase;
}

.btn-shop:hover {
    background: var(--color-tema);
    color: #fff;
    border-color: var(--color-tema);
}

/* Gráfico de Rendimiento */
.performance-chart {
    margin: 4rem 0;
    background: var(--chart-bg);
    color: var(--chart-text);
    padding: 2.5rem;
    border-radius: 20px;
    border: 2px solid #333;
}

.performance-chart h2 {
    color: var(--chart-text);
    margin-bottom: 2rem;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
    display: inline-block;
}

.chart-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.bar-group {
    display: flex;
    flex-direction: column;
}

.game-name {
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: #ccc;
}

.bar-fill {
    background: linear-gradient(90deg, var(--color-tema), #888);
    height: 35px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    padding-left: 15px;
    font-size: 0.9rem;
    font-weight: 900;
    color: white;
    white-space: nowrap;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    width: 0;
    animation: growBar 1.5s ease-out forwards;
    min-width: 40px;
}

@keyframes growBar {
    to {
        width: var(--w);
    }
}

/* Notas Técnicas */
.tech-notes {
    background: var(--bg-tech-notes);
    padding: 2rem;
    border-radius: 15px;
    border-left: 6px solid var(--color-tema);
    margin-bottom: 4rem;
}

.tech-notes h3 {
    margin-top: 0;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--texto-negro);
}

.notes-list {
    list-style: none;
    padding: 0;
}

.notes-list li {
    margin-bottom: 12px;
    padding-left: 25px;
    position: relative;
    font-size: 0.95rem;
    color: var(--texto-negro);
}

.notes-list li::before {
    content: "•";
    color: var(--color-tema);
    font-weight: bold;
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: -6px;
}

/* Escudo AdSense */
.detalle-container .google-auto-placed {
    display: none !important;
}

/* Modo oscuro */
body.dark-mode {
    --color-tema: #66b3ff;
    --texto-negro: #ffffff;
    --texto-gris: #a1a1aa;
    
    /* Variables Locales Dark */
    --fondo-tarjeta: #27272a;
    --bg-tech-notes: #27272a;
    --bg-comp-action-mobile: #1a1a1a;
    --chart-bg: #18181b;
}

/* Header */
body.dark-mode .build-title {
    color: var(--color-tema);
    border-bottom-color: #444;
}

body.dark-mode .breadcrumb {
    color: #aaa;
}

body.dark-mode .current-page {
    color: #fff;
}

/* Estadísticas */
body.dark-mode .stat-box {
    background-color: #27272a;
    border-color: #444;
}

body.dark-mode .stat-box:hover {
    border-color: var(--color-tema);
}

body.dark-mode .stat-box .value {
    color: #fff;
}

/* Lista de Componentes */
body.dark-mode .component-item {
    background-color: #27272a;
    border-color: #444;
}

body.dark-mode .component-item:hover {
    border-color: var(--color-tema);
    background-color: #1a1a1a;
    box-shadow: 0 4px 15px rgba(102, 179, 255, 0.15);
}

body.dark-mode .comp-name {
    color: #fff;
}

body.dark-mode .comp-specs {
    color: #ccc;
}

body.dark-mode .comp-reason {
    color: #aaa;
    border-left-color: var(--color-tema);
}

body.dark-mode .comp-action .price {
    color: #66b3ff;
}

/* Botones */
body.dark-mode .btn-shop {
    background: #18181b;
    color: #fff;
    border-color: #555;
}

body.dark-mode .btn-shop:hover {
    background: var(--color-tema);
    color: #000;
    border-color: var(--color-tema);
}

body.dark-mode .btn-buy-all {
    background: #e68a00;
    color: #000;
    border-color: #fff;
}

body.dark-mode .btn-buy-all:hover {
    background: #ffad33;
    box-shadow: 6px 6px 0px #fff;
}

/* Notas Técnicas */
body.dark-mode .tech-notes {
    background-color: #202022;
    border-left-color: var(--color-tema);
}

body.dark-mode .tech-notes h3 {
    color: #fff;
}

body.dark-mode .notes-list li {
    color: #ddd;
}

/* Gráfico */
body.dark-mode .performance-chart {
    border-color: #444;
}

body.dark-mode .game-name {
    color: #fff;
}

/* Imágenes */
body.dark-mode .build-image img {
    border-color: #555;
}

/* Responsive */
@media (max-width: 768px) {
    .header-detalle {
        padding: 1rem 20px;
    }
    
    .build-hero {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .build-title {
        font-size: 2.2rem;
        border-bottom: none;
    }
    
    .build-stats {
        justify-content: center;
        gap: 10px;
    }
    
    .stat-box {
        min-width: 45%;
    }

    .component-item { 
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        text-align: left;
    }
    
    .comp-type { 
        width: 100%;
        margin-bottom: 5px; 
        border-bottom: 1px solid #eee;
        padding-bottom: 5px;
    }
    
    body.dark-mode .comp-type {
        border-bottom-color: #444;
    }

    .comp-action { 
        width: 100%;
        text-align: left;
        margin-top: 10px; 
        display: flex;
        justify-content: space-between;
        align-items: center; 
        background: var(--bg-comp-action-mobile);
        padding: 10px;
        border-radius: 8px;
    }
    
    .comp-action .price {
        margin-bottom: 0;
    }

    .build-image img {
        width: 100%;
        height: auto;
        max-width: 100%;
    }
    
    .performance-chart {
        padding: 1.5rem;
    }
}