/* ============ VANILLA CAROUSEL (replaces Owl Carousel) ============
   Native CSS scroll-snap — no JS carousel library, no jQuery. */

.rd-carousel {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.rd-carousel::-webkit-scrollbar { display: none; }

.rd-carousel-item {
    flex-shrink: 0;
    scroll-snap-align: start;
    width: 120px;
    height: 120px;
}
.rd-carousel-item img,
.rd-carousel-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}
.rd-carousel.single-image .rd-carousel-item {
    width: 100%;
    max-width: 320px;
}

.rd-carousel-wrap {
    position: relative;
}
.rd-carousel-prev,
.rd-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rd-carousel-prev { left: 6px; }
.rd-carousel-next { right: 6px; }

/* ============ LIGHTBOX ============ */
.rd-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.92);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .25s ease;
}
.rd-lightbox.show { opacity: 1; }
.rd-lightbox .lb-bg { position: absolute; inset: 0; }
.rd-lightbox .close-lightbox {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    z-index: 3;
}
.rd-lightbox .lb-counter {
    position: absolute;
    top: 20px;
    left: 20px;
    color: #fff;
    font-size: 14px;
    z-index: 3;
}
.rd-lightbox .lb-track {
    width: 100%;
    height: 100%;
    scroll-snap-type: x mandatory;
}
.rd-lightbox .lb-item {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rd-lightbox .lb-item img {
    max-width: 95vw;
    max-height: 85vh;
    object-fit: contain;
    width: auto;
    height: auto;
    border-radius: 0;
}
.rd-lightbox .lb-nav {
    width: 44px;
    height: 44px;
    font-size: 18px;
}

/* ============ FLASH MESSAGE ============ */
.flash-message {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1e1e1e;
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    z-index: 10000;
    opacity: 0;
    transition: opacity .3s ease, transform .3s ease;
    pointer-events: none;
}
.flash-message.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.flash-message.error { background: #c0392b; }
.flash-message.warning { background: #b8860b; }
.flash-message.success { background: #1e1e1e; }

.rd-spinner {
    width: 34px; height: 34px;
    border: 3px solid #ddd;
    border-top: 3px solid #111;
    border-radius: 50%;
    animation: rd-spin .6s linear infinite;
    margin: auto;
}
@keyframes rd-spin { to { transform: rotate(360deg); } }
