/* Homepage banner groups (home-sections/_banner_group.blade.php). */

/* Grid: --pf-cols banners to a desktop row, fewer on a tablet and a phone. */
.pf-banner-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(var(--pf-cols-sm, 1), minmax(0, 1fr));
}

@media (min-width: 768px) {
    .pf-banner-grid {
        grid-template-columns: repeat(var(--pf-cols-md, 1), minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .pf-banner-grid {
        grid-template-columns: repeat(var(--pf-cols, 1), minmax(0, 1fr));
    }
}

/* Swipe: on a phone the row becomes one sideways strip, with the next banner
   peeking in so the shopper can see there is more. */
@media (max-width: 767.98px) {
    .pf-banner-grid--swipe {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-inline: 12px;
    }

    .pf-banner-grid--swipe::-webkit-scrollbar {
        display: none;
    }

    .pf-banner-grid--swipe > * {
        flex: 0 0 85%;
        scroll-snap-align: start;
    }

    .pf-banner-grid--swipe.pf-banner-grid--two > * {
        flex-basis: 62%;
    }

    .pf-banner-grid--swipe.pf-banner-grid--many > * {
        flex-basis: 44%;
    }
}

/* A lower banner on a computer or tablet: cropped from the middle to the group's
   shape. The file is untouched, so it stays as sharp as uploaded; a phone shows
   the whole picture (or the banner's phone version), which a strip would shrink
   to a sliver. */
@media (min-width: 768px) {
    .pf-banner-cropped img {
        aspect-ratio: var(--pf-ratio);
        height: auto;
        object-fit: cover;
        object-position: center;
    }
}

/* Slider arrows, round and over the banner edge. */
.pf-banner-slider {
    position: relative;
}

.pf-banner-slider .owl-nav {
    margin: 0;
}

.pf-banner-slider .owl-nav button.owl-prev,
.pf-banner-slider .owl-nav button.owl-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    margin: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9) !important;
    color: #1f2937 !important;
    font-size: 22px !important;
    line-height: 34px !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.pf-banner-slider .owl-nav button.owl-prev {
    inset-inline-start: 10px;
}

.pf-banner-slider .owl-nav button.owl-next {
    inset-inline-end: 10px;
}

.pf-banner-slider .owl-nav button.disabled {
    display: none;
}

.pf-banner-slider .owl-dots {
    margin-top: 6px;
}

@media (max-width: 767.98px) {
    .pf-banner-slider .owl-nav {
        display: none;
    }
}

/* Circles keep their own size; the row either wraps or scrolls. */
.pf-circle-row {
    display: flex;
    gap: 1rem;
}

.pf-circle-row--wrap {
    flex-wrap: wrap;
    justify-content: center;
}

.pf-circle-row--scroll {
    overflow-x: auto;
    scrollbar-width: none;
    padding-inline: 12px;
}

.pf-circle-row--scroll::-webkit-scrollbar {
    display: none;
}

.pf-circle-item {
    display: flex;
    flex: 0 0 96px;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.pf-circle-banner {
    display: block;
    width: 88px;
    height: 88px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
}

.pf-circle-banner img {
    object-fit: cover;
}

/* One wide banner, and two under it side by side (shape = one_over_two).
   The pair keeps its two columns on a phone: they are half-width pictures, and
   stacking them would turn a two-offer block into a three-banner column. */
.pf-banner-mosaic {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pf-banner-mosaic > .pf-mosaic-wide {
    grid-column: 1 / -1;
}

/* Each row crops to its own shape, and only from the tablet up -- a phone shows
   the whole picture, as everywhere else in this file. The wide rule is written
   with two classes so it outranks the section-wide .pf-banner-cropped img. */
@media (min-width: 768px) {
    .pf-banner-mosaic.pf-mosaic-wide-cropped > .pf-mosaic-wide img {
        aspect-ratio: var(--pf-ratio-wide);
        height: auto;
        object-fit: cover;
        object-position: center;
    }

    .pf-banner-mosaic.pf-mosaic-pair-cropped > :not(.pf-mosaic-wide) img {
        aspect-ratio: var(--pf-ratio);
        height: auto;
        object-fit: cover;
        object-position: center;
    }
}
