/* =============================================================
   galerie-grid-style.css
   — skryt puvodni Shoptet galerii (aktivni vzdycky na type-product) */
/* Skryt puvodni Shoptet scroll navigaci (sipky + tecky) uvnitr .p-detail-inner-header-mobile */
.in-test-galerie-produkt .img-scroll { display: none !important; }

/* Skryt puvodni galerii — pouze konkretni prvky, NE .p-image-wrapper
   (nas grid je vlozen uvnitr .p-image-wrapper pred .shp-tabs-wrapper — skryti parentu by ho schovalo taky) */
.in-test-galerie-produkt .p-image,
.in-test-galerie-produkt .p-image-roi,
.in-test-galerie-produkt .p-thumbnails-wrapper,
.in-test-galerie-produkt .p-thumbs-wrapper { display: none !important; }

/*
   Custom produktova galerie — 2-sloupcovy grid + lightbox
   Testovani: vlozit pres Amino CSS plugin na:
   https://www.doppler.cz/carbonsteel-magic-damsky-plne-automaticky-destnik/
   ============================================================= */

/* -------------------------------------------------------------
   GRID
   ------------------------------------------------------------- */

.roi-gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    width: 100%;
    margin-bottom: 24px;
}

/* Video — stejny slot jako foto (2. pozice v gridu) */
.roi-gallery-video-item {
    position: relative;
    background: #000;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.roi-gallery-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Foto polozka */
.roi-gallery-photo-item {
    position: relative;
    overflow: hidden;
    cursor: zoom-in;
    background: #f5f5f5;
    aspect-ratio: 1 / 1;
}

.roi-gallery-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}

.roi-gallery-photo-item:hover img {
    transform: scale(1.04);
}

/* Skryte polozky (nad limit GRID_SHOW_COUNT) */
.roi-gallery-item--hidden {
    display: none;
}

/* Overlay "+N" na ctvrtem itemu */
.roi-gallery-more-btn {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.55);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-sizing: border-box;
    z-index: 3;
    transition: background 0.2s;
}

.roi-gallery-more-btn:hover {
    background: rgba(255, 255, 255, 0.68);
}

.roi-gallery-more-btn span {
    font-family: Poppins, sans-serif;
    font-weight: 700;
    font-size: 64px;
    line-height: 1;
    letter-spacing: 0.5px;
    color: #000000;
    -webkit-text-stroke: 4px #ffffff;
    paint-order: stroke fill;
    pointer-events: none;
}

/* Play/Pause button na videu */
.roi-gallery-play-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    z-index: 5;
    line-height: 0;
    opacity: 0.85;
    transition: opacity 0.15s;
}

.roi-gallery-play-btn:hover {
    opacity: 1;
}

/* -------------------------------------------------------------
   LIGHTBOX — overlay
   ------------------------------------------------------------- */

.roi-lb {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.92);
}

/* Zakazat scroll body pri otevreni lightboxu */
body.roi-lb-open {
    overflow: hidden;
}

.roi-lb-overlay {
    position: absolute;
    inset: 0;
    z-index: 0;
}

/* -------------------------------------------------------------
   LIGHTBOX — tlacitka
   ------------------------------------------------------------- */

.roi-lb-close {
    position: absolute;
    top: 16px;
    right: 20px;
    z-index: 10;
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    line-height: 40px;
    text-align: center;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.roi-lb-close:hover {
    opacity: 1;
}

.roi-lb-prev,
.roi-lb-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    padding: 0;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    border-radius: 50%;
    line-height: 48px;
    text-align: center;
    opacity: 0.7;
    transition: opacity 0.15s, background 0.15s;
}

.roi-lb-prev:hover,
.roi-lb-next:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.roi-lb-prev { left: 16px; }
.roi-lb-next { right: 16px; }

/* -------------------------------------------------------------
   LIGHTBOX — hlavni obrazek
   ------------------------------------------------------------- */

.roi-lb-stage {
    position: relative;
    z-index: 5;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 60px 80px 12px;
    box-sizing: border-box;
    min-height: 0;
}

.roi-lb-main-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    box-shadow: 0 4px 32px rgba(0,0,0,0.5);
}

.roi-lb-main-video {
    max-width: 100%;
    max-height: 100%;
    display: block;
    outline: none;
}

/* -------------------------------------------------------------
   LIGHTBOX — footer (pocitadlo + thumbnail strip)
   ------------------------------------------------------------- */

.roi-lb-footer {
    position: relative;
    z-index: 5;
    width: 100%;
    padding: 8px 16px 12px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.roi-lb-counter {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    text-align: center;
    margin-bottom: 10px;
    font-family: sans-serif;
}

/* Thumbnail strip */
.roi-lb-thumbs {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    padding: 4px 0;
    justify-content: center;
    scrollbar-width: none; /* Firefox */
}

.roi-lb-thumbs::-webkit-scrollbar {
    display: none;
}

.roi-lb-thumb {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 2px;
    overflow: hidden;
    cursor: pointer;
    background: #333;
    opacity: 0.55;
    transition: opacity 0.15s, border-color 0.15s;
}

.roi-lb-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.roi-lb-thumb:hover {
    opacity: 0.85;
}

.roi-lb-thumb.roi-lb-thumb--active {
    opacity: 1;
    border-color: #fff;
}

/* -------------------------------------------------------------
   MOBILE
   ------------------------------------------------------------- */

/* -------------------------------------------------------------
   MOBILNI SLIDER (<=767px)
   ------------------------------------------------------------- */

@media (max-width: 767px) {

    /* Lightbox sipky — mensi na mobilu */
    .roi-lb-prev,
    .roi-lb-next {
        width: 36px;
        height: 36px;
        font-size: 26px;
        line-height: 36px;
    }

    .roi-lb-prev { left: 4px; }
    .roi-lb-next { right: 4px; }

    .roi-lb-stage {
        padding: 50px 48px 8px;
    }

    .roi-lb-thumb {
        width: 48px;
        height: 48px;
    }

    /* Slider wrapper */
    .roi-mobile-slider {
        width: 100%;
        margin-bottom: 16px;
    }

    /* Hlavni plocha — fotka/video */
    .roi-mobile-stage {
        position: relative;
        width: 100%;
        aspect-ratio: 1 / 1;
        background: #f5f5f5;
        overflow: hidden;
    }

    .roi-mobile-main-img,
    .roi-mobile-main-video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .roi-mobile-main-video {
        object-fit: cover;
    }

    /* Sipky prev/next */
    .roi-mobile-prev,
    .roi-mobile-next {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 5;
        width: 32px;
        height: 48px;
        padding: 0;
        background: rgba(0, 0, 0, 0.35);
        border: none;
        cursor: pointer;
        border-radius: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.15s;
    }

    .roi-mobile-prev:hover,
    .roi-mobile-next:hover {
        background: rgba(0, 0, 0, 0.55);
    }

    .roi-mobile-prev { left: 8px; }
    .roi-mobile-next { right: 8px; }

    /* Play/Pause btn — ikona + text */
    .roi-mobile-play-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        z-index: 6;
        display: flex !important;
        align-items: center;
        gap: 4px;
        padding: 1px 8px 1px 1px;
        background: rgba(255, 255, 255, 0.90);
        border: none;
        border-radius: 100px;
        cursor: pointer;
        line-height: 1;
    }

    .roi-mobile-play-btn svg {
        display: block;
        flex-shrink: 0;
    }

    .roi-mobile-play-btn span {
        font-family: Roboto, sans-serif;
        font-size: 13px;
        font-weight: 300;
        color: #383838;
        line-height: 24px;
        letter-spacing: 0.5px;
        text-decoration: underline;
        text-decoration-skip-ink: auto;
        display: block;
    }

    /* Pocitadlo */
    .roi-mobile-counter {
        text-align: center;
        font-size: 12px;
        color: rgba(0, 0, 0, 0.45);
        padding: 6px 0 4px;
        font-family: sans-serif;
    }

    /* Thumbnail strip */
    .roi-mobile-thumbs {
        display: flex;
        gap: 5px;
        overflow-x: auto;
        padding: 4px 0 8px;
        justify-content: center;
        scrollbar-width: none;
    }

    .roi-mobile-thumbs::-webkit-scrollbar { display: none; }

    .roi-mobile-thumb {
        flex-shrink: 0;
        width: 52px;
        height: 52px;
        padding: 0;
        border: 2px solid transparent;
        border-radius: 2px;
        overflow: hidden;
        cursor: pointer;
        background: #ddd;
        opacity: 0.55;
        transition: opacity 0.15s, border-color 0.15s;
    }

    .roi-mobile-thumb img,
    .roi-mobile-thumb video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .roi-mobile-thumb:hover { opacity: 0.85; }

    .roi-mobile-thumb.roi-mobile-thumb--active {
        opacity: 1;
        border-color: #000;
    }

    /* Flags odsazeni od kraju ve slideru */
    .roi-mobile-stage .flags.flags-default {
        padding: 10px;
    }
}
