/* CarseBID – ilan kartı fotoğraf galerisi */

/* Galeri kartta başlığın üstünde durur (eski ".qcu-classified-card img { order:-1 }"
   kuralının yerini alır). */
.qcu-classified-card > .qcu-card-gallery,
.qcu-classified-card > .qcu-card-gallery-empty {
    order: -1;
}

.qcu-card-gallery,
.qcu-card-gallery-empty {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #eceff1;
}

.qcu-card-gallery-track {
    display: flex;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    /* Kart içi kaydırma, araç kartlarının kendi kaydırmasına taşmasın. */
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.qcu-card-gallery-track::-webkit-scrollbar {
    display: none;
}
.qcu-card-gallery-track:focus-visible {
    outline: 3px solid #fbb45b;
    outline-offset: -3px;
}

.qcu-card-gallery-slide {
    flex: 0 0 100%;
    height: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

/* İki sınıf seçicisi, eski ".qcu-classified-card img" kuralını geçersiz kılar. */
.qcu-card-gallery .qcu-card-gallery-image {
    display: block;
    order: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    object-fit: cover;
    user-select: none;
    -webkit-user-drag: none;
}

.qcu-card-photo-prev,
.qcu-card-photo-next {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-size: 22px;
    line-height: 34px;
    text-align: center;
    cursor: pointer;
    transform: translateY(-50%);
}
.qcu-card-photo-prev { left: 8px; }
.qcu-card-photo-next { right: 8px; }
.qcu-card-photo-prev:focus-visible,
.qcu-card-photo-next:focus-visible {
    outline: 3px solid #fbb45b;
    outline-offset: 2px;
}
.qcu-card-photo-prev:disabled,
.qcu-card-photo-next:disabled {
    opacity: 0;
    pointer-events: none;
}

.qcu-card-photo-counter {
    position: absolute;
    right: 8px;
    bottom: 8px;
    z-index: 2;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    font-size: 12px;
    line-height: 18px;
    pointer-events: none;
}

.qcu-card-gallery-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    color: #5f6b72;
    font-size: 14px;
    text-align: center;
}

/* Masaüstünde düğmeler fareyle gelince belirginleşir; dokunmatikte her zaman görünür. */
@media (hover: hover) and (pointer: fine) {
    .qcu-card-photo-prev,
    .qcu-card-photo-next {
        opacity: .75;
    }
    .qcu-card-gallery:hover .qcu-card-photo-prev:not(:disabled),
    .qcu-card-gallery:hover .qcu-card-photo-next:not(:disabled) {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .qcu-card-gallery-track { scroll-behavior: auto; }
}
