﻿/* -------- Carousel shell -------- */
.av-carousel {
    margin: 18px 0 10px;
    letter-spacing: -1px;
}

.av-carousel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.av-carousel__title {
    margin: 0;
    display: inline-flex;
    align-items: center;
    font-size: 24px;
    font-weight: 500;
    color: #222222;
    text-decoration: none;
    line-height: unset;
}



/* Track: mobile-first horizontal row */
.av-carousel__track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 260px; /* card width on mobile */
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 6px 2px 12px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

    .av-carousel__track::-webkit-scrollbar {
        display: none;
    }

/* Desktop: turn into a real grid (no horizontal scroll) */
@media (min-width: 992px) {
    .av-carousel__track {
        overflow: visible;
        grid-auto-flow: initial;
        grid-auto-columns: initial;
        grid-template-columns: repeat(5, minmax(0, 1fr)); /* 5 columns */
    }
}

/* Controls */
.av-carousel__btn {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,.12);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0,0,0,.10);
}

    .av-carousel__btn:hover {
        box-shadow: 0 10px 22px rgba(0,0,0,.14);
    }

    .av-carousel__btn[disabled] {
        opacity: 0.35;
        pointer-events: none;
        cursor: default;
    }

/* -------- Card -------- */
.av-card {
    color: inherit;
    text-decoration: none;
    scroll-snap-align: start;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.av-card__img {
    border-radius: 18px;
    overflow: hidden;
    background: #f2f2f2;
    aspect-ratio: 4 / 3; /* consistent image height */
}

    .av-card__img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.av-card__body {
    padding-top: 10px;
}

.av-card__title {
    font-weight: 650;
    font-size: 14px;
    line-height: 1.25;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 50px;
}

.av-card__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.av-card__price {
    font-weight: 600;
    font-size: 14px;
}

    .av-card__price span {
        font-weight: 400;
        color: #6b7280;
        margin-left: 4px;
    }

.av-card__rating {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 13px;
    color: #111827;
}

    .av-card__rating .material-icons {
        font-size: 16px;
        color: #f59e0b;
    }

.av-card__meta {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr; /* 3 equal parts */
    align-items: center;
    font-size: 12px;
    color: #6b7280;
    margin-top: 6px;
}

    /* Left */
    .av-card__meta .meta-left {
        justify-self: start;
        display: flex;
        align-items: center;
        gap: 4px;
    }

    /* Center */
    .av-card__meta .meta-center {
        justify-self: center;
        display: flex;
        align-items: center;
        gap: 4px;
    }

    /* Right */
    .av-card__meta .meta-right {
        justify-self: end;
        display: flex;
        align-items: center;
        gap: 4px;
    }

    /* Icon styling */
    .av-card__meta .material-icons {
        font-size: 14px;
        color: #d83941;
    }

.av-carousel__track {
    display: flex;
    flex-wrap: nowrap; /* IMPORTANT: never create next row */
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 6px 2px 12px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

    .av-carousel__track::-webkit-scrollbar {
        display: none;
    }

    /* Card sizing */
    .av-carousel__track .av-card {
        flex: 0 0 246px; /* fixed width cards on desktop */
        scroll-snap-align: start;
    }

/* Mobile cards bigger (Airbnb feel) */
@media (max-width: 768px) {
    .av-carousel__track .av-card {
        flex-basis: 78vw;
    }
    .av-card__img img {
        height: 160px;
    }
    .av-carousel__track .av-card {
        flex: 0 0 220px;
        scroll-snap-align: start;
    }
    }
