/* ════ HOME PLUS — Vitrina "Ofertas con beneficios" ══════════════════════════
   Spec: _docs/Home Plus · Recorrido v2.pdf (adaptado a diseño vitrina).
   Paleta: navy #002d7b · rojo #b7131a · badges ds19/ds1/promo/urgent. */

:root {
    --hp-navy: #002d7b;
    --hp-red: #b7131a;
}

/* ── Destacada de la semana (dentro del hero) ─────────────────────────────── */
.hp-hero {
    display: block;
    background: #fff;
    border-radius: 1.25rem;
    padding: .7rem .7rem .3rem;
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .45);
    text-decoration: none; color: inherit;
    transition: transform .2s ease, box-shadow .2s ease;
}
.hp-hero:hover { transform: translateY(-4px); box-shadow: 0 36px 70px -20px rgba(0, 0, 0, .55); }
.hp-hero__media { position: relative; border-radius: .9rem; overflow: hidden; aspect-ratio: 16 / 11; background: #e5e7eb; }
.hp-hero__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hp-hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.82) 0%, rgba(0,0,0,.15) 45%, transparent 70%); }
.hp-hero__badges { position: absolute; top: .7rem; left: .7rem; z-index: 2; display: flex; flex-wrap: wrap; gap: .4rem; }
.hp-hero__badge { padding: .3rem .65rem; border-radius: 999px; font-size: .64rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.hp-hero__badge--star   { background: var(--hp-red); color: #fff; }
.hp-hero__badge--urgent { background: #fee2e2; color: #b91c1c; }
.hp-hero__caption { position: absolute; left: .9rem; right: .9rem; bottom: .8rem; z-index: 2; color: #fff; display: flex; flex-direction: column; gap: .1rem; }
.hp-hero__inmo { font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.82); }
.hp-hero__title { font-size: 1.3rem; font-weight: 800; line-height: 1.15; color: #fff; }
.hp-hero__loc { display: flex; align-items: center; gap: .3rem; font-size: .78rem; color: rgba(255,255,255,.85); }
.hp-hero__foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem .6rem .7rem; }
.hp-hero__price span { display: block; font-size: .72rem; color: var(--gray-500, #6b7280); }
.hp-hero__price strong { font-size: 1.35rem; font-weight: 800; color: var(--hp-navy); }
.hp-hero__foot-right { text-align: right; }
.hp-hero__chip { display: inline-flex; align-items: center; gap: .25rem; padding: .25rem .6rem; border-radius: 999px; background: #ecfdf5; color: #047857; font-size: .68rem; font-weight: 800; }
.hp-hero__foot-right small { display: block; margin-top: .25rem; font-size: .7rem; color: var(--gray-500, #6b7280); }
.hp-hero__price small { display: block; margin-top: .2rem; font-size: .7rem; font-weight: 500; color: var(--gray-500, #6b7280); }

/* ── Anuncio Home Plus en el hero: badge de categoría + gancho + CTA ──────── */
.hp-hero__badge--cat               { color: #fff; }
.hp-hero__badge--promocion         { background: var(--hp-red); }
.hp-hero__badge--lanzamiento       { background: #2563eb; }
.hp-hero__badge--ultimas_unidades  { background: #ea580c; }

.hp-hero__promo {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .65rem;
    margin: .55rem .3rem .15rem; padding: .6rem .8rem;
    border-radius: .7rem; background: #fef2f2; border: 1px solid #fbd5d5;
}
.hp-hero__promo--lanzamiento       { background: #eff6ff; border-color: #dbeafe; }
.hp-hero__promo--ultimas_unidades  { background: #fff7ed; border-color: #fed7aa; }
.hp-hero__promo-label { font-size: .62rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--gray-500, #6b7280); }
.hp-hero__promo-value { font-size: 1.15rem; font-weight: 800; line-height: 1.1; color: var(--hp-red); }
.hp-hero__promo--lanzamiento      .hp-hero__promo-value { color: #2563eb; }
.hp-hero__promo--ultimas_unidades .hp-hero__promo-value { color: #ea580c; }
.hp-hero__promo-dato { width: 100%; font-size: .72rem; color: var(--gray-500, #6b7280); }

.hp-hero__cta {
    display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap;
    padding: .6rem .95rem; border-radius: .6rem;
    background: var(--hp-red); color: #fff; font-size: .85rem; font-weight: 800;
    box-shadow: 0 8px 18px -8px rgba(183, 19, 26, .6);
    transition: background .15s ease, transform .15s ease;
}
.hp-hero__cta svg { flex-shrink: 0; }
.hp-hero:hover .hp-hero__cta { background: #8f0f15; transform: translateY(-1px); }

/* El anuncio Home Plus del hero SÍ se ve en móvil/tablet (app.css lo ocultaba
   con .hero__visual{display:none} bajo 1024px). El hero decorativo sigue oculto. */
@media (max-width: 1023px) {
    .hero__visual:has(.hp-hero) { display: flex !important; margin-top: var(--space-xl, 2rem); }
}

/* ── Sección vitrina ──────────────────────────────────────────────────────── */
.hp-section { background: var(--gray-50, #f9fafb); padding-block: var(--space-2xl, 3.5rem); }
.hp-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.hp-head__eyebrow { display: inline-flex; align-items: center; gap: .4rem; font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--hp-red); margin-bottom: .35rem; }
.hp-head__all { display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; font-weight: 700; color: var(--hp-navy); white-space: nowrap; }
.hp-head__all:hover { text-decoration: underline; }

.hp-track {
    display: flex; gap: 1.25rem;
    overflow-x: auto; scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
    padding-bottom: .25rem;
}
.hp-track::-webkit-scrollbar { display: none; }

.hp-card {
    flex: 0 0 85%; scroll-snap-align: start;
    display: flex; flex-direction: column;
    background: #fff; border-radius: 1.1rem; overflow: hidden;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .06);
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease;
}
.hp-card:hover { transform: translateY(-5px); box-shadow: 0 18px 36px -12px rgba(15, 23, 42, .22); }
.hp-card:hover .hp-card__media img { transform: scale(1.05); }

@media (min-width: 640px)  { .hp-card { flex-basis: calc(50% - .625rem); } }
@media (min-width: 1024px) {
    .hp-track { display: grid; grid-template-columns: repeat(4, 1fr); overflow: visible; scroll-snap-type: none; }
    .hp-card { flex-basis: auto; }
    .hp-nav { display: none; }
}

.hp-card__media { position: relative; height: 11.5rem; overflow: hidden; background: var(--gray-100, #f3f4f6); }
.hp-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.hp-card__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.55), transparent 55%); }
.hp-card__badges { position: absolute; top: .7rem; left: .7rem; z-index: 2; display: flex; flex-direction: column; gap: .4rem; align-items: flex-start; }
.hp-badge { padding: .3rem .6rem; border-radius: 999px; font-size: .62rem; font-weight: 800; letter-spacing: .02em; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.hp-badge--promocion        { background: #fef3c7; color: #b45309; }
.hp-badge--lanzamiento      { background: #eff6ff; color: #1d4ed8; }
.hp-badge--ultimas_unidades { background: #fee2e2; color: #b91c1c; }
.hp-badge--destacada        { background: #fff; color: var(--hp-navy); }
.hp-badge--urgent           { background: #fee2e2; color: #b91c1c; }
.hp-card__place { position: absolute; bottom: .7rem; right: .7rem; z-index: 2; padding: .2rem .55rem; border-radius: .4rem; background: rgba(0,0,0,.6); backdrop-filter: blur(3px); color: #fff; font-size: .66rem; font-weight: 700; }

.hp-card__body { display: flex; flex-direction: column; gap: .55rem; padding: 1.1rem 1.15rem 1.15rem; flex: 1; }
.hp-card__inmo { font-size: .66rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--gray-500, #6b7280); margin: 0; }
.hp-card__title { font-size: 1.05rem; font-weight: 800; color: var(--gray-900, #111827); line-height: 1.25; margin: 0; }

.hp-card__benefit { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .55rem .75rem; border-radius: .6rem; background: var(--gray-50, #f9fafb); }
.hp-card__benefit-label { font-size: .72rem; font-weight: 600; color: var(--gray-500, #6b7280); }
.hp-card__benefit-value { font-size: .9rem; font-weight: 800; text-align: right; }
.hp-card__benefit--promocion .hp-card__benefit-value        { color: var(--hp-red); }
.hp-card__benefit--promocion        { background: #fffbeb; }
.hp-card__benefit--lanzamiento .hp-card__benefit-value      { color: #1d4ed8; }
.hp-card__benefit--lanzamiento      { background: #eff6ff; }
.hp-card__benefit--ultimas_unidades .hp-card__benefit-value { color: #b91c1c; }
.hp-card__benefit--ultimas_unidades { background: #fef2f2; }

.hp-card__meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem; }
.hp-card__chips { display: inline-flex; flex-wrap: wrap; gap: .3rem; }
.hp-card__chip { display: inline-flex; align-items: center; gap: .2rem; padding: .18rem .5rem; border-radius: 999px; font-size: .64rem; font-weight: 700; background: #ecfdf5; color: #047857; }
.hp-card__dato { font-size: .74rem; color: var(--gray-500, #6b7280); }

.hp-card__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: .75rem; margin-top: auto; padding-top: .85rem; border-top: 1px solid var(--gray-100, #f3f4f6); }
.hp-card__price span { display: block; font-size: .7rem; color: var(--gray-500, #6b7280); }
.hp-card__price strong { display: block; font-size: 1.2rem; font-weight: 800; color: var(--hp-navy); line-height: 1.2; }
.hp-card__price small { display: block; font-size: .68rem; color: var(--gray-500, #6b7280); }
.hp-card__btn {
    display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap;
    padding: .55rem .85rem; border-radius: .6rem;
    background: var(--hp-navy); color: #fff;
    font-size: .8rem; font-weight: 700;
    transition: background .15s ease;
}
.hp-card__btn svg { flex-shrink: 0; }
.hp-card:hover .hp-card__btn { background: var(--hp-red); }

/* Indicador: puntos + contador (solo carrusel) */
.hp-nav { display: flex; align-items: center; justify-content: center; gap: .75rem; margin-top: 1rem; }
.hp-nav__dots { display: flex; gap: .4rem; }
.hp-nav__dot { width: .45rem; height: .45rem; border-radius: 999px; background: var(--gray-200, #e5e7eb); transition: all .2s ease; border: 0; padding: 0; cursor: pointer; }
.hp-nav__dot--on { width: 1.1rem; background: var(--hp-navy); }
.hp-nav__count { font-size: .7rem; font-weight: 600; color: var(--gray-500, #6b7280); }

/* Accesos rápidos "Busca por subsidio" */
.hp-quick { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: 1.5rem; }
.hp-quick__label { font-size: .8rem; font-weight: 700; color: var(--gray-700, #374151); margin-right: .25rem; }
.hp-quick__chip {
    padding: .4rem .95rem; border-radius: 999px;
    border: 1.5px solid var(--hp-navy); color: var(--hp-navy);
    font-size: .8rem; font-weight: 700; background: #fff;
    transition: background .15s ease, color .15s ease;
}
.hp-quick__chip:hover { background: var(--hp-navy); color: #fff; }
.hp-quick__select {
    padding: .45rem .75rem; border-radius: .6rem;
    border: 1.5px solid var(--gray-200, #e5e7eb);
    font-size: .8rem; color: var(--gray-700, #374151); background: #fff;
    min-width: 11rem;
}

/* ════ FICHA: bloque de oferta Home Plus ═════════════════════════════════════
   Llega desde una tarjeta (?origen=homeplus) → bloque completo oscuro arriba.
   Llega por otro camino → franja compacta bajo el nombre del proyecto. */

.hp-offer {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(220,38,38,.28) 0%, rgba(220,38,38,0) 42%),
        linear-gradient(135deg, #0a1c47 0%, #11347f 100%);
    color: #fff;
    border-radius: 1.1rem;
    padding: 1.6rem 1.75rem;
    margin-bottom: var(--space-lg, 1.5rem);
    box-shadow: 0 14px 40px -12px rgba(11, 31, 78, .55);
    display: grid;
    gap: 1.5rem;
}
/* línea de acento superior por categoría */
.hp-offer::before {
    content: "";
    position: absolute; inset: 0 0 auto 0; height: 4px;
    background: #dc2626;
}
.hp-offer--lanzamiento::before      { background: #2563eb; }
.hp-offer--ultimas_unidades::before { background: #ea580c; }
@media (min-width: 900px) { .hp-offer { grid-template-columns: 1.5fr 1fr; align-items: center; gap: 2rem; } }

.hp-offer__chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .9rem; }
.hp-offer__chip {
    display: inline-flex; align-items: center;
    padding: .34rem .72rem; border-radius: 999px;
    font-size: .625rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
    background: rgba(255,255,255,.12); color: #fff;
    border: 1px solid rgba(255,255,255,.14);
}
.hp-offer__chip--promocion        { background: #dc2626; border-color: transparent; box-shadow: 0 2px 10px rgba(220,38,38,.4); }
.hp-offer__chip--lanzamiento      { background: #2563eb; border-color: transparent; }
.hp-offer__chip--ultimas_unidades { background: #ea580c; border-color: transparent; }
.hp-offer__chip--ok               { background: rgba(34,197,94,.16); color: #6ee7a0; border-color: rgba(110,231,160,.3); }

.hp-offer__cifra {
    color: #fff;                 /* gana al h1..h6 global que lo dejaba oscuro */
    font-size: clamp(1.6rem, 4vw, 2.25rem);
    font-weight: 800; line-height: 1.1; letter-spacing: -.01em;
    margin: 0 0 .5rem;
    text-wrap: balance;
}
.hp-offer__loc { display: flex; align-items: center; gap: .4rem; font-size: .85rem; color: rgba(255,255,255,.82); margin-bottom: .9rem; }
.hp-offer__loc svg { opacity: .8; }
.hp-offer__pitch { font-size: 1rem; line-height: 1.45; font-weight: 500; color: rgba(255,255,255,.92); margin: 0; max-width: 34rem; }
.hp-offer__subs { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .9rem; }
.hp-offer__sub { padding: .25rem .65rem; border-radius: 999px; background: rgba(74,222,128,.14); color: #6ee7a0; font-size: .68rem; font-weight: 700; border: 1px solid rgba(110,231,160,.25); }
.hp-offer__extra {
    display: inline-flex; align-items: center; gap: .55rem; font-size: .88rem; font-weight: 600;
    background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.12);
    border-radius: .7rem; padding: .6rem .85rem; width: fit-content;
}

.hp-offer__side { display: flex; flex-direction: column; gap: 1rem; }
.hp-countdown { display: flex; align-items: center; gap: .75rem; }
.hp-countdown__label { font-size: .64rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: #fca5a5; max-width: 6rem; line-height: 1.35; }
.hp-countdown__boxes { display: flex; gap: .45rem; }
.hp-countdown__box {
    background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
    border-radius: .6rem; padding: .5rem .55rem; text-align: center; min-width: 3rem;
    backdrop-filter: blur(2px);
}
.hp-countdown__num { display: block; font-size: 1.35rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.hp-countdown__unit { display: block; margin-top: .2rem; font-size: .55rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,.6); }

.hp-offer__btn {
    display: flex; align-items: center; justify-content: center; gap: .55rem;
    background: #dc2626; color: #fff;
    border: 0; border-radius: .8rem; cursor: pointer;
    padding: .95rem 1.25rem; font-size: 1.05rem; font-weight: 800;
    box-shadow: 0 10px 26px -8px rgba(220,38,38,.65);
    transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
    width: 100%;
}
.hp-offer__btn:hover { background: #b91c1c; transform: translateY(-2px); box-shadow: 0 14px 30px -8px rgba(220,38,38,.75); }
.hp-offer__btn:active { transform: translateY(0); }
.hp-offer__bases { font-size: .72rem; text-align: center; color: rgba(255,255,255,.65); text-decoration: underline; }
.hp-offer__bases:hover { color: #fff; }

/* Franja compacta */
.hp-strip {
    background: #0b1f4e; color: #fff;
    border-radius: .8rem;
    border-left: 5px solid;
    padding: .8rem 1rem;
    margin-bottom: var(--space-md, 1rem);
    display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem;
}
.hp-strip--promocion        { border-color: #dc2626; }
.hp-strip--lanzamiento      { border-color: #2563eb; }
.hp-strip--ultimas_unidades { border-color: #ea580c; }
.hp-strip__tag { font-size: .6rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #fca5a5; width: 100%; }
.hp-strip__cifra { font-size: 1.05rem; font-weight: 800; }
.hp-strip__count { font-size: .8rem; font-variant-numeric: tabular-nums; opacity: .9; }
.hp-strip__btn {
    margin-left: auto;
    background: #dc2626; color: #fff; border: 0; border-radius: .55rem; cursor: pointer;
    padding: .5rem .9rem; font-size: .8rem; font-weight: 700;
}
.hp-strip__btn:hover { background: #b91c1c; }
.hp-strip__detail { font-size: .75rem; text-decoration: underline; cursor: pointer; background: none; border: 0; color: rgba(255,255,255,.8); }
.hp-strip__more { width: 100%; font-size: .8rem; opacity: .9; display: none; }
.hp-strip__more--open { display: block; }
