/* ============================================
   AS WEDDING — Gallery & Lightbox Styles
   ============================================ */

/* ================ MASONRY GRID ================ */
.gallery-grid {
    column-count: 2;
    column-gap: var(--space-xs);
    margin-top: var(--space-md);
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: var(--space-xs);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    background: var(--cream);
    transition: transform var(--duration-fast) var(--ease-smooth);
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: filter 0.5s ease;
}

/* Blur-up placeholder */
.gallery-item.loading img {
    filter: blur(20px);
    transform: scale(1.1);
}

.gallery-item.loaded img {
    filter: blur(0);
    transform: scale(1);
}

.gallery-empty {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-light);
    font-style: italic;
}

.gallery-empty-icon {
    font-size: var(--fs-3xl);
    margin-bottom: var(--space-md);
    opacity: 0.4;
}

/* ================ UPLOAD BUTTON ================ */
.upload-btn-wrapper {
    text-align: center;
    margin-top: var(--space-lg);
}

/* ================ LIGHTBOX ================ */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: var(--z-modal);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-smooth);
}

.lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

.lightbox-image-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--space-xl);
    max-width: 100%;
    max-height: calc(100vh - 80px);
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.lightbox-close {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    color: var(--white);
    font-size: var(--fs-xl);
    cursor: pointer;
    transition: background var(--duration-fast);
    z-index: 2;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-download {
    position: absolute;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%);
    color: var(--white);
    font-size: var(--fs-sm);
    padding: var(--space-xs) var(--space-lg);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background var(--duration-fast);
    z-index: 2;
}

.lightbox-download:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ================ GALLERY FILTER TABS ================ */
.gallery-tabs {
    display: flex;
    gap: var(--space-xs);
    justify-content: center;
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.gallery-tab {
    padding: var(--space-2xs) var(--space-md);
    font-size: var(--fs-xs);
    color: var(--text-light);
    border: 1px solid var(--gold-light);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-smooth);
    text-transform: uppercase;
    letter-spacing: var(--ls-wide);
}

.gallery-tab:hover,
.gallery-tab.active {
    background: var(--antique-gold);
    color: var(--white);
    border-color: var(--antique-gold);
}

/* ================ UPLOAD PROGRESS ================ */
.upload-progress {
    width: 100%;
    height: 4px;
    background: var(--cream);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-top: var(--space-sm);
}

.upload-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--antique-gold), var(--gold-light));
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
    width: 0%;
}

/* ================ GALLERY ATTRIBUTION ================ */
.gallery-attribution {
    display: block;
    font-size: 0.65rem;
    color: #8B7355;
    text-align: center;
    padding: 3px 6px;
    background: rgba(250, 247, 242, 0.9);
    letter-spacing: 0.02em;
}