/* Byty Inline Gallery – 3 sloupce */
#byty-inline-section {
    width: 75%;
    max-width: 1300px;
    margin: 30px auto;
    padding: 0;
    display: grid;
    grid-template-columns: 2fr 2fr 1fr;
    gap: 50px;
    align-items: start;
}

/* ── Záhlaví sloupce ────────────────────────────── */
.byty-col-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #92B675;
    margin-bottom: 10px;
}

/* ── Půdorys sloupec ────────────────────────────── */
#byty-inline-pudorys {
    display: flex;
    flex-direction: column;
}

#byty-pudorys-wrap {
    background: #f8fafc;
    border-radius: 10px;
    overflow: hidden;
    border: 1.5px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

#byty-pudorys-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    border-radius: 6px;
}

/* ── Gallery panel ─────────────────────────────── */
#byty-inline-gallery {
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    overflow: hidden;
    background: #111;
    min-width: 0;
}

#byty-inline-gallery .byty-col-label {
    background: #111;
    padding: 10px 12px 0;
    margin-bottom: 0;
}

#byty-gallery-main {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #111;
    touch-action: pan-y;
}

#byty-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity .2s;
    user-select: none;
    -webkit-user-drag: none;
}

#byty-gallery-counter {
    position: absolute;
    bottom: 10px;
    right: 14px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 13px;
    padding: 3px 10px;
    border-radius: 20px;
    pointer-events: none;
}

.byty-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.45);
    color: #fff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    z-index: 5;
    -webkit-tap-highlight-color: transparent;
}
.byty-gallery-nav:hover { background: rgba(0,0,0,0.75); }
#byty-nav-prev { left: 10px; }
#byty-nav-next { right: 10px; }

/* Thumbnails */
#byty-gallery-thumbs {
    display: flex;
    gap: 4px;
    padding: 6px 8px;
    overflow-x: auto;
    background: #1a1a1a;
    flex-shrink: 0;
    scrollbar-width: thin;
    scrollbar-color: #555 #1a1a1a;
}
#byty-gallery-thumbs img {
    height: 56px;
    width: 82px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.55;
    transition: opacity .15s;
    flex-shrink: 0;
    border: 2px solid transparent;
    -webkit-tap-highlight-color: transparent;
}
#byty-gallery-thumbs img.active,
#byty-gallery-thumbs img:hover {
    opacity: 1;
    border-color: #92B675;
}

/* Dots – jen mobil */
#byty-gallery-dots {
    display: none;
    justify-content: center;
    gap: 6px;
    padding: 8px 6px;
    background: #1a1a1a;
    flex-wrap: wrap;
}
.byty-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: background .15s;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}
.byty-dot.active { background: #92B675; }

/* ── Info panel ─────────────────────────────────── */
#byty-inline-info {
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.10);
}

#byty-info-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    border: 2px solid #92B675;
    color: #92B675;
    width: fit-content;
}
#byty-info-badge.obsazeno    { border-color: #d0021b; color: #d0021b; }
#byty-info-badge.rezervovano { border-color: #f5a623; color: #f5a623; }

#byty-info-title {
    font-size: 22px;
    font-weight: 700;
    color: #222;
    line-height: 1.2;
}

#byty-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.byty-info-item {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 10px 12px;
}
.byty-info-item .label {
    font-size: 11px;
    color: #888;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.byty-info-item .value {
    font-size: 15px;
    font-weight: 700;
    color: #222;
}
.byty-info-item.full-width { grid-column: 1 / -1; }

#byty-info-pdf {
    display: block;
    background: #92B675;
    color: #fff;
    text-align: center;
    padding: 13px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    margin-top: 4px;
    transition: background .2s;
    -webkit-tap-highlight-color: transparent;
}
#byty-info-pdf:hover { background: #7a9a62; color: #fff; text-decoration: none; }
#byty-info-pdf.hidden { display: none; }

/* ── Lightbox ───────────────────────────────────── */
#byty-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
}
#byty-lightbox.active {
    display: flex;
}
#byty-lb-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.92);
    cursor: zoom-out;
}
#byty-lb-img-wrap {
    position: relative;
    z-index: 2;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
#byty-lb-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}
#byty-lb-close {
    position: absolute;
    top: 16px;
    right: 20px;
    z-index: 3;
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    font-size: 32px;
    line-height: 1;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    -webkit-tap-highlight-color: transparent;
}
#byty-lb-close:hover { background: rgba(255,255,255,0.25); }

.byty-lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    font-size: 40px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    -webkit-tap-highlight-color: transparent;
}
.byty-lb-nav:hover { background: rgba(255,255,255,0.25); }
#byty-lb-prev { left: 16px; }
#byty-lb-next { right: 16px; }

#byty-lb-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    color: rgba(255,255,255,0.75);
    font-size: 14px;
    background: rgba(0,0,0,0.4);
    padding: 4px 14px;
    border-radius: 20px;
    pointer-events: none;
}

/* Zabrání scrollování stránky při otevřeném lightboxu */
body.byty-lb-open { overflow: hidden; }

/* Kurzor zoom na hlavní foto */
#byty-main-img { cursor: zoom-in; }

/* Active hotspot */
.ue_hotspot-item.spot.byty-active {
    background: #92B675 !important;
    color: #fff !important;
    transform: translate(-50%, -50%) scale(1.15) !important;
}

/* ── Tablet (max 1024px) ────────────────────────── */
@media (max-width: 1024px) {
    #byty-inline-section {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
    }
    /* Půdorys přes celou šířku nahoře */
    #byty-inline-pudorys {
        grid-column: 1 / -1;
    }
    #byty-pudorys-wrap {
        max-height: 320px;
    }
    #byty-pudorys-img {
        max-height: 296px;
        object-fit: contain;
    }
    #byty-inline-info {
        padding: 18px 16px;
        gap: 10px;
    }
    #byty-info-title { font-size: 19px; }
    .byty-info-item { padding: 8px 10px; }
    .byty-info-item .value { font-size: 14px; }
}

/* ── Mobil (max 600px) ──────────────────────────── */
@media (max-width: 600px) {
    #byty-inline-section {
        grid-template-columns: 1fr;
        gap: 0;
        margin: 16px auto;
        padding: 0;
    }

    #byty-inline-pudorys {
        grid-column: 1;
        padding: 12px 0 0;
    }
    #byty-pudorys-wrap {
        border-radius: 0;
        max-height: 260px;
        border-left: none;
        border-right: none;
    }

    #byty-inline-gallery {
        border-radius: 0;
    }
    #byty-gallery-main {
        aspect-ratio: 16/10;
    }

    .byty-gallery-nav {
        width: 38px;
        height: 38px;
        font-size: 20px;
    }
    #byty-nav-prev { left: 6px; }
    #byty-nav-next { right: 6px; }

    #byty-gallery-thumbs { display: none; }
    #byty-gallery-dots   { display: flex; }

    #byty-inline-info {
        border-radius: 0 0 10px 10px;
        padding: 16px 14px;
        gap: 10px;
        box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    }
    #byty-info-title { font-size: 18px; }
    .byty-info-item { padding: 8px 10px; }
    .byty-info-item .label { font-size: 10px; }
    .byty-info-item .value { font-size: 14px; }
    #byty-info-pdf { padding: 12px; font-size: 14px; }
}
