/* =============================================================================
   Shop Hero — Text Rotate + Floating Products
   Prefijo: .sh-hero-    Ancla: #sh-hero-section
   ============================================================================= */

#sh-hero-section {
    --sh-blue:       #002FD9;
    --sh-celeste:    #38BEFF;
    --sh-black:      #0A1A2E;
    --sh-gray:       #4A5A78;
    --sh-snow:       #F5F9FF;
    --sh-font:       -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
}

/* =============================================================================
   INTEGRACIÓN HEADER ↔ HERO — eliminar gap blanco entre header fijo y hero
   El #vi-header-wrapper es un spacer del header flotante; en el catálogo
   queremos que el hero quede pegado al header sin franja blanca.
   ============================================================================= */
.woocommerce-shop #vi-header-wrapper,
.woocommerce.archive #vi-header-wrapper,
.post-type-archive-product #vi-header-wrapper,
.tax-product_cat #vi-header-wrapper,
.tax-product_tag #vi-header-wrapper {
    display: none !important;
}

.woocommerce-shop body,
.woocommerce-shop #page,
.woocommerce-shop .hfeed,
.woocommerce.archive body,
.woocommerce.archive #page,
.woocommerce.archive .hfeed,
.post-type-archive-product body,
.post-type-archive-product #page,
.post-type-archive-product .hfeed,
.tax-product_cat #page,
.tax-product_cat .hfeed,
.tax-product_tag #page,
.tax-product_tag .hfeed {
    padding-top: 0 !important;
    margin-top:  0 !important;
}

/* Reset top spacing del #content que viene después del hero */
.woocommerce-shop #content,
.post-type-archive-product #content,
.tax-product_cat #content,
.tax-product_tag #content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* =============================================================================
   SECCIÓN — full-bleed, fondo blanco con leve degradado celeste
   ============================================================================= */
#sh-hero-section {
    position: relative;
    /* Inyectado vía astra_content_before → ya está a nivel body, simple width:100% */
    width: 100%;
    min-height: clamp(560px, 88vh, 820px);
    padding: clamp(5rem, 10vw, 8rem) 1.5rem clamp(4rem, 8vw, 6rem);
    overflow: hidden;
    background:
        radial-gradient(ellipse at 50% 110%, rgba(0,47,217,0.10), transparent 60%),
        radial-gradient(ellipse at 50% -10%, rgba(56,190,255,0.16), transparent 60%),
        #FFFFFF;
    margin: 0 !important;
    box-shadow: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Clear absoluto: si algún ancestro fuera flex/grid, esto rompe el row */
    clear: both;
}

/* =============================================================================
   STAGE DE PARALLAX — productos flotantes con transformación 3D
   ============================================================================= */
#sh-hero-section .sh-hero-section__stage {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

#sh-hero-section .sh-hero-section__float {
    position: absolute;
    will-change: transform;
    transition: transform 0.08s linear;
    pointer-events: none;
    /* drop-shadow ya que son PNGs sin marco */
    filter: drop-shadow(0 18px 30px rgba(0,47,217,0.18))
            drop-shadow(0 6px 12px rgba(0,0,0,0.08));
}

#sh-hero-section .sh-hero-section__float img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}

/* ── Posiciones específicas (≈ landing-hero del 21st) ────────────────────── */
/* 0 — pequeño, esquina superior izquierda */
#sh-hero-section .sh-hero-section__float--0 {
    top: 14%; left: 4%;
    width: clamp(80px, 11vw, 150px);
    transform: rotate(-6deg);
}
/* 1 — mediano, parte superior izquierda */
#sh-hero-section .sh-hero-section__float--1 {
    top: 4%; left: 12%;
    width: clamp(110px, 16vw, 230px);
    transform: rotate(-12deg);
}
/* 2 — grande, parte inferior izquierda */
#sh-hero-section .sh-hero-section__float--2 {
    bottom: 6%; left: 5%;
    width: clamp(130px, 18vw, 260px);
    transform: rotate(-4deg);
}
/* 3 — mediano, parte superior derecha */
#sh-hero-section .sh-hero-section__float--3 {
    top: 6%; right: 8%;
    width: clamp(110px, 16vw, 230px);
    transform: rotate(6deg);
}
/* 4 — grande, parte inferior derecha */
#sh-hero-section .sh-hero-section__float--4 {
    bottom: 4%; right: 4%;
    width: clamp(140px, 20vw, 300px);
    transform: rotate(15deg);
}

/* =============================================================================
   CONTENIDO CENTRAL — H1, subtítulo, CTAs
   ============================================================================= */
#sh-hero-section .sh-hero-section__inner {
    position: relative;
    z-index: 10;
    max-width: 920px;
    width: 100%;
    text-align: center;
    pointer-events: auto;
}

#sh-hero-section .sh-hero-section__title {
    font-family: var(--sh-font) !important;
    font-size: clamp(2.6rem, 8vw, 6rem) !important;
    font-weight: 800 !important;
    line-height: 1.02 !important;
    letter-spacing: -0.045em !important;
    color: var(--sh-black) !important;
    margin: 0 0 1.75rem !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

#sh-hero-section .sh-hero-section__line {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

/* Palabra rotativa — fondo azul corporativo + clip text */
#sh-hero-section .sh-hero-section__rotate {
    display: inline-block;
    padding: 0.05em 0.45em 0.18em;
    border-radius: 16px;
    background: var(--sh-blue);
    color: #FFFFFF;
    overflow: hidden;
    /* Altura mínima para evitar saltos al cambiar de palabra */
    min-width: 1ch;
    line-height: 1;
    box-shadow:
        0 12px 30px rgba(0, 47, 217, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    will-change: contents;
}

/* Cada carácter al rotar (spans inyectados por JS) */
#sh-hero-section .sh-hero-section__rotate .sh-char {
    display: inline-block;
    opacity: 0;
    transform: translateY(110%);
    animation: sh-char-in 0.55s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}
#sh-hero-section .sh-hero-section__rotate.is-exiting .sh-char {
    animation: sh-char-out 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes sh-char-in {
    0%   { opacity: 0; transform: translateY(110%); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes sh-char-out {
    0%   { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-120%); }
}

/* =============================================================================
   SUBTÍTULO
   ============================================================================= */
#sh-hero-section .sh-hero-section__subtitle {
    font-family: var(--sh-font) !important;
    font-size: clamp(1.05rem, 2vw, 1.3rem) !important;
    font-weight: 500 !important;
    line-height: 1.55 !important;
    color: var(--sh-gray) !important;
    max-width: 620px !important;
    margin: 0 auto 2.5rem !important;
    padding: 0 !important;
    text-shadow: 0 1px 12px rgba(255, 255, 255, 0.55);
}

/* =============================================================================
   CTAs
   ============================================================================= */
#sh-hero-section .sh-hero-section__cta-group {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.85rem;
}

#sh-hero-section .sh-hero-section__cta,
#sh-hero-section .sh-hero-section__cta:visited {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.95rem 1.85rem;
    font-family: var(--sh-font);
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.01em;
    text-decoration: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    white-space: nowrap;
}

#sh-hero-section .sh-hero-section__cta--primary {
    color: #FFFFFF !important;
    background: var(--sh-blue);
    border: 1.5px solid var(--sh-blue);
    box-shadow:
        0 4px 24px rgba(0, 47, 217, 0.50),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
#sh-hero-section .sh-hero-section__cta--primary:hover {
    transform: translateY(-2px);
    box-shadow:
        0 10px 40px rgba(0, 47, 217, 0.65),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    color: #FFFFFF !important;
}

#sh-hero-section .sh-hero-section__cta--secondary {
    color: var(--sh-blue) !important;
    background: rgba(255, 255, 255, 0.55);
    border: 1.5px solid rgba(0, 47, 217, 0.25);
    backdrop-filter: blur(10px) saturate(140%);
    -webkit-backdrop-filter: blur(10px) saturate(140%);
}
#sh-hero-section .sh-hero-section__cta--secondary:hover {
    background: rgba(255, 255, 255, 0.85);
    border-color: var(--sh-blue);
    transform: translateY(-1px);
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

/* Tablet — mantener floats pero ajustar tipografía */
@media (max-width: 900px) {
    #sh-hero-section {
        min-height: auto;
        padding: 7rem 1.25rem 5rem;
    }
    #sh-hero-section .sh-hero-section__title {
        font-size: clamp(2.4rem, 11vw, 4rem) !important;
    }
    #sh-hero-section .sh-hero-section__rotate {
        padding: 0.05em 0.4em 0.18em;
        border-radius: 12px;
    }
    /* Reducir tamaño de floats en tablet para que no tapen el texto */
    #sh-hero-section .sh-hero-section__float--1 { width: clamp(90px, 12vw, 160px); }
    #sh-hero-section .sh-hero-section__float--2 { width: clamp(100px, 14vw, 190px); }
    #sh-hero-section .sh-hero-section__float--3 { width: clamp(90px, 12vw, 160px); }
    #sh-hero-section .sh-hero-section__float--4 { width: clamp(110px, 15vw, 200px); }
}

/* Mobile — ocultar TODOS los floats, solo texto + CTAs */
@media (max-width: 640px) {
    #sh-hero-section {
        min-height: auto;
        padding: 6.5rem 1.25rem 4rem;
        /* En mobile full-bleed sigue funcionando por la regla base */
    }

    /* Ocultar todas las imágenes flotantes en mobile — evita que aparezcan
       fuera de lugar por el position:absolute dentro de una sección sin altura fija */
    #sh-hero-section .sh-hero-section__stage { display: none; }

    #sh-hero-section .sh-hero-section__cta-group { width: 100%; flex-direction: column; }
    #sh-hero-section .sh-hero-section__cta {
        width: 100%;
        justify-content: center;
        max-width: 340px;
        margin: 0 auto;
    }
}

/* =============================================================================
   REDUCE MOTION
   ============================================================================= */
@media (prefers-reduced-motion: reduce) {
    #sh-hero-section .sh-hero-section__float { transition: none !important; transform: none !important; }
    #sh-hero-section .sh-hero-section__rotate .sh-char {
        opacity: 1 !important; transform: none !important; animation: none !important;
    }
}
