.gallery-page {
    min-height: 100vh;
    background-image: url('/images/bg-gallery.png');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
}

/* 헤더가 bg-gallery.png 위에 투명하게 위치하도록 재정의 */
.gallery-page .site-header {
    background: transparent;
    backdrop-filter: none;
    border-bottom: none;
}

.gallery-content {
    padding: 60px 80px;
    flex: 1;
}

.gallery-header {
    margin-bottom: 40px;
}

.gallery-title {
    font-size: 36px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #000;
}

.gallery-title-bold {
    font-weight: 700;
}

.gallery-subtitle {
    font-size: 20px;
    color: #888381;
}

/* 필터 탭 */
.filter-tabs {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 8px 22px;
    border: 1px solid var(--color-border);
    border-radius: 50px;
    background: #faf8f7;
    color: var(--color-primary);
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
    font-family: inherit;
    display: inline-block;
}

.filter-tab.active {
    background: var(--color-primary);
    color: #f2f2f2;
    border-color: var(--color-primary);
}

.filter-tab:hover:not(.active) {
    background: rgba(48, 25, 4, 0.05);
}

/* 카드 그리드 */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.gallery-card {
    position: relative; /* 스켈레톤 ::after 포지셔닝 */
    border-radius: 30px;
    overflow: hidden;
    background: white;
    border: 1px solid #9c9c9c;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: transform 0.15s;
}

.gallery-card:hover {
    transform: translateY(-4px);
}

.gallery-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    background: #afafaf;
    transition: opacity 0.3s ease;
}

.card-label {
    padding: 12px 16px;
    font-size: 20px;
    font-weight: 600;
    color: #404040;
}

/* 빈 상태 */
.gallery-empty {
    text-align: center;
    padding: 80px 0;
    color: var(--color-text-sub);
    font-size: 16px;
    grid-column: 1 / -1;
}

/* 더 보기 */
.load-more-area {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.btn-load-more {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 300px;
    height: 70px;
    background: var(--color-primary);
    color: #fffbef;
    border-radius: 10px;
    font-size: 20px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.15s;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.btn-load-more:hover {
    opacity: 0.85;
}

/* 스켈레톤 shimmer */
@keyframes gallery-shimmer {
    0% { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

.gallery-card.is-loading {
    /* AJAX로 삽입된 스켈레톤 전용 카드가 높이 0이 되지 않도록 비율 확보 */
    aspect-ratio: 1 / 1;
    pointer-events: none;
}

.gallery-card.is-loading img {
    opacity: 0;
}

.gallery-card.is-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        #e8e5e2 0%,
        #f2f0ed 50%,
        #e8e5e2 100%
    );
    background-size: 800px 100%;
    animation: gallery-shimmer 1.4s infinite linear;
    border-radius: inherit;
    z-index: 1;
}

.btn-load-more:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
