/* ============================================================
   catawp_render_tour_with_schema_v2.css
   Rediseño 2026-06-05 — opt-in via option `catawp_tour_page_design`.
   Toda la cascada está namespacedada a .catawp-tp para no chocar con
   ningún CSS legacy que pueda quedarse vivo en otras páginas.
   ============================================================ */

:root {
    --tp-bg:           #fafafa;
    --tp-surface:      #ffffff;
    --tp-surface-2:    #f5f5f7;
    --tp-border:       #e7e7eb;
    --tp-border-strong:#d4d4d8;
    --tp-text:         #18181b;
    --tp-text-muted:   #71717a;
    --tp-text-subtle:  #a1a1aa;
    --tp-primary:      #3b49df;
    --tp-primary-hover:#2e3ab8;
    --tp-success:      #28a745;
    --tp-success-hover:#1f8a37;
    --tp-success-bg:   #f0fdf4;
    --tp-free:         #ff6a00;
    --tp-free-hover:   #e55c00;
    --tp-trending:     #f59e0b;
    --tp-trending-bg:  #fffbeb;
    --tp-red:          #dc2626;
    --tp-radius:       12px;
    --tp-radius-sm:    8px;
    --tp-shadow-sm:    0 1px 3px rgba(16,24,40,.06);
    --tp-shadow-md:    0 4px 16px -4px rgba(16,24,40,.08);
    --tp-shadow-lg:    0 10px 30px -10px rgba(16,24,40,.15);
    --tp-font:         -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
}

.catawp-tp,
.catawp-tp *,
.catawp-tp *::before,
.catawp-tp *::after {
    box-sizing: border-box;
}

.catawp-tp {
    max-width: 1180px;
    margin: 32px auto;
    padding: 0 20px 24px;
    color: var(--tp-text);
    font-family: var(--tp-font);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ---------- TITLE ---------- */
.catawp-tp-header { margin-bottom: 24px; }
.catawp-tp-title {
    margin: 0 0 10px;
    font-size: clamp(26px, 3.5vw, 38px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--tp-text);
}
.catawp-tp-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: var(--tp-text-muted);
    font-size: 14px;
}
.catawp-tp-meta__item { display: inline-flex; align-items: center; gap: 6px; }
.catawp-tp-meta__item i { color: var(--tp-text-subtle); font-size: 13px; }

/* ---------- HERO ---------- */
.catawp-tp-hero {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 28px;
    margin-bottom: 32px;
}
@media (max-width: 980px) {
    .catawp-tp-hero { grid-template-columns: 1fr; gap: 16px; }
}
.catawp-tp-hero__media {
    position: relative;
    border-radius: var(--tp-radius);
    overflow: hidden;
    aspect-ratio: 16 / 11;
    box-shadow: var(--tp-shadow-md);
    cursor: pointer;
}
.catawp-tp-hero__media img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}
.catawp-tp-hero__media:hover img { transform: scale(1.02); }
.catawp-tp-hero__badges {
    position: absolute;
    top: 14px; left: 14px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    max-width: calc(100% - 28px);
}
.catawp-tp-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(6px);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--tp-text);
    box-shadow: var(--tp-shadow-sm);
}
.catawp-tp-badge i { font-size: 11px; }
.catawp-tp-badge--trending { color: var(--tp-trending); }
.catawp-tp-badge--cancel   { color: var(--tp-success); }
.catawp-tp-hero__more-photos {
    position: absolute;
    bottom: 14px; right: 14px;
    background: rgba(0,0,0,.65);
    color: #fff;
    backdrop-filter: blur(6px);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ---------- PRICE CARD ---------- */
.catawp-tp-pricecard {
    background: var(--tp-surface);
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius);
    padding: 22px 22px 18px;
    box-shadow: var(--tp-shadow-md);
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-self: start;
    position: sticky;
    top: 24px;
}
@media (max-width: 980px) {
    .catawp-tp-pricecard { position: static; padding: 18px; }
}
.catawp-tp-pricecard__rating {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--tp-text-muted);
}
.catawp-tp-pricecard__rating-badge {
    background: var(--tp-success);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    padding: 3px 8px;
    border-radius: 6px;
}
.catawp-tp-pricecard__from {
    color: var(--tp-text-muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}
.catawp-tp-pricecard__price {
    display: flex;
    align-items: baseline;
    gap: 12px;
}
.catawp-tp-pricecard__amount {
    font-size: 44px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
    color: var(--tp-text);
}
.catawp-tp-pricecard__currency { font-size: 26px; font-weight: 600; }
.catawp-tp-pricecard__savings {
    background: var(--tp-success-bg);
    color: var(--tp-success);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    align-self: center;
}
.catawp-tp-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 18px;
    background: var(--tp-success);
    color: #fff !important;
    border: none;
    border-radius: var(--tp-radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, transform .1s;
    font-family: inherit;
}
.catawp-tp-cta:hover { background: var(--tp-success-hover); color: #fff !important; text-decoration: none; }
.catawp-tp-cta:active { transform: scale(.98); }
/* Recommendation card: visual upgrade — circular icon badge + más padding,
   más espacios entre líneas, separador entre precio y rating, color de
   trofeo destacado en ambar para que lea como un "premio". */
.catawp-tp-pricecard__best {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 16px 16px;
    background: linear-gradient(135deg, #fffbeb 0%, #fef9c3 100%);
    border: 1px solid #fde68a;
    border-radius: var(--tp-radius);
}
.catawp-tp-pricecard__best-iconwrap {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbbf24, #d97706);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.35);
    font-size: 18px;
}
.catawp-tp-pricecard__best-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    line-height: 1.3;
    min-width: 0;
}
.catawp-tp-pricecard__best-label {
    color: #92400e;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}
.catawp-tp-pricecard__best-name {
    color: var(--tp-text);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.01em;
}
.catawp-tp-pricecard__best-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--tp-text-muted);
    font-size: 13px;
}
.catawp-tp-pricecard__best-meta strong { color: var(--tp-text); }
.catawp-tp-pricecard__best-sep { color: var(--tp-text-subtle); }
.catawp-tp-pricecard__best-rating { color: #b45309; }
.catawp-tp-pricecard__best-rating i { font-size: 11px; }
.catawp-tp-pricecard__free {
    color: var(--tp-text-muted);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.catawp-tp-pricecard__free i { color: var(--tp-free); }
/* Link "vía Guruwalk" — subrayado discontinuo naranja para que se note
   que es clicable sin meterse el botón principal del free tour. */
.catawp-tp-pricecard__free-link {
    color: var(--tp-free) !important;
    text-decoration: underline;
    text-decoration-style: dashed;
    text-decoration-color: var(--tp-free);
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
    font-weight: 600;
    transition: color .15s, text-decoration-color .15s;
}
.catawp-tp-pricecard__free-link:hover {
    color: var(--tp-free-hover) !important;
    text-decoration-color: var(--tp-free-hover);
    text-decoration-style: solid;
}

/* ---------- SECTIONS ---------- */
.catawp-tp-section { margin-bottom: 28px; }
.catawp-tp-section__title {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0 0 14px;
    color: var(--tp-text);
    display: flex;
    align-items: center;
    gap: 10px;
}
.catawp-tp-section__title i { color: var(--tp-primary); font-size: 18px; }
/* Highlighter fluorescente sobre el TEXTO de cada section title (no
   sobre el icono). Banda amarilla en la mitad inferior. box-decoration-
   break: clone hace que cuando el texto wrappea, cada línea reciba su
   propio subrayador (no una banda inclinada cruzando ambas). */
.catawp-tp-section__title-text {
    background-image: linear-gradient(
        180deg,
        transparent 0%,
        transparent 55%,
        rgba(253, 224, 71, 0.72) 55%,
        rgba(253, 224, 71, 0.72) 92%,
        transparent 92%
    );
    background-repeat: no-repeat;
    background-size: 100% 100%;
    padding: 0 4px;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}
.catawp-tp-description {
    background: var(--tp-surface);
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius);
    padding: 20px 22px;
    color: var(--tp-text);
    font-size: 15px;
    line-height: 1.6;
}
.catawp-tp-description p { margin: 0; }

/* ---------- PROVIDERS ---------- */
.catawp-tp-providers {
    background: var(--tp-surface);
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius);
    /* overflow:hidden estaba clipando al tooltip cuando se abría desde
       el header. Movemos el clipping de las esquinas redondas al primer
       y último elemento que tocan los bordes del card, así el tooltip
       puede escapar verticalmente sin que las filas de proveedor se
       desborden por las esquinas. */
}
.catawp-tp-providers > :first-child {
    border-top-left-radius: calc(var(--tp-radius) - 1px);
    border-top-right-radius: calc(var(--tp-radius) - 1px);
}
.catawp-tp-providers > :last-child {
    border-bottom-left-radius: calc(var(--tp-radius) - 1px);
    border-bottom-right-radius: calc(var(--tp-radius) - 1px);
}
.catawp-tp-providers__header {
    padding: 18px 22px 12px;
    border-bottom: 1px solid var(--tp-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.catawp-tp-providers__title { font-size: 16px; font-weight: 600; }
.catawp-tp-providers__title-prefix,
.catawp-tp-providers__title-value { display: inline; }
.catawp-tp-providers__title-prefix { margin-right: 4px; }

/* Custom tooltip: black bg + white text + rounded corners + flecha.
   El bubble está posicionado a la izquierda del icono (right: 0) para
   que no se salga del viewport en desktop. En móvil ocupa todo el ancho
   disponible para garantizar legibilidad. */
.catawp-tp-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: help;
    color: var(--tp-text-muted);
    font-size: 14px;
    outline: none;
}
.catawp-tp-tooltip i { font-size: 14px; }
.catawp-tp-tooltip__bubble {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    /* High z-index para flotar sobre cualquier sección debajo y sobre el
       sticky bar (que está en z-index 9999). 10000 nos da margen. */
    z-index: 10000;
    width: max-content;
    max-width: 320px;
    background: #18181b;
    color: #fff;
    font-size: 12px;
    line-height: 1.45;
    padding: 10px 12px;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,.25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity .15s, transform .15s, visibility .15s;
    pointer-events: none;
    font-weight: 400;
    text-align: left;
    white-space: normal;
}
/* La flechita inferior que apunta al icono */
.catawp-tp-tooltip__bubble::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 6px;
    width: 0;
    height: 0;
    border: 6px solid transparent;
    border-top-color: #18181b;
}
.catawp-tp-tooltip:hover .catawp-tp-tooltip__bubble,
.catawp-tp-tooltip:focus .catawp-tp-tooltip__bubble,
.catawp-tp-tooltip:focus-within .catawp-tp-tooltip__bubble {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
@media (max-width: 600px) {
    /* En móvil el icono del tooltip puede estar centrado en el header,
       lo que hacía que el bubble anclado a `right: 0` se saliera por la
       izquierda del viewport. La solución limpia es cambiar a
       position:fixed para que el bubble flote sobre el viewport
       independientemente de la posición del trigger.
       Aparece como un toast centrado, por encima del sticky CTA bar. */
    .catawp-tp-tooltip__bubble {
        position: fixed;
        bottom: 100px;             /* por encima del sticky CTA (~80-90px) */
        top: auto;
        left: 16px;
        right: 16px;
        max-width: none;
        width: auto;
        font-size: 14px;
        padding: 12px 14px;
        line-height: 1.5;
        z-index: 10001;            /* sobre el sticky CTA (9999) */
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    }
    /* En el modo fixed la flecha pierde sentido (no apunta al trigger),
       la ocultamos. */
    .catawp-tp-tooltip__bubble::after {
        display: none;
    }
}

.catawp-tp-provider {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--tp-border);
    transition: background .15s;
}
.catawp-tp-provider:last-child { border-bottom: none; }
.catawp-tp-provider:hover { background: #fafafa; }
.catawp-tp-provider--best {
    background: linear-gradient(to right, #f0fdf4 0%, #fafafa 60%);
}
.catawp-tp-provider--best:hover {
    background: linear-gradient(to right, #dcfce7 0%, #f4f4f5 60%);
}

.catawp-tp-rank {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--tp-surface-2);
    color: var(--tp-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
    border: 2px solid transparent;
}
.catawp-tp-rank--gold   { background: linear-gradient(135deg, #fde68a, #f59e0b); color: #78350f; border-color: #fcd34d; }
.catawp-tp-rank--silver { background: linear-gradient(135deg, #e5e7eb, #94a3b8); color: #1f2937; border-color: #cbd5e1; }
.catawp-tp-rank--bronze { background: linear-gradient(135deg, #fed7aa, #c2410c); color: #fff7ed; border-color: #fdba74; }
.catawp-tp-rank--free   {
    background: var(--tp-free);
    color: #fff;
    font-size: 11px;
    letter-spacing: 0.04em;
    border-color: transparent;
}

.catawp-tp-provider__info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.catawp-tp-provider__logo-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.catawp-tp-provider__logo {
    height: 24px;
    max-width: 120px;
    object-fit: contain;
    object-position: left center;
}
.catawp-tp-provider__inline-stats { display: none; }
.catawp-tp-provider__stats {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--tp-text-muted);
    flex-wrap: wrap;
}
.catawp-tp-provider__rating-pill {
    background: var(--tp-success);
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
}
.catawp-tp-provider__savings {
    color: var(--tp-success);
    font-weight: 600;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.catawp-tp-provider__savings i { font-size: 12px; }

.catawp-tp-provider__action {
    display: flex;
    align-items: center;
    gap: 14px;
}
.catawp-tp-provider__price {
    font-size: 22px;
    font-weight: 700;
    color: var(--tp-text);
    letter-spacing: -0.01em;
}
.catawp-tp-provider__price--free {
    color: var(--tp-free);
    font-size: 16px;
}

.catawp-tp-provider__btn {
    background: var(--tp-primary);
    color: #fff !important;
    border: none;
    padding: 10px 16px;
    border-radius: var(--tp-radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background .15s, box-shadow .15s;
}
.catawp-tp-provider__btn:hover {
    background: var(--tp-primary-hover);
    color: #fff !important;
    text-decoration: none;
    box-shadow: 0 0 10px rgba(59,73,223,0.5);
}
.catawp-tp-provider--best .catawp-tp-provider__btn { background: var(--tp-success); }
.catawp-tp-provider--best .catawp-tp-provider__btn:hover {
    background: var(--tp-success-hover);
    box-shadow: 0 0 10px rgba(40,167,69,0.5);
}
.catawp-tp-provider--free .catawp-tp-provider__btn { background: var(--tp-free); }
.catawp-tp-provider--free .catawp-tp-provider__btn:hover {
    background: var(--tp-free-hover);
    box-shadow: 0 0 10px rgba(255,106,0,0.5);
}

.catawp-tp-provider__btn-price {
    display: none;
    font-weight: 700;
}
.catawp-tp-provider__btn-price::before { content: "·"; margin: 0 4px; opacity: .7; }

/* ---------- MOBILE PROVIDERS ---------- */
@media (max-width: 700px) {
    .catawp-tp-provider {
        grid-template-columns: 44px 1fr;
        grid-template-areas:
            "rank info"
            "action action";
        row-gap: 10px;
        padding: 14px 16px;
    }
    .catawp-tp-rank { grid-area: rank; width: 36px; height: 36px; font-size: 15px; }
    .catawp-tp-rank--free { font-size: 9px; }
    .catawp-tp-provider__info { grid-area: info; gap: 6px; }
    .catawp-tp-provider__logo-row {
        flex-wrap: nowrap;
        min-width: 0;
    }
    .catawp-tp-provider__logo-row {
        /* Round 6: volvemos a row para que logo + rating + "opiniones"
           quepan en una sola línea. Tamaños ajustados:
           - logo 24px (round 5 puso 30 = demasiado grande, no entraba)
           - stats 12px + pill 11px = compactos pero legibles */
        flex-direction: row;
        align-items: center;
        gap: 10px;
        flex-wrap: nowrap;
        min-width: 0;
    }
    .catawp-tp-provider__logo-row .catawp-tp-provider__logo {
        flex-shrink: 0;
        height: 24px;
        max-width: 100px;
    }
    .catawp-tp-provider__inline-stats {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 12px;
        color: var(--tp-text-muted);
        flex-wrap: nowrap;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
        flex: 1;
    }
    .catawp-tp-provider__inline-stats .catawp-tp-provider__rating-pill {
        font-size: 11px;
        padding: 2px 6px;
        flex-shrink: 0;
    }
    .catawp-tp-provider__stats { margin-top: 2px; }
    .catawp-tp-provider__stats > span:not(.catawp-tp-provider__savings) { display: none; }

    .catawp-tp-provider__action {
        grid-area: action;
        width: 100%;
        padding-top: 8px;
        border-top: 1px dashed var(--tp-border);
    }
    .catawp-tp-provider__price { display: none; }
    .catawp-tp-provider__btn {
        flex: 1;
        justify-content: center;
        padding: 13px 18px;
        font-size: 14px;
        gap: 6px;
        width: 100%;
    }
    .catawp-tp-provider__btn-price { display: inline; }
    .catawp-tp-providers__header { padding: 14px 16px 10px; }
}

/* ---------- PRICE HISTORY ---------- */
.catawp-tp-history {
    background: var(--tp-surface);
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius);
    overflow: hidden;
}
.catawp-tp-history__header {
    padding: 16px 22px;
    border-bottom: 1px solid var(--tp-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.catawp-tp-history__header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.catawp-tp-history__header h3 i { color: var(--tp-primary); }
.catawp-tp-history__summary {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: var(--tp-text-muted);
}
.catawp-tp-history__summary strong { color: var(--tp-text); }
.catawp-tp-history__chart {
    padding: 22px;
    background: linear-gradient(to bottom, var(--tp-surface) 0%, var(--tp-surface-2) 100%);
}
.catawp-tp-history__chart-wrap {
    position: relative;
    width: 100%;
    margin: 0 auto;
    height: 260px;
}
.catawp-tp-history__chart canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.catawp-tp-history__annotations {
    display: grid;
    /* Round 6: 3 columnas (min, max, reservas-totales). Las tres usan
       el mismo card visual, solo cambia el color del icono según
       semántica (verde = bajo, rojo = alto, azul = volumen). */
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 18px 22px 22px;
    margin-top: 8px;
    border-top: 1px solid var(--tp-border);
}
.catawp-tp-history__ann {
    background: var(--tp-surface);
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius-sm);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.catawp-tp-history__ann-icon {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.catawp-tp-history__ann--min .catawp-tp-history__ann-icon { background: var(--tp-success-bg); color: var(--tp-success); }
.catawp-tp-history__ann--max .catawp-tp-history__ann-icon { background: #fef2f2; color: var(--tp-red); }
.catawp-tp-history__ann--tickets .catawp-tp-history__ann-icon { background: #eef2ff; color: var(--tp-primary); }
.catawp-tp-history__ann-body { display: flex; flex-direction: column; gap: 2px; }
.catawp-tp-history__ann-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--tp-text-muted);
    font-weight: 600;
}
.catawp-tp-history__ann-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--tp-text);
    letter-spacing: -0.01em;
}
.catawp-tp-history__ann-detail { font-size: 12px; color: var(--tp-text-muted); }

/* Tablet: 1 fila para min/max, tickets debajo a ancho completo. */
@media (max-width: 980px) and (min-width: 701px) {
    .catawp-tp-history__annotations {
        grid-template-columns: 1fr 1fr;
    }
    .catawp-tp-history__ann--tickets {
        grid-column: 1 / -1;
    }
}
@media (max-width: 700px) {
    .catawp-tp-history__annotations { grid-template-columns: 1fr; }
    .catawp-tp-history__chart { padding: 14px; }
    .catawp-tp-history__chart-wrap { height: 220px; }
}

/* ---------- GALLERY ---------- */
.catawp-tp-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
@media (max-width: 700px) {
    .catawp-tp-gallery {
        grid-auto-flow: column;
        grid-auto-columns: 70%;
        grid-template-columns: none;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 8px;
        margin: 0 -20px;
        padding-left: 20px;
        padding-right: 20px;
    }
    .catawp-tp-gallery img { scroll-snap-align: start; }
}
.catawp-tp-gallery img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: var(--tp-radius-sm);
    cursor: pointer;
    transition: transform .2s;
}
.catawp-tp-gallery img:hover { transform: scale(1.02); }

/* ---------- LIGHTBOX ---------- */
.catawp-tp-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(15, 15, 18, 0.92);
    backdrop-filter: blur(8px);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}
.catawp-tp-lightbox[hidden] { display: none !important; }
.catawp-tp-lightbox.is-open { display: flex; }
.catawp-tp-lightbox__inner {
    position: relative;
    max-width: 1200px;
    max-height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.catawp-tp-lightbox__image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--tp-radius);
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
    user-select: none;
}
.catawp-tp-lightbox__close,
.catawp-tp-lightbox__nav {
    position: absolute;
    background: rgba(255,255,255,.1);
    backdrop-filter: blur(10px);
    color: #fff;
    border: 1px solid rgba(255,255,255,.2);
    width: 48px; height: 48px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, transform .1s;
}
.catawp-tp-lightbox__close:hover,
.catawp-tp-lightbox__nav:hover {
    background: rgba(255,255,255,.2);
    transform: scale(1.05);
}
.catawp-tp-lightbox__close { top: -56px; right: 0; }
.catawp-tp-lightbox__nav--prev { left: -64px; }
.catawp-tp-lightbox__nav--next { right: -64px; }
.catawp-tp-lightbox__counter {
    position: absolute;
    bottom: -42px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,.8);
    font-size: 13px;
    font-weight: 500;
    background: rgba(255,255,255,.08);
    padding: 5px 12px;
    border-radius: 999px;
}
@media (max-width: 768px) {
    .catawp-tp-lightbox { padding: 16px; }
    .catawp-tp-lightbox__close { top: -54px; right: 8px; }
    .catawp-tp-lightbox__nav--prev,
    .catawp-tp-lightbox__nav--next { top: 50%; transform: translateY(-50%); }
    .catawp-tp-lightbox__nav--prev { left: 8px; }
    .catawp-tp-lightbox__nav--next { right: 8px; }
    .catawp-tp-lightbox__image { max-height: 70vh; }
    .catawp-tp-lightbox__counter { bottom: -38px; }
}

/* ---------- STICKY BAR ---------- */
.catawp-tp-sticky {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--tp-surface);
    border-top: 1px solid var(--tp-border);
    padding: 12px 16px;
    box-shadow: 0 -4px 16px -4px rgba(16,24,40,.10);
    display: none;
    z-index: 9999;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    font-family: var(--tp-font);
}
@media (max-width: 980px) {
    .catawp-tp-sticky { display: flex; }
    /* Add bottom space to body so the last section isn't covered by the bar */
    body.catawp-tp-has-sticky { padding-bottom: 90px; }
}
.catawp-tp-sticky__price { display: flex; flex-direction: column; line-height: 1.1; flex-shrink: 0; }
.catawp-tp-sticky__price-label {
    font-size: 11px;
    color: var(--tp-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}
.catawp-tp-sticky__price-value { font-size: 20px; font-weight: 700; color: var(--tp-text); }
.catawp-tp-sticky__cta {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 20px;
    background: var(--tp-success);
    color: #fff !important;
    border: none;
    border-radius: var(--tp-radius-sm);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s;
    max-width: 220px;
}
.catawp-tp-sticky__cta:hover { background: var(--tp-success-hover); color: #fff !important; text-decoration: none; }

/* ---------- MOBILE: providers subtitle in two centered lines ---------- */
/* En desktop el subtítulo va en una sola línea, label + valor inline.
   En móvil lo partimos: "Ordenadas por:" arriba, y "mejor relación
   precio/valoración" debajo con highlighter fluorescente y tamaño más
   pequeño. */
@media (max-width: 600px) {
    .catawp-tp-providers__header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 6px;
    }
    .catawp-tp-providers__title {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        font-size: 16px;
        font-weight: 500;
        line-height: 1.3;
    }
    .catawp-tp-providers__title-prefix {
        margin-right: 0;
        color: var(--tp-text);
        font-weight: 600;
        font-size: 16px;
    }
    .catawp-tp-providers__title-value {
        font-size: 15px;
        font-weight: 600;
        color: var(--tp-text);
        /* Highlighter LILA / PÚRPURA claro — solo en la 2nd línea para
           distinguirla del valor secundario sin gritar. Mismo recurso
           que los section titles pero con violet-300 en vez de yellow. */
        background-image: linear-gradient(
            180deg,
            transparent 0%,
            transparent 55%,
            rgba(196, 181, 253, 0.75) 55%,
            rgba(196, 181, 253, 0.75) 92%,
            transparent 92%
        );
        background-repeat: no-repeat;
        background-size: 100% 100%;
        padding: 0 6px;
    }
}

/* ---------- STICKY BAR FIX ---------- */
/* En el round 3 el usuario reportó "veo bastantes píxeles de espacio y
   cuando voy scrollando se ve el contenido en ese hueco". El fix:
   - Forzar background sólido blanco (sin var fallback que pueda fallar
     si el cascade no resuelve).
   - Subir el body padding a 110px para garantizar que el último
     contenido no quede tapado y que el "hueco" perceptible desaparezca.
   - Asegurar que el bar no tiene ningún margin/border que aparezca
     como gap encima. */
@media (max-width: 980px) {
    body.catawp-tp-has-sticky { padding-bottom: 110px; }
    .catawp-tp-sticky {
        /* Triple candado contra la "ranura de píxeles" que reportaba el
           usuario en móvil:
           1. bg blanco !important para que ningún cascade (theme, ad
              block, dark mode reader) pueda dejarlo transparente.
           2. min-height + safe-area-inset garantiza que la barra
              cubra desde su top hasta el indicador del home, incluso en
              iPhones con home bar (~34px).
           3. ::after pseudo-element pintando blanco hasta 200px por
              debajo de la barra — fallback para rendering quirks de
              iOS donde la safe area se quedaba transparente. */
        background: #ffffff !important;
        background-color: #ffffff !important;
        margin: 0;
        border-bottom: 0;
        line-height: 1;
        min-height: calc(64px + env(safe-area-inset-bottom, 0px));
    }
    .catawp-tp-sticky::after {
        content: '';
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        height: 200px;
        background: #ffffff;
        pointer-events: none;
    }
    .catawp-tp-sticky__price-label,
    .catawp-tp-sticky__price-value { line-height: 1.1; }
}
