/* assets/css/gallery.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, Helvetica, sans-serif;
    color: white;
    min-height: 100vh;
    padding-bottom: 90px;
    -webkit-user-select: none;
    user-select: none;
}

/* ===== HEADER ===== */
.gallery-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 14px 20px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 1500px;
    margin: 0 auto;
}

.back-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.08);
    transition: 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.back-link:hover {
    background: rgba(255, 255, 255, 0.18);
    color: white;
    transform: translateX(-3px);
}

.back-link i {
    font-size: 14px;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-info h1 {
    font-size: 20px;
    font-weight: 700;
    color: white;
    letter-spacing: 0.5px;
}

.photo-count {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.08);
    padding: 4px 14px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.header-date {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ===== SEARCH ===== */
.search-wrapper {
    max-width: 600px;
    margin: 16px auto 10px;
    padding: 0 16px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: 0.3s;
}

.search-box:focus-within {
    border-color: rgba(37, 99, 235, 0.5);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
    font-size: 16px;
}

.search-input {
    flex: 1;
    padding: 12px 16px 12px 48px;
    border: none;
    background: transparent;
    font-size: 15px;
    color: white;
    outline: none;
    border-radius: 30px;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    font-size: 12px;
}

.search-clear:hover {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

/* ===== KOLOM SELECTOR ===== */
.column-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    max-width: 280px;
    margin: 8px auto;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.column-selector span {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-right: 4px;
}

.column-selector span i {
    margin-right: 4px;
}

.col-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: 0.3s;
}

.col-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.col-btn.active {
    background: rgba(37, 99, 235, 0.5);
    color: white;
    box-shadow: 0 2px 12px rgba(37, 99, 235, 0.2);
}

/* ===== GALLERY GRID (TETAP SAMA) ===== */
.gallery-grid {
    max-width: 1500px;
    margin: 12px auto;
    padding: 0 12px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.photo-item {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    transition: 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.photo-item:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.1);
    z-index: 2;
}

.photo-item img {
    width: 100%;
    height: auto;
    display: block;
}

.photo-checkbox {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    opacity: 0;
    transition: 0.3s;
}

.photo-item:hover .photo-checkbox,
.photo-item.selected .photo-checkbox {
    opacity: 1;
}

.photo-item.selected .photo-checkbox {
    background: #16a34a;
}

.photo-item.selected {
    outline: 3px solid #16a34a;
}

/* ===== FLOATING CHECKOUT ===== */
.floating-checkout {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: white;
    padding: 12px 24px;
    border-radius: 40px;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 16px;
    font-weight: 600;
    font-size: 15px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

#selectedCount {
    color: #16a34a;
}

.btn-checkout {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    padding: 8px 24px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: 0.3s;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}

.btn-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5);
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

/* ===== OVERLAY ===== */
.photo-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 200;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.overlay-content {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 20px;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.overlay-image-wrapper {
    max-width: 100%;
    max-height: 60vh;
    overflow: hidden;
    border-radius: 8px;
}

.overlay-image-wrapper img {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
}

.overlay-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.overlay-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.overlay-btn:first-child {
    background: rgba(255, 255, 255, 0.12);
    color: white;
}

.overlay-btn:first-child:hover {
    background: rgba(255, 255, 255, 0.2);
}

.overlay-btn:last-child {
    background: #16a34a;
    color: white;
}

.overlay-btn:last-child:hover {
    background: #15803d;
}

/* ===== FULLSCREEN VIEWER ===== */
.fullscreen-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 300;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
}

.viewer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: 0.3s;
}

.viewer-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.viewer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    font-size: 22px;
    cursor: pointer;
    z-index: 10;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.viewer-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.viewer-prev {
    left: 20px;
}

.viewer-next {
    right: 20px;
}

.viewer-image-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.viewer-image-wrapper img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    cursor: zoom-in;
    transition: transform 0.2s;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 18px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 700px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 0 8px;
    }
    .header-info h1 {
        font-size: 17px;
    }
    .header-date {
        font-size: 12px;
    }
    .back-link {
        font-size: 12px;
        padding: 6px 12px;
    }
    .floating-checkout {
        padding: 10px 16px;
        font-size: 13px;
        gap: 12px;
        width: 90%;
        justify-content: center;
    }
    .btn-checkout {
        padding: 6px 16px;
        font-size: 13px;
    }
    .search-wrapper {
        padding: 0 10px;
    }
    .search-input {
        font-size: 14px;
        padding: 10px 16px 10px 44px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
        padding: 0 4px;
    }
    .header-top {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 6px;
    }
    .header-info {
        justify-content: center;
    }
    .header-date {
        justify-content: center;
    }
    .back-link {
        justify-content: center;
    }
    .photo-count {
        font-size: 11px;
        padding: 3px 10px;
    }
    .column-selector {
        gap: 4px;
        padding: 6px 12px;
        max-width: 240px;
    }
    .col-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    .floating-checkout {
        font-size: 12px;
        padding: 8px 14px;
        gap: 10px;
    }
    .btn-checkout {
        font-size: 12px;
        padding: 5px 14px;
    }
}