/**
 * Martinflyer Sync — Frontend styles
 * CDN Gallery + Disclaimer
 */

/* ═══════════════════════════════════════════════════════
   DISCLAIMER
═══════════════════════════════════════════════════════ */
.martinflyer-disclaimer {
    margin-top: 6px;
    margin-bottom: 10px;
}
.martinflyer-disclaimer__text {
    display: inline-block;
    font-size: 13px;
    color: #b94a48;
    font-style: italic;
    font-weight: 500;
    padding: 4px 10px;
    border-left: 3px solid #b94a48;
    background: #fff5f5;
    border-radius: 2px;
    margin: 0;
}

/* ═══════════════════════════════════════════════════════
   CDN GALLERY — Main container
═══════════════════════════════════════════════════════ */
.mf-gallery {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    font-family: inherit;
}

/* ── Main image ── */
.mf-gallery__main {
    position: relative;
    width: 100%;
    background: #f9f9f9;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    overflow: hidden;
    cursor: zoom-in;
}
.mf-gallery__main-img {
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: contain;
    display: block;
    transition: opacity 0.2s ease;
}
.mf-gallery__main-img:hover {
    opacity: 0.92;
}
.mf-gallery__zoom-hint {
    position: absolute;
    bottom: 8px;
    right: 10px;
    font-size: 11px;
    color: #888;
    background: rgba(255,255,255,0.8);
    padding: 2px 6px;
    border-radius: 3px;
    pointer-events: none;
}

/* ── Thumbnails strip ── */
.mf-gallery__thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    padding: 0;
    list-style: none;
}
.mf-gallery__thumb {
    flex: 0 0 calc(20% - 7px);
    max-width: 88px;
    padding: 0;
    border: 2px solid #e0e0e0;
    border-radius: 3px;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.mf-gallery__thumb:hover {
    border-color: #aaa;
}
.mf-gallery__thumb--active {
    border-color: #333;
    box-shadow: 0 0 0 1px #333;
}
.mf-gallery__thumb img {
    width: 100%;
    height: 72px;
    object-fit: contain;
    display: block;
    background: #f9f9f9;
}

/* ═══════════════════════════════════════════════════════
   LIGHTBOX
═══════════════════════════════════════════════════════ */
.mf-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.mf-lightbox--open {
    display: flex;
}
.mf-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    cursor: zoom-out;
}
.mf-lightbox__content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 90vh;
}
.mf-lightbox__img {
    max-width: 85vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 3px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6);
    display: block;
}
.mf-lightbox__close {
    position: fixed;
    top: 18px;
    right: 22px;
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 32px;
    line-height: 1;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.mf-lightbox__close:hover { background: rgba(255,255,255,0.3); }

.mf-lightbox__nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 42px;
    line-height: 1;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.mf-lightbox__nav:hover { background: rgba(255,255,255,0.3); }
.mf-lightbox__nav--prev { left: 16px; }
.mf-lightbox__nav--next { right: 16px; }

.mf-lightbox__counter {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    background: rgba(0,0,0,0.4);
    padding: 4px 12px;
    border-radius: 20px;
}

/* ── Mobile adjustments ── */
@media (max-width: 767px) {
    .mf-gallery__thumb {
        flex: 0 0 calc(25% - 6px);
    }
    .mf-gallery__thumb img {
        height: 56px;
    }
    .mf-lightbox__nav--prev { left: 6px; }
    .mf-lightbox__nav--next { right: 6px; }
}
