/* ----------------------------------
   Bilonline - Senaste lagerbilar
---------------------------------- */

.hb-latest-section {
    padding: clamp(4.5rem, 8vw, 6.25rem) 0;
    overflow: hidden;
    color: #fafafa;
    background: #030302;
}

.hb-latest-section.section-animate {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

.hb-latest-section .row {
    margin: 0;
}

.hb-latest-section .bo-senastefordonslider-container {
    width: min(100%, 82.5rem);
    max-width: 82.5rem;
    padding: 0;
}

.hb-latest-section .bo-latest {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.hb-latest-section .hb-section-header__gold {
    margin: 0 0 clamp(3rem, 5vw, 5rem);
    color: var(--hb-gold);
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 800;
    line-height: 1.4;
    text-align: center;
}

/* Slider */

.hb-latest-section .bo-latest-slider-shell {
    position: relative;
    width: 100%;
    max-width: 82.5rem;
    margin: 0 auto;
}

.hb-latest-section .bo-latest-viewport {
    overflow: hidden;
    width: 100%;
}

.hb-latest-section .bo-latest-swiper {
    overflow: visible;
    width: 100%;
}

.hb-latest-section .bo-latest-slide {
    width: min(22.1875rem, 82vw) !important;
    flex-shrink: 0;
}

/* Isolerade kort */

.hb-latest-section .hb-latest-card-link {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.hb-latest-section .hb-latest-card {
    display: flex;
    box-sizing: border-box;
    height: 25.9375rem;
    min-height: 0;
    flex-direction: column;
    gap: 1.25rem;
    padding: 0.625rem;
    color: #fafafa;
    background: transparent;
    text-decoration: none;
    transition: transform 220ms ease;
}

.hb-latest-section .hb-latest-card-link:hover .hb-latest-card,
.hb-latest-section .hb-latest-card-link:focus-visible .hb-latest-card {
    transform: translateY(-0.35rem);
}

.hb-latest-section .hb-latest-card__media {
    overflow: hidden;
    width: 100%;
    aspect-ratio: 334 / 280;
    border-radius: 1rem;
    background: #1b1b19;
}

.hb-latest-section .hb-latest-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 360ms ease;
}

.hb-latest-section .hb-latest-card-link:hover .hb-latest-card__img,
.hb-latest-section .hb-latest-card-link:focus-visible .hb-latest-card__img {
    transform: scale(1.045);
}

.hb-latest-section .hb-latest-card__body {
    display: grid;
    height: 5.9375rem;
    align-content: start;
    gap: 0.45rem;
    overflow: hidden;
    padding: 0;
}

.hb-latest-section .hb-latest-card__title {
    display: block;
    min-height: 0;
    height: auto;
    overflow: hidden;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.5;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hb-latest-section .hb-latest-card__meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
    color: rgba(250, 250, 250, 0.72);
    font-size: 0.95rem;
    line-height: 1.3;
}

.hb-latest-section .hb-latest-card__meta span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hb-latest-section .hb-latest-card__price {
    color: var(--hb-gold);
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.4;
}

/* Navigation */

.hb-latest-section .bo-slider-prev,
.hb-latest-section .bo-slider-next {
    position: absolute;
    top: 38%;
    z-index: 2;
    display: grid;
    width: 3rem;
    height: 3rem;
    place-items: center;
    border: 1px solid rgba(194, 165, 107, 0.5);
    border-radius: 999px;
    color: var(--hb-gold);
    background: rgba(3, 3, 2, 0.72);
    cursor: pointer;
    transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.hb-latest-section .bo-slider-prev {
    left: -1.5rem;
}

.hb-latest-section .bo-slider-next {
    right: -1.5rem;
}

.hb-latest-section .bo-slider-prev::before,
.hb-latest-section .bo-slider-next::before {
    content: "";
    width: 0.65rem;
    height: 0.65rem;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
}

.hb-latest-section .bo-slider-prev::before {
    transform: rotate(-135deg);
}

.hb-latest-section .bo-slider-next::before {
    transform: rotate(45deg);
}

.hb-latest-section .bo-slider-prev:hover,
.hb-latest-section .bo-slider-prev:focus-visible,
.hb-latest-section .bo-slider-next:hover,
.hb-latest-section .bo-slider-next:focus-visible {
    border-color: var(--hb-gold);
    color: #030302;
    background: var(--hb-gold);
    outline: 0;
    transform: translateY(-0.125rem);
}

/* Pagination */

.hb-latest-section .bo-latest-pagination {
    display: flex;
    width: 100%;
    min-height: 0.625rem;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.hb-latest-section .bo-latest-pagination .swiper-pagination-bullet {
    width: 0.55rem;
    height: 0.55rem;
    margin: 0 !important;
    border-radius: 999px;
    background: rgba(250, 250, 250, 0.38);
    opacity: 1;
    transition: width 180ms ease, background-color 180ms ease;
}

.hb-latest-section .bo-latest-pagination .swiper-pagination-bullet-active {
    width: 1.7rem;
    background: var(--hb-gold);
}

/* Knapp */

.hb-latest-section .bo-latest-link {
    display: inline-flex;
    width: fit-content;
    min-height: 3.375rem;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin-top: clamp(2.5rem, 4vw, 3.75rem);
    padding: 0.95rem 1.125rem;
    border-radius: 999px;
    color: var(--hb-dark);
    background: #fafafa;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
    transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.hb-latest-section .bo-latest-link .hb-btn__icon {
    color: var(--hb-gold);
}

.hb-latest-section .bo-latest-link:hover,
.hb-latest-section .bo-latest-link:focus-visible {
    color: #030302;
    background: var(--hb-gold);
    outline: 0;
    transform: translateY(-0.125rem);
}

.hb-latest-section .bo-latest-link:hover .hb-btn__icon,
.hb-latest-section .bo-latest-link:focus-visible .hb-btn__icon {
    color: #030302;
}

/* Responsive */

@media (max-width: 1399.98px) {
    .hb-latest-section .bo-slider-prev {
        left: 0;
    }

    .hb-latest-section .bo-slider-next {
        right: 0;
    }
}

@media (max-width: 991.98px) {
    .hb-latest-section .bo-senastefordonslider-container {
        max-width: none;
        padding: 0 1rem;
    }

    .hb-latest-section .bo-latest {
        align-items: flex-start;
        gap: 2rem;
    }

    .hb-latest-section .hb-section-header__gold {
        width: 100%;
        text-align: left;
    }

    .hb-latest-section .bo-slider-prev,
    .hb-latest-section .bo-slider-next {
        display: none;
    }

    .hb-latest-section .bo-latest-pagination {
        margin-top: -0.75rem;
    }
}

@media (max-width: 575.98px) {
    .hb-latest-section {
        padding: 4rem 0;
    }

    .hb-latest-section .hb-latest-card {
        min-height: 23rem;
        padding: 0.45rem;
    }

    .hb-latest-section .hb-latest-card__title {
        font-size: 0.95rem;
    }

    .hb-latest-section .bo-latest-link {
        width: 100%;
    }
}

@media (max-width: 991.98px) {
    .hb-services .hb-services__pagination {
        position: relative;
    }
}
