﻿
/* carousel */
.carousel-container {
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
}

.carousel-inner {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: .3rem;
    background-color: #fff;
}

.ribbon-carousel {
    position: absolute;
    top: 13px;
    right: -3rem;
    z-index: 10;
    width: 160px;
    height: 3rem;
    background: linear-gradient(135deg, #fd657b 0%, #53265E 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 16px;
    transform: rotate(45deg);
    box-shadow: 0 3px 10px -5px #cdaa82;
    text-align: center;
}

.carousel.new-arrivals-carousel {
    position: relative;
}

.carousel-item {
    padding: .2rem 0;
}

    .carousel-item .container,
    .carousel-item .row {
        height: 100%;
    }

    .carousel-item [class*="col-"] {
        display: flex;
    }

.carousel-container .carousel-control-prev.custom-prev,
.carousel-container .carousel-control-next.custom-next {
    position: absolute;
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%);
    width: 32px !important;
    height: 32px !important;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #1987549e;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    opacity: 1;
    transition: background .2s ease;
}

.carousel-container .carousel-control-prev.custom-prev {
    left: 4px;
    right: auto;
}

.carousel-container .carousel-control-next.custom-next {
    right: 4px;
    left: auto;
}

    .carousel-container .carousel-control-prev.custom-prev:hover,
    .carousel-container .carousel-control-next.custom-next:hover {
        background: rgba(255,69,96,.9);
    }

.carousel-container .carousel-control-prev-icon,
.carousel-container .carousel-control-next-icon {
    filter: invert(1);
    width: 14px;
    height: 14px;
    background-size: 100% 100%;
}

.carousel-title {
    --title-accent-1: #97744b;
    --title-accent-2: #478778;
    display: inline-block;
    margin: 0 0 .9rem;
    padding: .2rem .5rem .4rem;
    font-size: clamp(1.05rem, 1vw + .85rem, 1.5rem);
    font-weight: 700;
    line-height: 1.2;
    color: #495057;
    border-radius: 6px;
    position: relative;
}

    .carousel-title::after {
        content: "";
        position: absolute;
        left: .5rem;
        bottom: .2rem;
        width: 9rem;
        height: 3px;
        background: linear-gradient(90deg, var(--title-accent-1), var(--title-accent-2));
        border-radius: 2px;
        box-shadow: 0 2px 6px rgba(0,0,0,.08);
    }

@media (max-width: 576px) {
    .carousel-title {
        display: block;
        text-align: center;
        margin-bottom: .6rem;
    }

        .carousel-title::after {
            left: 50%;
            transform: translateX(-50%);
        }
}

/* smaller controls on narrow screens */
@media (max-width: 768px) {
    .carousel-container .carousel-control-prev.custom-prev,
    .carousel-container .carousel-control-next.custom-next {
        width: 30px !important;
        height: 30px !important;
    }
}

@media (max-width: 480px) {
    .carousel-container .carousel-control-prev.custom-prev,
    .carousel-container .carousel-control-next.custom-next {
        width: 28px !important;
        height: 28px !important;
    }
}

/* Ribbon tweaks for mobile */
@media (max-width: 576px) {
    .ribbon-carousel {
        top: 10px;
        right: -2.2rem;
        width: 120px;
        height: 2.4rem;
        font-size: 13px;
    }
}

/* Wrapper for Horizontal Scrolling */
.horizontal-scroll-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px 0;
    display: flex;
    justify-content: flex-start;
    width: 100%;
}

.horizontal-scroll-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 14px;
    width: 100%;
}

/* Card widths tuned for mobile friendliness */
@media (max-width: 768px) {
    .card-item {
        width: calc(50% - 14px);
    }
}

@media (max-width: 576px) {
    .card-item {
        width: calc(80% - 14px);
    }
}

/* Scrollbar styling */
.horizontal-scroll-wrapper::-webkit-scrollbar {
    height: 8px;
}

.horizontal-scroll-wrapper::-webkit-scrollbar-track {
    background-color: #f1f1f1;
}

.horizontal-scroll-wrapper::-webkit-scrollbar-thumb {
    background-color: #d1e1dd;
    border-radius: 5px;
}

    .horizontal-scroll-wrapper::-webkit-scrollbar-thumb:hover {
        background-color: #478778;
    }

/* Posters Carousel ONLY */
.posters-carousel #postersCarousel .carousel-item,
.posters-carousel #postersCarouselXs .carousel-item {
    transition: transform .6s ease, opacity .6s ease;
}

.posters-carousel .poster {
    display: block;
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    background: #f7f7f7;
    box-shadow: 0 6px 24px rgba(0,0,0,.08);
}

/* 820:312 */
.posters-carousel .poster-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 820 / 312;
}

@supports not (aspect-ratio: 1 / 1) {
    .posters-carousel .poster-image-container {
        height: 0;
        padding-top: calc(312 / 820 * 100%);
    }
}

.posters-carousel .poster-image-container img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: translateZ(0);
    transition: transform .4s ease, filter .4s ease;
}

.posters-carousel a:hover .poster-image-container img,
.posters-carousel a:focus .poster-image-container img {
    transform: scale(1.03);
    filter: saturate(1.02);
}

.posters-carousel #postersCarousel .container,
.posters-carousel #postersCarouselXs .container {
    padding-left: 0;
    padding-right: 0;
}

.posters-carousel #postersCarousel .row,
.posters-carousel #postersCarouselXs .row {
    margin-left: 0;
    margin-right: 0;
}

@media (max-width: 767.98px) {
    .posters-carousel #prevPosters,
    .posters-carousel #nextPosters {
        width: 44px;
        height: 44px;
    }
}

/* Badge-style title */
.badge-title {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .9rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: #97744b;
}

    .badge-title::before {
        content: "";
        width: .45rem;
        height: .45rem;
        border-radius: 50%;
        background: #ff9800;
        box-shadow: 0 0 0 3px rgba(255,152,0,.18);
    }

/* new-arrivals.css */
.new-arrivals-carousel {
    touch-action: pan-y;
}

@media (max-width: 767.98px) {
    #newArrivalsCarouselXs .carousel-control-prev,
    #newArrivalsCarouselXs .carousel-control-next {
        width: 34px;
    }

    #newArrivalsCarouselXs .carousel-control-prev-icon,
    #newArrivalsCarouselXs .carousel-control-next-icon {
        transform: scale(.9);
    }
}
