/* ============================================================
   PRODUCTOS Y SERVICIOS — estilos propios de la página
   (base compartida: style-home.css)
   ============================================================ */

/* Las anclas deben quedar bajo el header + la barra de pestañas */
html { scroll-padding-top: 150px; }

/* ============================================================
   MINI-NAVEGACIÓN DE ANCLAS (pestañas)
   ============================================================ */
.product-tabs {
    position: sticky;
    top: 0;
    z-index: 900;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--mbi-border);
    padding: 0.8rem 0;
}

.product-tabs-track {
    display: flex;
    gap: 0.6rem;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

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

.product-tabs-track a {
    flex-shrink: 0;
    color: var(--mbi-text-muted);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 400;
    border: 1px solid var(--mbi-border);
    border-radius: 50px;
    padding: 0.45rem 1.3rem;
    transition: var(--transition);
    white-space: nowrap;
}

.product-tabs-track a:hover {
    border-color: var(--mbi-orange);
    color: #fff;
    background: rgba(255, 131, 42, 0.1);
}

/* ============================================================
   GRILLA DE PRODUCTOS (2 × 3) — tarjetas expandibles
   ------------------------------------------------------------
   SEO: el detalle viaja SIEMPRE en el HTML y solo lo oculta el
   CSS, que es el caso que Google indexa con peso completo. Lo
   que NO se indexa es el contenido inyectado por JS recién al
   hacer clic — por eso aquí no se inyecta nada.
   Visibles siempre: número, <h2> y descripción (las keywords).
   ============================================================ */
.prod-grid-section {
    padding: 70px 0 80px;
    background: var(--mbi-dark);
}

.prod-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    /* start: cada tarjeta crece sola al abrirse, sin estirar a su vecina de fila */
    align-items: start;
}

@media (max-width: 767px) {
    .prod-grid { grid-template-columns: 1fr; }
}

.prod-card {
    background: var(--mbi-panel);
    border: 1px solid var(--mbi-border);
    border-radius: 20px;
    overflow: hidden;   /* recorta el zoom de la foto */
    transition: var(--transition);
}

.prod-card:hover { border-color: rgba(255, 131, 42, 0.45); }

.prod-card.is-open { border-color: var(--mbi-orange); }

/* La cabecera ES la foto. El contenido se ancla abajo. */
.prod-card-head {
    position: relative;
    min-height: 340px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.8rem;
    overflow: hidden;
}

.prod-media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.prod-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
    transition: transform 0.8s ease;
}

.prod-card:hover .prod-media img { transform: scale(1.07); }

/* Degradado que garantiza la lectura del texto sobre cualquier foto */
.prod-scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to top,
            rgba(5, 5, 5, 0.95) 0%,
            rgba(5, 5, 5, 0.86) 42%,
            rgba(5, 5, 5, 0.52) 72%,
            rgba(5, 5, 5, 0.35) 100%);
}

.prod-head-content {
    position: relative;
    z-index: 2;
}

/* El botón cubre TODA la foto. El <h2> va fuera del botón: un heading
   dentro de un <button> es HTML inválido, y el h2 es la keyword. */
.prod-trigger {
    position: absolute;
    inset: 0;
    z-index: 3;
    width: 100%;
    background: none;
    border: 0;
    padding: 0;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.prod-trigger:focus-visible {
    outline: 2px solid var(--mbi-orange);
    outline-offset: -5px;
}

.prod-num {
    display: block;
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.22em;
    color: var(--mbi-orange);
    line-height: 1;
}

/* La línea que se extiende: pista tenue + relleno que va de
   scaleX(.22) a scaleX(1) al pasar el mouse. */
.prod-rule {
    position: relative;
    height: 1px;
    background: rgba(255, 255, 255, 0.25);
    margin: 0.75rem 0 1.05rem;
    overflow: hidden;
}

.prod-rule-fill {
    position: absolute;
    inset: 0;
    background: var(--mbi-orange);
    transform: scaleX(0.22);
    transform-origin: left center;
    transition: transform 0.55s ease;
}

.prod-card:hover .prod-rule-fill,
.prod-card.is-open .prod-rule-fill { transform: scaleX(1); }

.prod-title {
    font-size: clamp(1.45rem, 2.2vw, 1.9rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.18;
    margin: 0 0 0.7rem;
    padding-right: 2.6rem;
}

.prod-chevron {
    position: absolute;
    bottom: 1.8rem;
    right: 1.8rem;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mbi-orange);
    background: rgba(5, 5, 5, 0.5);
    transition: var(--transition);
}

.prod-card:hover .prod-chevron { border-color: var(--mbi-orange); }

.prod-card.is-open .prod-chevron {
    transform: rotate(180deg);
    background: rgba(255, 131, 42, 0.18);
    border-color: var(--mbi-orange);
}

/* Descripción: más chica que el título, como en la referencia */
.prod-desc {
    color: var(--mbi-text-muted);
    font-weight: 300;
    font-size: 0.84rem;
    line-height: 1.65;
    margin: 0;
    padding-right: 2.6rem;
}

/* Panel: la altura se anima con grid-template-rows 0fr → 1fr,
   sin medir alturas en JS y sin romper el flujo del texto. */
.prod-panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.42s ease;
}

.prod-card.is-open .prod-panel { grid-template-rows: 1fr; }

.prod-panel-inner {
    overflow: hidden;
    /* Mientras está cerrado, el detalle sale del orden de tabulación
       y del lector de pantalla — pero sigue en el HTML para Google. */
    visibility: hidden;
    transition: visibility 0s 0.42s;
}

.prod-card.is-open .prod-panel-inner {
    visibility: visible;
    transition-delay: 0s;
}

.prod-panel-body { padding: 1.4rem 1.8rem 1.8rem; }

@media (prefers-reduced-motion: reduce) {
    .prod-panel,
    .prod-panel-inner,
    .prod-chevron { transition: none; }

    .prod-media img,
    .prod-rule-fill { transition: none; }

    /* Sin movimiento: la línea se muestra completa en vez de animarse */
    .prod-card:hover .prod-media img { transform: none; }
}

.prod-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

/* Bullets con check naranjo */
.prod-bullets {
    list-style: none;
    padding: 0;
    margin: 0 0 1.4rem;
}

.prod-bullets li {
    color: var(--mbi-text-muted);
    font-weight: 300;
    font-size: 0.92rem;
    line-height: 1.6;
    padding: 0.45rem 0 0.45rem 2rem;
    position: relative;
    border-bottom: 1px solid var(--mbi-border);
}

.prod-bullets li:last-child { border-bottom: none; }

/* Círculo y check en un solo pseudo-elemento, centrado con flex:
   antes eran dos, alineados con offsets fijos que dejaban el ✓
   descentrado (se leía como una aguja de reloj, no como un ticket). */
.prod-bullets li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0.62rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 131, 42, 0.14);
    border: 1px solid var(--mbi-orange);
    color: var(--mbi-orange);
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prod-bullets strong { color: #fff; font-weight: 600; }

/* ============================================================
   FAQ (details/summary estilizado)
   ============================================================ */
.faq-section {
    padding: 90px 0;
    background: var(--mbi-dark);
    border-top: 1px solid var(--mbi-border);
}

.faq-wrap {
    max-width: 820px;
    margin: 2.5rem auto 0;
}

.faq-group {
    color: var(--mbi-orange);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 2.2rem 0 0.9rem;
}

.faq-group:first-child { margin-top: 0; }

.faq-item {
    background: var(--mbi-panel);
    border: 1px solid var(--mbi-border);
    border-radius: 14px;
    margin-bottom: 0.7rem;
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover { border-color: rgba(255, 131, 42, 0.35); }

.faq-item[open] { border-color: rgba(255, 131, 42, 0.45); }

.faq-item summary {
    cursor: pointer;
    list-style: none;
    padding: 1.05rem 3rem 1.05rem 1.4rem;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    transition: var(--transition);
}

.faq-item summary::-webkit-details-marker { display: none; }

/* Chevron */
.faq-item summary::after {
    content: '';
    position: absolute;
    right: 1.4rem;
    top: 50%;
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--mbi-orange);
    border-bottom: 2px solid var(--mbi-orange);
    transform: translateY(-70%) rotate(45deg);
    transition: transform 0.3s ease;
}

.faq-item[open] summary::after {
    transform: translateY(-30%) rotate(225deg);
}

.faq-item p {
    padding: 0 1.4rem 1.2rem;
    margin: 0;
    color: var(--mbi-text-muted);
    font-weight: 300;
    font-size: 0.88rem;
    line-height: 1.7;
}

.faq-item a {
    color: var(--mbi-orange);
    text-decoration: underline;
    transition: var(--transition);
}

.faq-item a:hover { color: var(--mbi-orange-dark); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    /* Los bloques verticales a ancho completo centraban su texto; una
       tarjeta no: se lee alineada a la izquierda, como en desktop. */
    .prod-grid-section { padding: 55px 0; }

    .prod-card-head {
        min-height: 290px;
        padding: 1.4rem;
    }

    .prod-chevron { bottom: 1.4rem; right: 1.4rem; }

    .prod-panel-body { padding: 1.2rem 1.4rem 1.4rem; }

    /* CTA a ancho completo: objetivo táctil cómodo dentro de la tarjeta */
    .prod-actions .btn-orange,
    .prod-actions .btn-outline-orange {
        display: block;
        width: 100%;
        text-align: center;
    }
}
