.subcategory-grid {  
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin: 36px 0;
    padding: 0 2vw;
}

/* Bublina */
.subcategory {   
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: #f9f9f9;
    border-radius: 16px;
    padding: 32px 18px 24px 18px;
    gap: 20px;
    min-height: 220px;
    box-sizing: border-box;
    width: 100%;
    box-shadow: 0 2px 18px #0001;
    overflow: hidden;
    position: relative;
}

/* Název kategorie s červenou čárou */
.subcategory-title {
    font-size: 1.22em;
    font-weight: 600;
    color: #8B0000;
    text-align: center;
    margin-bottom: 0.1em;
    letter-spacing: 0.01em;
    word-break: break-word;
    width: 100%;
    position: relative;
    padding-bottom: 15px;
}
.subcategory-title::after {
    content: "";
    display: block;
    margin: 0 auto;
    margin-top: 8px;
    width: 44px;
    height: 4px;
    border-radius: 4px;
    background: #8B0000;
}

/* Popisky */
.subcategory-desc {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.08em;
    color: #3a3a3a;
    background: transparent;
    box-sizing: border-box;
    text-align: center;
    width: 100%;
    padding: 0;
}

.subcategory-desc ul {
    margin: 0;
    padding-left: 0;
    list-style: disc inside;
    text-align: left;
    display: inline-block;
}
.subcategory-desc li {
    font-size: 1.04em;
    color: #444;
    margin-bottom: 8px;
    line-height: 1.45;
    word-break: break-word;
}

.subcategory-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px 8px;
    padding: 8px 0 0 0;
    width: 100%;
    margin: 0 auto;
    max-width: 420px;
}

.subcategory-logo {
    aspect-ratio: 3 / 4;
    width: 100px;      /* ještě menší */
    max-width: 100px;  /* pevná velikost */
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px #0002;
    padding: 6px;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.subcategory-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    cursor: zoom-in;
    transition: box-shadow .2s;
}

.subcategory-logo img:hover {
    box-shadow: 0 0 0 3px #8B000088;
}

/* Lightbox galerie - centrální zarovnání a konzistentní velikost */
.lightbox-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.lightbox-content {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    max-width: 90vw;
    max-height: 90vh;
    aspect-ratio: 3 / 4;
}

.lightbox-content img {
    width: auto;
    height: 80vh;
    max-height: 90vh;
    max-width: 60vw;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 0 32px #000b;
    background: #fff;
}

/* Responsivita */
@media (max-width: 1200px) {
    .subcategory-grid { grid-template-columns: repeat(2, 1fr); }
    .subcategory-logos { max-width: 270px; }
    .subcategory-logo { width: 80px; max-width: 80px; }
}
@media (max-width: 800px) {
    .subcategory-grid { grid-template-columns: 1fr; }
    .subcategory-logos { max-width: 98vw; }
    .subcategory-logo { width: 70px; max-width: 70px; }
    .lightbox-content { max-width: 98vw; }
    .lightbox-content img { max-width: 98vw; height: 60vh; }
}
@media (max-width: 500px) {
    .subcategory { gap: 10px; padding: 4vw 1vw; }
    .subcategory-logo { width: 54vw; max-width: 80px; }
    .lightbox-content { aspect-ratio: 3 / 4; }
    .lightbox-content img { max-width: 94vw; height: 44vh; }
}
