/* --------------------------- */
/* Vehicle Photo Slider CSS    */
/* --------------------------- */

/* Container */
.photo-slider {
    width: 100%;
    font-family: Arial, sans-serif;
    position: relative;
}

.photo-slider * {
    box-sizing: initial;
}

/* Main slider */
.ps-main {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.ps-track {
    display: flex;
    transition: transform 0.4s ease;
}

.ps-slide {
    min-width: 100%;
    position: relative;
}

.ps-slide img {
    width: 100%;
    height: auto;
    max-height: 500px;
    min-height: 300px;
    object-fit: contain;
    border-radius: 6px;
    border: 2px solid #ddd;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease;
    align-content: center;
}

/* Overlay counter */
.ps-counter {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.85),
        rgba(0, 0, 0, 0.6)
    );
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    backdrop-filter: blur(6px);
    z-index: 5;
}

/* Main arrows */
.ps-prev,
.ps-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 5;
}

.ps-prev {
    left: 10px;
}
.ps-next {
    right: 10px;
}

/* --------------------------- */
/* Thumbnail section           */
/* --------------------------- */
.ps-thumbs-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-top: 10px;
    overflow: hidden; /* hides edges for fade effect */
}

/* Dynamic edge fade */
.ps-thumbs-wrapper.fade-left::before,
.ps-thumbs-wrapper.fade-right::after {
    content: "";
    position: absolute;
    top: 0;
    width: 30px;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.ps-thumbs-wrapper.fade-left::before {
    left: 0;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 1),
        rgba(255, 255, 255, 0)
    );
}

.ps-thumbs-wrapper.fade-right::after {
    right: 0;
    background: linear-gradient(
        to left,
        rgba(255, 255, 255, 1),
        rgba(255, 255, 255, 0)
    );
}

/* Dark theme */
.photo-slider.dark .ps-thumbs-wrapper.fade-left::before,
.photo-slider.dark .ps-thumbs-wrapper.fade-right::after {
    background: linear-gradient(to right, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));
}

/* Thumbnails container */
.ps-thumbs {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    flex: 1;
    cursor: grab;
    padding: 1.5rem 0.5rem;
    margin: 0;
}

/* Remove default scrollbar */
.ps-thumbs::-webkit-scrollbar {
    height: 0;
}

/* Individual thumbnail */
.ps-thumb {
    flex: 0 0 70px;
    height: 50px;
    position: relative;
    cursor: pointer;
    box-sizing: border-box;
    background-color: #f5f5f5; /* placeholder if image fails */
}

.ps-thumb img {
    width: 70px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    opacity: 0.6;
    transition:
        transform 0.25s ease,
        opacity 0.2s,
        border 0.2s ease,
        box-shadow 0.2s ease;
}

/* Active thumbnail */
.ps-thumb.active img {
    transform: scale(1.08);
    opacity: 1;
    border: 2px solid #0d6efd;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(13, 110, 253, 0.4);
}

/* Checked thumbnail */
.ps-thumb.checked img {
    box-shadow: 0 0 8px rgba(13, 110, 253, 0.6);
    border-radius: 4px;
}

/* Both active + checked */
.ps-thumb.active.checked img {
    transform: scale(1.08);
    opacity: 1;
    border: 2px solid #0d6efd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.5);
}

/* Floating round checkbox */
.ps-checkbox {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.ps-checkbox:hover {
    background: rgba(0, 0, 0, 0.7);
}

.ps-checkbox input {
    display: none;
}

.ps-checkbox span {
    width: 12px;
    height: 12px;
    display: block;
    border-radius: 50%;
    background: transparent;
    border: 2px solid #fff;
    transition: all 0.2s ease;
    position: relative;
}

.ps-checkbox input:checked + span {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.ps-checkbox span::after {
    content: "✔";
    position: absolute;
    font-size: 10px;
    color: white;
    top: 0;
    left: 1px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.ps-checkbox input:checked + span::after {
    opacity: 1;
}

/* Empty state */
.ps-empty {
    padding: 30px;
    text-align: center;
    font-size: 16px;
    color: #777;
    height: 100% !important;
    align-content: center !important;
    font-weight: bold;
}

/* Fullscreen overlay */
.ps-fullscreen-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.ps-fullscreen-overlay img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.ps-fullscreen-overlay.show {
    display: flex;
}
