/* ============================================================
   BIOAUREA · RÍO EDITORIAL — Otros Productos
   v2 "Cauce Narrativo" — horizontal river, leaf-shaped numbered
   badges alternating up/down, hover popup with metric.
   v1.0 (2026-05-07)
   ============================================================ */

.productos-section.rio {
    /* Use the same Tierra cream as every other section */
    --rio-cream:    #f3ede0;
    --rio-cream-2:  #f3ede0;
    --rio-paper:    #fffdf5;
    --rio-ink:      #2a1f12;
    --rio-ink-2:    #574230;
    --rio-mute:     #8d7656;
    --rio-line:     rgba(82, 56, 28, 0.16);
    --rio-line-2:   rgba(82, 56, 28, 0.30);
    --rio-amber:    #c66a1a;
    --rio-rust:     #a4401d;
    --rio-gold:     #d49a2c;
    --rio-burgundy: #7a2a20;

    padding: 0;
    background: transparent;
    overflow: visible;
    position: relative;
    scroll-margin-top: 0;
}
.productos-section.rio::before { display: none; }

.productos-section.rio .container {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 1;
}

/* Outer frame — fills section, no fixed width */
.productos-section.rio .rio-frame {
    width: 100%;
    margin: 0 auto;
    background: var(--rio-cream);
    box-shadow: none;
    position: relative;
    font-family: 'Manrope', system-ui, sans-serif;
    color: var(--rio-ink);
}

.productos-section.rio .rio-stage {
    width: 100%;
    min-height: 640px;
    height: auto;
    position: relative;
    overflow: visible;
    color: var(--rio-ink);
    /* Transparent so the body's page-wide gradient shows through */
    background: transparent;
    /* Compact padding so the section fits in viewport without cropping */
    padding-top: 36px;
    padding-bottom: 110px;
}

/* Inner content stays at a comfortable max-width and is centered */
.productos-section.rio .rio-head,
.productos-section.rio .rio-v2-canvas {
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
}

/* Header */
.productos-section.rio .rio-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    padding: 36px 72px 0;
    gap: 40px;
    flex-wrap: wrap;
}
.productos-section.rio .rio-head-l { max-width: 760px; }
.productos-section.rio .rio-tag {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font: 700 11px 'Manrope', system-ui, sans-serif;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--rio-rust);
    margin-bottom: 18px;
}
.productos-section.rio .rio-tag::before {
    content: '';
    width: 32px; height: 1px;
    background: currentColor;
}
.productos-section.rio .rio-head h2 {
    font-family: 'Fraunces', serif;
    font-weight: 300;
    font-size: 42px;
    line-height: 1.05;
    letter-spacing: -0.025em;
    margin: 0;
    color: var(--rio-ink);
}
.productos-section.rio .rio-head h2 em {
    font-style: italic;
    color: var(--rio-rust);
    font-weight: 400;
}
.productos-section.rio .rio-head .meta {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-size: 17px;
    line-height: 1.5;
    color: var(--rio-mute);
    max-width: 320px;
    text-align: right;
    margin: 0;
}

/* Canvas with horizontal river + stations */
.productos-section.rio .rio-v2-canvas {
    position: relative;
    width: 100%;
    margin-top: 80px;        /* más espacio entre el título y las cards */
    padding: 170px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.productos-section.rio .rio-v2-river {
    position: absolute;
    left: 0; right: 0;
    top: 50%;
    height: 2px;
    pointer-events: none;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(166, 64, 29, 0.45) 8%,
        rgba(212, 154, 44, 0.65) 50%,
        rgba(122, 42, 32, 0.45) 92%,
        transparent 100%);
}
.productos-section.rio .rio-v2-river::before,
.productos-section.rio .rio-v2-river::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--rio-rust);
}
.productos-section.rio .rio-v2-river::before { left: 5%; }
.productos-section.rio .rio-v2-river::after { right: 5%; background: var(--rio-burgundy); }

.productos-section.rio .rio-v2-track {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 0;
    padding: 0 56px;
    width: 100%;
    justify-content: space-between;
}

/* Station — leaf-shaped numbered card */
.productos-section.rio .rio-v2-st {
    position: relative;
    width: 132px;
    cursor: pointer;
    --accent: var(--rio-amber);
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.productos-section.rio .rio-v2-st .anchor {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 18px;
    height: 18px;
    background: var(--accent);
    border: 3px solid var(--rio-cream);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 1px var(--accent), 0 4px 10px rgba(124, 60, 20, 0.30);
    transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 3;
}

.productos-section.rio .rio-v2-st .card {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    background: transparent;
    border: 0;
    padding: 12px 14px 10px;
    transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    text-align: center;
}
.productos-section.rio .rio-v2-st.up .card {
    bottom: calc(50% + 28px);
}
.productos-section.rio .rio-v2-st.down .card {
    top: calc(50% + 28px);
}

/* Leaf-shaped number badge */
.productos-section.rio .rio-v2-st .num {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 56px;
    height: 68px;
    margin: 0 auto 10px;
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-weight: 500;
    font-size: 18px;
    color: var(--accent);
    transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.productos-section.rio .rio-v2-st .num svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.productos-section.rio .rio-v2-st .num svg path {
    fill: var(--rio-paper);
    stroke: var(--accent);
    stroke-width: 2;
    transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.productos-section.rio .rio-v2-st .num span {
    position: relative;
    z-index: 2;
    display: block;
    filter: drop-shadow(0 1px 0 rgba(255, 253, 245, 0.6));
}

.productos-section.rio .rio-v2-st .pre {
    font: 700 9.5px 'Manrope', system-ui, sans-serif;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 6px;
    opacity: 0.85;
}
/* Product NAME — larger, neutral ink color (no accent) */
.productos-section.rio .rio-v2-st .nm {
    font-family: 'Fraunces', serif;
    font-weight: 500;
    font-size: 21px;
    line-height: 1.2;
    letter-spacing: -0.018em;
    color: var(--rio-ink);
    margin: 0;
}
.productos-section.rio .rio-v2-st .body {
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--rio-ink-2);
    margin: 0;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease, margin 0.3s ease;
}
.productos-section.rio .rio-v2-st .metric {
    display: block;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--rio-line);
    text-align: center;
    line-height: 1.4;
}
/* METRIC value — smaller now, kept italic + muted dark */
.productos-section.rio .rio-v2-st .metric .v {
    display: block;
    font: 500 13px 'Fraunces', serif;
    font-style: italic;
    color: var(--rio-ink-2);
    letter-spacing: -0.005em;
}
.productos-section.rio .rio-v2-st .metric .u {
    display: block;
    font: 500 10px 'JetBrains Mono', monospace;
    color: var(--rio-mute);
    margin-top: 2px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease, margin 0.3s ease;
}

/* Hover */
.productos-section.rio .rio-v2-st:hover { z-index: 10; }
.productos-section.rio .rio-v2-st:hover .anchor {
    width: 22px; height: 22px;
    box-shadow: 0 0 0 5px rgba(198, 106, 26, 0.18),
                0 0 0 1px var(--accent),
                0 4px 10px rgba(124, 60, 20, 0.30);
}
.productos-section.rio .rio-v2-st:hover .num {
    transform: translateY(-2px);
}
.productos-section.rio .rio-v2-st:hover .num svg path {
    fill: var(--accent);
    filter: drop-shadow(0 6px 14px rgba(124, 60, 20, 0.30));
}
.productos-section.rio .rio-v2-st:hover .num span {
    color: var(--rio-paper);
    filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.10));
}
/* Hover card — wider (more horizontal) and shorter */
.productos-section.rio .rio-v2-st:hover .card {
    width: 360px;
    background: var(--rio-paper);
    border: 1px solid var(--rio-line);
    border-top: 2px solid var(--accent);
    box-shadow: 0 10px 28px rgba(124, 60, 20, 0.14);
    padding: 14px 18px 14px;
    z-index: 6;
}
.productos-section.rio .rio-v2-st:hover .pre { opacity: 1; }
.productos-section.rio .rio-v2-st:hover .nm { color: var(--accent); }
.productos-section.rio .rio-v2-st:hover .body {
    /* Shorter vertical growth — wider card means body wraps in fewer lines */
    max-height: 90px;
    opacity: 1;
    margin: 8px 0 0;
}
.productos-section.rio .rio-v2-st:hover .metric .u {
    max-height: 36px;
    opacity: 1;
    margin-top: 2px;
}

/* Edge stations (first/last) — anchor card so it doesn't clip viewport sides */
.productos-section.rio .rio-v2-track .rio-v2-st:first-child:hover .card {
    transform: translateX(-15%);
}
.productos-section.rio .rio-v2-track .rio-v2-st:nth-child(2):hover .card {
    transform: translateX(-30%);
}
.productos-section.rio .rio-v2-track .rio-v2-st:nth-last-child(1):hover .card {
    transform: translateX(-85%);
}
.productos-section.rio .rio-v2-track .rio-v2-st:nth-last-child(2):hover .card {
    transform: translateX(-70%);
}

/* Hide legacy header/section-header (we use rio-head instead) */
.productos-section.rio .section-header,
.productos-section.rio .stage-header {
    display: none !important;
}

/* Hide legacy productos-leaf-stage (replaced) */
.productos-section.rio .productos-leaf-host,
.productos-section.rio .productos-leaf-stage,
.productos-section.rio .leaf-arc-list,
.productos-section.rio .leaf-img-wrap {
    display: none !important;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1200px) {
    .productos-section.rio .rio-head {
        padding: 40px 40px 0;
    }
    .productos-section.rio .rio-head h2 {
        font-size: 42px;
    }
    .productos-section.rio .rio-v2-track {
        padding: 0 32px;
    }
    .productos-section.rio .rio-v2-st { width: 110px; }
    .productos-section.rio .rio-v2-st .card { width: 180px; }
    .productos-section.rio .rio-v2-st:hover .card { width: 220px; }
}

@media (max-width: 880px) {
    .productos-section.rio .rio-stage {
        min-height: 0;
        padding-bottom: 40px;
    }
    .productos-section.rio .rio-head {
        flex-direction: column;
        align-items: flex-start;
        padding: 36px 24px 0;
    }
    .productos-section.rio .rio-head h2 {
        font-size: 34px;
    }
    .productos-section.rio .rio-head .meta {
        text-align: left;
        max-width: none;
    }
    /* Switch to vertical river on mobile */
    .productos-section.rio .rio-v2-canvas {
        margin-top: 32px;
        padding: 16px 0 16px;
    }
    .productos-section.rio .rio-v2-river {
        left: 50%;
        right: auto;
        top: 0;
        bottom: 0;
        height: auto;
        width: 2px;
        background: linear-gradient(180deg,
            transparent 0%,
            rgba(166, 64, 29, 0.45) 8%,
            rgba(212, 154, 44, 0.65) 50%,
            rgba(122, 42, 32, 0.45) 92%,
            transparent 100%);
    }
    .productos-section.rio .rio-v2-river::before {
        left: 50%;
        top: 0;
        right: auto;
        transform: translate(-50%, -50%);
    }
    .productos-section.rio .rio-v2-river::after {
        left: 50%;
        right: auto;
        bottom: 0;
        top: auto;
        transform: translate(-50%, 50%);
    }
    .productos-section.rio .rio-v2-track {
        flex-direction: column;
        align-items: stretch;
        gap: 28px;
        padding: 36px 16px;
        width: 100%;
    }
    .productos-section.rio .rio-v2-st {
        position: relative;
        width: 100%;
        display: flex;
        align-items: flex-start;
        gap: 16px;
        padding-left: 50%;
    }
    .productos-section.rio .rio-v2-st.up,
    .productos-section.rio .rio-v2-st.down {
        padding-left: 0;
    }
    .productos-section.rio .rio-v2-st.up { padding-right: 50%; padding-left: 0; }
    .productos-section.rio .rio-v2-st.down { padding-left: 50%; padding-right: 0; }
    .productos-section.rio .rio-v2-st .anchor {
        left: 50%;
        top: 28px;
    }
    .productos-section.rio .rio-v2-st .card {
        position: relative;
        left: auto;
        top: auto;
        bottom: auto;
        transform: none;
        width: 100%;
        max-width: none;
        text-align: left;
        background: var(--rio-paper);
        border: 1px solid var(--rio-line);
        padding: 14px 16px;
        margin: 0 12px;
    }
    .productos-section.rio .rio-v2-st.up .card,
    .productos-section.rio .rio-v2-st.down .card {
        bottom: auto;
        top: auto;
    }
    .productos-section.rio .rio-v2-st .num {
        margin: 0 auto 8px;
    }
    /* On mobile, always show body and metric */
    .productos-section.rio .rio-v2-st .body {
        max-height: 200px;
        opacity: 1;
        margin: 8px 0 0;
    }
    .productos-section.rio .rio-v2-st .metric .u {
        max-height: 36px;
        opacity: 1;
        margin-top: 2px;
    }
}
