@layer shoptet-overrides {
    @media (min-width: 992px) {

        /* --- ROZLOŽENÍ 60/40 --- */
        .type-product.type-detail .p-detail-inner {
            display: flex !important;
            flex-wrap: nowrap !important;
            align-items: flex-start;
            gap: var(--space-10, 2.5rem); 
        }
        
        .type-product.type-detail .p-image-wrapper {
            width: 60% !important;      
            flex: 0 0 60% !important;   
            display: flex !important;
            flex-direction: row;
            height: 90vh !important;
            position: relative; 
        }

        .type-product.type-detail .p-data-wrapper {
            width: calc(40% - var(--space-10, 2.5rem)) !important; 
            flex: 0 0 calc(40% - var(--space-10, 2.5rem)) !important; 
            margin-top: 0; 
        }

        /* --- SLOUPEC MINIATUR --- */
        .type-product.type-detail .p-image-wrapper > .row {
            order: 1; 
            width: 150px !important; 
            flex-shrink: 0;
            margin: 0 !important; 
            margin-right: var(--space-8, 2rem) !important; 
            height: 100%; 
            overflow-y: auto !important; 
            overflow-x: hidden !important;
            position: relative; 
            scrollbar-width: none; 
        }

        .type-product.type-detail .p-image-wrapper > .row::-webkit-scrollbar {
            display: none;
        }

        .type-product.type-detail .p-image-wrapper > .row > .col-sm-12 {
            padding: 0 !important;
            margin: 0 !important;
            width: 100% !important;
        }

        /* --- GRADIENT: výraznější, jasně signalizuje scroll --- */
        .type-product.type-detail .p-image-wrapper::before {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 150px; 
            height: 140px;  /* vyšší než původních 100px */
            background: linear-gradient(
                to bottom, 
                rgba(255,255,255,0) 0%, 
                rgba(255,255,255,0.7) 50%,
                rgba(255,255,255,1) 100%
            );
            pointer-events: none; 
            z-index: 5;
        }

    /* --- SCROLL ŠIPKY (nahoru + dolů) --- */
.thumb-scroll-btn {
    position: absolute;
    left: 0;
    width: 150px;
    height: 44px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border: none !important;
    box-shadow: none !important;
    cursor: pointer !important;
    z-index: 6;
    padding: 0 !important;
    transition: opacity 0.2s ease;
}

.thumb-scroll-btn.hidden {
    display: none !important;
}

/* Šipka DOLŮ – gradient shora průhledný → bílý */
.thumb-scroll-btn--down {
    bottom: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 50%) !important;
    align-items: flex-end;
    padding-bottom: 8px !important;
}

/* Šipka NAHORU – gradient shora bílý → průhledný */
.thumb-scroll-btn--up {
    top: -1px;
    background: linear-gradient(to top, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 50%) !important;
    align-items: flex-start;
    padding-top: 8px !important;
}

.thumb-scroll-btn svg {
    width: 18px;
    height: 18px;
    color: #000;
    opacity: 0.35;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.thumb-scroll-btn:hover svg {
    opacity: 0.85;
}

        /* --- MINIATURY --- */
        .type-product.type-detail .p-thumbnails {
            overflow: visible !important;
        }

        .type-product.type-detail .p-thumbnails-inner {
            position: static !important;
            width: 100% !important;
            transform: none !important;
        }
        
        .type-product.type-detail .p-thumbnails-inner > div {
            display: flex;
            flex-direction: column;
            gap: var(--space-4, 1rem); 
            padding-bottom: 60px;  /* prostor pod posledním thumbem před gradient */
        }

        .type-product.type-detail .p-thumbnail,
        .type-product.type-detail .p-thumbnail img {
            margin: 0 !important;
            width: 100% !important;
            height: auto !important;
            max-width: none !important;
            border-radius: var(--rounded, 8px) !important;
        }

        .type-product.type-detail .thumbnail-prev, 
        .type-product.type-detail .thumbnail-next {
            display: none !important;
        }

        /* --- HLAVNÍ FOTKA --- */
        .type-product.type-detail .p-image-wrapper .p-image {
            order: 2; 
            flex-grow: 1;
            height: 100% !important; 
            display: flex !important;
            align-items: center !important; 
            justify-content: center !important;
            overflow: hidden; 
            cursor: zoom-in !important; 
        }
        
        .type-product.type-detail .mousetrap {
            cursor: zoom-in !important;
            width: 100% !important;
            left: 0 !important; 
        }
        
        .type-product.type-detail #wrap,
        .type-product.type-detail .p-main-image {
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            width: 100% !important;
            height: 100% !important;
        }

        .type-product.type-detail .p-main-image img {
            max-height: 90vh !important;
            width: 100% !important; 
            height: 100% !important; 
            object-fit: contain !important;
            border-radius: var(--rounded, 8px) !important;
        }

        /* --- BUTTON SCHOVÁM (pro případ že ho Shoptet injectne) --- */
        .show-all-gallery-btn {
            display: none !important;
        }
    }
}
/* --- MOBILNÍ SWIPER --- */
@media (max-width: 991px) {

    .type-product.type-detail .p-image {
        width: 100% !important;
        height: auto !important;
        min-height: unset !important;
        max-height: unset !important;
        display: block !important;
        overflow: visible !important;
        margin-bottom: 1rem !important;
    }

    .vera-swiper {
        width: 100% !important;
        aspect-ratio: 3 / 4;
        height: auto !important;
        cursor: zoom-in;
        overflow: hidden !important; /* zpět na hidden – jinak swipe bělá */
        border-radius: 8px;
    }

    .vera-swiper .swiper-slide {
        display: flex;
        align-items: center;
        justify-content: center;
        background: #fff;
        overflow: hidden;
    }

    .vera-swiper .swiper-slide img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        display: block;
    }

    /* Paginace pod swiperem, vlastní třídy */
    .vera-swiper-pagination {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 6px;
        padding: 12px 0 4px 0;
        width: 100%;
    }

    .vera-bullet {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #000;
        opacity: 0.2;
        cursor: pointer;
        transition: opacity 0.2s ease;
        flex-shrink: 0;
    }

    .vera-bullet--active {
        opacity: 1;
    }
}