/* ==========================================================================
   EXTRAFELGI.EU — GALLERY V3 BULLETPROOF SPECIFICATION
   ========================================================================== */

#projector_photos.photos {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 16px !important;
    max-width: 100% !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    padding: 10px !important;
    box-sizing: border-box !important;
}

/* 1. Główne duże zdjęcie — po lewej stronie, od góry */
#projector_photos .photos__slider {
    order: 1 !important;
    flex: 1 1 auto !important;
    width: calc(100% - 104px) !important;
    max-height: 600px !important;
    height: 600px !important;
    position: relative !important;
    overflow: hidden !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    border: 1px solid #f1f5f9 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: zoom-in !important;
}

#projector_photos .photos___slider_wrapper {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    max-height: 600px !important;
    overflow: hidden !important;
}

/* Ukrycie wszystkich nieaktywnych slajdów — ZERO KAWAŁKÓW PO BOKACH */
html body #projector_photos .photos___slider_wrapper > .photos__figure {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Tylko jeden aktywny slajd ma display: flex i opacity: 1 */
html body #projector_photos .photos___slider_wrapper > .photos__figure[data-active="true"],
html body #projector_photos .photos___slider_wrapper:not(:has([data-active="true"])) > .photos__figure:first-child {
    display: flex !important;
    visibility: visible !important;
    position: relative !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    width: 100% !important;
    height: 100% !important;
    align-items: center !important;
    justify-content: center !important;
    margin: auto !important;
}

#projector_photos .photos___slider_wrapper .photos__photo {
    max-height: 570px !important;
    max-width: 95% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    border-radius: 8px !important;
    user-select: none !important;
    margin: auto !important;
    display: block !important;
}

/* 2. Miniatury po prawej stronie pionowo — BEZ SCROLLBARA */
#projector_photos #photos_nav.photos__nav {
    order: 2 !important;
    flex: 0 0 84px !important;
    width: 84px !important;
    max-height: 600px !important;
    height: 600px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 2px !important;
    box-sizing: border-box !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

#projector_photos #photos_nav.photos__nav::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* 3. Kwadratowe miniatury 80x80 — BEZ CZARNYCH PASÓW */
#projector_photos .photos__nav .photos__figure.--nav {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 80px !important;
    width: 80px !important;
    height: 80px !important;
    min-height: 80px !important;
    max-height: 80px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#projector_photos .photos__nav .photos__figure.--nav:hover {
    border-color: #64748b !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08) !important;
}

#projector_photos .photos__nav .photos__figure.--nav.active-thumb,
#projector_photos .photos__nav .photos__figure.--nav:has(.--active) {
    border-color: #0f172a !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25) !important;
}

#projector_photos .photos__nav a.photos__link.--nav {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #ffffff !important;
    overflow: hidden !important;
}

#projector_photos .photos__nav img.photos__photo.--nav {
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    max-width: 100% !important;
    object-fit: cover !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    display: block !important;
}

/* Wyłączenie PhotoSwipe IdoSell */
.pswp {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Raty 46px */
.cms-button-wrapper {
    display: flex !important;
    flex-direction: row !important;
    gap: 12px !important;
    margin-top: 14px !important;
    margin-bottom: 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.cms-button-wrapper a.cms-button__link.btn {
    flex: 1 1 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    height: 46px !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
    text-decoration: none !important;
    font-size: 13px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.cms-button-wrapper a[href*="zakupy-na-raty"] {
    background: #f8fafc !important;
    border: 1.5px solid #e2e8f0 !important;
    color: #0f172a !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

.cms-button-wrapper a[href*="zakupy-na-raty"]:hover {
    background: #ffffff !important;
    border-color: #0f172a !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(15, 23, 42, 0.08) !important;
}

.cms-button-wrapper a[href*="zakupy-na-raty"]::before {
    content: '%' !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 22px !important;
    height: 22px !important;
    border-radius: 50% !important;
    background: #0f172a !important;
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 800 !important;
}

.cms-button-wrapper a[href*="szybkie-zakupy"] {
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    color: #475569 !important;
    font-weight: 600 !important;
}

.cms-button-wrapper a[href*="szybkie-zakupy"]:hover {
    border-color: #94a3b8 !important;
    color: #0f172a !important;
}

/* Karta parametrów */
#projector_dictionary.dictionary {
    margin-top: 18px !important;
    background: #ffffff !important;
    border: 1px solid #f1f5f9 !important;
    border-radius: 10px !important;
    padding: 16px 20px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03) !important;
}

#projector_dictionary .headline {
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    margin-bottom: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border-bottom: 2px solid #0f172a !important;
    padding-bottom: 6px !important;
    display: inline-block !important;
}

/* Responsywność Mobile (< 768px) */
@media (max-width: 767px) {
    #projector_photos.photos {
        flex-direction: column !important;
        gap: 10px !important;
        padding: 4px !important;
    }
    
    #projector_photos .photos__slider {
        order: 1 !important;
        width: 100% !important;
        max-height: 380px !important;
        height: 380px !important;
    }
    
    #projector_photos #photos_nav.photos__nav {
        order: 2 !important;
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        justify-content: flex-start !important;
        gap: 8px !important;
        scrollbar-width: none !important;
    }
    
    #projector_photos .photos__nav .photos__figure.--nav {
        flex: 0 0 68px !important;
        width: 68px !important;
        height: 68px !important;
        min-height: 68px !important;
        max-height: 68px !important;
    }

    html, body, .projector {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }
    
    .cms-button-wrapper {
        flex-direction: column !important;
        gap: 8px !important;
    }
}
