/* =========================================
   Predaukční Galerie - Lightbox
   ========================================= */

.pg-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.pg-lightbox--open {
    opacity: 1;
    visibility: visible;
}

.pg-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
}

.pg-lightbox__container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* Header */
.pg-lightbox__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
}

.pg-lightbox__header-info {
    flex: 1;
    min-width: 0;
}

.pg-lightbox__title {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pg-lightbox__image-desc {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin: 0.25rem 0 0;
}

.pg-lightbox__header-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
    margin-left: 1rem;
}

/* --- Zoom button: rounded rect with magnifying glass icon --- */
.pg-lightbox__zoom-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.pg-lightbox__zoom-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.7);
}

/* --- Close button: red circle with bold X --- */
.pg-lightbox__close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: #dc2626;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease;
}

.pg-lightbox__close-btn:hover {
    background: #b91c1c;
}

/* Image area */
.pg-lightbox__image-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    min-height: 0;
}

.pg-lightbox__image-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 60px 60px 0;
    touch-action: none;
    -webkit-touch-callout: none;
}

@media (max-width: 767px) {
    .pg-lightbox__image-wrapper {
        padding: 50px 10px 0;
    }
}

.pg-lightbox__image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: zoom-in;
    transition: transform 0.15s ease;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.pg-lightbox__image--zoomed {
    cursor: grab;
    max-width: none;
    max-height: none;
}

.pg-lightbox__image--dragging {
    cursor: grabbing;
    transition: none;
}

.pg-lightbox__pan-hint {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    pointer-events: none;
    display: none;
}

.pg-lightbox__image--zoomed ~ .pg-lightbox__pan-hint {
    display: block;
}

/* Navigation arrows (desktop) */
.pg-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease;
    z-index: 5;
}

.pg-lightbox__nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.pg-lightbox__nav--prev {
    left: 1rem;
}

.pg-lightbox__nav--next {
    right: 1rem;
}

.pg-lightbox__nav--hidden {
    display: none;
}

@media (max-width: 767px) {
    .pg-lightbox__nav {
        display: none;
    }
}

/* Footer */
.pg-lightbox__footer {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.25rem;
    color: #fff;
}

/* Contact button row - centered, prominent */
.pg-lightbox__contact-row {
    display: flex;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.pg-lightbox__contact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 2.5rem;
    background: #059669;
    border: none;
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: background 0.2s ease, transform 0.15s ease;
}

.pg-lightbox__contact-btn:hover {
    background: #047857;
    color: #fff;
    transform: scale(1.03);
}

.pg-lightbox__contact-btn:active {
    transform: scale(0.98);
}

.pg-lightbox__meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
}

.pg-lightbox__meta-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pg-lightbox__meta-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.pg-lightbox__meta-status {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

.pg-lightbox__meta-status--available {
    background: #059669;
    color: #fff;
}

.pg-lightbox__meta-status--sold {
    background: #dc2626;
    color: #fff;
}

.pg-lightbox__meta-status--reserved {
    background: #d97706;
    color: #fff;
}

.pg-lightbox__meta-details {
    font-size: 0.85rem;
    opacity: 0.7;
    display: flex;
    gap: 1rem;
}

.pg-lightbox__meta-price {
    font-weight: 700;
    font-size: 0.95rem;
    opacity: 1;
}

/* Mobile navigation */
.pg-lightbox__nav-mobile {
    display: none;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.5rem;
}

@media (max-width: 767px) {
    .pg-lightbox__nav-mobile {
        display: flex;
    }
}

.pg-lightbox__nav-mobile-btn {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: transparent;
    color: #fff;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.pg-lightbox__nav-mobile-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.pg-lightbox__counter {
    font-size: 0.8rem;
    opacity: 0.6;
}
