/* ==========================================
   LIGHTBOX STYLING - Frontend Galerie
   Mit EXIF-Daten und dominanten Farben
   ========================================== */

/* ==========================================
   LIGHTBOX CONTAINER
   ========================================== */
.gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
}

.gallery-lightbox.active {
    display: flex;
    opacity: 1;
    visibility: visible;
    animation: lightboxFadeIn 0.5s ease forwards;
}

.gallery-lightbox.closing {
    animation: lightboxFadeOut 0.4s ease forwards;
}

@keyframes lightboxFadeIn {
    0% {
        opacity: 0;
        filter: blur(10px);
    }
    100% {
        opacity: 1;
        filter: blur(0);
    }
}

@keyframes lightboxFadeOut {
    0% {
        opacity: 1;
        filter: blur(0);
    }
    100% {
        opacity: 0;
        filter: blur(10px);
    }
}

.gallery-lightbox .lightbox-content {
    transform: scale(0.95);
    transition: transform 0.4s ease;
}

.gallery-lightbox.active .lightbox-content {
    transform: scale(1);
}

/* Blur-Hintergrund mit Bild */
.lightbox-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(40px) brightness(0.4);
    transform: scale(1.2);
    z-index: 1;
}

/* Overlay zum Schließen */
.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2;
}

/* ==========================================
   CONTENT CONTAINER
   ========================================== */
.gallery-lightbox .lightbox-content {
    position: relative;
    z-index: 10;
    max-width: 95vw;
    max-height: 90vh;
    width: 1400px;
    height: 85vh;
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
    display: flex;
    overflow: hidden;
}

/* ==========================================
   CLOSE BUTTON
   ========================================== */
.gallery-lightbox .lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.gallery-lightbox .lightbox-close svg {
    width: 20px;
    height: 20px;
    color: white;
}

.gallery-lightbox .lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

/* ==========================================
   MAIN IMAGE AREA
   ========================================== */
.gallery-lightbox .lightbox-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.gallery-lightbox .lightbox-image-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 30px;
}

.gallery-lightbox .lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
}

/* ==========================================
   SIDEBAR
   ========================================== */
.gallery-lightbox .lightbox-sidebar {
    width: 340px;
    background: rgba(15, 15, 15, 0.6);
    padding: 100px 25px 30px 25px;
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    overflow-y: auto;
}

/* Info Sections */
.lightbox-info-section {
    margin-bottom: 3rem;
}

.lightbox-info-section h3 {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.lightbox-info-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lightbox-info-grid .info-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.lightbox-info-grid .info-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.lightbox-info-grid .info-value {
    color: white;
    font-size: 0.9rem;
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

/* ==========================================
   FARBEN DISPLAY
   ========================================== */
.lightbox-colors {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.color-dot {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.color-dot:hover {
    transform: scale(1.15);
    border-color: rgba(255, 255, 255, 0.7);
}

.color-percent {
    font-size: 0.8rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
    pointer-events: none;
}

/* ==========================================
   ACTION BUTTONS
   ========================================== */
.lightbox-actions {
    margin-top: auto;
    padding-top: 25px;
}

.btn-lightbox-cart {
    width: 100%;
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-lightbox-cart svg {
    width: 20px;
    height: 20px;
}

.btn-lightbox-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

/* ==========================================
   SCROLLBAR
   ========================================== */
.gallery-lightbox .lightbox-sidebar::-webkit-scrollbar {
    width: 6px;
}

.gallery-lightbox .lightbox-sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.gallery-lightbox .lightbox-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.gallery-lightbox .lightbox-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1200px) {
    .gallery-lightbox .lightbox-sidebar {
        width: 300px;
    }
    
    .color-dot {
        width: 40px;
        height: 40px;
    }
}

/* Mobile: Sidebar komplett verstecken, wird durch mobile.css gehandelt */
@media (max-width: 768px) {
    .gallery-lightbox .lightbox-content {
        flex-direction: column;
    }
    
    .gallery-lightbox .lightbox-sidebar {
        display: none !important;
    }
}

/* Desktop: Mobile-Elemente verstecken */
@media (min-width: 769px) {
    .lightbox-mobile-bar,
    .lightbox-mobile-panel {
        display: none !important;
    }
}
