/* ========================================
   Store Gallery Skin - Main Styles
   ======================================== */

/* 컨테이너 */
.store-list-container, .store-view-container, .store-write-container {
    margin: 0px auto;
    padding-bottom: 20px;
}

.store-list-container, .store-write-container {
    max-width: 1200px;
}

.store-view-container {
    max-width: 1000px;
}

/* ========================================
   LIST PAGE (목록)
   ======================================== */

/* 게시판 헤더 */
.board-header {
    margin-bottom: 30px;
    text-align: center;
}

/* 카테고리 탭 */
.category-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: center;
}

.category-tab {
    display: inline-block;
    padding: 6px 12px;
    background: var(--card-bg, #fff);
    border: 0;
    border-radius: 12px;
    color: var(--text-secondary, #666);
    text-decoration: none;
    font-size: var(--content-font-size);
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.category-tab:hover {
    background: var(--hover-bg, #f8f9fa);
    border-color: var(--primary-color, #667eea);
    color: var(--primary-color, #667eea);
}

.category-tab.active {
    background: var(--primary-color, #667eea);
    border-color: var(--primary-color, #667eea);
    color: #fff;
    font-weight: 600;
}

.board-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--content-font-color);
    margin: 0 0 10px 0;
}

.board-description {
    color: rgb(from var(--content-font-color) r g b / 60%);
    font-size: 15px;
    line-height: 1.6;
}

/* 게시판 컨트롤 */
.board-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.board-info {
    font-size: 14px;
    color: rgb(from var(--content-font-color) r g b / 60%);
}

.board-info strong {
    color: var(--primary-color, #007bff);
    font-weight: 700;
}

/* 검색 폼 */
.search-form {
    display: flex;
    gap: 8px;
}

.search-select {
    padding: 7px 12px;
    border-radius: 6px;
    border: 1px solid var(--form-border-color);
}

.search-input {
    padding: 8px 12px;
    border: 1px solid var(--form-border-color, #dee2e6);
    background: var(--form-bg-color);
    color: var(--form-text-color);
    border-radius: 6px;
    width: 200px;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color, #007bff);
}

.btn-search {
    padding: 8px 20px;
    background: var(--primary-color, #007bff);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-search:hover {
    background: var(--accent-color, #0056b3);
	color: var(--white);
}

/* 상품 그리드 */
.store-list-container .product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.product-card {
    transition: all 0.3s;
}


.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* 리스트 전용 썸네일 */
.store-list-container .product-thumb {
    position: relative;
    width: 100%;
    height: 250px;
    background: var(--gray-50, #f8f9fa);
    overflow: hidden;
    border-radius: 8px;
    transition: all 0.3s;
}

.store-list-container .product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 리스트 카드 호버 효과 */
.store-list-container .product-card:hover .product-thumb {
    transform: translateY(-4px);
    box-shadow: 2px 4px 6px rgba(0,0,0,0.1);
}

.badge-purchased {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    background: var(--success-color, #28a745);
    color: var(--white, white);
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    z-index: 10;
}

.badge-category {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 4px;
    background: rgba(0, 0, 0, 0.65);
    color: var(--white, white);
    font-size: 11px;
    font-weight: 500;
    border-radius: 4px;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.badge-sale {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    background: var(--accent-color, #dc3545);
    color: var(--white, white);
    font-size: 12px;
    font-weight: 700;
    border-radius: 20px;
    z-index: 10;
}

/* 리스트 전용 상품 정보 영역 */
.store-list-container .product-info {
    padding: 16px;
    transition: transform 0.3s;
}

.store-list-container .product-card:hover .product-info {
    transform: scale(1.01);
}

.store-list-container .product-title {
    font-size: 1em;
    font-weight: 400;
    color: rgb(from var(--content-font-color) r g b / 70%);
    margin-bottom: 0;
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.store-list-container .product-price {
    margin: 0;
    line-height: 1;
}

.store-list-container .price-original {
    font-size: 1.2rem;
    color: var(--text-muted, #999);
    text-decoration: line-through;
    margin-right: 6px;
}

.store-list-container .price-sale, .store-list-container .price-normal {
    font-size: 2.0rem;
    font-weight: 700;
    color: var(--content-font-color);
}

.store-list-container .price-sale {
    color: var(--accent-color, #dc3545);
}

/* 리스트 전용 상품 태그 */
.store-list-container .product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 0.5rem;
}

.store-list-container .product-tags .tag {
    display: inline-block;
    padding: 3px 8px;
    background: var(--btn-secondary-bg);
    color: var(--btn-secondary-text);
    font-size: 0.75em;
    border-radius: 4px;
    line-height: 1;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: rgb(from var(--content-font-color) r g b / 60%);
}

/* 빈 상태 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: rgb(from var(--content-font-color) r g b / 60%);
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-text {
    font-size: 16px;
}

/* 페이징 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

/* 하단 버튼 */
.board-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-write,
.btn-submit {
    background: var(--primary-color, #007bff);
    color: var(--white, white);
}

.btn-write:hover,
.btn-submit:hover {
    background: var(--accent-color, #0056b3);
	color: var(--white);
}

.btn-admin {
    background: var(--gray-600, #6c757d);
    color: var(--white, white);
}

.btn-admin:hover {
    background: var(--gray-700, #5a6268);
}

/* ========================================
   VIEW PAGE (상세)
   ======================================== */

.view-nav {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1em;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border: 0;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-back:hover {
    background: var(--btn-accent-bg);
    color: var(--btn-accent-text);
}


/* 상품 상세 섹션 */
.product-detail-section {
    background: var(--card-bg-color, white);
    border: 1px solid var(--card-border-color, #dee2e6);
    border-radius: var(--card-border-radius, 12px);
    padding: 40px;
    margin-bottom: 30px;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.product-image-area {
    width: 100%;
    height: 240px;
    border: 1px solid var(--container-border-color);
    border-radius: 12px;
    overflow: hidden;
}

.product-main-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.product-info-area {
    display: flex;
    flex-direction: column;
}

/* 작가명 */
.product-author {
    font-size: 1em;
    color: rgb(from var(--content-font-color) r g b / 60%);
    margin-bottom: 8px;
    font-weight: 500;
}

/* 제목 */
.product-title {
    font-size: 1.75em;
    font-weight: 700;
    color: var(--title-font-color, #333);
    margin-bottom: 1rem;
}

/* 가격 영역 */
.product-price-area {
    margin-bottom: 20px;
}

.price-original-line {
    font-size: 1.1em;
    color: var(--text-muted, #999);
    text-decoration: line-through;
    margin-bottom: 4px;
}

.product-price {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--accent-color, #dc3545);
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.product-price-area .product-price {
    color: var(--accent-color, #dc3545);
}

.price-discount-info {
    font-size: 0.95em;
    color: var(--success-color, #28a745);
    font-weight: 600;
    margin-bottom: 20px;
}

/* 작품 태그 */
.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 1rem;
}

.product-tags .tag {
    display: inline-block;
    padding: 6px 14px;
    background: var(--gray-100, #f1f3f5);
    color: var(--text-secondary, #495057);
    font-size: 1em;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
}

.product-tags .tag:hover {
    background: var(--gray-200, #e9ecef);
}

/* 구매 액션 */
.product-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

.btn-cart, .btn-gift {
    flex: 1;
    background: var(--gray-100);
    color: var(--gray-600);
}

.btn-cart:hover, .btn-gift:hover {
    background: var(--gray-600);
    color: var(--gray-50);
}

.btn-purchase {
    flex: 2;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-color, #667eea) 0%, var(--accent-color, #764ba2) 100%);
    color: var(--white, white);
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-purchase:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(from var(--primary-color, #667eea) r g b / 0.4);
}

.product-actions a.btn-purchase {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 다운로드 버튼 */
.btn-download {
    flex: 1;
    padding: 16px;
    background: linear-gradient(135deg, var(--success-color, #28a745) 0%, var(--secondary-color, #20c997) 100%);
    color: var(--white, white);
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(from var(--success-color, #28a745) r g b / 0.4);
}

.download-info {
    margin-top: 12px;
    padding: 12px;
    background: var(--info-color, #d1ecf1);
    color: var(--text-primary, #0c5460);
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
}

/* 아코디언 섹션 */
.product-accordion-section {
    margin-bottom: 30px;
}

.accordion-item {
    background: var(--card-bg-color, white);
    border: 1px solid var(--card-border-color, #dee2e6);
    border-radius: var(--card-border-radius, 8px);
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.3s;
}

.accordion-item:hover {
    border-color: var(--accent-color);
}

.accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: var(--white, white);
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-700);
    transition: all 0.3s;
    text-align: left;
}

.accordion-header:hover {
    background: var(--gray-50, #f8f9fa);
}

.accordion-item.active .accordion-header {
    background: var(--primary-color, #667eea);
    color: var(--white, white);
}

.accordion-title {
    flex: 1;
}

.accordion-count {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-size: 13px;
    margin-left: 6px;
}

.accordion-icon {
    font-size: 14px;
    font-style: normal;
    transition: transform 0.3s;
    margin-left: 12px;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    padding: 0 24px;
    font-size: var(--content-font-size);
}

.accordion-item.active .accordion-content {
    max-height: fit-content;
    padding: 4rem;
    transition: max-height 0.5s ease-in;
}

/* 리뷰 섹션이 포함된 아코디언은 padding 제거 */
#review-accordion.accordion-item.active .accordion-content {
    padding: 0;
}

/* 상품 설명 */
.product-description-content {
    font-size: 1em;
    line-height: 1.8;
    color: var(--content-font-color);
}

.product-description-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

/* 유의사항 */

/* FAQ */
.product-faq-content {
    max-width: 800px;
    margin: 0 auto;
}

.faq-help {
    margin-top: 32px;
    padding: 16px;
    background: var(--gray-100);
    color: var(--gray-700);
    border-radius: 8px;
    text-align: center;
}

.faq-help a {
    color: var(--primary-color, #667eea);
    font-weight: 600;
    text-decoration: none;
}

.faq-help a:hover {
    text-decoration: underline;
}

/* 빈 메시지 */
.empty-message {
    text-align: center;
    padding: 60px 20px;
    color: #adb5bd;
    font-size: 15px;
}

.empty-message a {
    color: var(--primary-color, #667eea);
    font-weight: 600;
    text-decoration: none;
}

.empty-message a:hover {
    text-decoration: underline;
}

/* 리뷰 목록 */
.review-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.review-item {
    padding: 16px 0;
    border-bottom: 1px solid #eee;
}
.review-item:last-child {
    border-bottom: none;
}
.review-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 13px;
}
.review-author {
    font-weight: 600;
    color: #333;
}
.review-date {
    color: #999;
}
.review-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}
.review-badge.photo {
    background: #fef3c7;
    color: #d97706;
}
.review-rating {
    margin-bottom: 8px;
}
.review-rating .star {
    color: #ddd;
    font-size: 14px;
}
.review-rating .star.filled {
    color: #fbbf24;
}
.review-subject a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
}
.review-subject a:hover {
    color: var(--primary-color, #667eea);
}
.review-more {
    text-align: center;
    padding: 16px 0 0;
    border-top: 1px solid #eee;
    margin-top: 8px;
}
.review-more a {
    color: var(--primary-color, #667eea);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}
.review-more a:hover {
    text-decoration: underline;
}

/* 레거시: 상품 설명 섹션 */
.product-description-section,
.product-links-section {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 30px;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin: 0 0 24px 0;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
}

/* 링크 목록 */
.links-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.link-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}

.link-item a:hover {
    background: white;
    border-color: var(--primary-color, #007bff);
}

.link-icon {
    font-size: 18px;
}

.link-text {
    flex: 1;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.view-nav-right {
    display: flex;
    gap: 8px;
}

.btn-list,
.btn-nav {
    background: white;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.btn-list:hover,
.btn-nav:hover {
    background: #f8f9fa;
}

.btn-edit {
    background: var(--bg-color);
    color: var(--primary-color);
}

.btn-edit:hover {
    background: var(--btn-secondary-bg);
    color: var(--btn-secondary-text);
}

.btn-edit {
    background: var(--bg-color);
    color: var(--primary-color);
}

.btn-delete:hover {
    background: var(--error-color);
    color: var(--white);
}

/* 댓글 섹션 */
.comment-section {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 40px;
}

.comment-count {
    color: var(--primary-color, #007bff);
    font-weight: 700;
}

/* ========================================
   WRITE PAGE (글쓰기)
   ======================================== */

.write-header {
    margin-bottom: 30px;
}

.write-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.write-form-card {
    background: var(--card-bg-color);
    border: 1px solid var(--card-border-color);
    border-radius: 12px;
    padding: 40px;
}

.form-group {
    margin-bottom: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--content-font-color);
    margin-bottom: 8px;
}

.form-label .required {
    color: #dc3545;
    margin-left: 4px;
}

.form-control {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
    color: var(--form-text-color);
    background: var(--form-bg-color);
    border: 1px solid var(--form-border-color);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color, #007bff);
}

.form-control-file {
    width: 100%;
    padding: 10px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
}

.form-help {
    margin-top: 6px;
    font-size: 13px;
    color: #6c757d;
}

.file-upload-item {
    margin-bottom: 12px;
}

.file-current {
    margin-top: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 13px;
    color: #6c757d;
}

.file-name {
    font-weight: 500;
    color: #333;
}

.file-size {
    margin-left: 8px;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.checkbox-item span {
    font-size: 14px;
    color: #333;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid #f0f0f0;
}

.btn-cancel {
    background: #6c757d;
    color: white;
}

.btn-cancel:hover {
    background: #5a6268;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }

    .product-detail-grid {
        grid-template-columns: 1fr;
    }

    .product-image-area {
        position: relative;
        top: 0;
    }
}

@media (max-width: 768px) {
    .store-list-container,
    .store-view-container,
    .store-write-container {
        padding: 0 15px;
    }

    .board-title {
        font-size: 24px;
    }

    .board-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .search-form {
        width: 100%;
        flex-wrap: wrap;
    }

    .search-input {
        flex: 1;
        min-width: 150px;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 16px;
    }

    .product-detail-section {
        padding: 24px;
    }

    .product-detail-title {
        font-size: 22px;
    }

    /* 모바일용 아코디언 스타일 */
    .accordion-header {
        padding: 16px 20px;
        font-size: 15px;
    }

    .accordion-item.active .accordion-content {
    }

    .accordion-content {
        padding: 0 20px;
    }

    /* 리뷰 아코디언은 모바일에서도 padding 0 */
    #review-accordion.accordion-item.active .accordion-content {
        padding: 0;
    }

    .product-price-box .price-sale,
    .product-price-box .price-normal {
        font-size: 24px;
    }

    .view-footer {
        flex-direction: column;
        gap: 12px;
    }

    .view-footer-left,
    .view-footer-right {
        width: 100%;
        justify-content: space-between;
    }

    .write-form-card {
        padding: 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}

/* ========================================
   THUMBNAIL UPLOAD SECTION
   ======================================== */

.thumbnail-upload-section {
    border-radius: 8px;
    padding: 10px;
    display: flex;
    gap: 20px;
}

.upload-method {
    margin-bottom: 15px;
    flex: 1;
}

.upload-method:last-child {
    margin-bottom: 0;
}

.current-thumbnail {
    padding: 15px;
    border-radius: 4px;
}

.current-thumbnail img {
    display: block;
    max-width: 200px;
    height: auto;
    border-radius: 4px;
}

/* ========================================
   DOWNLOAD UPLOAD SECTION
   ======================================== */

.download-upload-section {
    border: 2px dashed var(--card-border-color);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    gap: 20px;
}

button.btn.btn-danger.btn-sm {
    background: var(--error-color);
    height: 25px;
    padding: 10px;
    gap: 3px;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .board-title {
        font-size: 20px;
    }

    .product-detail-section,
    .product-description-section,
    .product-links-section,
    .comment-section {
        padding: 20px;
    }
}

/* ========================================
   타일형 이미지 레이아웃
   ======================================== */

/* 타일 그리드 기본 */
.ra0-content .tile-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    max-width: 100%;
    box-sizing: border-box;
}

/* 타일 아이템 */
.ra0-content .tile-item {
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 8px;
    position: relative;
}

.ra0-content .tile-item img {
    display: block;
    height: auto;
    max-width: none;
}


/* 반응형 */
@media (max-width: 768px) {
    .tile-grid {
        gap: 4px;
    }

    /* 모바일에서는 모두 2열로 */
    .tile-2,
    .tile-3,
    .tile-4,
    .tile-5,
    .tile-6 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================
   이미지 모달
   ======================================== */

.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
}

.image-modal-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: cover;
    animation: zoom 0.3s;
}

@keyframes zoom {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10000;
}

.image-modal-close:hover,
.image-modal-close:focus {
    color: #bbb;
}

/* 이미지 모달 좌우 버튼 */
.image-modal-prev,
.image-modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    font-size: 50px;
    padding: 10px 20px;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10000;
    border-radius: 4px;
}

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

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

.image-modal-prev:hover,
.image-modal-next:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* 이미지 카운터 */
.image-modal-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 10000;
}

@media (max-width: 768px) {
    .image-modal-close {
        top: 10px;
        right: 15px;
        font-size: 30px;
    }

    .image-modal-content {
        max-width: 95%;
        max-height: 95%;
    }

    .image-modal-prev,
    .image-modal-next {
        font-size: 35px;
        padding: 8px 15px;
    }

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

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

    .image-modal-counter {
        bottom: 20px;
        font-size: 12px;
        padding: 6px 12px;
    }
}
