/* ============================================================
   LP CUSTOM GALLERY v2 (06.06.2026)
   Cesta: /css/lp-gallery.css
   ============================================================
   Menší rozměry (280x280 + thumbs max 280 tall, scroll když víc).
   Aplikuje se jen na detailu produktu (kde existuje #mygallery).
   ============================================================ */

/* === SKRYJ PŮVODNÍ ROZBITÝ KARUSEL + THUMBS === */
#mygallery,
.stepcarousel,
#dhtmlgoodies_slideshow,
.jqZoomWindow {
    display: none !important;
}

/* === NOVÁ GALERIE === */
.lp-gallery {
    display: flex;
    gap: 10px;
    margin: 0 0 14px 0;
    align-items: flex-start;
}

.lp-gallery-main {
    width: 280px;
    height: 280px;
    border: 1px solid #fbd2bd;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
    overflow: hidden;
    flex-shrink: 0;
}

.lp-gallery-main img {
    max-width: 95%;
    max-height: 95%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.15s ease;
}

.lp-gallery-main:hover img {
    transform: scale(1.03);
}

.lp-gallery-thumbs {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 2px;
}

.lp-gallery-thumb {
    width: 60px;
    height: 60px;
    border: 2px solid #f1e5d5;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    box-sizing: border-box;
    transition: border-color 0.15s ease;
}

.lp-gallery-thumb:hover {
    border-color: #d4761e;
}

.lp-gallery-thumb.active {
    border-color: #c0571f;
    box-shadow: 0 0 0 1px #c0571f inset;
}

.lp-gallery-thumb img {
    max-width: 90%;
    max-height: 90%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.lp-gallery-thumbs:empty {
    display: none;
}

/* === LIGHTBOX === */
.lp-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.88);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    cursor: zoom-out;
    padding: 30px;
}

.lp-lightbox.lp-open {
    display: flex;
}

.lp-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.lp-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
    padding: 0;
}
