/* ============================================================
   hero.css — Banner hero principal + carousel
   ============================================================ */


/* ============================================================
   HERO
   ============================================================ */

.hero {
    position: relative;
    /*
     * Altura responsiva:
     *
     * celular       -> mínimo 28rem
     * telas médias  -> cresce proporcionalmente
     * desktop       -> máximo 36rem
     */
    min-height: clamp(28rem, 45vw, 36rem);
    display: flex;
    align-items: center;
    background-color: var(--ecom-color-secondary-900);
    overflow: hidden;
}


/* ============================================================
   CAROUSEL DA HERO
   ============================================================ */

.hero__slides {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}


.hero__slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: inherit;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 650ms ease, visibility 650ms ease;
}


.hero__slide--active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 1;
}


/* ============================================================
   HERO FIXO
   ============================================================ */

/*
 * IMPORTANTE:
 *
 * Sua Default.aspx usa:
 *
 * class="hero hero--fixed"
 *
 * Por isso precisamos garantir que o slide continue
 * ocupando toda a altura da HERO.
 *
 * Isso também sobrescreve o position:relative que existia
 * na regra antiga da Default.aspx.
 */

.hero.hero--fixed .hero__slides {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    transform: none !important;
}


.hero.hero--fixed .hero__slide {
    position: absolute !important;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none !important;
}


/*
 * Hero fixo não possui controles de carousel.
 */

.hero.hero--fixed .hero__arrow,
.hero.hero--fixed .hero__dots,
.hero.hero--fixed .carousel__arrow,
.hero.hero--fixed .carousel__dots {
    display: none !important;
}


/* ============================================================
   CONTAINER
   ============================================================ */

.hero__slide > .container {
    position: relative;
    z-index: 2;
    width: 100%;
}


/* ============================================================
   IMAGEM DE FUNDO
   ============================================================ */

.hero__background {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}


    .hero__background img {
        display: block;
        width: 100%;
        height: 100%;
        min-width: 100%;
        min-height: 100%;
        object-fit: initial;
        object-position: center center;
    }


/* ============================================================
   OVERLAY
   ============================================================ */

.hero__overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: linear-gradient( to right, rgb(15 23 42 / 0.85) 0%, rgb(15 23 42 / 0.6) 50%, rgb(15 23 42 / 0.3) 100% );
}


/* ============================================================
   CONTEÚDO
   ============================================================ */

.hero__content {
    position: relative;
    z-index: 2;
    max-width: 36rem;
    padding-block: var(--ecom-space-12);
    text-align: left;
    margin-right: auto;
}


/* ============================================================
   BADGE
   ============================================================ */

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: var(--ecom-space-2);
    padding: var(--ecom-space-2) var(--ecom-space-4);
    background-color: rgb(249 115 22 / 0.15);
    border: 1px solid rgb(249 115 22 / 0.3);
    border-radius: var(--ecom-radius-full);
    font-size: var(--ecom-text-xs);
    font-weight: var(--ecom-font-semibold);
    color: var(--ecom-color-primary-400);
    margin-bottom: var(--ecom-space-6);
}


.hero__badge-dot {
    width: 0.5rem;
    height: 0.5rem;
    background-color: var(--ecom-color-primary-500);
    border-radius: var(--ecom-radius-full);
    flex-shrink: 0;
}


/* ============================================================
   TÍTULO
   ============================================================ */

.hero__title {
    font-size: var(--ecom-text-3xl);
    color: var(--ecom-color-neutral-0);
    margin-bottom: var(--ecom-space-4);
    line-height: var(--ecom-leading-tight);
}


@media (min-width: 768px) {

    .hero__title {
        font-size: var(--ecom-text-4xl);
    }
}


@media (min-width: 1024px) {

    .hero__title {
        font-size: var(--ecom-text-5xl);
    }
}


/* ============================================================
   DESCRIÇÃO
   ============================================================ */

.hero__description {
    font-size: var(--ecom-text-base);
    color: var(--ecom-color-neutral-300);
    margin-bottom: var(--ecom-space-8);
    line-height: var(--ecom-leading-relaxed);
}


/* ============================================================
   BOTÕES
   ============================================================ */

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--ecom-space-4);
}


/* ============================================================
   SETAS
   ============================================================ */

.hero .hero__arrow {
    top: 50%;
    z-index: 5;
}


.hero .hero__arrow--prev {
    left: max( var(--ecom-space-2), calc((100vw - 1280px) / 2) );
}


.hero .hero__arrow--next {
    right: max( var(--ecom-space-2), calc((100vw - 1280px) / 2) );
}


/* ============================================================
   DOTS
   ============================================================ */

.hero .hero__dots {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: var(--ecom-space-5);
    transform: translateX(-50%);
    margin-top: 0;
    padding: 0.5rem 0.75rem;
    border-radius: var(--ecom-radius-full);
    background: rgb(15 23 42 / 0.45);
    backdrop-filter: blur(4px);
}


    .hero .hero__dots .carousel__dot {
        background-color: rgb(255 255 255 / 0.6);
    }


        .hero .hero__dots .carousel__dot:hover {
            background-color: rgb(255 255 255 / 0.9);
        }


    .hero .hero__dots .carousel__dot--active {
        background-color: var(--ecom-color-primary-500);
    }


/* ============================================================
   TABLET
   ============================================================ */

@media (min-width: 768px) {

    /*
     * Mantemos um mínimo confortável no desktop/tablet.
     *
     * O clamp() da .hero continua controlando telas maiores.
     */

    .hero {
        min-height: clamp( 32rem, 45vw, 36rem );
    }
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 767px) {

    .hero {
        /*
         * No celular precisa de espaço suficiente
         * para título, descrição e até dois botões.
         */
        min-height: 30rem;
    }


    .hero__background img {
        /*
         * A imagem continua preenchendo tudo.
         *
         * Se quiser subir/descer o enquadramento no futuro,
         * pode alterar somente este valor.
         */
        object-position: center center;
        object-fit: cover;
    }


    /*
     * No celular o overlay fica mais forte,
     * melhorando a leitura do conteúdo.
     */
    .hero__overlay {
        background: linear-gradient( to right, rgb(15 23 42 / 0.88) 0%, rgb(15 23 42 / 0.72) 60%, rgb(15 23 42 / 0.48) 100% );
    }


    .hero__content {
        max-width: 100%;
        padding-inline: var(--ecom-space-2);
        padding-top: var(--ecom-space-10);
        padding-bottom: var(--ecom-space-10);
    }


    .hero__actions {
        flex-direction: column;
    }


        .hero__actions .btn {
            width: 100%;
            justify-content: center;
            text-align: center;
        }


    .hero .hero__arrow--prev {
        left: var(--ecom-space-2);
    }


    .hero .hero__arrow--next {
        right: var(--ecom-space-2);
    }
}


/* ============================================================
   CELULARES PEQUENOS
   ============================================================ */

@media (max-width: 480px) {

    .hero {
        /*
         * Um pouco maior porque título pode quebrar
         * em várias linhas.
         */
        min-height: 32rem;
    }


    .hero__content {
        padding-top: var(--ecom-space-8);
        padding-bottom: var(--ecom-space-8);
    }


    .hero__badge {
        margin-bottom: var(--ecom-space-4);
    }


    .hero__description {
        margin-bottom: var(--ecom-space-6);
    }
}


/* ============================================================
   MOVIMENTO REDUZIDO
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

    .hero__slide {
        transition: none;
    }
}
