/* CELAI 패션 갤러리 스타일 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --accent-primary: #667eea;
    --accent-secondary: #764ba2;
    --overlay-bg: rgba(0, 0, 0, 0.9);
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --text-primary: #f5f5f5;
    --text-secondary: #aaaaaa;
    --overlay-bg: rgba(0, 0, 0, 0.95);
    --shadow: rgba(255, 255, 255, 0.05);
    --shadow-hover: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: background-color 0.3s, color 0.3s;
}

/* 사이트 로고 */
.site-logo {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.site-logo img {
    width: 120px;
    height: auto;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.site-logo:hover img {
    transform: scale(1.05);
    opacity: 0.8;
}

/* 테마 토글 버튼 */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--shadow);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px var(--shadow-hover);
}

[data-theme="dark"] .theme-toggle {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* 태그 필터 바 */
.tag-filter-bar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: var(--bg-secondary);
    padding: 10px 20px;
    border-radius: 30px;
    box-shadow: 0 4px 20px var(--shadow);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.filter-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-label i {
    color: var(--accent-primary);
}

.filter-tag {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.filter-clear {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: var(--bg-primary);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.filter-clear:hover {
    background: #ff6b6b;
    color: white;
}

/* 로딩 오버레이 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    font-size: 3rem;
    color: var(--accent-primary);
}

/* 갤러리 컨테이너 - Masonry 레이아웃 */
.gallery-container {
    padding: 20px;
    columns: 5 280px;
    column-gap: 15px;
}

/* 갤러리 아이템 */
.gallery-item {
    break-inside: avoid;
    margin-bottom: 15px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: var(--bg-secondary);
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 40px var(--shadow-hover);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* 다양한 크기 클래스 */
.gallery-item.small {
    /* 기본 크기 */
}

.gallery-item.medium {
    /* 중간 크기 - 기본과 동일 */
}

.gallery-item.large {
    /* 크게 - CSS columns에서는 높이로 제어 */
}

.gallery-item.tall img {
    min-height: 350px;
    object-fit: cover;
}

.gallery-item.wide {
    /* CSS columns에서 wide는 tall과 유사하게 처리 */
}

/* 비디오 래퍼 */
.video-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.video-wrapper video {
    width: 104%;
    margin-left: -2%;
    display: block;
}

/* 비디오 재생 아이콘 */
.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 5;
}

.gallery-item:hover .video-play-icon {
    background: var(--accent-primary);
    transform: translate(-50%, -50%) scale(1.1);
}

.gallery-item.loaded .video-play-icon {
    opacity: 0;
    pointer-events: none;
}

.gallery-item.loaded:hover .video-play-icon {
    opacity: 0;
}

/* 레이지 로딩 플레이스홀더 */
.lazy-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 200px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 2.5rem;
    z-index: 1;
    transition: opacity 0.5s ease;
}

.gallery-item.loaded .lazy-placeholder {
    opacity: 0;
    pointer-events: none;
}

/* 레이지 로딩 shimmer 애니메이션 */
.lazy-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 100%);
    animation: shimmer 1.5s infinite;
}

[data-theme="dark"] .lazy-placeholder::before {
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.05) 50%,
            transparent 100%);
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* 오버레이 */
.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 60%, rgba(0, 0, 0, 0.7) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 15px;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.item-type-badge {
    background: rgba(255, 255, 255, 0.9);
    color: var(--accent-primary);
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 에러 메시지 */
.error-message {
    text-align: center;
    padding: 100px 20px;
    color: var(--text-secondary);
    width: 100%;
}

.error-message i {
    font-size: 4rem;
    margin-bottom: 20px;
    display: block;
}

.error-message p {
    font-size: 1.2rem;
}

/* 모달 오버레이 - 개선된 스타일 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

[data-theme="dark"] .modal-overlay {
    background: rgba(0, 0, 0, 0.6);
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: 20px;
    max-width: 900px;
    width: 100%;
    max-height: 95vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    animation: modalSlideIn 0.3s ease;
    transition: transform 0.15s ease, opacity 0.15s ease;
    margin: auto;
    /* 스크롤바 숨기기 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE, Edge */
}

/* 모달 콘텐츠 스크롤바 숨기기 - Webkit (Chrome, Safari) */
.modal-content::-webkit-scrollbar {
    display: none;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.modal-body {
    /* 스크롤 가능 */
}

/* 모달 헤더 - 메인 이미지 */
.modal-header {
    position: relative;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
    background: var(--bg-primary);
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.modal-main-image {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    object-position: top;
    display: block;
    cursor: zoom-in;
}

.modal-main-video {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    display: block;
    background: #000;
}

/* 모달 헤더 액션 버튼 */
.modal-header-actions {
    position: absolute;
    bottom: 15px;
    right: 15px;
    display: flex;
    gap: 10px;
    z-index: 5;
}

.header-link-btn {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: white;
}

.header-link-btn:hover {
    transform: scale(1.1);
}

.header-link-btn.youtube {
    background: #ff0000;
}

.header-link-btn.youtube:hover {
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.5);
}

.header-link-btn.blog {
    background: #03c75a;
}

.header-link-btn.blog:hover {
    box-shadow: 0 4px 15px rgba(3, 199, 90, 0.5);
}

.header-link-btn.share {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
}

.header-link-btn.share:hover {
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.5);
}

/* 토스트 메시지 */
.toast-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    z-index: 30000;
    animation: toastIn 0.3s ease;
}

.toast-message.fade-out {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}

/* 모달 정보 섹션 */
.modal-info {
    padding: 25px;
}

.modal-badges {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge.category {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
}

.badge.season {
    background: rgba(255, 107, 107, 0.9);
    color: white;
}

.modal-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.modal-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.modal-description {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--bg-primary);
    border-radius: 12px;
}

/* 모달 상품 섹션 */
.modal-products h3,
.modal-gallery h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-products h3 i,
.modal-gallery h3 i {
    color: var(--accent-primary);
}

.products-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.product-item {
    display: flex;
    gap: 15px;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: 12px;
    transition: transform 0.2s;
}

.product-item:hover {
    transform: translateX(5px);
}

.product-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.2s;
}

.product-item img:hover {
    transform: scale(1.05);
}

.product-img-link {
    flex-shrink: 0;
}

.product-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
    justify-content: center;
}

.product-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 가격+버튼 행 */
.price-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-price {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-primary);
}

.product-buy-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.85rem;
    transition: transform 0.2s, box-shadow 0.2s;
    width: fit-content;
}

.product-buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 모달 미니 갤러리 */
.mini-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-bottom: 25px;
}

.mini-gallery img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    cursor: zoom-in;
    transition: transform 0.2s;
}

.mini-gallery img:hover {
    transform: scale(1.05);
}

/* 모달 태그 */
.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.modal-tags .tag {
    background: var(--bg-primary);
    color: var(--accent-primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    transition: background 0.2s, color 0.2s;
}

.modal-tags .tag:hover {
    background: var(--accent-primary);
    color: white;
}

/* 클릭 가능한 태그 스타일 */
.modal-tags .tag.clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-tags .tag.clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* 모달 링크 버튼 */
.modal-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
}

.link-btn:hover {
    transform: translateY(-2px);
}

.link-btn.youtube {
    background: #ff0000;
    color: white;
}

.link-btn.youtube:hover {
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.4);
}

.link-btn.blog {
    background: #03c75a;
    color: white;
}

.link-btn.blog:hover {
    box-shadow: 0 4px 15px rgba(3, 199, 90, 0.4);
}

/* 이미지 확대 보기 오버레이 */
.image-zoom-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.image-zoom-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 20px;
}

.image-zoom-overlay .zoom-image {
    max-width: 95vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    user-select: none;
    -webkit-user-drag: none;
}

.image-zoom-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, transform 0.2s;
    z-index: 10;
}

.image-zoom-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* 이전/다음 버튼 */
.image-zoom-prev,
.image-zoom-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, transform 0.2s;
    z-index: 10;
}

.image-zoom-prev {
    left: 20px;
}

.image-zoom-next {
    right: 20px;
}

.image-zoom-prev:hover,
.image-zoom-next:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.1);
}

/* 이미지 카운터 */
.image-zoom-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 10;
}

/* 모바일에서 버튼 크기 조정 */
@media (max-width: 600px) {

    .image-zoom-prev,
    .image-zoom-next {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .image-zoom-prev {
        left: 10px;
    }

    .image-zoom-next {
        right: 10px;
    }

    .image-zoom-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .image-zoom-counter {
        bottom: 20px;
        padding: 6px 16px;
        font-size: 0.85rem;
    }

    .image-zoom-overlay .zoom-image {
        max-height: 80vh;
    }
}

/* 반응형 */
@media (max-width: 1200px) {
    .gallery-container {
        columns: 4 250px;
    }
}

@media (max-width: 900px) {
    .gallery-container {
        columns: 3 220px;
    }
}

@media (max-width: 600px) {
    .gallery-container {
        columns: 2 160px;
        padding: 10px;
        padding-top: 70px;
        /* 필터 바 공간 확보 */
        column-gap: 10px;
    }

    .gallery-item {
        margin-bottom: 10px;
        border-radius: 8px;
    }

    .theme-toggle {
        top: 10px;
        right: 10px;
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    /* 로고 모바일 */
    .site-logo {
        top: 10px;
        left: 10px;
    }

    .site-logo img {
        width: 90px;
    }

    /* 태그 필터 바 모바일 */
    .tag-filter-bar {
        padding: 8px 15px;
        gap: 8px;
        font-size: 0.85rem;
    }

    .filter-label {
        display: none;
    }

    .filter-tag {
        padding: 5px 12px;
        font-size: 0.85rem;
    }

    .filter-clear {
        width: 28px;
        height: 28px;
    }

    /* 모바일 모달 - 윗부분 짤림 방지 */
    .modal-overlay {
        padding: 10px;
        align-items: flex-start;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .modal-content {
        border-radius: 15px;
        max-height: none;
        margin-top: 0;
        margin-bottom: 0;
    }

    .modal-main-image,
    .modal-main-video {
        max-height: 300px;
    }

    .video-play-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .lazy-placeholder {
        min-height: 150px;
        font-size: 2rem;
    }

    /* 모바일 모달 정보 섹션 */
    .modal-info {
        padding: 15px;
    }

    .modal-badges {
        gap: 6px;
        margin-bottom: 10px;
    }

    .modal-badges .badge {
        padding: 4px 10px;
        font-size: 0.75rem;
    }

    .modal-title {
        font-size: 1.1rem;
        margin-bottom: 5px;
    }

    .modal-subtitle {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }

    .modal-description {
        font-size: 0.85rem;
        padding: 10px;
        margin-bottom: 15px;
        line-height: 1.6;
    }

    /* 모바일 상품 섹션 */
    .modal-products h3,
    .modal-gallery h3 {
        font-size: 0.95rem;
        margin-bottom: 10px;
    }

    .products-list {
        gap: 8px;
        margin-bottom: 15px;
    }

    /* 모바일 상품 아이템 - 가로 레이아웃 유지, 컴팩트하게 */
    .product-item {
        flex-direction: row;
        align-items: stretch;
        padding: 8px;
        gap: 10px;
    }

    .product-img-link {
        display: flex;
        align-items: stretch;
    }

    .product-item img {
        width: 55px;
        height: 100%;
        min-height: 55px;
        object-fit: cover;
        border-radius: 6px;
        flex-shrink: 0;
    }

    .product-details {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 3px;
        min-width: 0;
    }

    .product-name {
        font-size: 0.73rem;
        -webkit-line-clamp: 1;
        margin-bottom: 0;
        line-height: 1.3;
    }

    /* 가격과 버튼 - 좌우 끝 배치 */
    .product-item .price-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .product-price {
        font-size: 0.75rem;
        margin: 0;
    }

    .product-buy-btn {
        padding: 5px 10px;
        font-size: 0.75rem;
        border-radius: 4px;
        margin: 0;
        margin-left: auto;
    }

    .product-buy-btn i {
        display: none;
    }

    /* 모바일 미니 갤러리 */
    .modal-gallery {
        margin-bottom: 15px;
    }

    .mini-gallery {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
        margin-bottom: 15px;
    }

    .mini-gallery img {
        border-radius: 6px;
    }

    /* 모바일 태그 */
    .modal-tags {
        gap: 5px;
        margin-bottom: 15px;
    }

    .modal-tags .tag {
        padding: 4px 10px;
        font-size: 0.75rem;
    }

    /* 모바일 링크 버튼 */
    .modal-links {
        gap: 8px;
    }

    .link-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
        gap: 5px;
    }

    /* 모달 헤더 액션 버튼 */
    .modal-header-actions {
        bottom: 10px;
        right: 10px;
        gap: 6px;
    }

    .header-link-btn {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }

    .modal-close {
        top: 10px;
        right: 10px;
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
}

/* 스크롤바 스타일 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}

/* 이미지 로딩 애니메이션 - shimmer 애니메이션은 위에서 이미 정의됨 */
.gallery-item img {
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-primary) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.gallery-item img[src] {
    animation: none;
    background: none;
}

/* ===================================
   기존 post.html 페이지용 스타일 유지
   =================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 헤더 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 0;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.logo {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 5px;
}

.logo-link {
    text-decoration: none;
    color: inherit;
}

.tagline {
    font-size: 1rem;
    opacity: 0.9;
}

/* 메인 콘텐츠 */
.main-content {
    padding: 40px 0;
    min-height: calc(100vh - 200px);
}

/* 통계 바 */
.stats-bar {
    background: white;
    padding: 15px 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 30px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #636e72;
    font-size: 0.95rem;
}

.stat-item i {
    color: #667eea;
}

.stat-item strong {
    color: #667eea;
    font-size: 1.1rem;
}

/* 포스트 그리드 */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* 포스트 카드 */
.post-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.post-image-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-image {
    transform: scale(1.05);
}

/* 이미지 없음 스타일 */
.no-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f1f3f4 0%, #e1e5e8 100%);
    color: #aaa;
}

.no-image-placeholder i {
    font-size: 3rem;
    margin-bottom: 10px;
}

.no-image-placeholder span {
    font-size: 0.9rem;
}

.post-image-wrapper.no-image .post-image {
    display: none;
}

.post-image-wrapper.no-image::after {
    content: '이미지 없음';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #999;
    font-size: 0.9rem;
}

.post-image-wrapper.no-image {
    background: linear-gradient(135deg, #f1f3f4 0%, #e1e5e8 100%);
}

/* 포스트 배지 */
.post-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    gap: 6px;
}

.post-category {
    background: rgba(102, 126, 234, 0.9);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.post-season {
    background: rgba(255, 107, 107, 0.9);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.post-info {
    padding: 20px;
}

/* 상품 썸네일 */
.product-thumbnails {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    align-items: center;
}

.product-thumb {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #f1f3f4;
}

.more-products {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #667eea;
    color: white;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
}

.post-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2d3436;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-subtitle {
    font-size: 0.9rem;
    color: #636e72;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 포스트 통계 */
.post-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.post-stats .stat {
    font-size: 0.8rem;
    color: #636e72;
}

.post-stats .stat i {
    margin-right: 4px;
    color: #667eea;
}

/* 포스트 가격 */
.post-price {
    font-size: 0.95rem;
    font-weight: 600;
    color: #e17055;
    margin-bottom: 10px;
}

.post-price i {
    margin-right: 4px;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #b2bec3;
    margin-bottom: 10px;
}

.post-meta i {
    margin-right: 4px;
}

.post-id {
    font-family: monospace;
    font-size: 0.7rem;
    color: #aaa;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    background: #f1f3f4;
    color: #667eea;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
}

.tag.more {
    background: #667eea;
    color: white;
}

/* 로딩 */
.loading {
    text-align: center;
    padding: 40px;
    color: #667eea;
    font-size: 1.1rem;
}

.loading i {
    margin-right: 8px;
}

/* 페이지네이션 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
}

.page-btn {
    background: white;
    border: 1px solid #ddd;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.page-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.page-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.page-dots {
    padding: 0 10px;
    color: #999;
}

.page-info {
    color: #636e72;
    font-size: 0.9rem;
    margin-right: 15px;
}

/* 푸터 */
.footer {
    background: #2d3436;
    color: #b2bec3;
    padding: 25px 0;
    text-align: center;
    font-size: 0.9rem;
}

/* 에러 메시지 */
.error,
.no-posts {
    text-align: center;
    padding: 60px 20px;
    color: #636e72;
    font-size: 1.1rem;
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 포스트 상세 페이지 스타일 */
.back-nav {
    margin-bottom: 20px;
}

.back-link {
    color: #667eea;
    text-decoration: none;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.back-link:hover {
    color: #764ba2;
}

.post-detail {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.post-header {
    position: relative;
}

.post-hero {
    height: 400px;
    overflow: hidden;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-title-section {
    padding: 30px;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.post-category-badge,
.post-season-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin: 0 5px 15px;
}

.detail-title {
    font-size: 2rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.detail-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 15px;
}

.detail-date {
    font-size: 0.9rem;
    opacity: 0.8;
}

.detail-date i {
    margin-right: 5px;
}

/* 섹션 스타일 */
.post-description,
.products-section,
.gallery-section,
.tags-section,
.text-section,
.post-html-content {
    padding: 30px;
    border-bottom: 1px solid #f1f3f4;
}

.post-description p {
    font-size: 1.05rem;
    color: #555;
    line-height: 1.8;
}

.section-title {
    font-size: 1.3rem;
    color: #2d3436;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: #667eea;
}

/* 상품 그리드 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.product-card {
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.product-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.product-image-wrapper {
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 15px;
}

.product-name {
    font-size: 0.95rem;
    color: #2d3436;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 8px;
}

.product-desc {
    font-size: 0.85rem;
    color: #636e72;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-link {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.product-link:hover {
    background: #764ba2;
}

/* 갤러리 그리드 */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.gallery-item-old {
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item-old:hover .gallery-image {
    transform: scale(1.05);
}

/* 태그 섹션 */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.detail-tag {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 18px;
    border-radius: 25px;
    font-size: 0.9rem;
}

/* 텍스트 섹션 */
.text-content {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    color: #555;
    line-height: 1.8;
    white-space: pre-wrap;
}

/* HTML 콘텐츠 스타일 오버라이드 */
.post-html-content .fashion-post {
    max-width: 100%;
}

.post-html-content .hero-section {
    text-align: center;
    margin-bottom: 30px;
}

.post-html-content .hero-section img {
    max-width: 100%;
    border-radius: 12px;
}

.post-html-content .product-section {
    margin-bottom: 25px;
}

.post-html-content .product-card {
    display: flex;
    gap: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
}

.post-html-content .product-image {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
}

.post-html-content .buy-button {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    margin-top: 10px;
}

.post-html-content .gallery-section img {
    max-width: 100%;
    border-radius: 8px;
}

.post-html-content .hashtag {
    display: inline-block;
    background: #eee;
    padding: 5px 12px;
    border-radius: 20px;
    margin: 5px;
    color: #667eea;
}

/* 반응형 (post.html용) */
@media (max-width: 768px) {
    .logo {
        font-size: 1.8rem;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .post-hero {
        height: 250px;
    }

    .detail-title {
        font-size: 1.5rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .post-html-content .product-card {
        flex-direction: column;
    }

    .post-html-content .product-image {
        width: 100%;
        height: 200px;
    }
}