/* ================================================================
   SPEC TABLE — "Pipe Manufacturing Range"
   KPIs, líneas TIG/LASER en video, tabla de materiales y matriz de
   disponibilidad O.D. x espesor.
   ================================================================ */
.pipe-range__header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.pipe-range__highlight {
    color: var(--color-primary);
}

.pipe-range__kpis {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-sm);
    width: 100%;
}

@media (min-width: 560px) {
    .pipe-range__kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .pipe-range__kpis {
        width: auto;
    }
}

.pipe-range__kpi {
    padding: var(--space-md);
    background-color: var(--color-bg);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-lg);
}

.pipe-range__kpi dt {
    color: var(--color-text-muted);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.pipe-range__kpi dd {
    margin-top: var(--space-xs);
    color: var(--color-primary);
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 500;
}

.pipe-range__kpi dd span {
    color: var(--color-text-muted);
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 400;
}

/* minmax(0, …): sin esto la columna crece al ancho mínimo de la matriz
   (640px) y desborda la página en móvil en vez de hacer scroll interno. */
.pipe-range__content {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-xl);
}

@media (min-width: 1024px) {
    .pipe-range__content {
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
        align-items: start;
    }
}

.pipe-range__lines {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.pipe-range__line {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.pipe-range__video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pipe-range__line-caption {
    position: absolute;
    left: var(--space-md);
    bottom: var(--space-md);
    padding: var(--space-xs) var(--space-md);
    background-color: rgba(14, 47, 63, 0.7);
    backdrop-filter: blur(6px);
    border-radius: var(--radius-full);
    color: var(--color-text-inverse);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ── Tablas de especificaciones ───────────────── */
.spec-table {
    padding: var(--space-lg);
    background-color: var(--color-bg);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.spec-table__title {
    color: var(--color-primary);
    text-transform: uppercase;
    font-size: var(--text-base);
    letter-spacing: 0.04em;
}

.spec-table__lead {
    margin-top: var(--space-xs);
    color: var(--color-text-muted);
    font-size: var(--text-sm);
}

/* position: relative hace del wrapper el bloque contenedor de los
   .sr-only (absolute) de las celdas; sin esto escapan del scroll y
   ensanchan la página en móvil. */
.spec-table__wrapper {
    position: relative;
    margin-top: var(--space-md);
    overflow-x: auto;
}

.spec-table table {
    width: 100%;
    min-width: 320px;
    font-size: var(--text-sm);
    border-collapse: separate;
    border-spacing: 0;
}

.spec-table--matrix table {
    min-width: 640px;
}

.spec-table th,
.spec-table td {
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--color-border-subtle);
    text-align: left;
    white-space: nowrap;
}

.spec-table thead th {
    background-color: var(--color-bg-alt);
    color: var(--color-text-muted);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.spec-table--matrix th,
.spec-table--matrix td {
    text-align: center;
}

.spec-table--matrix thead th:first-child,
.spec-table--matrix tbody th {
    text-align: left;
}

.spec-table--matrix tbody th {
    background-color: var(--color-bg-alt);
    color: var(--color-text);
    font-weight: 600;
}

.spec-table__row--featured th,
.spec-table__row--featured td {
    background-color: rgba(0, 192, 230, 0.08);
}

.spec-table__cell--yes {
    color: var(--color-secondary);
    font-weight: 600;
}

.spec-table__cell--no {
    color: var(--color-text-muted);
}
