/*
 * vb-product-reference.css
 * Vital Bridge — Rich content de fichas WooCommerce
 * Referencia para implementar en: theme/obelisk-child/assets/css/vb-product.css
 * Generado: S26 — 2026-06-08
 *
 * Estructura de uso:
 *   body.product-id-370 .vb-product-rich  → ILÍVIT (verde #5DA64A)
 *   body.product-id-371 .vb-product-rich  → IPOLIX (magenta #FF006E)
 *   body.product-id-372 .vb-product-rich  → EQUILIUM (cyan #22BABF)
 *   body.product-id-374, 377              → ILÍVIT packs (heredan verde)
 *   body.product-id-375, 378              → IPOLIX packs (heredan magenta)
 *   body.product-id-376, 379              → EQUILIUM packs (heredan cyan)
 *   body.product-id-380, 381, 382         → combos (accent dual — ver sec 4)
 *
 * Obelisk quirks cubiertos:
 *   - Clearfix ghost cells: ::before/::after reset en grid containers (Sec 9)
 *   - --color-main:#12c2e9 !important override con specificity (0,4,4)+ (Sec 8)
 *   - clear:both en wrapper para liberar float de gallery WC (Sec 1)
 * ============================================================================
 */


/* ============================================================
   SECCIÓN 1 — Variables y wrapper raíz
   ============================================================ */

/* Defaults del sistema (fallback si no matchea ningún producto) */
.vb-product-rich {
    --vb-accent:          #22BABF;
    --vb-accent-soft:     rgba(34, 186, 191, 0.15);
    --vb-accent-soft-35:  rgba(34, 186, 191, 0.35);
    --vb-bg:              #11141B;
    --vb-surface:         #181C26;
    --vb-surface-alt:     #1E2330;
    --vb-text:            rgba(255, 255, 255, 0.90);
    --vb-text-muted:      rgba(255, 255, 255, 0.55);
    --vb-border:          rgba(255, 255, 255, 0.08);
}

/* ILÍVIT verde — singles y packs */
body.product-id-370 .vb-product-rich,
body.product-id-374 .vb-product-rich,
body.product-id-377 .vb-product-rich {
    --vb-accent:         #5DA64A;
    --vb-accent-soft:    rgba(93, 166, 74, 0.15);
    --vb-accent-soft-35: rgba(93, 166, 74, 0.35);
}

/* IPOLIX magenta — singles y packs */
body.product-id-371 .vb-product-rich,
body.product-id-375 .vb-product-rich,
body.product-id-378 .vb-product-rich {
    --vb-accent:         #FF006E;
    --vb-accent-soft:    rgba(255, 0, 110, 0.15);
    --vb-accent-soft-35: rgba(255, 0, 110, 0.35);
}

/* EQUILIUM cyan — singles y packs */
body.product-id-372 .vb-product-rich,
body.product-id-376 .vb-product-rich,
body.product-id-379 .vb-product-rich {
    --vb-accent:         #22BABF;
    --vb-accent-soft:    rgba(34, 186, 191, 0.15);
    --vb-accent-soft-35: rgba(34, 186, 191, 0.35);
}

/* Combos — sin accent único (lo gestionan las tarjetas individuales via style inline) */
/* body.product-id-380/381/382 hereda el default pero el h2 es blanco puro */
body.product-id-380 .vb-product-rich .vb-h2,
body.product-id-381 .vb-product-rich .vb-h2,
body.product-id-382 .vb-product-rich .vb-h2 {
    color: #ffffff;
}


/* ============================================================
   SECCIÓN 2 — Wrapper .vb-product-rich
   ============================================================ */

.vb-product-rich {
    /* Libera float de gallery WC — crítico */
    clear: both;

    /* Espaciado base (mobile-first) */
    padding: 36px 16px 56px;

    /* Fondo: hereda el body #11141B — no se declara background-color
       para no crear un nuevo bloque visual. Si el tema añade otro fondo,
       descomentar la línea siguiente:
       background-color: var(--vb-bg); */

    /* Tipografía base */
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: var(--vb-text);

    /* Contener el max-width */
    box-sizing: border-box;
}

/* Contenido interior: max-width centrado */
.vb-product-rich__inner {
    max-width: 860px;
    margin: 0 auto;
}

/* Tablet */
@media (min-width: 600px) {
    .vb-product-rich {
        padding: 44px 24px 64px;
    }
}

/* Desktop */
@media (min-width: 768px) {
    .vb-product-rich {
        padding: 48px 32px 80px;
    }
}

/* Desktop ancho — si el tema no ya centra el contenido */
@media (min-width: 1024px) {
    .vb-product-rich {
        padding: 48px 0 80px;
    }
}


/* ============================================================
   SECCIÓN 3 — Tipografía del rich content
   ============================================================ */

/* h2 — hook principal del producto */
.vb-product-rich .vb-h2 {
    font-family: 'Red Rose', serif;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.01em;
    color: var(--vb-accent);
    margin: 0 0 16px 0;
}

@media (min-width: 380px) {
    .vb-product-rich .vb-h2 {
        font-size: 24px;
    }
}

@media (min-width: 600px) {
    .vb-product-rich .vb-h2 {
        font-size: 28px;
    }
}

@media (min-width: 768px) {
    .vb-product-rich .vb-h2 {
        font-size: 32px;
        margin-bottom: 20px;
    }
}

/* Párrafo de apertura / intro */
.vb-product-rich .vb-intro {
    font-size: 15px;
    line-height: 1.75;
    color: var(--vb-text);
    margin: 0 0 32px 0;
}

@media (min-width: 600px) {
    .vb-product-rich .vb-intro {
        font-size: 16px;
        margin-bottom: 40px;
    }
}

/* h3 — título de sección (What X supports / Key ingredients / How to / FAQ) */
.vb-product-rich h3 {
    font-family: 'Red Rose', serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.01em;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 14px 0;
}

@media (min-width: 600px) {
    .vb-product-rich h3 {
        font-size: 19px;
    }
}

@media (min-width: 768px) {
    .vb-product-rich h3 {
        font-size: 20px;
        margin-bottom: 16px;
    }
}

/* Párrafos dentro del rich content */
.vb-product-rich p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--vb-text);
    margin: 0 0 14px 0;
}

@media (min-width: 600px) {
    .vb-product-rich p {
        font-size: 16px;
    }
}

/* strong dentro de párrafos */
.vb-product-rich strong {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

/* em / italic */
.vb-product-rich em {
    font-style: italic;
    color: var(--vb-text-muted);
}


/* ============================================================
   SECCIÓN 4 — Bloques de sección (.vb-section-block)
   ============================================================ */

.vb-product-rich .vb-section-block {
    margin-bottom: 32px;
    padding-left: 16px;
    border-left: 3px solid var(--vb-accent);
}

@media (min-width: 600px) {
    .vb-product-rich .vb-section-block {
        margin-bottom: 36px;
        padding-left: 20px;
    }
}

@media (min-width: 768px) {
    .vb-product-rich .vb-section-block {
        margin-bottom: 40px;
    }
}

/* Variante neutral para "How to use them together" en combos */
.vb-product-rich .vb-section-block--neutral {
    border-left-color: rgba(255, 255, 255, 0.25);
}


/* ============================================================
   SECCIÓN 5 — Listas (.vb-list)
   ============================================================ */

.vb-product-rich ul.vb-list {
    /* !important beats Obelisk's `ul { list-style: outside none square }`
       (style.css:1867) which otherwise paints a square marker beside our dot. */
    list-style: none !important;
    margin: 0;
    padding: 0;
}

.vb-product-rich ul.vb-list li {
    position: relative;
    list-style: none !important;
    padding: 7px 0 7px 22px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--vb-text);
    border-bottom: 1px solid var(--vb-border);
}

.vb-product-rich ul.vb-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Bullet dot con accent */
.vb-product-rich ul.vb-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--vb-accent);
    flex-shrink: 0;
}

/* strong en li (nombre de ingrediente) */
.vb-product-rich ul.vb-list li strong {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
}

@media (min-width: 600px) {
    .vb-product-rich ul.vb-list li {
        font-size: 15px;
        padding: 8px 0 8px 22px;
    }
}


/* ============================================================
   SECCIÓN 6 — Nota FDA (.vb-fda-note)
   ============================================================ */

.vb-product-rich .vb-fda-note {
    font-size: 12px;
    font-style: italic;
    color: var(--vb-text-muted);
    margin: -4px 0 32px 0;
    line-height: 1.5;
}

@media (min-width: 600px) {
    .vb-product-rich .vb-fda-note {
        font-size: 13px;
    }
}

.vb-product-rich .vb-fda-note a {
    color: var(--vb-text-muted);
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.25);
}

.vb-product-rich .vb-fda-note a:hover {
    color: var(--vb-text);
    text-decoration-color: rgba(255, 255, 255, 0.55);
}


/* ============================================================
   SECCIÓN 7 — FAQ (.vb-faq-block, .vb-faq-item)
   ============================================================ */

.vb-product-rich .vb-faq-block {
    /* hereda .vb-section-block — no necesita reglas extra propias */
}

.vb-product-rich .vb-faq-item {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--vb-border);
}

.vb-product-rich .vb-faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Línea de la pregunta — el strong ya viene del brief HTML */
.vb-product-rich .vb-faq-item p:first-child {
    margin-bottom: 6px;
}

/* Respuesta: ligeramente más muted que el cuerpo principal */
.vb-product-rich .vb-faq-item p:last-child {
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 0;
}


/* ============================================================
   SECCIÓN 8 — Pack header (.vb-pack-header, .vb-badge-save, .vb-divider)
   ============================================================ */

.vb-product-rich .vb-pack-header {
    margin-bottom: 32px;
}

/* Badge de ahorro */
.vb-product-rich .vb-badge-save {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--vb-accent);
    background-color: var(--vb-accent-soft);
    border: 1px solid var(--vb-accent-soft-35);
    margin-bottom: 12px;
    /* Evitar que el badge herede cursor o estilos de link */
    cursor: default;
}

@media (min-width: 600px) {
    .vb-product-rich .vb-badge-save {
        font-size: 12px;
    }
}

/* Párrafo intro del pack */
.vb-product-rich .vb-pack-intro {
    font-size: 16px;
    line-height: 1.7;
    color: var(--vb-text);
    margin: 0 0 0 0;
}

@media (min-width: 600px) {
    .vb-product-rich .vb-pack-intro {
        font-size: 17px;
    }
}

/* Separador visual entre intro pack y contenido heredado */
.vb-product-rich .vb-divider {
    border: none;
    border-top: 1px solid var(--vb-border);
    margin: 28px 0 32px;
}

@media (min-width: 768px) {
    .vb-product-rich .vb-divider {
        margin: 32px 0 36px;
    }
}


/* ============================================================
   SECCIÓN 9 — Combo cara a cara (.vb-combo-vs, .vb-combo-card)
   ============================================================ */

/* Grid container */
.vb-product-rich .vb-combo-vs {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 36px;
}

/* Reset clearfix de Obelisk — evitar ghost cells en grid */
.vb-product-rich .vb-combo-vs::before,
.vb-product-rich .vb-combo-vs::after {
    display: none !important;
    content: none !important;
}

/* 768px+ → 2 columnas */
@media (min-width: 768px) {
    .vb-product-rich .vb-combo-vs {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
        margin-bottom: 40px;
    }
}

/* Tarjeta individual */
.vb-product-rich .vb-combo-card {
    /*
     * --vb-card-accent se pasa como style inline en el HTML del post_content:
     * <div class="vb-combo-card" style="--vb-card-accent:#5DA64A;--vb-card-accent-soft:rgba(93,166,74,0.15)">
     * Esto evita necesitar PHP para aplicar accents diferentes por producto.
     */
    --vb-card-accent:       #22BABF; /* fallback */
    --vb-card-accent-soft:  rgba(34, 186, 191, 0.15); /* fallback */

    background-color: var(--vb-surface);
    border: 1px solid var(--vb-border);
    border-left: 3px solid var(--vb-card-accent);
    border-radius: 12px;
    padding: 20px 16px;
    box-sizing: border-box;
}

@media (min-width: 600px) {
    .vb-product-rich .vb-combo-card {
        padding: 24px 20px;
    }
}

/* Reset clearfix dentro de tarjeta */
.vb-product-rich .vb-combo-card::before,
.vb-product-rich .vb-combo-card::after {
    display: none !important;
    content: none !important;
}

/* Pill con nombre del producto (ILÍVIT / IPOLIX / EQUILIUM) */
.vb-product-rich .vb-combo-card__name {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--vb-card-accent);
    background-color: var(--vb-card-accent-soft);
    border: 1px solid var(--vb-card-accent);
    margin-bottom: 10px;
    opacity: 0.9;
}

@media (min-width: 600px) {
    .vb-product-rich .vb-combo-card__name {
        font-size: 11px;
    }
}

/* h3 dentro de tarjeta combo */
.vb-product-rich .vb-combo-card h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.95);
}

@media (min-width: 380px) {
    .vb-product-rich .vb-combo-card h3 {
        font-size: 17px;
    }
}

@media (min-width: 768px) {
    .vb-product-rich .vb-combo-card h3 {
        font-size: 18px;
    }
}

/* Lista dentro de tarjeta combo — hereda .vb-list pero bullets usan card-accent */
.vb-product-rich .vb-combo-card ul.vb-list li::before {
    background-color: var(--vb-card-accent);
}

/* Párrafo de cierre del combo (ahorro + timing note) */
.vb-product-rich .vb-combo-closing {
    font-size: 14px;
    font-style: italic;
    color: var(--vb-text-muted);
    margin-top: -8px;
    margin-bottom: 32px;
    line-height: 1.6;
}

@media (min-width: 600px) {
    .vb-product-rich .vb-combo-closing {
        font-size: 15px;
    }
}


/* ============================================================
   SECCIÓN 10 — Override de links cyan Obelisk
   Obelisk usa --color-main:#12c2e9 con !important en links y tabs.
   Se necesita especificidad >= (0,4,4) para ganar.
   ============================================================ */

/* Links dentro del rich content — anular cyan Obelisk */
body.single-product .vb-product-rich a,
body.single-product .vb-product-rich a:visited {
    color: var(--vb-accent);
    text-decoration: underline;
    text-decoration-color: var(--vb-accent-soft-35);
}

body.single-product .vb-product-rich a:hover,
body.single-product .vb-product-rich a:focus {
    color: rgba(255, 255, 255, 0.90);
    text-decoration-color: rgba(255, 255, 255, 0.35);
    outline: none;
}

/* Override específico con alta especificidad si el anterior no alcanza */
body.single-product.woocommerce .vb-product-rich .vb-section-block a:hover {
    color: rgba(255, 255, 255, 0.90) !important;
}


/* ============================================================
   SECCIÓN 11 — Upsells "You may also like"
   Estiliza la sección de upsells generada automáticamente por WooCommerce.
   ============================================================ */

/* Wrapper de upsells WC */
body.single-product .up-sells.upsells,
body.single-product section.up-sells {
    clear: both;
    padding: 40px 16px 48px;
    max-width: 860px;
    margin: 0 auto;
    box-sizing: border-box;
}

@media (min-width: 600px) {
    body.single-product .up-sells.upsells,
    body.single-product section.up-sells {
        padding: 48px 24px 56px;
    }
}

@media (min-width: 768px) {
    body.single-product .up-sells.upsells,
    body.single-product section.up-sells {
        padding: 56px 0 64px;
    }
}

/* Título "You may also like" */
body.single-product .up-sells > h2,
body.single-product section.up-sells > h2 {
    font-family: 'Red Rose', serif !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: rgba(255, 255, 255, 0.90) !important;
    margin-bottom: 20px !important;
    letter-spacing: 0.01em;
    text-transform: none;
}

@media (min-width: 600px) {
    body.single-product .up-sells > h2,
    body.single-product section.up-sells > h2 {
        font-size: 20px !important;
        margin-bottom: 24px !important;
    }
}

@media (min-width: 768px) {
    body.single-product .up-sells > h2,
    body.single-product section.up-sells > h2 {
        font-size: 22px !important;
    }
}

/* Grid de productos upsell */
body.single-product .up-sells ul.products {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Reset clearfix ghost cells en grid */
body.single-product .up-sells ul.products::before,
body.single-product .up-sells ul.products::after {
    display: none !important;
    content: none !important;
}

/* 768px+ → 3 columnas */
@media (min-width: 768px) {
    body.single-product .up-sells ul.products {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 20px !important;
    }
}

/* 380px- → 1 columna */
@media (max-width: 380px) {
    body.single-product .up-sells ul.products {
        grid-template-columns: 1fr !important;
    }
}

/* Tarjetas de producto upsell */
body.single-product .up-sells ul.products li.product {
    background-color: #181C26;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: border-color 0.2s ease;
    padding: 0;
    margin: 0 !important;
    /* WooCommerce columns-N gives li.product float:left + width:~22%, which
       collapses the cards inside the grid. Reset both so the grid controls width. */
    width: auto !important;
    float: none !important;
    clear: none !important;
}

body.single-product .up-sells ul.products li.product:hover {
    border-color: rgba(255, 255, 255, 0.20);
}

/* Reset ghost cells de Obelisk dentro de li */
body.single-product .up-sells ul.products li.product::before,
body.single-product .up-sells ul.products li.product::after {
    display: none !important;
    content: none !important;
}

/* Imagen de producto upsell */
body.single-product .up-sells ul.products li.product a img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px 8px 0 0;
}

/* Área de texto del upsell */
body.single-product .up-sells ul.products li.product .woocommerce-loop-product__title,
body.single-product .up-sells ul.products li.product h2.woocommerce-loop-product__title {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: rgba(255, 255, 255, 0.90) !important;
    padding: 12px 12px 4px !important;
    margin: 0 !important;
    line-height: 1.4 !important;
}

/* Precio */
body.single-product .up-sells ul.products li.product .price {
    font-size: 14px !important;
    color: rgba(255, 255, 255, 0.70) !important;
    padding: 0 12px 8px !important;
    display: block !important;
}

body.single-product .up-sells ul.products li.product .price .woocommerce-Price-amount {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* Botón add to cart en upsells */
body.single-product .up-sells ul.products li.product a.button,
body.single-product .up-sells ul.products li.product .button {
    display: block !important;
    margin: 4px 12px 12px !important;
    padding: 8px 12px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-align: center !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    border-radius: 4px !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: rgba(255, 255, 255, 0.80) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    text-decoration: none !important;
    transition: background-color 0.2s ease, color 0.2s ease !important;
}

body.single-product .up-sells ul.products li.product a.button:hover,
body.single-product .up-sells ul.products li.product .button:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

/* Override link cyan Obelisk en upsells — alta especificidad */
body.single-product.woocommerce .up-sells ul.products li.product a.woocommerce-loop-product__link:hover {
    color: #ffffff !important;
    text-decoration: none !important;
}


/* ============================================================
   SECCIÓN 12 — Separador entre tabs/description y el rich content
   (Si WC renderiza el tab "Description" antes del hook, ocultarlo)
   ============================================================ */

/*
 * Si la implementación opta por dejar los tabs de WC y poner el rich content
 * DENTRO del tab via filtro, este bloque no es necesario.
 *
 * Si se usa el hook woocommerce_after_single_product_summary y se quiere
 * suprimir los tabs WC, usar en PHP:
 *   remove_action('woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10);
 *
 * En ese caso, el separador visual entre summary y rich content:
 */
body.single-product .vb-product-rich {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 0;
    padding-top: 40px;
}

@media (min-width: 768px) {
    body.single-product .vb-product-rich {
        padding-top: 48px;
    }
}
