/* ── Media Slider Pro – Front-end styles ── */

.msp-root {
    --msp-accent: #fff;
    --msp-arrow-bg: rgba(0,0,0,.45);
    --msp-dot-size: 10px;
    max-width: 100%;
    user-select: none;
}

/* ── Stage ── */
.msp-stage-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    background: #111;
}

.msp-stage-wrap::before {
    content: '';
    display: block;
    padding-top: var(--msp-ratio, 56.25%);
}

.msp-stage {
    position: absolute;
    inset: 0;
    display: flex;
    transition: transform .45s cubic-bezier(.4,0,.2,1);
    will-change: transform;
}

.msp-slide {
    min-width: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Media wrap ── */
.msp-media-wrap {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.msp-media-wrap img,
.msp-media-wrap video,
.msp-media-wrap iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border: none;
}

.msp-media-wrap a {
    display: contents;
}

/* ── Zoom button ── */
.msp-zoom-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,.55);
    color: #fff;
    border: none;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    font-size: 16px;
    cursor: pointer;
    opacity: 0;
    transition: opacity .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.msp-slide:hover .msp-zoom-btn { opacity: 1; }

/* ── Caption ── */
.msp-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,.65));
    color: #fff;
    padding: 24px 14px 10px;
    font-size: 13px;
    text-align: center;
    pointer-events: none;
}

/* ── Arrows ── */
.msp-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--msp-arrow-bg);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, opacity .2s;
    opacity: .7;
}
.msp-arrow:hover { background: rgba(0,0,0,.75); opacity: 1; }
.msp-prev { left: 10px; }
.msp-next { right: 10px; }
.msp-arrow[disabled] { opacity: .2; cursor: default; }

/* ── Dots ── */
.msp-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 3;
}

.msp-dot {
    width: var(--msp-dot-size);
    height: var(--msp-dot-size);
    border-radius: 50%;
    background: rgba(255,255,255,.5);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background .2s, transform .2s;
}
.msp-dot.active {
    background: #fff;
    transform: scale(1.3);
}

/* ── Thumbnails ── */
.msp-thumbs {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
}

.msp-thumb {
    flex-shrink: 0;
    width: 72px;
    height: 48px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color .2s, opacity .2s;
    position: relative;
    background: #222;
    opacity: .65;
}
.msp-thumb.active { border-color: #0073aa; opacity: 1; }
.msp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.msp-thumb-placeholder { width: 100%; height: 100%; background: #444; }

.msp-play-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    background: rgba(0,0,0,.35);
}

/* ── Lightbox ── */
.msp-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.msp-lb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.92);
    cursor: zoom-out;
}

.msp-lb-content {
    position: relative;
    z-index: 1;
    max-width: 92vw;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.msp-lb-stage {
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.msp-lb-stage img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    cursor: zoom-in;
    transition: transform .25s;
}

.msp-lb-stage img.zoomed {
    transform: scale(2);
    cursor: zoom-out;
}

.msp-lb-stage video,
.msp-lb-stage iframe {
    width: 80vw;
    height: 45vw;
    max-height: 80vh;
    border: none;
    border-radius: 4px;
}

.msp-lb-close,
.msp-lb-prev,
.msp-lb-next {
    position: fixed;
    background: rgba(255,255,255,.15);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    z-index: 2;
}
.msp-lb-close:hover,
.msp-lb-prev:hover,
.msp-lb-next:hover { background: rgba(255,255,255,.3); }

.msp-lb-close { top: 18px; right: 18px; width: 44px; height: 44px; font-size: 26px; }
.msp-lb-prev  { top: 50%; left: 18px;  transform: translateY(-50%); width: 48px; height: 48px; font-size: 22px; }
.msp-lb-next  { top: 50%; right: 18px; transform: translateY(-50%); width: 48px; height: 48px; font-size: 22px; }

.msp-lb-caption {
    color: #ddd;
    font-size: 14px;
    margin-top: 10px;
    text-align: center;
    max-width: 80vw;
}

.msp-lb-counter {
    color: #888;
    font-size: 12px;
    margin-top: 4px;
}

/* ── Mobile ── */
@media (max-width: 600px) {
    .msp-arrow { width: 32px; height: 32px; font-size: 14px; }
    .msp-thumbs { gap: 4px; }
    .msp-thumb  { width: 56px; height: 38px; }
}