/* ======================================================
     HERO CAROUSEL (SLIDE LOOP) - ROBUSTO + RESPONSIVE
     ====================================================== */

.hero-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: var(--color-bg);
    isolation: isolate;

    /* ✅ alturas mobile-friendly */
    height: 720px;
    /* fallback */
    height: min(80vh, 720px);
    /* desktop/tablet */
}

/* ✅ Para navegadores modernos: “altura real” de viewport en móviles */
@supports (height: 100svh) {
    .hero-carousel {
        height: min(80svh, 720px);
    }
}

@supports (height: 100dvh) {
    .hero-carousel {
        height: min(80dvh, 720px);
    }
}

.carousel-track {
    display: flex;
    height: 100%;
    transform: translate3d(0, 0, 0);
    transition: transform 700ms cubic-bezier(.22, .61, .36, 1);
    will-change: transform;
}

.carousel-slide {
    position: relative;
    min-width: 100%;
    height: 100%;
    overflow: hidden;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03) translateZ(0);
    will-change: transform;
}

.carousel-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(1200px 600px at 25% 50%,
            rgba(0, 0, 0, 0.55) 0%,
            rgba(0, 0, 0, 0.35) 45%,
            rgba(0, 0, 0, 0.00) 75%),
        linear-gradient(90deg,
            rgba(0, 0, 0, 0.45) 0%,
            rgba(0, 0, 0, 0.22) 40%,
            rgba(0, 0, 0, 0.00) 70%);
    z-index: 1;
}

.carousel-content {
    position: absolute;
    z-index: 2;
    top: 70%;
    left: clamp(1.25rem, 6vw, 5.5rem);
    transform: translateY(-50%);
    max-width: 620px;
    color: var(--color-white);
    padding-right: 1rem;
}

.carousel-eyebrow {
    font-size: 0.9rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    opacity: 0.95;
    margin-bottom: 0.85rem;
    display: inline-block;
}

.carousel-title {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: clamp(3rem, 7vw, 6rem);
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 0.95;
    margin: 0 0 0.7rem 0;
    color: var(--color-primary);
}

.carousel-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.35rem 0 1rem;
    opacity: 0.9;
}

.carousel-divider::before,
.carousel-divider::after {
    content: "";
    width: 28px;
    height: 6px;
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0.95) 2px, transparent 3px) left center / 10px 6px repeat-x;
}

.carousel-divider span {
    height: 1px;
    width: 150px;
    background: rgba(255, 255, 255, 0.75);
}

.carousel-text {
    font-size: 1.15rem;
    line-height: 1.55;
    max-width: 520px;
    margin: 0 0 1.6rem 0;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}

.carousel-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.95rem 2.25rem;
    background: var(--color-black);
    color: var(--color-white);
    font-size: 0.85rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: transform 250ms ease, background 250ms ease, border-color 250ms ease;
    white-space: nowrap;
}

.carousel-btn:hover {
    background: var(--color-primary);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

/* Flechas */
.carousel-arrow {
    position: absolute;
    top: 50%;
    width: 56px;
    height: 56px;
    border: none;
    background: transparent;
    cursor: pointer;
    transform: translateY(-50%);
    z-index: 5;
    opacity: 0.95;

    /* ✅ area clickeable agradable */
    display: grid;
    place-items: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.carousel-arrow::before {
    content: "";
    display: block;
    width: 14px;
    height: 14px;
    border-top: 2px solid rgba(255, 255, 255, 0.92);
    border-right: 2px solid rgba(255, 255, 255, 0.92);
    margin: auto;
}

.carousel-arrow.prev {
    left: 1.25rem;
}

.carousel-arrow.prev::before {
    transform: rotate(-135deg);
}

.carousel-arrow.next {
    right: 1.25rem;
}

.carousel-arrow.next::before {
    transform: rotate(45deg);
}

.carousel-dots {
    position: absolute;
    bottom: 1.6rem;
    left: clamp(1.25rem, 6vw, 5.5rem);
    display: flex;
    gap: 12px;
    z-index: 6;
    align-items: center;

    /* ✅ respeta safe-area (iPhone notch) */
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.carousel-dots .dot {
    width: 34px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
}

.carousel-dots .dot.active {
    background: rgba(255, 255, 255, 0.9);
    transform: scaleX(1.05);
}

.carousel-slide .carousel-content {
    opacity: 0;
    transform: translateY(-50%) translateX(-10px);
    transition: opacity 600ms ease, transform 600ms ease;
}

.carousel-slide.is-active .carousel-content {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* ======================================================
     ✅ RESPONSIVE: TABLET
     ====================================================== */
@media (max-width: 1024px) {
    .hero-carousel {
        height: min(70vh, 640px);
    }

    .carousel-content {
        max-width: 560px;
        left: clamp(1rem, 5vw, 3rem);
    }

    .carousel-text {
        font-size: 1.05rem;
        max-width: 480px;
    }
}

/* ======================================================
     ✅ RESPONSIVE: MOBILE
     - Texto abajo (se ve mejor como el banner fashion)
     - Dots centrados abajo
     - Flechas con zonas de toque grandes
     ====================================================== */
@media (max-width: 768px) {
    .hero-carousel {
        height: min(82vh, 640px);
    }

    /* Overlay tipo “bottom fade” para móvil */
    .carousel-slide::after {
        background:
            linear-gradient(0deg,
                rgba(0, 0, 0, 0.72) 0%,
                rgba(0, 0, 0, 0.45) 40%,
                rgba(0, 0, 0, 0.05) 75%,
                rgba(0, 0, 0, 0.00) 100%);
    }

    .carousel-content {
        top: 70%;
        bottom: calc(3.8rem + env(safe-area-inset-bottom, 0px));
        left: 1.25rem;
        right: 1.25rem;
        transform: none;
        max-width: 100%;
        padding-right: 0;
    }

    .carousel-eyebrow {
        font-size: 0.78rem;
        letter-spacing: 0.20em;
        margin-bottom: 0.6rem;
    }

    .carousel-title {
        font-size: clamp(2.2rem, 10vw, 3.2rem);
        margin-bottom: 0.5rem;
    }

    .carousel-divider {
        margin: 0.25rem 0 0.8rem;
    }

    .carousel-divider span {
        width: 90px;
    }

    .carousel-text {
        font-size: 0.98rem;
        line-height: 1.45;
        margin-bottom: 1rem;
        max-width: 100%;
    }

    .carousel-btn {
        width: 100%;
        padding: 0.95rem 1.25rem;
        font-size: 0.78rem;
        letter-spacing: 0.18em;
        text-align: center;
    }

    /* Flechas: más fáciles de tocar */
    .carousel-arrow {
        width: 52px;
        height: 52px;
        opacity: 0.95;
    }

    .carousel-arrow.prev {
        left: 0.5rem;
    }

    .carousel-arrow.next {
        right: 0.5rem;
    }

    .carousel-dots {
        left: 50%;
        transform: translateX(-50%);
        bottom: 1.1rem;
        gap: 10px;
    }

    .carousel-dots .dot {
        width: 26px;
        height: 4px;
    }
}

/* Extra pequeño: si quieres ocultar flechas para no tapar el contenido */
@media (max-width: 380px) {
    .carousel-arrow {
        display: none;
    }

    .carousel-content {
        bottom: calc(3.2rem + env(safe-area-inset-bottom, 0px));
    }

    .carousel-title {
        font-size: clamp(2rem, 11vw, 2.8rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    .carousel-track {
        transition: none;
    }

    .carousel-slide .carousel-content {
        transition: none;
    }
}

/* El link debe ocupar toda la slide */
.carousel-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 3;
    /* por encima del overlay */
}

/* Asegura que el picture y la imagen llenen la slide */
.carousel-link picture,
.carousel-link img {
    display: block;
    width: 100%;
    height: 100%;
}