/**
 * Divi WooCommerce Gallery Slider - CSS dla miniaturek po lewej
 * Wersja: 3.0 - Dla dynamicznego slidera
 */

/* ============================================
   LAYOUT GŁÓWNY - Desktop
   ============================================ */

.et_pb_wc_gallery.thumbnails-initialized {
    display: flex;
    flex-direction: row;
    gap: 5%;
    align-items: flex-start;
    justify-content: flex-end;
}

/* Kontener głównej galerii (slider) */
.et_pb_wc_gallery.thumbnails-initialized .et_pb_gallery_items {
    flex: 0 1 auto;
    width: auto !important;
    max-width: 100%;
    margin-left: auto;
    position: relative !important;
}

/* Główny obrazek - pełna szerokość */
.et_pb_wc_gallery.thumbnails-initialized .et_pb_gallery_item {
    width: 100% !important;
}

.et_pb_wc_gallery.thumbnails-initialized .et_pb_gallery_image {
    width: 100% !important;
}

/* Kontener miniaturek */
.et_pb_wc_gallery .gallery-thumbnails-wrapper {
    display: flex;
    flex-direction: column;
    width: 100px;
    gap: 3px;
    flex-shrink: 0;
}

/* Pojedyncza miniaturka */
.et_pb_wc_gallery .gallery-thumbnail {
    width: 100%;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.et_pb_wc_gallery .gallery-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0.6;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

/* Hover na miniaturce */
.et_pb_wc_gallery .gallery-thumbnail:hover img {
    opacity: 1;
    border-color: #a9b6c3;
    transform: scale(1.05);
}

/* Aktywna miniaturka */
.et_pb_wc_gallery .gallery-thumbnail.active-thumbnail img {
    opacity: 1;
    border-color: #a9b6c3;
    box-shadow: 0 0 0 2px rgba(44, 62, 80, 0.2);
}

/* Główny obrazek w sliderze */
.et_pb_wc_gallery .et_pb_gallery_item .et_pb_gallery_image img {
    width: 100%;
    height: auto;
}

/* Kontener głównego obrazka - pozycjonowanie względne dla strzałek */
.et_pb_wc_gallery.thumbnails-initialized .et_pb_gallery_items {
    position: relative;
}

/* Strzałki nawigacji - wycentrowane do głównego obrazka */
.et_pb_wc_gallery.thumbnails-initialized .et-pb-slider-arrows {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
    z-index: 10;
    margin: 0 !important;
}

/* Strzałki - bez tła, kolor #bdbdbd */
.et_pb_wc_gallery.thumbnails-initialized .et-pb-arrow-prev,
.et_pb_wc_gallery.thumbnails-initialized .et-pb-arrow-next {
    pointer-events: auto;
    background: none !important;
    padding: 10px;
    border-radius: 0;
    transition: all 0.3s ease;
    box-shadow: none !important;
    color: #bdbdbd !important;
    font-size: 30px;
}

.et_pb_wc_gallery.thumbnails-initialized .et-pb-arrow-prev:hover,
.et_pb_wc_gallery.thumbnails-initialized .et-pb-arrow-next:hover {
    color: #999 !important;
}

/* Kolor tekstu w strzałkach */
.et_pb_wc_gallery.thumbnails-initialized .et-pb-arrow-prev span,
.et_pb_wc_gallery.thumbnails-initialized .et-pb-arrow-next span {
    color: #bdbdbd !important;
}

.et_pb_wc_gallery.thumbnails-initialized .et-pb-arrow-prev:hover span,
.et_pb_wc_gallery.thumbnails-initialized .et-pb-arrow-next:hover span {
    color: #999 !important;
}

/* Kontrolery (kropki) - tylko na głównym obrazku */
.et_pb_wc_gallery.thumbnails-initialized .et-pb-controllers {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.et_pb_wc_gallery.thumbnails-initialized .et-pb-controllers a {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
    text-indent: -9999px;
    display: block;
    border: 2px solid rgba(0,0,0,0.2);
}

.et_pb_wc_gallery.thumbnails-initialized .et-pb-controllers a:hover {
    background: rgba(255, 255, 255, 0.8);
}

.et_pb_wc_gallery.thumbnails-initialized .et-pb-controllers a.et-pb-active-control {
    background: #2c3e50;
    border-color: #2c3e50;
}


/* ============================================
   RESPONSYWNOŚĆ - Tablet (768px - 980px)
   MINIATURKI NA DOLE
   ============================================ */

@media (max-width: 980px) and (min-width: 768px) {
    .et_pb_wc_gallery.thumbnails-initialized {
        flex-direction: column-reverse;
        gap: 15px;
    }
    
    .et_pb_wc_gallery .gallery-thumbnails-wrapper {
        flex-direction: row;
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 10px;
        gap: 10px;
        
        /* Scrollbar styling */
        scrollbar-width: thin;
        scrollbar-color: #ccc transparent;
    }
    
    .et_pb_wc_gallery .gallery-thumbnails-wrapper::-webkit-scrollbar {
        height: 6px;
    }
    
    .et_pb_wc_gallery .gallery-thumbnails-wrapper::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .et_pb_wc_gallery .gallery-thumbnails-wrapper::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 3px;
    }
    
    .et_pb_wc_gallery .gallery-thumbnail {
        width: 80px;
        flex-shrink: 0;
    }
}


/* ============================================
   RESPONSYWNOŚĆ - Mobile (MINIATURKI UKRYTE)
   ============================================ */

@media (max-width: 767px) {
    /* Ukryj miniaturki na mobile */
    .et_pb_wc_gallery .gallery-thumbnails-wrapper {
        display: none !important;
    }
    
    /* Przywróć normalny layout */
    .et_pb_wc_gallery.thumbnails-initialized {
        flex-direction: column;
        gap: 10px;
    }
    
    .et_pb_wc_gallery.thumbnails-initialized .et_pb_gallery_items {
        width: 100% !important;
    }
}


/* ============================================
   OPCJONALNE ULEPSZENIA
   ============================================ */

/* Większe miniaturki (120px) */
/*
.et_pb_wc_gallery .gallery-thumbnails-wrapper {
    width: 120px;
}

@media (max-width: 980px) and (min-width: 768px) {
    .et_pb_wc_gallery .gallery-thumbnail {
        width: 100px;
    }
}
*/

/* Zaokrąglone rogi */
/*
.et_pb_wc_gallery .gallery-thumbnail,
.et_pb_wc_gallery .gallery-thumbnail img {
    border-radius: 8px;
}
*/

/* Cień na miniaturkach */
/*
.et_pb_wc_gallery .gallery-thumbnail img {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.et_pb_wc_gallery .gallery-thumbnail:hover img {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
*/

/* Scroll dla wielu miniaturek na desktop */
/*
.et_pb_wc_gallery .gallery-thumbnails-wrapper {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 8px;
}

.et_pb_wc_gallery .gallery-thumbnails-wrapper::-webkit-scrollbar {
    width: 8px;
}

.et_pb_wc_gallery .gallery-thumbnails-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.et_pb_wc_gallery .gallery-thumbnails-wrapper::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.et_pb_wc_gallery .gallery-thumbnails-wrapper::-webkit-scrollbar-thumb:hover {
    background: #666;
}
*/

/* Ukryj kontrolery na mobile (opcjonalnie) */
/*
@media (max-width: 767px) {
    .et_pb_wc_gallery .et-pb-controllers {
        display: none !important;
    }
}
*/

/* Ukryj strzałki na mobile (opcjonalnie) */
/*
@media (max-width: 767px) {
    .et_pb_wc_gallery .et-pb-slider-arrows {
        display: none !important;
    }
}
*/