/**
 * =============================================================================
 * Project:      Studio4209
 * Component:    Featured Artwork Carousel
 * Purpose:      Swiper-powered fade presentation and existing Studio4209
 *               artwork metadata styling.
 * Revision:     1.2.6
 *
 * Dependencies: Swiper 8.3.2 CSS
 *
 * Notes:
 *   - The artwork stage keeps the existing 16:9 desktop / 4:3 mobile layout.
 *   - Product title, price, and GET INFO retain their existing placement and
 *     typography.
 *   - Swiper owns slide positioning and transitions.
 * =============================================================================
 */

.studio4209-featured-carousel {
    --studio4209-carousel-stage-ratio: 16 / 9;
    position: relative;
    width: 100%;
    max-width: 1040px;
    margin-inline: auto;
    box-sizing: border-box;
    font-family: var(
        --e-global-typography-primary-font-family,
        inherit
    );
    color: var(
        --e-global-color-primary,
        currentColor
    );
}

.studio4209-featured-carousel *,
.studio4209-featured-carousel *::before,
.studio4209-featured-carousel *::after {
    box-sizing: border-box;
}

.studio4209-featured-carousel-stage-wrap {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    aspect-ratio: var(--studio4209-carousel-stage-ratio);
    min-height: 1px;
    overflow: visible;
}

.studio4209-featured-carousel-stage {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 1px;
    overflow: hidden;
    background: #000;
}

@supports not (aspect-ratio: 1 / 1) {
    .studio4209-featured-carousel-stage-wrap {
        height: 56.25vw;
    }
}

/* Swiper supplies the slide positioning and fade transition. */
.studio4209-featured-carousel .swiper-wrapper,
.studio4209-featured-carousel .swiper-slide {
    height: 100%;
}

.studio4209-featured-carousel-slide {
    position: relative;
    width: 100%;
    margin: 0;
    background: #000;
}

.studio4209-featured-carousel-image-link {
    display: block;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.studio4209-featured-carousel-image {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center center;
    background: #000;
    user-select: none;
}

/* ------------------------------------------------------------------------- */
/* Navigation                                                               */
/* ------------------------------------------------------------------------- */

.studio4209-featured-carousel .swiper-button-prev,
.studio4209-featured-carousel .swiper-button-next {
    margin-top: 0;
    color: var(
        --e-global-color-primary,
        currentColor
    );
}

/* Use Studio4209's existing text arrows instead of Swiper's icon font. */
.studio4209-featured-carousel .swiper-button-prev::after,
.studio4209-featured-carousel .swiper-button-next::after {
    content: none;
}

.studio4209-featured-carousel-arrow {
    width: 2.25rem;
    height: 3.5rem;
    padding: 0;
    border: 0 !important;
    border-radius: 0;
    background: rgba(0, 0, 0, 0.55) !important;
    background-color: rgba(0, 0, 0, 0.55) !important;
    background-image: none !important;
    box-shadow: none !important;
    color: var(--e-global-color-primary, #ffffff);
    font-family: inherit;
    font-size: 2.75rem;
    line-height: 0.8;
    cursor: pointer;
    opacity: 0.9;
    appearance: none;
    -webkit-appearance: none;
    transition: opacity 160ms ease;
}

.studio4209-featured-carousel-arrow:hover,
.studio4209-featured-carousel-arrow:focus-visible {
    opacity: 1;
}

.studio4209-featured-carousel-arrow:focus-visible {
    outline: 1px solid currentColor;
    outline-offset: 0.2rem;
}

.studio4209-featured-carousel-arrow-prev {
    left: -3.25rem;
    right: auto;
}

.studio4209-featured-carousel-arrow-next {
    right: -3.25rem;
    left: auto;
}

/* ------------------------------------------------------------------------- */
/* Artwork metadata — deliberately preserved from the existing carousel.     */
/* ------------------------------------------------------------------------- */

.studio4209-featured-carousel-caption-area {
    position: relative;
    display: block;
    width: 100%;
    min-height: 4rem;
    margin-top: 0.75rem;
    overflow: visible;
}

.studio4209-featured-carousel-caption {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 1000ms ease-in-out,
        visibility 0s linear 1000ms;
}

.studio4209-featured-carousel-caption.is-active {
    z-index: 2;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition:
        opacity 1000ms ease-in-out,
        visibility 0s linear 0s;
}

.studio4209-featured-carousel-caption-row {
    display: flex;
    width: 100%;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-inline: 2rem;
}

.studio4209-featured-carousel-product-meta {
    min-width: 0;
    flex: 1 1 auto;
    text-align: left;
}

.studio4209-featured-carousel-title {
    margin: 0;
    font-family: var(
        --e-global-typography-primary-font-family,
        inherit
    );
    font-size: clamp(0.95rem, 1.5vw, 1.25rem);
    font-weight: var(
        --e-global-typography-primary-font-weight,
        400
    );
    line-height: 1.2;
    text-align: left;
}

.studio4209-featured-carousel-title a {
    color: var(
        --e-global-color-primary,
        currentColor
    );
    text-decoration: none;
}

.studio4209-featured-carousel-title a:hover,
.studio4209-featured-carousel-title a:focus-visible {
    text-decoration: underline;
}

.studio4209-featured-carousel-price {
    margin-top: 0.35rem;
    font-family: var(
        --e-global-typography-primary-font-family,
        inherit
    );
    color: var(
        --e-global-color-primary,
        currentColor
    );
    line-height: 1.3;
    text-align: left;
}

.studio4209-featured-carousel-actions {
    display: flex;
    flex: 0 0 auto;
    justify-content: flex-end;
}

.studio4209-featured-carousel-request-info {
    display: inline-block;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(
        --e-global-color-primary,
        currentColor
    );
    font-family: var(
        --e-global-typography-primary-font-family,
        inherit
    );
    font-weight: var(
        --e-global-typography-primary-font-weight,
        400
    );
    font-size: clamp(0.95rem, 1.5vw, 1.25rem);
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
}

.studio4209-featured-carousel-request-info:hover,
.studio4209-featured-carousel-request-info:focus,
.studio4209-featured-carousel-request-info:focus-visible,
.studio4209-featured-carousel-request-info:active {
    background: transparent;
    border: 0;
    color: var(
        --e-global-color-primary,
        currentColor
    );
    text-decoration: none;
}

@media (max-width: 1100px) {
    .studio4209-featured-carousel-arrow-prev {
        right: auto;
        left: -2.5rem;
    }

    .studio4209-featured-carousel-arrow-next {
        right: -2.5rem;
        left: auto;
    }

    .studio4209-featured-carousel-arrow {
        text-shadow: 0 1px 5px rgba(0, 0, 0, 0.75);
    }
}

@media (max-width: 767px) {
    .studio4209-featured-carousel {
        --studio4209-carousel-stage-ratio: 4 / 3;
        max-width: 100%;
    }

    .studio4209-featured-carousel-stage-wrap {
        width: 100%;
        min-height: calc(100vw * 0.75);
    }

    .studio4209-featured-carousel-stage {
        width: calc(100% - 3rem);
        margin-inline: auto;
    }

    .studio4209-featured-carousel-caption-area {
        min-height: 6.5rem;
        margin-top: 1rem;
    }

    .studio4209-featured-carousel-caption-row {
        gap: 0.75rem;
        padding-inline: 1rem;
    }

    .studio4209-featured-carousel-arrow-prev {
        left: 0;
        transform: none;
    }

    .studio4209-featured-carousel-arrow-next {
        right: 0;
        transform: none;
    }

    .studio4209-featured-carousel-arrow {
        width: 1.75rem;
        height: 2.75rem;
        font-size: 2.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .studio4209-featured-carousel-caption {
        transition-duration: 1ms !important;
    }
}

@media (max-width: 480px) {
    .studio4209-featured-carousel-stage {
        width: calc(100% - 2.5rem);
    }
}
