/* ======================================
   CAROUSEL BASE
====================================== */
.baf-carousel {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 0 auto;
}

/* Flickity carousel cells */
.carousel-cell {
    width: 100%;
    display: flex;
    justify-content: center;
    position: relative;
}

/* Flickity fixes */
.flickity-viewport {
    width: 100%;
}

/* ======================================
   SLIDE CONTAINER
====================================== */
.baf-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    /* container width */
    height: 500px;
    /* fixed height */
    aspect-ratio: 3 / 4;
    /* maintain 3:4 ratio */
    overflow: hidden;
    border-radius: 10px;
    --position: 50%;
}

/* ======================================
   IMAGE LAYERS
====================================== */
.baf-image {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.baf-image img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover;
}

.baf-before {
    clip-path: inset(0 calc(100% - var(--position)) 0 0);
    z-index: 2;
}

.baf-after {
    z-index: 1;
}

/* ======================================
   SLIDER LINE & BUTTON
====================================== */
.baf-slider {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: ew-resize;
    z-index: 3;
}

.baf-line {
    position: absolute;
    left: var(--position);
    top: 0;
    bottom: 0;
    width: 2px;
    background: #fff;
    transform: translateX(-50%);
    z-index: 4;
}

.baf-button {
    position: absolute;
    left: var(--position);
    top: 50%;
    width: 58px;
    height: 45px;
    background: #ffffff;
    border-radius: 0%;
    transform: translate(-50%, -50%);
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    /* important */
    box-shadow: 1px 1px 1px hsl(0, 50%, 2%, .5);
}

.baf-button svg {
    width: 28px;
    height: 28px;
}

.baf-button svg path {
    stroke: #000;
}

/* ======================================
   LABELS
====================================== */
.baf-label {
    position: absolute;
    top: 20px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 13px;
    text-transform: uppercase;
    border-radius: 4px;
    z-index: 6;
}

.baf-label-before {
    left: 20px;
}

.baf-label-after {
    right: 20px;
}

/* ======================================
   FLICKITY BUTTONS
====================================== */
.flickity-prev-next-button {
    width: 50px;
    height: 50px;
    top: 62%;
    padding: 0px 0px 0px 0px !important;
    /* border-radius: 50% !important; */
}

.flickity-button {
    background: #0000002e;
    width: 35px;
    height: 35px;
    border-radius: 6%;
}

.flickity-button:hover {
    background: rgba(0, 0, 0, 0.9);
}

.flickity-button-icon {
    fill: #fff;
}

.flickity-prev-next-button.previous {
    left: calc(50% - 200px);
}

.flickity-prev-next-button.next {
    right: calc(50% - 200px);
}

/* ======================================
   RESPONSIVE
====================================== */
@media (max-width: 768px) {
    .baf-container {
        height: 300px;
    }

    .baf-button {
        width: 28px;
        height: 28px;
    }

    .baf-label {
        font-size: 11px;
        padding: 4px 8px;
    }

    .flickity-prev-next-button {
        width: 30px;
        height: 30px;
        top: 38%;
        padding: 0px 0px 0px 0px !important;
        /* border-radius: 50% !important; */
    }

    .flickity-prev-next-button.previous {
        left: calc(50% - 150px);
    }

    .flickity-prev-next-button.next {
        right: calc(50% - 150px);
    }
}