/**
 * List styling
 */
dl,
dt,
dd,
ol,
ul,
li {
  margin-block-start: 0;
  margin-block-end: 0;
  border: 0;
  outline: 0;
  font-size: 100%;
  vertical-align: baseline;
  background: transparent;
}

#car-gallery-wrapper ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
#car-gallery-wrapper ul li {
    position: relative;
    width: 80px;
    height: 80px;
}
#car-gallery-wrapper ul li img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}
.remove-gallery-item {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #f00;
    color: #fff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    text-align: center;
    line-height: 18px;
    font-size: 12px;
    cursor: pointer;
}

.car-featured-wrapper {
    text-align: center;
}

.car-featured-wrapper img {
    width: 100%;
    max-width: 600px;
    border-radius: 8px;
    transition: 0.3s ease-in-out;
}

.car-gallery-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.car-gallery-thumbnails img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: 0.3s ease;
}

.car-gallery-thumbnails img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
}

.car-gallery-thumbnails img.active-thumb {
    border: 2px solid #e63946; /* Червена рамка на избраната снимка */
}


/* Нашите custom стрелки */
.custom-button-prev,
.custom-button-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 22px;
    font-weight: bold;
    z-index: 20;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Позициониране ляво и дясно */
.custom-button-prev {
    left: 10px;
}
.custom-button-next {
    right: 10px;
}
/* Бокс за Оферта № */
.offer-id-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #e63946; /* Червен фон като в mobile.bg */
    color: white;
    font-size: 14px;
    font-weight: bold;
    padding: 6px 12px;
    border-radius: 5px;
    z-index: 15;
}
.car-featured-wrapper {
    position: relative; /* Задължително за правилно позициониране */
}
.offer-id-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #e63946;
    color: white;
    font-size: 14px;
    font-weight: bold;
    padding: 6px 12px;
    border-radius: 5px;
    z-index: 1;
}

/* По-красиви Accordion-и в ACF */
.acf-fields > .acf-field.acf-field-accordion > .acf-label {
    background: #2c3e50;
    color: white;
    font-size: 16px;
    font-weight: bold;
    padding: 10px;
}

/* Отстояния между групите */
.acf-fields > .acf-field {
    margin-bottom: 20px;
}

/* По-малко полета в ширина 50% */
.acf-fields > .acf-field[data-width="50"] {
    float: left;
    width: 48%;
    margin-right: 4%;
}

/* Последното поле на ред да няма дясен маргин */
.acf-fields > .acf-field[data-width="50"]:nth-child(2n) {
    margin-right: 0;
}

.main-swiper {
    height: 650px;
    border-radius: 10px;
    overflow: hidden;
}

.main-swiper .swiper-wrapper {
    height: 100%;
}

.main-swiper .swiper-slide {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f8f8;
}

.car-gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    max-width: 100%;
    max-height: 100%;
}

/* ➤ МОБИЛНА ВЕРСИЯ */
@media screen and (max-width: 768px) {
    .main-swiper {
        height: 300px;
    }

    .car-gallery-image {
        object-fit: contain;
        padding: 10px;
        border-radius: 6px;
        background: #fff;
    }

    .thumbs-swiper {
        padding: 0 10px;
    }

    .thumbs-swiper .swiper-slide {
        width: 60px !important;
        height: 60px !important;
    }

    .thumbs-swiper .swiper-slide img {
        border-radius: 4px;
        object-fit: cover;
        width: 100%;
        height: 100%;
    }
}