/* 추가 스타일: 상품 문의 */
.section-header-flex { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.btn-write-inquiry { padding: 8px 16px; background: #fff; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; font-weight: 700; color: #374151; cursor: pointer; transition: all 0.2s; }
.btn-write-inquiry:hover { background: #f9fafb; border-color: #9ca3af; }

.inquiry-write-form { background: #f9fafb; border: 1px solid #f0f0f0; border-radius: 16px; padding: 24px; margin-bottom: 30px; }
.form-group { margin-bottom: 12px; }
.form-input { width: 100%; padding: 12px; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 14px; outline: none; box-sizing: border-box; }
.form-textarea { width: 100%; padding: 12px; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 14px; outline: none; min-height: 120px; resize: vertical; box-sizing: border-box; }
.form-footer { display: flex; justify-content: space-between; align-items: center; }
.checkbox-label { font-size: 14px; color: #6b7280; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.form-btns { display: flex; gap: 8px; }
.btn-cancel { padding: 8px 16px; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.btn-submit { padding: 8px 20px; background: var(--primary-color); color: #fff; border: none; border-radius: 8px; font-size: 14px; font-weight: 700; cursor: pointer; }

.inquiry-items, .review-items { border-top: 1px solid #f3f4f6; }
.inquiry-item, .review-item { border-bottom: 1px solid #f3f4f6; }
.inquiry-main, .review-main { padding: 20px 0; cursor: pointer; }
.inquiry-meta, .review-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.status-badge { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 4px; }
.status-pending { background: #f3f4f6; color: #9ca3af; }
.status-done { background: color-mix(in srgb, var(--primary-color), transparent 90%); color: var(--primary-color); }
.inquiry-author, .review-author { font-size: 13px; font-weight: 600; color: #4b5563; }
.inquiry-date, .review-date { font-size: 12px; color: #9ca3af; }
.inquiry-title, .review-title { font-size: 15px; font-weight: 600; color: #111; display: flex; align-items: center; }

.inquiry-content-box, .review-content-box { background: #f9fafb; padding: 24px; border-radius: 12px; margin-bottom: 20px; }
.q-box, .a-box { display: flex; gap: 16px; width: 100%; box-sizing: border-box; }
.q-box { margin-bottom: 24px; }
.q-icon, .a-icon { flex-shrink: 0; width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; }
.q-icon { background: #e5e7eb; color: #6b7280; }
.a-icon { background: var(--primary-color); color: #fff; }
.q-text, .a-text { flex: 1; min-width: 0; font-size: 14px; color: #374151; line-height: 1.7; word-break: keep-all; overflow-wrap: break-word; }
.a-box-content { flex: 1; min-width: 0; }
.q-btns { margin-top: 12px; }
.q-btns button { background: none; border: none; color: #ef4444; font-size: 12px; cursor: pointer; padding: 0; }
.a-info { margin-bottom: 8px; }
.a-author { font-size: 13px; font-weight: 700; color: #111; margin-right: 8px; }
.a-date { font-size: 12px; color: #9ca3af; }
.secret-message { display: flex; align-items: center; justify-content: center; color: #9ca3af; font-size: 14px; padding: 20px 0; }

/* 마켓 컨테이너 공통 (index.html과 동일/호환) */
.shop-container { max-width: 1200px; margin: 40px auto; padding: 0 20px; font-family: 'Lexend', 'Pretendard', sans-serif; }

/* 뒤로가기 버튼 */
.detail-top-nav { margin-bottom: 20px; }
.btn-back { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: #6b7280; text-decoration: none; transition: color 0.2s; padding: 8px 0; }
.btn-back:hover { color: #111; }

/* 상세 페이지 상단 그리드 */
.detail-top-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; margin-bottom: 60px; }
@media (max-width: 768px) {
    .detail-top-grid { grid-template-columns: 1fr; gap: 30px; }
}

/* 갤러리 영역 */
.detail-gallery { display: flex; flex-direction: column; gap: 16px; }
.gallery-main { width: 100%; aspect-ratio: 1/1; background: #f4f5f7; border-radius: 20px; overflow: hidden; border: 1px solid #f0f0f0; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-main .no-image { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #a0a0a0; font-weight: bold; font-size: 20px; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.thumb-item { aspect-ratio: 1/1; background: #f4f5f7; border-radius: 8px; overflow: hidden; cursor: pointer; border: 2px solid transparent; transition: border-color 0.2s; }
.thumb-item:hover { border-color: #4f46e5; }
.thumb-item img { width: 100%; height: 100%; object-fit: cover; }

/* 상품 정보 영역 */
.detail-info { display: flex; flex-direction: column; gap: 32px; }
.info-header .category-badge { display: inline-block; padding: 4px 12px; background: #eef2ff; color: #4f46e5; border-radius: 20px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; }
.item-stats-badges { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.stat-badge { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 10px; font-size: 13px; font-weight: 700; line-height: 1; }
.stat-badge svg { width: 14px; height: 14px; }
.stat-badge.sales { background: color-mix(in srgb, var(--primary-color), transparent 90%); color: var(--primary-color); border: 1px solid color-mix(in srgb, var(--primary-color), transparent 80%); }
.stat-badge.readed { background: #FFFDE7; color: #FBC02D; border: 1px solid #FFF9C4; }
.item-title { font-size: 36px; font-weight: 800; color: #111; line-height: 1.3; margin: 0; letter-spacing: -1px; }

/* 라이선스 선택 (버튼 및 상세 연동형) */
.section-label { font-size: 12px; font-weight: 800; color: #9ca3af; letter-spacing: 0.5px; margin-bottom: 12px; }
.license-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.license-btn { padding: 12px 24px; border-radius: 12px; border: 2px solid #f3f4f6; background: #fff; color: #4b5563; font-size: 15px; font-weight: 700; cursor: pointer; transition: all 0.2s; }
.license-btn:hover { border-color: #e5e7eb; background: #f9fafb; }
.license-btn.active { border-color: #4f46e5; background: #eef2ff; color: #4f46e5; }

.license-details-container { background: #f8f9fa; border-radius: 16px; padding: 24px; border: 1px solid #f0f0f0; }
.license-detail-box { display: none; }
.license-detail-box.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.detail-box-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px dashed #e5e7eb; }
.detail-title { font-size: 18px; font-weight: 800; color: #111; margin: 0; }
.detail-price { font-size: 20px; font-weight: 800; color: #4f46e5; margin: 0; }
.license-domain { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: #4b5563; margin: 0 0 12px 0; }
.license-content { font-size: 14px; color: #6b7280; line-height: 1.6; }
.license-content p { margin: 0; }

/* 구매 액션 */
.purchase-action { padding-top: 32px; border-top: 1px solid #f3f4f6; display: flex; justify-content: space-between; align-items: flex-end; }
@media (max-width: 600px) {
    .purchase-action { flex-direction: column; align-items: flex-start; gap: 20px; }
    .action-buttons { width: 100%; display: flex; }
    .action-buttons button { flex: 1; }
}
.total-price .price-amount { font-size: 32px; font-weight: 800; color: #111; margin: 0; }

/* 혜택 강조 박스 (네이버 스타일) */
.benefit-badge-box { display: flex; align-items: center; background: #FFF9C4; border: 1px solid #FFF176; border-radius: 8px; padding: 8px 12px; margin-top: 15px; max-width: fit-content; gap: 10px; }
.benefit-label { background: #FBC02D; color: #fff; font-size: 11px; font-weight: 800; padding: 2px 6px; border-radius: 4px; line-height: 1; }
.benefit-content { font-size: 14px; font-weight: 700; color: #333; }
.benefit-content span { color: #E65100; }
.btn-open-benefit { background: none; border: none; padding: 0; cursor: pointer; color: #9E9E9E; display: flex; align-items: center; transition: color 0.2s; }
.btn-open-benefit:hover { color: #333; }

/* 모달 공통 스타일 */
.shop-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 1000; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.shop-modal-content { background: #fff; border-radius: 20px; width: 90%; max-width: 450px; position: relative; animation: modalSlideUp 0.3s ease-out; overflow: hidden; box-shadow: 0 20px 40px rgba(0,0,0,0.2); }
@keyframes modalSlideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-header { padding: 20px 24px; border-bottom: 1px solid #f0f0f0; display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { margin: 0; font-size: 18px; font-weight: 800; color: #111; }
.btn-modal-close { background: none; border: none; padding: 0; cursor: pointer; color: #9ca3af; transition: color 0.2s; }
.btn-modal-close:hover { color: #111; }

.modal-body { padding: 24px; }
.benefit-summary { margin-bottom: 20px; font-size: 14px; color: #666; }
.benefit-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; table-layout: fixed; }
.benefit-table th { background: #f8f9fa; font-size: 12px; color: #888; font-weight: 600; padding: 10px; text-align: left; border-bottom: 1px solid #eee; }
.benefit-table td { padding: 12px 10px; font-size: 14px; color: #333; border-bottom: 1px solid #f9f9f9; }
.benefit-table .total-col { font-weight: 800; color: var(--primary-color); }

.benefit-notice { background: #f9f9f9; border-radius: 10px; padding: 15px; }
.benefit-notice ul { margin: 0; padding: 0; list-style: none; }
.benefit-notice li { font-size: 12px; color: #888; margin-bottom: 5px; position: relative; padding-left: 10px; }
.benefit-notice li::before { content: '·'; position: absolute; left: 0; font-weight: bold; }
.benefit-notice li:last-child { margin-bottom: 0; }

.modal-footer { padding: 0 24px 24px; }

.action-buttons { display: flex; gap: 12px; }
.btn-cart { padding: 16px 32px; background: #f3f4f6; color: #111; font-size: 16px; font-weight: 800; border-radius: 16px; border: none; cursor: pointer; transition: background 0.2s; }
.btn-cart:hover { background: #e5e7eb; }
.btn-buy { padding: 16px 32px; background: #4f46e5; color: #fff; font-size: 16px; font-weight: 800; border-radius: 16px; border: none; cursor: pointer; transition: background 0.2s; box-shadow: 0 10px 20px -10px rgba(79, 70, 229, 0.5); }
.btn-buy:hover { background: #4338ca; }

/* 탭 영역 */
.detail-tabs-section { padding-top: 60px; }
.tabs-nav { display: flex; gap: 32px; border-bottom: 1px solid #f3f4f6; margin-bottom: 40px; overflow-x: auto; overflow-y: hidden; }
.tab-btn { padding: 0 0 20px 0; background: none; border: none; border-bottom: 4px solid transparent; font-size: 15px; font-weight: 700; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.5px; cursor: pointer; transition: all 0.2s; white-space: nowrap; margin-bottom: -1px; }
.tab-btn:hover { color: #4b5563; }
.tab-btn.active { color: #111; border-bottom-color: #111; }

/* 상세 콘텐츠 세로 배치 영역 */
.tab-content { margin-bottom: 80px; scroll-margin-top: 160px; }
.section-title { display: inline-block; font-size: 22px; font-weight: 800; color: #111; margin: 0 0 24px 0; padding: 0; background: transparent; border: none; }
.title-count { margin-left: 4px; }
.empty-message { color: #9ca3af; font-size: 15px; padding: 40px 0; text-align: center; background: #f9fafb; border-radius: 12px; }

.detail-description { color: #374151; line-height: 1.8; font-size: 16px; }
.detail-description img { max-width: 100%; height: auto; border-radius: 12px; margin: 20px 0; }

/* 환불 정책 안내 박스 */
.refund-policy-box {
    background: #FFF5F5;
    border: 1px solid #FEB2B2;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 40px;
}
.refund-policy-box .policy-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: #C53030;
}
.refund-policy-box .policy-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
}
.refund-policy-box .policy-content {
    font-size: 14px;
    line-height: 1.7;
    color: #4A5568;
    word-break: keep-all;
}

/* 업데이트 내역 스타일 */
.update-items { border-top: 1px solid #f3f4f6; }
.update-item { padding: 30px 0; border-bottom: 1px solid #f3f4f6; transition: background 0.2s; }
.update-item:last-child { border-bottom: none; }
.update-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.update-version-wrap { display: flex; align-items: center; gap: 10px; }
.version-badge { padding: 4px 10px; background: #111; color: #fff; border-radius: 6px; font-size: 13px; font-weight: 800; }
.license-target-badge { padding: 4px 10px; background: #f3f4f6; color: #6b7280; border-radius: 6px; font-size: 12px; font-weight: 700; border: 1px solid #e5e7eb; }
.license-target-badge.all { background: color-mix(in srgb, var(--primary-color), transparent 92%); color: var(--primary-color); border-color: color-mix(in srgb, var(--primary-color), transparent 80%); }
.update-date { font-size: 13px; color: #9ca3af; font-weight: 600; }
.update-content { font-size: 15px; color: #4b5563; line-height: 1.7; word-break: keep-all; }

/* 업데이트 탭 스타일 */
.update-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.update-tab-btn { display: flex; flex-direction: column; align-items: flex-start; padding: 12px 20px; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; cursor: pointer; transition: all 0.2s; text-align: left; min-width: 120px; }
.update-tab-btn:hover { background: #f9fafb; border-color: #d1d5db; }
.update-tab-btn.active { border-color: var(--primary-color); background: color-mix(in srgb, var(--primary-color), transparent 95%); box-shadow: 0 4px 12px color-mix(in srgb, var(--primary-color), transparent 90%); }
.update-tab-btn .tab-text { font-size: 14px; font-weight: 800; color: #111; margin-bottom: 4px; }
.update-tab-btn .tab-meta { font-size: 11px; font-weight: 600; color: #9ca3af; }
.update-tab-btn.active .tab-text { color: var(--primary-color); }
.update-tab-btn.active .tab-meta { color: color-mix(in srgb, var(--primary-color), transparent 40%); }

/* 앵커 네비게이션 (Sticky) */
.tabs-nav { position: sticky; top: 60px; background: rgba(255,255,255,0.95); backdrop-filter: blur(8px); z-index: 100; padding: 15px 0 0 0; }
a.tab-btn { display: inline-block; text-decoration: none; }