#obsah-galerie {
    background-color: antiquewhite;
    overflow: auto;
    border-top: solid black;
    padding: 5vh 5vw;
}
.obrazky {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6vh;
}
.produkt {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 45vw;
    max-width: 600px;
    margin-bottom: 2vw;
}
.produkt img {
    width: 100%;
    height: auto;
    object-fit: contain; /* Zajišťuje, že se obrázek vejde do rámečku, pokud by byla definována výška */
    max-height: 600px; /* Zamezí nekonečnému roztahování */
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    margin-bottom: 1vh;
}
.produkt h3,
.produkt .cena,
.produkt .prodano {
    margin: 0.25vh 0;
    text-align: center;
    font-size: 2.5vh;
}
.produkt h3 {
    font-size: 3.5vh;
}
.prodano {
    color: gray;
    font-size: 2vh;
}
.cena {
    font-size: 2.5vh;
}
@media screen and (min-width: 768px) and (max-width: 1023px) {
    .obrazky {
        flex-direction: column;
        align-items: center;
    }
    .produkt {
        width: 80vw;
    }
    .produkt img {
        max-width: 80vw;
    }
}
@media screen and (max-width: 767px) {
    .obrazky {
        flex-direction: column;
        align-items: center;
    }
    .produkt {
        width: 90vw;
    }
    .produkt img {
        max-width: 90vw;
        /* Výška je auto, takže OK */
    }
    .produkt h3,
    .produkt .cena,
    .produkt .prodano {
        font-size: 2.2vh;
    }
    .produkt h3 {
        font-size: 3vh;
    }
}
.lightbox {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}
.hidden {
    display: none !important;
}
.lightbox-content {
    position: relative;
    display: flex;
    flex-direction: row;
    max-width: 95vw;
    max-height: 90vh;
    overflow: hidden;
}
.close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 50px;
    color: white;
    cursor: pointer;
    z-index: 1000;
    line-height: 1;
}
.lightbox-gallery {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 65%;
    padding: 0;
}
.lightbox-gallery img {
    max-height: 85vh;
    max-width: 100%;
    display: none;
    object-fit: contain;
    border-radius: 10px 0 0 10px;
}
.lightbox-gallery img.active {
    display: block;
}
.lightbox-details {
    width: 35%;
    background: white;
    padding: 4vh 3vw;
    border-radius: 0 10px 10px 0;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 20px rgba(0, 0, 0, 0.1);
}
.nazev-produktu {
    font-size: 20px;
    font-weight: bold;
    text-transform: uppercase;
    margin-top: 0;
    margin-bottom: 5px;
}
.cena-lightbox {
    font-size: 16px;
    font-weight: normal;
    margin-top: 0;
    margin-bottom: 20px;
}
.status-prodano {
    color: #888;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 20px;
}
.popis-produktu {
    border-top: 1px solid #ccc;
    padding-top: 20px;
    margin-bottom: auto;
}
.tlacitko-prodano {
    background: #ccc;
    color: black;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: bold;
    cursor: default;
    width: 100%;
    text-align: center;
    border-radius: 5px;
    opacity: 0.8;
    margin-top: 20px;
}
.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 50px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    cursor: pointer;
    z-index: 1001;
    padding: 10px 15px;
    border-radius: 40%;
    display: block;
    transition: background 0.2s;
}
.arrow:hover {
    background: rgba(0, 0, 0, 0.8);
}
.arrow.left {
    left: 10px;
}
.arrow.right {
    right: 10px;
}
@media screen and (max-width: 1024px) {
    .lightbox-content {
        flex-direction: column;
        max-height: 95vh;
        overflow-y: auto;
    }
    .lightbox-gallery,
    .lightbox-details {
        width: 100%;
        max-width: 100%;
    }
    .lightbox-details {
        border-radius: 0 0 10px 10px;
    }
    .arrow {
        font-size: 30px;
        padding: 5px 10px;
    }
    .close {
        top: 10px;
        right: 10px;
    }
}