/* ════════════════════════════════════════════════════════════════════════
   PESTAÑAS DE PRODUCTO Y TABLAS DE PRECIO
   Identidad FISMATT: negro #050505, blanco, rojo #d40000.

   Este archivo se carga DESPUÉS de styles.css, así que gana en los empates.
   Todo lo de aquí es nuevo: no pisa ninguna clase existente.
   ════════════════════════════════════════════════════════════════════════ */

:root {
    --fm-tinta: #050505;
    --fm-rojo: #d40000;
    --fm-gris: #6b6b70;
    --fm-gris-claro: #8e8e93;
    --fm-linea: #e5e5e7;
    --fm-papel: #f5f5f7;
}

/* ─── Barra de pestañas ────────────────────────────────────────────────── */
.product-tabs {
    position: sticky;
    top: 68px;
    z-index: 45;
    background: #0d0d0d;
    border-bottom: 1px solid #262626;
}

.product-tabs-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
}

.product-tabs-inner::-webkit-scrollbar { display: none; }

@media (min-width: 1024px) {
    .product-tabs-inner { padding: 0 40px; }
}

.product-tab {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 12px 18px 11px;
    border-bottom: 3px solid transparent;
    text-decoration: none;
    white-space: nowrap;
    transition: background .18s ease, border-color .18s ease;
}

.product-tab:hover { background: rgba(255, 255, 255, .05); }

.product-tab-name {
    font-size: 13.5px;
    font-weight: 700;
    color: #b8b8bd;
    letter-spacing: -.01em;
    transition: color .18s ease;
}

.product-tab-price {
    font-size: 11px;
    font-weight: 600;
    color: #6f6f76;
    transition: color .18s ease;
}

.product-tab:hover .product-tab-name { color: #fff; }

.product-tab.is-active {
    border-bottom-color: var(--fm-rojo);
    background: rgba(255, 255, 255, .04);
}

.product-tab.is-active .product-tab-name { color: #fff; }
.product-tab.is-active .product-tab-price { color: var(--fm-rojo); }

/* ─── Tabla de precios ─────────────────────────────────────────────────── */
/* El envoltorio hace el scroll: la página nunca se desplaza en horizontal. */
.price-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--fm-linea);
    border-radius: 18px;
    background: #fff;
    -webkit-overflow-scrolling: touch;
}

.price-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
    font-size: 14px;
}

.price-table thead th {
    background: var(--fm-tinta);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    text-align: left;
    padding: 14px 18px;
    white-space: nowrap;
}

.price-table thead th:first-child { border-top-left-radius: 17px; }
.price-table thead th:last-child { border-top-right-radius: 17px; }

.price-table tbody td {
    padding: 16px 18px;
    border-top: 1px solid var(--fm-linea);
    color: #333;
    vertical-align: middle;
}

.price-table tbody tr:hover { background: #fafafa; }

.price-table .cell-plan {
    font-weight: 800;
    color: var(--fm-tinta);
    font-size: 15px;
}

.price-table .cell-nota {
    display: block;
    font-weight: 500;
    font-size: 12.5px;
    color: var(--fm-gris);
    margin-top: 2px;
}

.price-table .cell-precio {
    font-weight: 900;
    color: var(--fm-tinta);
    font-size: 22px;
    letter-spacing: -.02em;
    white-space: nowrap;
}

.price-table .cell-precio small {
    font-size: 12px;
    font-weight: 600;
    color: var(--fm-gris);
    letter-spacing: 0;
}

.price-table .cell-antes {
    text-decoration: line-through;
    color: var(--fm-gris-claro);
    font-weight: 600;
    font-size: 14px;
    margin-right: 6px;
}

.price-table .cell-rojo { color: var(--fm-rojo); }

/* Fila destacada: la que queremos que compren. */
.price-table tr.is-destacada { background: #fff6f6; }
.price-table tr.is-destacada:hover { background: #fff0f0; }
.price-table tr.is-destacada td { border-top-color: #f6cccc; }

.tag-plan {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--fm-rojo);
    color: #fff;
    margin-left: 8px;
    vertical-align: middle;
}

.tag-plan.is-suave {
    background: #efeff1;
    color: #444;
}

/* ─── Tarjetas de plan (resumen visual sobre la tabla) ──────────────────── */
.plan-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .plan-grid { grid-template-columns: repeat(3, 1fr); }
}

.plan-card {
    position: relative;
    border: 1px solid var(--fm-linea);
    border-radius: 18px;
    background: #fff;
    padding: 26px 24px 24px;
    display: flex;
    flex-direction: column;
}

.plan-card.is-destacada {
    border-color: var(--fm-tinta);
    box-shadow: 0 22px 60px -30px rgba(0, 0, 0, .45);
}

.plan-card-flag {
    position: absolute;
    top: -11px;
    left: 24px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    background: var(--fm-rojo);
    color: #fff;
    padding: 4px 11px;
    border-radius: 999px;
}

.plan-card h3 {
    font-size: 15px;
    font-weight: 800;
    color: var(--fm-tinta);
    margin-bottom: 10px;
}

.plan-card .plan-precio {
    font-size: 40px;
    font-weight: 900;
    color: var(--fm-tinta);
    letter-spacing: -.035em;
    line-height: 1;
}

.plan-card .plan-precio span {
    font-size: 13px;
    font-weight: 600;
    color: var(--fm-gris);
    letter-spacing: 0;
}

.plan-card .plan-para {
    font-size: 13px;
    color: var(--fm-gris);
    margin-top: 10px;
    margin-bottom: 18px;
    line-height: 1.5;
    flex: 1;
}

/* ─── Escala institucional ─────────────────────────────────────────────── */
.tier-table .cell-tramo {
    font-weight: 800;
    color: var(--fm-tinta);
    white-space: nowrap;
}

.tier-table .cell-ahorro {
    font-weight: 700;
    color: #15803d;
    white-space: nowrap;
}

/* ─── Tarjetas del ecosistema (portada) ────────────────────────────────── */
.eco-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) { .eco-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .eco-grid { grid-template-columns: repeat(4, 1fr); } }

.eco-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--fm-linea);
    border-radius: 18px;
    background: #fff;
    overflow: hidden;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.eco-card:hover {
    transform: translateY(-4px);
    border-color: var(--fm-tinta);
    box-shadow: 0 26px 60px -34px rgba(0, 0, 0, .5);
}

.eco-card-shot {
    background: var(--fm-papel);
    border-bottom: 1px solid var(--fm-linea);
    padding: 18px;
}

.eco-card-shot img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 12px 28px -14px rgba(0, 0, 0, .3);
}

.eco-card-body {
    padding: 20px 20px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.eco-card-tag {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--fm-rojo);
    margin-bottom: 8px;
}

.eco-card h3 {
    font-size: 17px;
    font-weight: 800;
    color: var(--fm-tinta);
    line-height: 1.2;
    margin-bottom: 8px;
    letter-spacing: -.02em;
}

.eco-card p {
    font-size: 13.5px;
    color: var(--fm-gris);
    line-height: 1.55;
    flex: 1;
    margin-bottom: 16px;
}

.eco-card-pie {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    border-top: 1px solid var(--fm-linea);
    padding-top: 14px;
}

.eco-card-precio {
    font-size: 19px;
    font-weight: 900;
    color: var(--fm-tinta);
    letter-spacing: -.02em;
}

.eco-card-precio small {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--fm-gris);
    letter-spacing: 0;
}

.eco-card-ir {
    font-size: 12.5px;
    font-weight: 800;
    color: var(--fm-rojo);
    white-space: nowrap;
}

/* ─── Cabecera de una página de producto ───────────────────────────────── */
.product-hero {
    background: var(--fm-tinta);
    border-bottom: 4px solid var(--fm-rojo);
    color: #fff;
}

.product-hero .product-hero-eyebrow {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: #d2d2d7;
    margin-bottom: 14px;
}

.product-hero h1 {
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -.035em;
    margin-bottom: 18px;
}

.product-hero p.lead {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: #c7c7cc;
    line-height: 1.6;
    max-width: 44ch;
}

.product-hero-shot {
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .9);
    display: block;
    width: 100%;
    height: auto;
}

.product-hero .btn-blanco {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: var(--fm-tinta);
    font-weight: 800;
    font-size: 14px;
    padding: 14px 26px;
    border-radius: 999px;
    text-decoration: none;
    transition: background .2s ease, color .2s ease;
}

.product-hero .btn-blanco:hover { background: var(--fm-rojo); color: #fff; }

.product-hero .btn-borde {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1.5px solid #8e8e93;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    padding: 13px 24px;
    border-radius: 999px;
    text-decoration: none;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.product-hero .btn-borde:hover { background: #fff; color: var(--fm-tinta); border-color: #fff; }

/* ─── Lista de beneficios de una página de producto ────────────────────── */
.beneficio-lista { display: grid; gap: 14px; }

@media (min-width: 768px) {
    .beneficio-lista { grid-template-columns: repeat(2, 1fr); gap: 16px 32px; }
}

.beneficio {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.beneficio-punto {
    flex: 0 0 auto;
    margin-top: 7px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--fm-rojo);
}

.beneficio p {
    font-size: 14.5px;
    line-height: 1.55;
    color: #333;
}

.beneficio strong { color: var(--fm-tinta); font-weight: 700; }
