/**
 * COMPONENTS / PRODUCT STORY + HIGHLIGHTS
 * -----------------------------------------------------------------------------
 * Estructura de la pestaña "Descripción" de la ficha de producto.
 *
 *   <div class="product-story">
 *       <header class="product-story__head">      ← banda oscura de identificación
 *           <span class="product-story__kicker">Solis · Inversores</span>
 *           <h2 class="product-story__title">…</h2>
 *           <span class="product-story__sku">S6-EH1P8K-L-PLUS</span>
 *       </header>
 *       <div class="product-story__body">…</div>   ← la descripción del editor
 *       <section class="product-highlights">       ← tarjetas de argumentos
 *           <h3 class="product-highlights__title">Por qué elegir este equipo</h3>
 *           <div class="product-highlights__grid">
 *               <article class="highlight">
 *                   <h4 class="highlight__title">…</h4>
 *                   <p class="highlight__text">…</p>
 *               </article>
 *           </div>
 *       </section>
 *   </div>
 *
 * Ver woocommerce/single-product/tabs/description.php e inc/product-highlights.php
 */

/* =============================================================
   BANDA DE IDENTIFICACIÓN
============================================================= */

.product-story__head {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: var(--gradient-dark);
    /* Menos aire vertical que horizontal: el bloque son tres líneas y con
       padding simétrico se quedaba medio vacío. */
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

/* Filete de marca arriba: el mismo recurso que la cabecera del sitio. */
.product-story__head::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--orange), var(--blue) 60%, transparent);
}

/* Halo azul que deriva despacio, para que la banda no quede plana. */
.product-story__head::after {
    content: "";
    position: absolute;
    top: -30%;
    right: -10%;
    width: 55%;
    height: 160%;
    background: var(--glow-blue-strong);
    animation: fm-drift 26s ease-in-out infinite;
    pointer-events: none;
}

.product-story__head-inner {
    position: relative;
    z-index: var(--z-content);
}

.product-story__kicker {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--fs-sm);
    font-weight: var(--fw-bold);
    letter-spacing: var(--ls-kicker);
    text-transform: uppercase;
    color: var(--orange);
    margin-bottom: var(--space-sm);
}

.product-story__kicker::before {
    content: "";
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: var(--orange);
    flex-shrink: 0;
}

/*
 * Separador entre el kicker y el título: sustituye a la caja cerrada que
 * tendría un recuadro y deja la banda más ligera.
 */
.product-story__title {
    position: relative;
    font-family: var(--font-heading);
    font-weight: var(--fw-bold);
    font-size: clamp(24px, 2.8vw, 34px);
    line-height: var(--lh-heading);
    letter-spacing: var(--ls-heading);
    color: var(--white);
    padding-top: var(--space-md);
    margin: 0 0 var(--space-xs);
}

.product-story__title::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-on-dark);
}

/* La referencia del fabricante: dato de catálogo, no titular. */
.product-story__sku {
    display: block;
    font-family: "SFMono-Regular", Consolas, Menlo, monospace;
    font-size: var(--fs-lg);
    letter-spacing: 0.4px;
    color: var(--on-dark-muted);
}

/* =============================================================
   CUERPO DE LA DESCRIPCIÓN
============================================================= */

.product-story__body {
    max-width: 78ch;
    margin-bottom: var(--space-xl);
}

/* La descripción suele venir en párrafos sueltos del editor. */
.product-story__body > :last-child {
    margin-bottom: 0;
}

/* =============================================================
   PUNTOS DESTACADOS
============================================================= */

.product-highlights__title {
    position: relative;
    font-family: var(--font-heading);
    font-weight: var(--fw-semibold);
    font-size: var(--fs-h4);
    color: var(--heading);
    padding-left: var(--space-sm);
    margin-bottom: var(--space-md);
}

/* Filete naranja de entrada, en vez de un subrayado a todo lo ancho. */
.product-highlights__title::before {
    content: "";
    position: absolute;
    top: 2px;
    bottom: 2px;
    left: 0;
    width: 3px;
    border-radius: 3px;
    background: var(--orange);
}

/*
 * `auto-fit`, no un número fijo de columnas: los productos tienen tres, cuatro
 * o seis puntos y con una rejilla fija la última fila quedaba coja.
 *
 * El mínimo de 300px deja tres columnas como máximo en la ficha. Con 260 px
 * entraban cuatro y los titulares se partían en dos líneas casi siempre.
 */
.product-highlights__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--gap-grid);
}

.highlight {
    padding: var(--space-md);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.highlight:hover {
    border-color: var(--border-blue);
    box-shadow: var(--shadow-card-hover);
    transform: var(--lift);
}

.highlight__title {
    font-family: var(--font-heading);
    font-weight: var(--fw-semibold);
    font-size: var(--fs-xl);
    line-height: 1.35;
    color: var(--heading);
    margin: 0 0 var(--space-xs);
}

.highlight__text {
    font-size: var(--fs-md);
    line-height: var(--lh-body);
    color: var(--text);
    margin: 0;
}

/* =============================================================
   RESPONSIVE
============================================================= */

@media (max-width: 700px) {

    .product-story__head {
        padding: var(--space-lg) var(--space-md);
    }

    .product-story__sku {
        font-size: var(--fs-md);
    }

    .product-story__body {
        margin-bottom: var(--space-lg);
    }

    /* Una sola columna: a 260px mínimos entrarían dos apretadas. */
    .product-highlights__grid {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }
}
