/* =========================================================
   CARSELECT — VEHICLE TYPES
   One clean stylesheet. No stacked overrides.
   ========================================================= */

#carselect-marketplace-home .cs-home-types {
    position: relative;
    overflow: hidden;
    padding: 28px 30px 30px !important;
    border: 0 !important;
    outline: 0 !important;
    border-radius: 18px !important;
    background: #0D1217 !important;
    box-shadow: none !important;
}

#carselect-marketplace-home .cs-home-types-head {
    margin-bottom: 18px !important;
}

/* Carousel */
#carselect-marketplace-home .cs-home-types-carousel {
    position: relative;
    overflow: hidden;
}

#carselect-marketplace-home .cs-home-types-track {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#carselect-marketplace-home .cs-home-types-track::-webkit-scrollbar {
    display: none;
}

/* Cards — exactly four on desktop */
#carselect-marketplace-home .cs-home-type-card {
    position: relative;
    flex: 0 0 calc((100% - 42px) / 4);
    min-width: calc((100% - 42px) / 4);
    height: 226px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0;
    border: 0 !important;
    outline: 0 !important;
    border-radius: 18px;
    background: #070A0D;
    box-shadow: none !important;
    color: #F3F4F4;
    text-decoration: none !important;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    transform: translateY(0);
    transition: transform .20s ease, background .20s ease;
}

#carselect-marketplace-home .cs-home-type-card:hover {
    transform: translateY(-2px);
    background: #090D11;
}

/* =========================================================
   PHOTO AREA — FINAL
   The source PNG edge is cropped by only 2px on each side.
   No blurred duplicate, no mask, no pseudo overlay.
   The car itself stays visually the same size.
   ========================================================= */
#carselect-marketplace-home .cs-home-type-image-area {
    position: relative;
    width: 100%;
    height: 144px;
    flex: 0 0 144px;
    overflow: hidden;
    margin: 0;
    padding: 0;
    border: 0 !important;
    outline: 0 !important;
    border-radius: 18px 18px 0 0;
    background: #0F1318;
    box-shadow: none !important;
}

/* No generated background layers at all. */
#carselect-marketplace-home .cs-home-type-image-area::before,
#carselect-marketplace-home .cs-home-type-image-area::after {
    content: none !important;
    display: none !important;
}

/*
 * Crop ONLY the source image edge:
 * - 2px overhang on all sides
 * - no mask
 * - no clip-path
 * - no artificial background copy
 *
 * 2px over ~250px is under 1% size difference, so the car
 * does not visibly become larger.
 */
#carselect-marketplace-home .cs-home-type-image {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0 !important;
    outline: 0 !important;
    object-fit: cover;
    object-position: center center;
    clip-path: none !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
    transform: translate(-50%, -50%) scale(1.075);
    transform-origin: center center;
    box-shadow: none !important;
    filter: none;
    pointer-events: none;
    transition: transform .24s ease, filter .24s ease;
}

#carselect-marketplace-home .cs-home-type-card:hover .cs-home-type-image {
    transform: translate(-50%, -50%) scale(1.090);
    filter: brightness(1.02);
}

/* Text */
#carselect-marketplace-home .cs-home-type-info {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 12px 13px;
    text-align: center;
}

#carselect-marketplace-home .cs-home-type-name {
    color: #F3F4F4;
    font-size: 15px;
    line-height: 1.15;
    font-weight: 750;
}

#carselect-marketplace-home .cs-home-type-count {
    margin-top: 5px;
    color: #98A3AD;
    font-size: 10.5px;
    line-height: 1.2;
    font-weight: 500;
}

/* Arrows */
#carselect-marketplace-home .cs-home-types-arrow {
    position: absolute;
    top: 50%;
    z-index: 30;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0 !important;
    outline: 0 !important;
    border-radius: 999px;
    background: #20262C;
    background-image: none !important;
    color: #FFFFFF;
    box-shadow:
        0 14px 34px rgba(0,0,0,.58),
        0 5px 12px rgba(0,0,0,.38) !important;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background .18s ease, transform .18s ease, opacity .18s ease;
}

#carselect-marketplace-home .cs-home-types-arrow:hover {
    border: 0 !important;
    outline: 0 !important;
    background: #2D343B;
    transform: translateY(-50%) scale(1.03);
}

#carselect-marketplace-home .cs-home-types-arrow svg {
    width: 23px;
    height: 23px;
    stroke: currentColor;
}

#carselect-marketplace-home .cs-home-types-arrow-prev {
    left: 10px;
}

#carselect-marketplace-home .cs-home-types-arrow-next {
    right: 10px;
}

#carselect-marketplace-home .cs-home-types-arrow.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Tablet */
@media (max-width: 1100px) {
    #carselect-marketplace-home .cs-home-type-card {
        flex-basis: calc((100% - 28px) / 3);
        min-width: calc((100% - 28px) / 3);
        height: 220px;
    }

    #carselect-marketplace-home .cs-home-type-image-area {
        height: 138px;
        flex-basis: 138px;
    }
}

/* Mobile */
@media (max-width: 760px) {
    #carselect-marketplace-home .cs-home-types {
        padding: 20px 16px 22px !important;
    }

    #carselect-marketplace-home .cs-home-types-track {
        gap: 12px;
    }

    #carselect-marketplace-home .cs-home-type-card {
        flex: 0 0 205px;
        min-width: 205px;
        height: 214px;
    }

    #carselect-marketplace-home .cs-home-type-image-area {
        height: 132px;
        flex-basis: 132px;
        border-radius: 16px 16px 0 0;
    }

    #carselect-marketplace-home .cs-home-types-arrow {
        display: none;
    }
}
