:root {
    --gold: #D32F2F;
    --dark: #0a0a0a;
    --dark-soft: #0d0d0d; 
    --dark-panel: #111;
    --text-light: #e0e0e0;
    --text-muted: #888;
    --border-subtle: rgba(255,255,255,0.05);
}
.cuadro-title{
    color: var(--gold);
}

/* --- REINICIO Y BASE --- */
body { margin: 0; font-family: 'Segoe UI', Roboto, sans-serif; background: var(--dark); color: white; }

/* --- HERO SECTION --- */
.specs-hero {
    background: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.8)), url('images/fabricacionM50.jpeg');
    background-size: cover;
    background-position: center;
    padding: 100px 0;
    text-align: center;
}

/* --- GALERÍA SUPERIOR --- */
.xp-gallery {
    background: var(--dark);
    padding: 30px 20px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    max-width: 96%;
    margin: 0 auto;
}

.gallery-card {
    position: relative;
    height: 140px; 
    background-image: var(--bg-img);
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.4s ease;
}

.gallery-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold);
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    transition: background 0.3s;
}

.gallery-card:hover .card-overlay { background: rgba(0,0,0,0.1); }

.card-content-center {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.card-content-center h3 {
    color: white;
    font-size: 0.9rem;
    letter-spacing: 2px;
    font-weight: 800;
    text-transform: uppercase;
    margin: 0;
    pointer-events: none;
}

/* --- PANELES DE INGENIERÍA --- */
.details-wrapper { background: var(--dark); padding: 0; }

.engineering-panel {
    display: flex;
    width: 100%;
    min-height: 550px;
    background: var(--dark-panel);
    border-bottom: 1px solid var(--border-subtle);
}

/* Side Accent (La franja negra con margen en la imagen) */
.side-accent {
    flex: 0 0 220px;
    background: #000;
    padding: 30px; /* Margen para que la imagen no toque bordes */
    position: relative;
    display: flex;
    align-items: center;
}

.panel-image-slim {
    width: 100%;
    height: 80%;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    opacity: 0.5;
    filter: grayscale(1);
    transition: 0.6s ease;
}

.engineering-panel:hover .panel-image-slim { opacity: 0.9; filter: grayscale(0); }

.glow-line {
    position: absolute;
    right: 0; top: 0; width: 3px; height: 100%;
    background: var(--gold);
    box-shadow: 0 0 15px var(--gold);
}

.side-accent.right { order: 2; }
.side-accent.right .glow-line { right: auto; left: 0; }

/* Cuerpo del Panel */
.panel-body {
    flex: 1;
    padding: 60px 6%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.spec-id {
    color: var(--gold);
    font-family: monospace;
    letter-spacing: 3px;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.panel-header {
    position: relative;
    margin-bottom: 30px;
    padding-bottom: 15px;
    background: transparent !important; /* Forzamos a que no haya fondo */
}

.panel-header h2 {
    color: white;
    text-transform: uppercase;
    font-size: clamp(2rem, 4vw, 3rem);
    margin: 0;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.1;
    background: transparent; /* Aseguramos que el h2 tampoco tenga fondo */
}

.panel-main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

.description { color: var(--text-light); line-height: 1.7; font-size: 1.1rem; }
.description strong { color: white; }

/* Mini Specs */
.mini-specs { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.spec-item {
    background: rgba(255,255,255,0.03);
    padding: 12px 15px;
    border-left: 3px solid var(--gold);
    font-size: 0.9rem;
}
.spec-item span { color: var(--gold); font-weight: bold; margin-right: 5px; }

/* --- NUEVAS TABLAS COMPARATIVAS --- */
.visual-resource { width: 100%; }

.comparison-card {
    background: #050505;
    border: 1px solid #222;
    border-radius: 8px;
    padding: 20px;
}

.comp-header {
    font-size: 0.7rem;
    color: var(--gold);
    letter-spacing: 2px;
    margin-bottom: 15px;
    font-weight: 800;
    text-transform: uppercase;
}

.comp-item { margin-bottom: 15px; }
.comp-label { font-size: 0.65rem; color: #555; text-transform: uppercase; display: block; margin-bottom: 5px; }

.comp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.model-val {
    padding: 8px;
    font-size: 0.8rem;
    border-radius: 3px;
    line-height: 1.2;
}

.model-val.std { background: #000000; color: #9c9c9c; border: 1px solid #222; }
.model-val.ultra { background: rgba(211,47,47,0.1); color: #fff; border: 1px solid var(--gold); }

.model-val small { display: block; font-size: 0.6rem; opacity: 0.5; margin-bottom: 2px; }

/* Responsive */
@media (max-width: 900px) {
    .panel-main-content { grid-template-columns: 1fr; }
    .side-accent { flex: 0 0 100px; padding: 10px; }
}