/* =====================================================================
   HERO DE ANIVERSARIO + VITRINA — banda oscura full-bleed
   Modo: @promo on-dark (campaña) · Apertura: Banda
   Las cenefas doradas corren de lado a lado del viewport como listones;
   el contenido va en .container. Las cards de la vitrina se estilan en
   vitrina-ofertas.css (variante on-dark).
   ===================================================================== */

/* Paleta de campaña (dorado de aniversario sobre el teal #004349 que
   usan también el popup y el announcement) + tokens de marca usados. */
:root {
    --ha-ink:        #004349;
    --ha-ink-deep:   #003338;
    --ha-gold:       #D8A93A;
    --ha-gold-light: #F0C558;
    --ha-gold-bright:#F7D983;
    --ha-gold-deep:  #B8862A;
    --ha-gold-ink:   #04322F;
    --fiu-coral: #F8796C;
    --fiu-coral-deep: #E35D50;
    --fiu-radius-lg: 20px;
    --fiu-radius-pill: 999px;
    --fiu-ring: 0 0 0 3px rgba(110, 171, 165, .40);
    --fiu-ease-out: cubic-bezier(.22, .61, .36, 1);
    --fiu-ease-back: cubic-bezier(.34, 1.56, .64, 1);
}

.ha-full {
    margin: 0;
}

/* ── Cenefa de rayitas doradas, full-bleed ──
   El relieve sale de un solo gradiente repetido: una línea oscura
   seguida de una clara simula la sombra y la luz de cada varilla. */
.ha-rayas {
    height: 44px;
    background:
        repeating-linear-gradient(90deg,
            rgba(0, 0, 0, .26) 0 1px,
            rgba(255, 255, 255, .32) 1px 3px,
            rgba(0, 0, 0, 0) 3px 7px),
        linear-gradient(180deg, #E9C767 0%, #D8A93A 55%, #B8862A 100%);
    border-bottom: 3px solid rgba(0, 0, 0, .22);
}

.ha-rayas--bottom {
    border-bottom: none;
    border-top: 3px solid rgba(0, 0, 0, .28);
}

/* ── Cuerpo oscuro con brillos dorados muy sutiles ── */
.ha-body {
    background:
        radial-gradient(55% 42% at 12% 0%, rgba(216, 169, 58, .16), transparent 65%),
        radial-gradient(45% 38% at 92% 100%, rgba(216, 169, 58, .10), transparent 70%),
        linear-gradient(180deg, var(--ha-ink) 0%, var(--ha-ink-deep) 100%);
    padding: clamp(32px, 4vw, 56px) 0 clamp(40px, 5vw, 60px);
}

/* ══════════════════════════════════════════════════════════════
   COLLAGE DE FONDO
   Piezas del catálogo y porcentajes sueltos repartidos hacia los
   bordes. El contenido va centrado y ocupa la franja 25%–75% del
   ancho, así que todo el collage vive fuera de esa banda; encima
   va un velo radial que apaga el centro y deja respirar el texto.
   ══════════════════════════════════════════════════════════════ */
.ha-body {
    position: relative;
    overflow: hidden;
}

.ha-body > .container {
    position: relative;
    z-index: 1;
}

/* Cinta de confianza movida dentro de la banda: aire respecto a la
   vitrina de arriba. La card ya es blanca, se lee sobre el verde. */
.ha-body #barra-de-pago {
    margin-top: clamp(30px, 4vw, 52px);
}

.ha-collage {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

/* Velo: ahora el contenido ocupa casi todo el ancho (texto a la
   izquierda, rejilla a la derecha), así que el collage se queda en
   textura de fondo y sólo respira en los márgenes exteriores. */
.ha-collage::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg,
            rgba(0, 51, 56, .30) 0%,
            rgba(0, 51, 56, .88) 12%,
            rgba(0, 51, 56, .92) 50%,
            rgba(0, 51, 56, .88) 88%,
            rgba(0, 51, 56, .30) 100%);
}

.ha-col-item {
    position: absolute;
    display: block;
    border-radius: 16px;
    overflow: hidden;
    opacity: .3;
}

.ha-col-item picture,
.ha-col-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Posiciones "a mano": buscan desorden de collage, no una retícula.
   Los anchos están calculados para no rebasar el 25% / 75% del ancho,
   que es donde arranca el texto centrado. */
.ha-col-item--1 { top: 3%;  left: 1.5%;  width: 252px; aspect-ratio: 4/3;  transform: rotate(-7deg); }
.ha-col-item--2 { top: 33%; left: 4.5%;  width: 212px; aspect-ratio: 1;    transform: rotate(6deg); }
.ha-col-item--3 { top: 66%; left: 1%;    width: 244px; aspect-ratio: 4/3;  transform: rotate(-3deg); }
.ha-col-item--4 { top: 5%;  right: 2%;   width: 234px; aspect-ratio: 1;    transform: rotate(8deg); }
.ha-col-item--5 { top: 35%; right: 5%;   width: 222px; aspect-ratio: 4/3;  transform: rotate(-6deg); }
.ha-col-item--6 { top: 68%; right: 1.5%; width: 248px; aspect-ratio: 1;    transform: rotate(5deg); }
.ha-col-item--7 { top: 1%;  left: 17%;   width: 142px; aspect-ratio: 1;    transform: rotate(11deg); opacity: .32; }
.ha-col-item--8 { top: 84%; right: 17%;  width: 156px; aspect-ratio: 4/3;  transform: rotate(-10deg); opacity: .32; }

.ha-col-pct {
    position: absolute;
    font-family: 'Fredoka', 'Poppins', sans-serif;
    font-weight: 600;
    line-height: 1;
    color: rgba(240, 197, 88, .22);
    user-select: none;
}

.ha-col-pct--1 { top: 21%; left: 12%;   font-size: 6.5rem; transform: rotate(-12deg); }
.ha-col-pct--2 { top: 56%; right: 12.5%; font-size: 7rem;  transform: rotate(9deg); }
.ha-col-pct--3 { top: 2%;  right: 16%;  font-size: 4.6rem; transform: rotate(-6deg); color: rgba(240, 197, 88, .17); }
.ha-col-pct--4 { top: 88%; left: 15%;   font-size: 5.2rem; transform: rotate(13deg); color: rgba(240, 197, 88, .17); }
.ha-col-pct--5 { top: 46%; left: .5%;   font-size: 4rem;   transform: rotate(5deg);  color: rgba(240, 197, 88, .15); }

/* ── Hero a dos columnas: mensaje de campaña + rejilla de producto ── */
.ha-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
    gap: clamp(30px, 4vw, 60px);
    align-items: center;
    margin-bottom: clamp(30px, 3.6vw, 44px);
}

.ha-hero-texto {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: clamp(14px, 1.7vw, 20px);
}

/* Logotipo de aniversario. No pasa de 220px, que es su ancho real: por
   encima se vería blando. */
.ha-logo {
    display: block;
    width: clamp(158px, 15vw, 220px);
}

.ha-logo img {
    width: 100%;
    height: auto;
    display: block;
}

/* "7 años contigo": el número manda, el texto se acomoda a su lado */
.ha-title {
    display: flex;
    align-items: center;
    gap: clamp(10px, 1.4vw, 20px);
    margin: 0;
    color: #ffffff;
    font-weight: 600;
    line-height: .95;
}

.ha-years {
    font-family: 'Fredoka', 'Poppins', sans-serif;
    font-weight: 600;
    font-size: clamp(4.6rem, 2rem + 10vw, 9.5rem);
    line-height: .8;
    letter-spacing: -.04em;
    background: linear-gradient(180deg, var(--ha-gold-bright) 0%, var(--ha-gold) 55%, var(--ha-gold-deep) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    /* respaldo si el navegador no recorta el fondo al texto */
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 6px 18px rgba(216, 169, 58, .4));
}

.ha-years-txt {
    font-family: 'Fredoka', 'Poppins', sans-serif;
    font-weight: 500;
    font-size: clamp(1.7rem, .9rem + 3vw, 3.2rem);
    line-height: 1.02;
    color: #ffffff;
}

.ha-since {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(.8rem, .76rem + .2vw, .9rem);
    font-weight: 600;
    letter-spacing: .04em;
    color: var(--ha-gold-light);
    margin: -8px 0 0;
}

.ha-lede {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(.92rem, .86rem + .28vw, 1.02rem);
    line-height: 1.65;
    color: rgba(255, 255, 255, .8);
    max-width: 48ch;
    margin: 0;
}

.ha-lede strong {
    color: #ffffff;
    font-weight: 700;
}

/* ── Tarjetas de descuento por material ── */
.ha-deals {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    width: 100%;
    max-width: 460px;
}

.ha-deal {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: rgba(255, 255, 255, .96);
    border-radius: var(--fiu-radius-lg);
    padding: 16px 18px 14px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .28);
}

.ha-deal-pct {
    font-family: 'Fredoka', 'Poppins', sans-serif;
    font-weight: 600;
    font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.2rem);
    line-height: 1;
    color: var(--ha-ink);
}

.ha-deal-cat {
    font-family: 'Poppins', sans-serif;
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ha-ink);
    margin-top: 4px;
}

.ha-deal-note {
    font-family: 'Poppins', sans-serif;
    font-size: .74rem;
    line-height: 1.4;
    color: #4b5f5e;
}

/* La de mayor descuento se invierte: fondo oscuro y galón dorado */
.ha-deal--max {
    background: linear-gradient(160deg, #0a4b50 0%, var(--ha-ink-deep) 100%);
    border: 1px solid rgba(216, 169, 58, .55);
}

.ha-deal--max .ha-deal-pct,
.ha-deal--max .ha-deal-cat {
    color: #ffffff;
}

.ha-deal--max .ha-deal-note {
    color: rgba(255, 255, 255, .72);
}

.ha-deal-flag {
    position: absolute;
    top: -11px;
    right: 12px;
    background: linear-gradient(135deg, var(--ha-gold-light), var(--ha-gold));
    color: #3a2b06;
    font-family: 'Poppins', sans-serif;
    font-size: .6rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: var(--fiu-radius-pill);
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .3);
}

/* ── Rejilla de producto (2×2) ── */
.ha-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(12px, 1.5vw, 18px);
}

/* Tarjeta de oferta: foto + nombre + precio, en versión compacta */
.ha-gcard {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: var(--fiu-radius-lg);
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .3);
    transition: transform .25s var(--fiu-ease-out), box-shadow .25s ease;
}

.ha-gcard:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 44px rgba(0, 0, 0, .4);
    text-decoration: none;
}

.ha-gcard:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(240, 197, 88, .6);
}

.ha-gcard-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    background: var(--fiu-coral);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: .72rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: var(--fiu-radius-pill);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .22);
}

.ha-gcard-badge--max {
    background: var(--fiu-coral-deep);
}

.ha-gcard-img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--fiu-mist, #f1f3f5);
}

.ha-gcard-img picture,
.ha-gcard-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .45s var(--fiu-ease-out);
}

.ha-gcard:hover .ha-gcard-img img {
    transform: scale(1.06);
}

.ha-gcard-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 11px 13px 13px;
}

.ha-gcard-nombre {
    font-family: 'Poppins', sans-serif;
    font-size: .84rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--ha-ink);
}

.ha-gcard-precios {
    display: flex;
    align-items: baseline;
    gap: 7px;
}

.ha-gcard-antes {
    font-family: 'Poppins', sans-serif;
    font-size: .74rem;
    color: #94a3b8;
    text-decoration: line-through;
}

.ha-gcard-ahora {
    font-family: 'Fredoka', 'Poppins', sans-serif;
    font-size: 1.12rem;
    font-weight: 600;
    color: var(--fiu-coral);
    font-variant-numeric: tabular-nums;
}

/* ── Countdown: franja centrada que cierra el hero a todo el ancho ── */
.ha-countdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding-top: clamp(24px, 3vw, 36px);
    margin-bottom: clamp(34px, 4.5vw, 56px);
    border-top: 1px solid rgba(216, 169, 58, .28);
}

.ha-countdown-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: clamp(.7rem, .66rem + .16vw, .78rem);
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ha-gold-light);
}

.ha-count-chips {
    display: flex;
    align-items: center;
    gap: clamp(6px, .9vw, 12px);
}

.ha-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: clamp(68px, 8vw, 104px);
    background: linear-gradient(180deg, rgba(0, 0, 0, .34), rgba(0, 0, 0, .18));
    border: 1px solid rgba(216, 169, 58, .5);
    border-radius: 16px;
    padding: clamp(10px, 1.4vw, 16px) clamp(8px, 1.2vw, 14px) clamp(8px, 1vw, 12px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10);
}

.ha-chip b {
    font-family: 'Fredoka', 'Poppins', sans-serif;
    font-weight: 600;
    font-size: clamp(1.7rem, 1.1rem + 2.1vw, 3rem);
    line-height: 1;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.ha-chip small {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(.58rem, .54rem + .16vw, .68rem);
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ha-gold-light);
    margin-top: 6px;
}

/* Dos puntos entre chips, al estilo de un reloj */
.ha-chip-sep {
    font-family: 'Fredoka', 'Poppins', sans-serif;
    font-size: clamp(1.2rem, .8rem + 1.2vw, 2rem);
    line-height: 1;
    color: rgba(216, 169, 58, .55);
    transform: translateY(-.25em);
}

/* ── CTA dorado ── */
.ha-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--ha-gold-light) 0%, var(--ha-gold) 100%);
    color: var(--ha-gold-ink);
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: .92rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 15px 32px;
    border-radius: var(--fiu-radius-pill);
    box-shadow: 0 8px 22px rgba(216, 169, 58, .38);
    transition: transform .15s var(--fiu-ease-out), box-shadow .15s ease, background .2s ease;
}

.ha-btn i {
    transition: transform .25s var(--fiu-ease-back);
}

.ha-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(216, 169, 58, .5);
    background: linear-gradient(135deg, var(--ha-gold-bright) 0%, var(--ha-gold-deep) 100%);
    color: var(--ha-gold-ink);
    text-decoration: none;
}

.ha-btn:hover i {
    transform: translateY(3px);
}

.ha-btn:active {
    transform: translateY(1px) scale(.985);
}

.ha-btn:focus-visible {
    outline: none;
    box-shadow: 0 8px 22px rgba(216, 169, 58, .38), 0 0 0 3px rgba(240, 197, 88, .5);
}

/* CTA: botón dorado + enlace secundario "Ver catálogo completo" */
.ha-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 22px;
    margin-top: clamp(6px, 1vw, 12px);
}

.ha-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: .9rem;
    color: #ffffff;
    text-decoration: none;
    transition: gap .15s ease, color .15s ease;
}

.ha-link svg {
    width: 16px;
    height: 16px;
}

.ha-link:hover {
    color: var(--ha-gold-light);
    gap: 11px;
    text-decoration: none;
}

/* El encabezado de la vitrina (.vit-heading*) se estila en
   vitrina-ofertas.css — versión propia con su tag rojo pulsante y su
   subrayado. Aquí sólo se aclara el título, porque vive sobre la banda
   verde de aniversario y su color de origen es oscuro. */
.ha-body .vit-heading-title {
    color: #ffffff;
}

/* ── Responsive ── */

/* Al angostarse, el texto ocupa casi todo el ancho: el collage se
   repliega para no meterse debajo. Primero se van las piezas interiores
   y los porcentajes cercanos al centro. */
@media (max-width: 1199px) {
    .ha-col-item--7,
    .ha-col-item--8,
    .ha-col-pct--3,
    .ha-col-pct--4 {
        display: none;
    }

    .ha-col-item { width: 186px !important; }
    .ha-col-pct--1 { left: 3%; font-size: 4.6rem; }
    .ha-col-pct--2 { right: 3%; font-size: 5rem; }
    .ha-col-pct--5 { display: none; }
}

@media (max-width: 991px) {
    /* Una columna: el texto arriba, la rejilla debajo */
    .ha-hero {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .ha-grid {
        max-width: 460px;
        margin: 0 auto;
    }

    /* Sólo cuatro piezas en las esquinas, más apagadas */
    .ha-col-item--2,
    .ha-col-item--5,
    .ha-col-pct--1,
    .ha-col-pct--2 {
        display: none;
    }

    .ha-col-item {
        width: 150px !important;
        opacity: .4;
    }
}

/* En móvil el texto llega de borde a borde: el collage solo aportaría
   ruido detrás de las letras, así que se retira por completo. */
@media (max-width: 767px) {
    .ha-collage {
        display: none;
    }

    .ha-rayas {
        height: 26px;
        background:
            repeating-linear-gradient(90deg,
                rgba(0, 0, 0, .26) 0 1px,
                rgba(255, 255, 255, .32) 1px 2px,
                rgba(0, 0, 0, 0) 2px 5px),
            linear-gradient(180deg, #E9C767 0%, #D8A93A 55%, #B8862A 100%);
        border-bottom-width: 2px;
    }

    .ha-rayas--bottom {
        border-bottom: none;
        border-top-width: 2px;
    }
}

@media (max-width: 575px) {
    /* Las dos tarjetas de descuento se apilan antes de apretarse */
    .ha-deals {
        grid-template-columns: 1fr;
        max-width: none;
    }

    .ha-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    /* Los 4 chips deben caber en una línea a 320px sin encogerse */
    .ha-chip {
        min-width: 0;
        flex: 1 1 0;
        padding: 9px 4px 7px;
    }

    .ha-chip-sep {
        display: none;
    }

    .ha-count-chips {
        width: 100%;
        gap: 6px;
    }

    .ha-btn {
        width: 100%;
        justify-content: center;
    }
}
