/**
 * 상품 상세 페이지 스타일
 * 
 * ProductDetail 화면의 스타일을 웹 버전으로 구현
 */

:root {
    --primary-color: #C97D7E;
    --primary-hover: #b86d6e;
    --secondary-color: #D4A574;
    --background: #FFFFFF;
    --surface: #F8F9FA;
    --text-primary: #2d2d2d;
    --text-secondary: #666666;
    --border: #E0E0E0;
    --success-color: #4CAF50;
    --error-color: #f44336;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* 상품 상세 섹션 */
.product-detail-section {
    background: var(--background);
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 24px;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    box-shadow: none;
}

/* 검색 결과로 돌아가기 버튼 */
.back-to-search-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.back-to-search-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--surface);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.back-to-search-button:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.back-to-search-button i {
    font-size: 14px;
}

.back-to-search-button span {
    line-height: 1.4;
}

/* 로딩 오버레이 */
#productDetailLoading {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    min-height: 300px;
}

#productDetailLoading .loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

#productDetailLoading .loading-text {
    color: var(--text-secondary);
    font-size: 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 에러 메시지 */
#productDetailError {
    display: none;
    padding: 30px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
}

#productDetailError .error-message {
    color: #856404;
    font-size: 16px;
    margin: 0 0 20px 0;
}

#productDetailError .btn {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

#productDetailError .btn:hover {
    background: var(--primary-hover);
}

/* 상품 상단 섹션 (이미지 + 제품정보) — 상세 페이지만 적용, 최근 본 상품과 클래스 충돌 방지 */
.product-detail-section .product-top-section {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
    align-items: flex-start;
}

/* 상품 이미지 섹션 (4/12 비율) */
.product-detail-section .product-image-section {
    flex: 0 0 33.333%; /* 4/12 = 33.333% */
    max-width: 33.333%;
}

.product-detail-section .product-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
}

.product-detail-section .product-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.product-detail-section .product-image-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    color: var(--primary-color);
    font-size: 32px;
}

.product-detail-section .product-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    color: var(--border);
    font-size: 64px;
}

/* 상품 정보 섹션 (8/12 비율) */
.product-detail-section .product-info-section {
    flex: 0 0 66.667%; /* 8/12 = 66.667% */
    max-width: 66.667%;
    margin-bottom: 0;
}

.product-detail-section .product-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

/* 상품명: 메인 "~님을 위한 최근 분석된 제품"(.recent-products-header h2)과 동일한 폰트 */
.product-detail-section .product-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
    flex: 1;
    min-width: 0;
}

.product-detail-section .product-status-badge {
    display: inline-block;
    padding: 6px 12px;
    background: #ffebee;
    color: #c62828;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.product-detail-section .product-price-section {
    margin-bottom: 16px;
}

/* 가격: 상품명(20px)보다 작게 */
.product-detail-section .product-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.product-detail-section .product-tags {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* 구매하기 버튼 */
.product-detail-section .product-purchase-section {
    margin-top: 24px;
}

.product-detail-section .purchase-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.purchase-button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.purchase-button:active {
    transform: translateY(0);
}

.purchase-button i {
    font-size: 18px;
}

/* 제품 태그 공통: 연한 핑크 배경 + 붉은 계통 테두리·글자색 */
.tag-chip {
    display: inline-block;
    padding: 4px 8px;
    background: rgba(201, 125, 126, 0.08);
    color: var(--primary-color);
    border: 1px solid rgba(201, 125, 126, 0.45);
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
}

/* 탭 컨테이너 */
.product-tabs-container {
    margin-top: 32px;
    padding-top: 24px;
}

.product-tabs-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.product-tabs-nav::-webkit-scrollbar {
    display: none;
}

.product-tabs-nav {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.tab-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    bottom: -2px;
}

.tab-button:hover {
    color: var(--primary-color);
    background: var(--surface);
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 600;
}

.tab-button i {
    font-size: 16px;
}

.product-tabs-content {
    min-height: 200px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 섹션 공통 스타일 */
.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

/* 상품 설명 섹션 */
.product-description-section {
    margin-bottom: 0;
    padding-top: 0;
    border-top: none;
}

.product-description {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-primary);
    white-space: pre-line;
}

/* 적합도 정보 섹션 */
.product-compatibility-section {
    margin-bottom: 0;
    padding-top: 0;
    border-top: none;
}

.product-compatibility {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.compatibility-score-card {
    padding: 20px;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.compatibility-score-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
}

.compatibility-score-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.score-display {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.score-display .fas.fa-star {
    color: #FFD700;
    font-size: 24px;
}

.score-value-large {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
}

.score-max {
    font-size: 18px;
    color: var(--text-secondary);
}

.compatibility-message-card {
    padding: 20px;
    background: transparent;
    border: none;
}

.compatibility-message {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-primary);
    margin: 0;
    white-space: normal;
}

/* 의료 고지 (적합도 탭 하단, 네이티브 앱 TypographyStyles.caption, Spacing.mt2/mb2) */
.medical-disclaimer {
    margin-top: 12px;
    margin-bottom: 12px;
}

.medical-disclaimer .medical-disclaimer-label {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 0 0 2px 0;
}

.medical-disclaimer .medical-disclaimer-text {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 0 0 12px 0;
}

.medical-disclaimer .medical-disclaimer-text:last-child {
    margin-bottom: 0;
}

.compatibility-ingredients-summary {
    padding: 20px;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.compatibility-ingredients-summary h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 12px 0;
}

.ingredients-summary-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ingredient-badge {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.ingredient-badge.helpful {
    background: #f1f8f4;
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.ingredient-badge.avoided {
    background: #ffebee;
    color: var(--error-color);
    border: 1px solid var(--error-color);
}

.ingredient-more {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px solid var(--border);
}

.compatibility-target-card {
    padding: 20px;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.compatibility-target-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 12px 0;
}

.target-info-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.target-info-item {
    font-size: 15px;
    color: var(--text-primary);
    line-height: 1.6;
}

.target-info-item strong {
    color: var(--text-secondary);
    margin-right: 8px;
}

/* 성분 정보 섹션 */
.product-ingredients-section {
    margin-bottom: 0;
    padding-top: 0;
    border-top: none;
}

.product-ingredients {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* 성분 섹션 카드 */
.ingredient-section-card {
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 0;
}

.ingredient-section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 16px 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* 도움이 되는 성분 / 주의가 필요한 성분 - 태그 리스트 */
.ingredient-badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.ingredient-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border-radius: 0;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    background: transparent;
    border: none;
}

.ingredient-badge.helpful {
    background: transparent;
    border: none;
    color: var(--success-color);
}

.ingredient-badge.avoided {
    background: transparent;
    border: none;
    color: var(--error-color);
}

.ingredient-badge-ewg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    flex-shrink: 0;
}

.ingredient-badge-name {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
}

.ingredient-empty-message {
    color: var(--text-secondary);
    font-size: 15px;
    padding: 10px 0;
    margin: 0;
}

/* 효능별/안전성 분포 컨테이너 (한 줄로 표시) */
.distribution-container {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.distribution-column {
    flex: 1;
    min-width: 0;
}

/* 효능별/안전성 분포 차트 */
.distribution-chart {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.distribution-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.distribution-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.distribution-bar {
    width: 80%;
    height: 20px;
    background: var(--surface);
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.distribution-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.distribution-bar-fill.primary {
    background: var(--primary-color);
}

.distribution-bar-fill.secondary {
    background: var(--secondary-color);
}

.distribution-bar-fill.tertiary {
    background: #D4A574;
}

.distribution-bar-fill.success {
    background: var(--success-color);
}

.distribution-bar-fill.warning {
    background: #ff9800;
}

.distribution-bar-fill.danger {
    background: var(--error-color);
}

.distribution-bar-fill.info {
    background: #2196F3;
}

.distribution-bar-fill.disabled {
    background: var(--border);
}

.distribution-label {
    font-size: 14px;
    color: var(--text-primary);
    white-space: nowrap;
    flex-shrink: 0;
}

/* 전체성분목록 */
.ingredient-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    border: none;
    border-radius: 0;
    overflow: hidden;
}

.ingredient-row {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
    transition: background-color 0.2s ease;
}

.ingredient-row:nth-child(2n) {
    border-right: none;
}

.ingredient-row:nth-last-child(-n+2) {
    border-bottom: none;
}

.ingredient-row:hover {
    background-color: var(--surface);
}

.ingredient-ewg-cell {
    width: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    flex-shrink: 0;
    position: relative;
    text-align: center;
}

.ewg-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 0 auto;
    text-align: center;
}

.ewg-icon.ewg-green {
    background: #4CAF50;
}

.ewg-icon.ewg-orange {
    background: #ff9800;
}

.ewg-icon.ewg-red {
    background: var(--error-color);
}

.ewg-icon.ewg-default {
    background: var(--border);
}

.ewg-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 20px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    padding: 0 2px;
}

.ingredient-content-cell {
    flex: 1;
    min-width: 0;
}

.ingredient-name-with-benefit {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ingredient-name {
    font-size: 15px;
    color: var(--text-primary);
    line-height: 1.5;
    word-break: break-word;
}

.ingredient-benefit {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* 리뷰 섹션 */
.product-reviews-section {
    margin-bottom: 0;
    padding-top: 0;
    border-top: none;
}

.product-reviews {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* 리뷰 작성 버튼 */
.review-write-button {
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    white-space: nowrap;
}

.review-write-button:hover {
    background: var(--primary-hover);
    opacity: 0.9;
}

/* 리뷰 통계 */
.review-stats-section {
    padding: 20px;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 24px;
}

.review-stats-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 0;
    border-bottom: none;
}

.review-stats-total {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

/* 만족도 통계 (네이티브 앱과 동일한 디자인) */
.review-satisfaction-container {
    margin-top: 8px;
}

.review-satisfaction-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.review-satisfaction-bar-container {
    margin: 4px 0;
}

.review-satisfaction-bar {
    height: 8px;
    border-radius: 4px;
    display: flex;
    flex-direction: row;
    overflow: hidden;
    background: var(--background2, #f5f5f5);
}

.review-satisfaction-segment {
    height: 8px;
}

.review-satisfaction-segment.satisfied {
    background: #5A8FA3; /* 네이티브 앱: 틸 블루 (EWG Green 1-2등급) */
}

.review-satisfaction-segment.neutral {
    background: #fac02e; /* 네이티브 앱: 옐로우 (EWG Orange 3-6등급) */
}

.review-satisfaction-segment.dissatisfied {
    background: #C97D7E; /* 네이티브 앱: 로즈 (EWG 주의 색상) */
}

.review-satisfaction-legend {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin-top: 6px;
    flex-wrap: wrap;
    gap: 12px;
}

.review-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 60px;
}

.review-legend-color {
    width: 8px;
    height: 8px;
    border-radius: 4px;
    flex-shrink: 0;
    margin-right: 4px;
}

.review-legend-color.satisfied {
    background: #5A8FA3; /* 네이티브 앱: 틸 블루 (EWG Green 1-2등급) */
}

.review-legend-color.neutral {
    background: #fac02e; /* 네이티브 앱: 옐로우 (EWG Orange 3-6등급) */
}

.review-legend-color.dissatisfied {
    background: #C97D7E; /* 네이티브 앱: 로즈 (EWG 주의 색상) */
}

.review-legend-text {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    flex-shrink: 1;
}

/* 리뷰 목록: 핀터레스트형 매슨리 (다단 레이아웃) */
.review-list {
    column-count: 1;
    column-gap: 16px;
    column-fill: balance;
}

.review-item {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 16px;
    padding: 16px;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
}

/* 모바일: 1열 (기본) */
@media (max-width: 767px) {
    .review-list {
        column-count: 1;
    }
}

/* 태블릿: 2열 */
@media (min-width: 768px) and (max-width: 1023px) {
    .review-list {
        column-count: 2;
    }
}

/* PC: 3열 */
@media (min-width: 1024px) {
    .review-list {
        column-count: 3;
    }
}

/* recent 타입(메인): PC·태블릿 2열, 모바일 1열 */
[data-reviews-type="recent"] .review-list {
    column-count: 1;
}
@media (min-width: 768px) {
    [data-reviews-type="recent"] .review-list {
        column-count: 2;
    }
}

.review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
    position: relative;
}

/* 리뷰 메뉴 (점 3개) */
.review-actions-menu {
    position: relative;
}

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

.review-menu-button:hover {
    background: var(--surface);
    color: var(--text-primary);
}

.review-menu-button i {
    font-size: 16px;
}

.review-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 120px;
    overflow: hidden;
}

.review-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    text-align: left;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.review-menu-item:hover {
    background: var(--surface);
}

.review-menu-item i {
    font-size: 14px;
    width: 16px;
    text-align: center;
}

.review-menu-item-danger {
    color: #F44336;
}

.review-menu-item-danger:hover {
    background: #FFEBEE;
}

.review-author-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}

.review-author-link {
    text-decoration: none;
    color: inherit;
    display: inline-flex;
    align-items: center;
    transition: opacity 0.2s;
    cursor: pointer;
}

.review-author-link:hover {
    opacity: 0.8;
}

.review-author-link img {
    pointer-events: none;
}

.review-author-avatar-wrap {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
}

.review-author-avatar-wrap .review-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
}

.review-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--border);
}

/* 리뷰 작성자 아바타 좌상단 Pioneer 배지 (is_pioneer 시) */
.review-author-avatar-wrap .pioneer-badge {
    position: absolute;
    top: 0;
    left: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--secondary-color, #D4A574);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    border: 1px solid var(--background, #fff);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.review-author-avatar-wrap .pioneer-badge i {
    font-size: 1em;
}

.review-author-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.review-author {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.4;
}

.review-date {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* 만족도 아이콘 (좋아요 토글 앞에 위치) */
.review-satisfaction-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-right: 4px;
}

.review-satisfaction-icon.satisfied {
    color: #5A8FA3; /* 네이티브 앱: 틸 블루 (EWG Green 1-2등급) */
}

.review-satisfaction-icon.neutral {
    color: #fac02e; /* 네이티브 앱: 옐로우 (EWG Orange 3-6등급) */
}

.review-satisfaction-icon.dissatisfied {
    color: #C97D7E; /* 네이티브 앱: 로즈 (EWG 주의 색상) */
}

.review-satisfaction-icon i {
    font-size: 18px;
    font-family: 'Font Awesome 6 Free';
    font-weight: 400; /* regular style to match native app */
}

.review-content {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
    white-space: pre-line;
    margin-top: 0;
    margin-bottom: 12px;
}

/* 리뷰 제품 정보 (작성자 프로필명 아래, 리뷰 이미지 위) */
.review-product-info {
    margin-top: 12px;
    margin-bottom: 12px;
}

.review-product-link {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    padding: 0;
    background: transparent;
    border-radius: 0;
    border: none;
    transition: color 0.2s ease;
}

.review-product-link:hover {
    color: var(--primary-color);
}

.review-product-image {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
    flex-shrink: 0;
    background: var(--background);
}

/* 상품명 좌측 대표 이미지 없을 때 플레이스홀더 (동일 크기 유지) */
.review-product-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 18px;
}

.review-product-image-placeholder i {
    opacity: 0.5;
}

.review-product-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.review-product-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

/* 리뷰 카드 태그: 연한 핑크 배경 + 붉은 계통 테두리·글자색 */
.review-product-tag {
    display: inline-block;
    padding: 4px 8px;
    background: rgba(201, 125, 126, 0.08);
    color: var(--primary-color);
    border: 1px solid rgba(201, 125, 126, 0.45);
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
}

/* 리뷰 이미지 슬라이더 */
.review-images-container {
    position: relative;
    margin-top: 12px;
    margin-bottom: 12px;
    width: 100%;
}

.review-images-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
}

.review-image-slide {
    display: none;
    width: 100%;
    aspect-ratio: 1; /* 정사각형 비율 */
    overflow: hidden;
}

.review-image-slide.active {
    display: block;
}

.review-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: transform 0.2s ease;
}

.review-image:hover {
    transform: scale(1.02);
}

/* 리뷰 이미지 인디케이터 */
.review-images-indicators {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.review-image-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.review-image-indicator.active {
    background: var(--primary-color);
    width: 20px;
    border-radius: 3px;
}

.review-image-indicator:hover {
    background: var(--text-secondary);
}

/* 리뷰 empty state (네이티브 앱과 동일한 디자인) */
.review-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    min-height: 200px;
    text-align: center;
}

.review-empty-icon {
    font-size: 50px;
    color: var(--border);
    margin-bottom: 16px;
}

.review-empty-message {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.6;
    white-space: pre-line;
    margin: 0;
    padding: 0;
}

.review-loading {
    color: var(--text-secondary);
    font-size: 15px;
    padding: 40px 20px;
    text-align: center;
}

.review-load-more {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.review-load-more-button {
    padding: 12px 24px;
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.review-load-more-button:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.review-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 0;
    margin-bottom: 12px;
    padding-top: 0;
    padding-bottom: 0;
    border-top: none;
    border-bottom: none;
}

.review-footer .review-satisfaction-icon {
    margin-right: 0;
}

.review-action-button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.review-action-button:hover {
    background: var(--surface);
    color: var(--text-primary);
}

.review-action-button i {
    font-size: 16px;
    font-family: 'Font Awesome 6 Free';
    font-weight: 400; /* regular style to match native app */
}

.review-comment-button i {
    font-family: 'Font Awesome 6 Free';
    font-weight: 400; /* regular style to match native app */
}

.review-like-button.liked {
    color: var(--primary-color);
}

.review-like-button.liked i {
    color: var(--primary-color);
}

.review-like-button.liked i.fa-heart {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900; /* solid heart when liked */
}

.review-like-button:not(.liked) i.fa-heart {
    font-family: 'Font Awesome 6 Free';
    font-weight: 400; /* regular heart when not liked */
}

.review-like-count,
.review-comment-count {
    font-size: 14px;
    font-weight: 500;
}

/* 리뷰 공유 버튼 */
.review-share-button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.review-share-button:hover {
    background: var(--surface);
    color: var(--text-primary);
}

.review-share-button i {
    font-size: 16px;
    font-family: 'Font Awesome 6 Free';
    font-weight: 400; /* regular style to match native app */
}

/* 리뷰 공유 다이얼로그 */
.review-share-dialog {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.review-share-dialog-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.review-share-dialog-content {
    position: relative;
    background: var(--background);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    z-index: 1;
    animation: reviewShareDialogSlideIn 0.3s ease;
}

@keyframes reviewShareDialogSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.review-share-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.review-share-dialog-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.review-share-dialog-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.review-share-dialog-close:hover {
    background: var(--surface);
    color: var(--text-primary);
}

.review-share-dialog-close i {
    font-size: 18px;
}

.review-share-dialog-body {
    padding: 24px;
}

.review-share-dialog-label {
    margin: 0 0 16px 0;
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
}

.review-share-dialog-url-container {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.review-share-dialog-url-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--surface);
    font-family: monospace;
    word-break: break-all;
}

.review-share-dialog-url-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(201, 125, 126, 0.1);
}

.review-share-dialog-copy-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.review-share-dialog-copy-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(201, 125, 126, 0.3);
}

.review-share-dialog-copy-btn:active {
    transform: translateY(0);
}

.review-share-dialog-copy-btn.copied {
    background: var(--success-color);
}

.review-share-dialog-copy-btn.copied:hover {
    background: var(--success-color);
}

.review-share-dialog-copy-btn i {
    font-size: 14px;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .review-share-dialog-content {
        width: 95%;
        max-width: none;
    }
    
    .review-share-dialog-url-container {
        flex-direction: column;
    }
    
    .review-share-dialog-copy-btn {
        width: 100%;
        justify-content: center;
    }
}

/* 관련 상품 섹션 */
.related-products-section {
    margin-bottom: 0;
    padding-top: 0;
    border-top: none;
}

.related-products-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.related-product-card {
    display: flex;
    flex-direction: column;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.related-product-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.related-product-image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    background: var(--background);
    margin-bottom: 12px;
    object-fit: cover;
}

.related-product-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-product-price {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .product-detail-section {
        padding: 16px;
    }
    
    /* 모바일에서는 분포 컨테이너를 2줄로 표시 */
    .distribution-container {
        flex-direction: column;
        gap: 32px;
    }
    
    .distribution-column {
        width: 100%;
    }
    
    /* 모바일에서는 전체 성분 목록을 한 줄에 1개씩 표시 */
    .ingredient-list {
        grid-template-columns: 1fr;
    }
    
    .ingredient-row {
        border-right: none;
    }
    
    .ingredient-row:nth-last-child(1) {
        border-bottom: none;
    }
    
    /* 모바일에서는 세로 배치 */
    .product-top-section {
        flex-direction: column;
        gap: 20px;
    }
    
    .product-image-section {
        flex: 1 1 100%;
        max-width: 100%;
    }
    
    .product-info-section {
        flex: 1 1 100%;
        max-width: 100%;
    }
    
    .product-name {
        font-size: 20px;
    }
    
    .product-price {
        font-size: 18px;
    }
    
    .product-image-container {
        max-width: 100%;
    }
    
    .purchase-button {
        width: 100%;
        justify-content: center;
        padding: 16px 24px;
    }
    
    .related-products-list {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }
    
    .section-title {
        font-size: 18px;
    }
    
    .product-description {
        font-size: 15px;
    }
    
    .product-tabs-nav {
        gap: 4px;
    }
    
    .tab-button {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .tab-button span {
        display: none;
    }
    
    .tab-button i {
        font-size: 18px;
    }
    
    @media (min-width: 480px) {
        .tab-button span {
            display: inline;
        }
    }
}

/* 성분 정보 신고 섹션 */
.ingredient-report-section {
    margin-top: 32px;
}

.ingredient-report-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 16px 0;
    line-height: 1.6;
}

.ingredient-report-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: #ff9800;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ingredient-report-button:hover {
    background: #f57c00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.ingredient-report-button:active {
    transform: translateY(0);
}

/* 성분 정보 신고 모달 */
.ingredient-report-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.ingredient-report-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.ingredient-report-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    margin-top: 56px; /* 헤더에 가려지지 않도록 위쪽 여백 */
}

.ingredient-report-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.ingredient-report-modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.ingredient-report-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s ease;
}

.ingredient-report-modal-close:hover {
    color: var(--text-primary);
}

.ingredient-report-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.ingredient-report-form-group {
    margin-bottom: 20px;
}

.ingredient-report-form-group label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.ingredient-report-type-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ingredient-report-type-button {
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.ingredient-report-type-button:hover {
    border-color: var(--primary-color);
    background: #fff;
}

.ingredient-report-type-button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.ingredient-report-image-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.ingredient-report-image-button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ingredient-report-image-button:hover {
    border-color: var(--primary-color);
    background: #fff;
}

.ingredient-report-images {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ingredient-report-image-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.ingredient-report-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ingredient-report-image-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--error-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: transform 0.2s ease;
}

.ingredient-report-image-remove:hover {
    transform: scale(1.1);
}

.ingredient-report-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
    color: var(--text-primary);
    box-sizing: border-box;
}

.ingredient-report-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(201, 125, 126, 0.1);
}

.ingredient-report-char-count {
    text-align: right;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.ingredient-report-help-text {
    padding: 12px;
    background: var(--surface);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.ingredient-report-modal-footer {
    display: flex;
    gap: 8px;
    padding: 20px 24px;
    border-top: 1px solid var(--border);
}

.ingredient-report-cancel-button,
.ingredient-report-submit-button {
    flex: 1;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.ingredient-report-cancel-button {
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.ingredient-report-cancel-button:hover {
    background: #f5f5f5;
}

.ingredient-report-submit-button {
    background: #ff9800;
    color: white;
}

.ingredient-report-submit-button:hover:not(:disabled) {
    background: #f57c00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.ingredient-report-submit-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 리뷰 작성 모달 */
.review-write-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.review-write-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.review-write-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    overflow: hidden;
}

.review-write-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.review-write-modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.review-write-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.review-write-modal-close:hover {
    background: var(--surface);
    color: var(--text-primary);
}

.review-write-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

/* 리뷰 댓글 모달 */
.review-comments-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.review-comments-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.review-comments-content {
    position: relative;
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 560px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    overflow: hidden;
}

.review-comments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.review-comments-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.review-comments-header-icon {
    position: relative;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.review-comments-header-icon .fa-comment {
    font-size: 22px;
    color: var(--primary-color);
}

.review-comments-header-sparkle {
    position: absolute;
    top: -2px;
    right: -2px;
    font-size: 8px;
    color: var(--surface);
}

.review-comments-header-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.review-comments-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.review-comments-header-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

.review-comments-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.review-comments-close:hover {
    background: var(--surface);
    color: var(--text-primary);
}

.review-comments-body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
}

.review-comments-loading,
.review-comments-empty {
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
    padding: 24px 0;
}

.review-comments-empty-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.review-comments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.review-comment-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.review-comment-divider {
    margin-top: 8px;
    border-bottom: 1px solid var(--border);
}

.review-comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.review-comment-author-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.review-comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface);
    flex-shrink: 0;
}

.review-comment-author {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.review-comment-date {
    font-size: 12px;
    color: var(--text-secondary);
}

.review-comment-content {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
    white-space: pre-wrap;
    margin: 4px 0 8px 0;
}

.review-comment-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.review-comment-action-button {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
}

.review-comment-action-button:hover {
    background: var(--surface);
    color: var(--text-primary);
}

/* 네이티브 앱 스타일에 맞춘 댓글 레이아웃 */

.review-comment-profile-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
}

.review-comment-avatar-large {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface);
    flex-shrink: 0;
}

.review-comment-profile-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.review-comment-profile-line {
    display: flex;
    align-items: center;
    gap: 8px;
}

.review-comment-content-wrapper {
    display: block;
    margin-top: 4px;
}

.review-comment-content {
    display: inline;
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
    white-space: normal;
    word-wrap: break-word;
}

.review-comment-edit-inline {
    border: none;
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 12px;
    padding: 0;
    margin-left: 4px;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.review-comment-edit-inline i {
    font-size: 12px;
}

.review-comment-actions-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    margin-left: 8px;
    flex-shrink: 0;
    align-self: flex-start;
}

.review-comment-like-icon {
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.review-comment-likes-count {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
    min-width: 20px;
}

.review-comment-delete-icon {
    border: none;
    background: none;
    color: var(--danger, #e53935);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.review-comment-delete-icon i {
    font-size: 16px;
}

.review-comment-edit-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.review-comment-edit-input {
    width: 100%;
    min-height: 60px;
    resize: vertical;
    border-radius: 8px;
    border: 1px solid var(--border);
    padding: 8px 10px;
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
}

.review-comment-edit-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px rgba(53, 132, 255, 0.15);
}

.review-comment-edit-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.review-comment-edit-cancel,
.review-comment-edit-save {
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
}

.review-comment-edit-cancel {
    background: var(--surface);
    color: var(--text-secondary);
}

.review-comment-edit-save {
    background: var(--primary-color);
    color: #fff;
}

.review-comments-footer {
    padding: 12px 16px 16px 16px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.review-comments-footer form {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.review-comments-textarea {
    flex: 1;
    resize: none;
    border-radius: 8px;
    border: 1px solid var(--border);
    padding: 8px 10px;
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
}

.review-comments-textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px rgba(53, 132, 255, 0.15);
}

.review-comments-submit-button {
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    background: var(--primary-color);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.review-comments-submit-button:hover {
    background: #2157c9;
}

/* 리뷰 신고 & 차단 모달 */
.review-report-block-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.review-report-block-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.review-report-block-content {
    position: relative;
    background: #fff7f7;
    border-radius: 12px;
    width: 90%;
    max-width: 420px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    padding: 20px 20px 16px 20px;
}

.review-report-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.review-report-block-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #c62828;
}

.review-report-block-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #f44336;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.review-report-block-close:hover {
    background: rgba(244, 67, 54, 0.1);
}

.review-report-block-body {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0 8px 0;
}

.review-report-block-description {
    font-size: 14px;
    line-height: 1.6;
    color: #d32f2f;
    margin: 0 0 12px 0;
}

.review-report-block-field {
    margin-bottom: 12px;
}

.review-report-block-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #c62828;
    margin-bottom: 6px;
}

.review-report-block-select,
.review-report-block-textarea {
    width: 100%;
    box-sizing: border-box;
    border-radius: 8px;
    border: 1px solid #ffcdd2;
    padding: 8px 10px;
    font-size: 14px;
    color: #333;
    background: #ffffff;
}

.review-report-block-select:focus,
.review-report-block-textarea:focus {
    outline: none;
    border-color: #f44336;
    box-shadow: 0 0 0 1px rgba(244, 67, 54, 0.2);
}

.review-report-block-textarea {
    resize: vertical;
    min-height: 70px;
}

.review-report-block-note {
    font-size: 12px;
    color: #e57373;
    line-height: 1.5;
    margin: 0;
}

.review-report-block-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

.review-report-block-cancel,
.review-report-block-submit {
    min-width: 90px;
    padding: 8px 14px;
    border-radius: 20px;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.review-report-block-cancel {
    background: #ffffff;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.review-report-block-cancel:hover {
    background: #fff0f0;
}

.review-report-block-submit {
    background: #f44336;
    color: #ffffff;
}

.review-report-block-submit:hover:not(:disabled) {
    background: #d32f2f;
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.4);
}

.review-report-block-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

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

.review-write-form-group:last-child {
    margin-bottom: 0;
}

.review-write-form-group label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.review-write-form-group .required {
    color: #F44336;
}

/* 만족도 선택 버튼 */
.review-write-satisfaction-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.review-write-satisfaction-button {
    flex: 1;
    min-width: 100px;
    padding: 12px 20px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.review-write-satisfaction-button:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.review-write-satisfaction-button.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.review-write-satisfaction-button.active.satisfied {
    border-color: #5A8FA3;
    background: #5A8FA3;
    color: white;
}

.review-write-satisfaction-button.active.neutral {
    border-color: #fac02e;
    background: #fac02e;
    color: white;
}

.review-write-satisfaction-button.active.dissatisfied {
    border-color: #C97D7E;
    background: #C97D7E;
    color: white;
}

.review-write-satisfaction-button i {
    font-size: 18px;
}

/* 리뷰 내용 입력 */
.review-write-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--background);
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.2s ease;
}

.review-write-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.review-write-char-count {
    text-align: right;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* 이미지 업로드 */
.review-write-image-upload {
    margin-bottom: 12px;
}

.review-write-image-add-button {
    padding: 12px 20px;
    background: var(--surface);
    border: 2px dashed var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.review-write-image-add-button:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--background);
}

.review-write-image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.review-write-image-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    cursor: move;
    transition: all 0.2s ease;
}

.review-write-image-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.review-write-image-item.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.review-write-image-item.drag-over {
    border-color: var(--primary-color);
    border-width: 2px;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.review-write-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.review-write-image-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.review-write-image-remove:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.review-write-image-drag-handle {
    position: absolute;
    bottom: 4px;
    left: 4px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 4px;
    color: white;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 10;
}

.review-write-image-item:hover .review-write-image-drag-handle {
    background: rgba(0, 0, 0, 0.8);
}

/* 모달 푸터 */
.review-write-modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.review-write-cancel-button,
.review-write-submit-button {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.review-write-cancel-button {
    background: var(--surface);
    color: var(--text-secondary);
}

.review-write-cancel-button:hover {
    background: #f5f5f5;
}

.review-write-submit-button {
    background: var(--primary-color);
    color: white;
}

.review-write-submit-button:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.review-write-submit-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 리뷰 이미지 뷰어 모달 */
.review-image-viewer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.95);
}

.review-image-viewer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.review-image-viewer-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 80px;
    box-sizing: border-box;
}

.review-image-viewer-slider {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.review-image-viewer-slide {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    align-items: center;
    justify-content: center;
}

.review-image-viewer-slide.active {
    display: flex;
}

.review-image-viewer-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}

.review-image-viewer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    transition: all 0.2s ease;
}

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

.review-image-viewer-prev,
.review-image-viewer-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    transition: all 0.2s ease;
}

.review-image-viewer-prev {
    left: 20px;
}

.review-image-viewer-next {
    right: 20px;
}

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

.review-image-viewer-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10001;
}

/* 모바일 대응 */
@media (max-width: 767px) {
    .review-image-viewer-content {
        padding: 40px 20px;
    }
    
    .review-image-viewer-prev,
    .review-image-viewer-next {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .review-image-viewer-prev {
        left: 10px;
    }
    
    .review-image-viewer-next {
        right: 10px;
    }
    
    .review-image-viewer-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    
    .review-image-viewer-counter {
        bottom: 20px;
        font-size: 12px;
        padding: 6px 12px;
    }
}
