/* --- Global Styles (Improved) --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #ffffff;
    /* [개선] 단색 배경으로 깔끔하게 */
    color: #1a1a1a;
    line-height: 1.6;
}

.container {
    max-width: 1280px;
    /* [개선] 최적의 가독성을 위한 너비 조정 */
    margin: 0 auto;
    padding: 0 30px;
}

/* --- Header (Refined) --- */
.header {
    background: rgba(255, 255, 255, 0.8);
    /* [개선] 투명도 조정 */
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #f0f0f0;
    /* [개선] 더 옅은 경계선 */
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    width: 150px;
    height: 40px;
    background: url('img/header/logo3.png') no-repeat center center / contain;
    text-indent: -9999px;
    cursor: pointer;
}

.nav-links {
    display: flex;
    gap: 40px;
    /* [개선] 간격 조정 */
}

.nav-links a {
    color: #555;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #1a1a1a;
}

.nav-links span {
    color: #ff5f1f;
}


/* --- Product Detail (Golden Ratio Layout) --- */
.product-detail {
    padding: 80px 0;
}

.product-main {
    display: grid;
    grid-template-columns: 1fr 0.6fr; /* 좌측: 이미지 / 우측: 정보 */
    gap: 60px;
    margin-bottom: 100px;
}

/* --- Image Gallery --- */
.product-gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 메인 이미지 컨테이너 */
.main-image-container {
    width: 80%;              /* 메인 이미지 + 썸네일 공통 폭 */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 메인 이미지 */
.main-image {
    width: 100%;             /* 컨테이너 기준으로 꽉 채움 */
    height: auto;
    aspect-ratio: 1 / 1;     /* 정사각형 박스 */
    object-fit: cover;     /* 원본 비율 유지 (잘리지 않음) */
    background-color: #f9f9f9; /* 여백 채우기 */
    border-radius: 16px;
    transition: transform 0.5s ease;
}

.main-image:hover {
    transform: scale(1.03);
}

/* 썸네일 */
.thumbnails {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    width: 100%;             /* 메인 이미지와 같은 폭 */
    margin-top: 15px;
}

.thumbnail {
    width: 100%;
    aspect-ratio: 1 / 1;     /* 정사각형 박스 */
    object-fit: cover;     /* 원본 비율 유지 */
    background-color: #f9f9f9;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.thumbnail.active,
.thumbnail:hover {
    border: 2px solid #ff5f1f;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}


/* --- Product Info (Improved Hierarchy) --- */
.product-info {
    padding-top: 10px;
}

.brand {
    color: #888;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.product-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 40px;
    /* [개선] 타이틀 크기 강조 */
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
    line-height: 1.2;
}

.price-section {
    margin-bottom: 40px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 30px;
}

.price {
    font-size: 32px;
    font-weight: 600;
    /* [개선] 타이틀과 차별화 */
    margin-bottom: 8px;
}

.price-note {
    font-size: 14px;
    color: #888;
}

/* Options */
.options-section {
    margin-bottom: 30px;
}

.option-group {
    margin-bottom: 30px;
}

.option-label {
    display: block;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.size-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.size-btn {
    padding: 10px 18px;
    border: 1px solid #ddd;
    /* [개선] 얇은 테두리 */
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.size-btn:hover {
    border-color: #888;
}

.size-btn.active {
    border-color: #1a1a1a;
    background: #1a1a1a;
    color: white;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px;
    /* [개선] 더 컴팩트하게 */
    width: fit-content;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    /* [개선] 크기 축소 */
    border: none;
    background: #f5f5f5;
    border-radius: 6px;
    /* [개선] */
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background: #1a1a1a;
    color: white;
}

.quantity-display {
    font-size: 16px;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.total-section {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
}

.total-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.total-price {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
}






/* Action Buttons */
.actions {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
}

.btn {
    flex: 1;
    padding: 16px 25px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: white;
    color: #1a1a1a;
    border: 2px solid #ddd;
}

.btn-primary:hover {
    background: #444;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background: #1a1a1a;
    color: white;
    border: 2px solid #ddd;
}

.btn-secondary:hover {
    border-color: #1a1a1a;
}






/* Share Section */
.share-section {
    border-top: 1px solid #f0f0f0;
    padding-top: 30px;
}

.share-title {
    font-size: 14px;
    font-weight: 500;
    color: #888;
    margin-bottom: 15px;
}

.share-icons {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.share-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #555;
    font-size: 16px;
}

.share-btn:hover {
    border-color: #1a1a1a;
    background: #1a1a1a;
    color: white;
}

/* --- Reviews Section --- */
.reviews-section {
    margin-top: 100px;
    background: #f9f9f9;
    /* [개선] 배경 통일 */
    border-radius: 20px;
    padding: 60px;
    border: 1px solid #f0f0f0;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 40px;
    text-align: center;
    /* [추가] */
}

.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.rating-summary {
    display: flex;
    align-items: center;
    gap: 15px;
}

.rating-score {
    font-size: 40px;
    font-weight: 700;
}

.stars {
    color: #ffb400;
    font-size: 20px;
    /* [개선] 별 색상 변경 */
}

.review-count {
    background: #f0f0f0;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.review-photos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.review-photo {
    width: 100%;
    height: 250px;
    /* [개선] 높이 조정 */
    object-fit: cover;
    border-radius: 12px;
}

.review-list {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 25px;
}

/* [개선] */
.review-card {
    border: 1px solid #eee;
    background: white;
    border-radius: 16px;
    padding: 30px;
    transition: all 0.3s ease;
}

.review-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    transform: translateY(-5px);
}

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

.reviewer-name {
    font-weight: 600;
    color: #1a1a1a;
}

.review-stars {
    color: #ffb400;
}

.review-text {
    color: #555;
    line-height: 1.7;
}

/* --- Recommendations (Improved) --- */
.recommendations-section {
    margin-top: 100px;
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.recommendation-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.recommendation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.recommendation-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
}

.recommendation-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px;
    text-align: center;
}

.recommendation-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px; /* [수정] 가격과의 간격 확보 */
    color: #1a1a1a;
    height: 40px; /* [추가] 2줄 높이 고정으로 레이아웃 틀어짐 방지 */
}

/* [삭제] 기존 .recommendation-price 스타일은 아래의 새로운 클래스들로 대체됩니다. */

/* [추가] 가격 정보 전체를 감싸는 컨테이너 */
.price-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

/* [추가] 취소선이 적용된 원래 가격 */
.original-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

/* [추가] 할인율과 최종 가격을 묶는 라인 */
.final-price-line {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* [추가] 할인율: 눈에 띄는 포인트 컬러 적용 */
.discount-rate {
    font-size: 18px;
    font-weight: 700;
    color: #ff5f1f; /* 포인트 컬러 */
}

/* [추가] 최종 할인가 */
.final-price {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
}

/* --- Responsive & Animations (기존과 유사) --- */
@media (max-width: 992px) {
    .product-main {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .review-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .nav-links {
        display: none;
    }

    .recommendations-grid,
    .review-list {
        grid-template-columns: 1fr 1fr;
    }

    .reviews-header {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
}

.fade-in {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
    /* [개선] forwards 추가 */
}

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