/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: var(--spacing-md);
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    background: var(--color-white);
    width: 100%;
    max-width: 1000px;
    height: 80vh;
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.lightbox-main {
    flex: 2;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.lightbox-main img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 1rem;
    cursor: pointer;
    font-size: 1.5rem;
    border-radius: 50%;
    transition: background 0.3s;
    user-select: none;
    z-index: 10;
}

.lightbox-nav-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

.lightbox-nav-btn.prev {
    left: 1rem;
}

.lightbox-nav-btn.next {
    right: 1rem;
}

.lightbox-sidebar {
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: var(--color-white);
}

.lightbox-close {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    font-size: 2rem;
    color: var(--color-text-primary);
    background: rgba(255, 255, 255, 0.8);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.lightbox-close:hover {
    background: #eee;
}

.lightbox-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.lightbox-thumbnails {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
}

.lightbox-thumb {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.lightbox-thumb:hover,
.lightbox-thumb.active {
    border-color: var(--color-accent-primary);
    opacity: 0.8;
}

.lightbox-desc {
    color: #666;
    line-height: 1.6;
    margin-bottom: auto;
    /* Pushes button to bottom */
}

.lightbox-cta {
    margin-top: var(--spacing-md);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .lightbox-content {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr auto;
        height: 90vh;
        overflow-y: auto;
    }

    .lightbox-main {
        height: 40vh;
        padding: var(--spacing-sm);
        background: #000;
        /* Dark background for image on mobile */
    }

    .lightbox-sidebar {
        padding: var(--spacing-md);
    }

    .lightbox-title {
        font-size: 1.5rem;
        margin-top: 0;
    }
}