/* 상품 상세 페이지 스타일 */

/* 상품 정보 섹션 */
.product-info-section {
    padding: 60px 0;
    background: #fff;
}

.product-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 좌측: 상품 이미지 */
.product-image-area {
    position: sticky;
    top: 120px;
    height: fit-content;
}

.main-image {
    width: 100%;
    aspect-ratio: 1/1;
    background: #f5f5f5;
    border-radius: 12px;
    overflow: hidden;
}

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

/* 우측: 상품 정보 */
.product-info-area {
    padding: 20px 0;
}

.product-title {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
}

.product-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

/* 평점 */
.product-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.product-rating .stars {
    display: flex;
    gap: 2px;
}

.product-rating .star {
    font-size: 20px;
    color: #ddd;
}

.product-rating .star.filled {
    color: #ffc107;
}

.rating-score {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.review-count {
    font-size: 14px;
    color: #999;
}

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

.original-price {
    font-size: 18px;
    color: #999;
    text-decoration: line-through;
    margin-bottom: 10px;
}

.sale-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.discount-badge {
    background: #ff4444;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 20px;
    font-weight: bold;
}

.sale-price {
    font-size: 32px;
    font-weight: bold;
    color: #333;
}

/* 배송 정보 */
.delivery-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.info-row {
    display: flex;
    padding: 8px 0;
}

.info-row .label {
    width: 120px;
    color: #666;
    font-size: 14px;
}

.info-row .value {
    flex: 1;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

/* 수량 선택 */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 20px 0;
    border-top: 1px solid #eee;
}

.quantity-selector .label {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.quantity-controls button {
    width: 40px;
    height: 40px;
    border: none;
    background: #fff;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.3s;
}

.quantity-controls button:hover {
    background: #f5f5f5;
}

.quantity-controls input {
    width: 60px;
    height: 40px;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
}

/* 총 금액 */
.total-price-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-top: 2px solid #333;
    border-bottom: 2px solid #333;
    margin-bottom: 30px;
}

.total-price-area .label {
    font-size: 18px;
    font-weight: 500;
    color: #333;
}

.total-price {
    font-size: 28px;
    font-weight: bold;
    color: #d4a574;
}

/* 버튼 */
.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.action-buttons button {
    padding: 18px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-cart {
    background: #fff;
    color: #d4a574;
    border: 2px solid #d4a574;
}

.btn-cart:hover {
    background: #f8f5f0;
}

.btn-buy {
    background: #d4a574;
    color: #fff;
}

.btn-buy:hover {
    background: #c49564;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.3);
}

/* 탭 섹션 */
.product-tabs-section {
    padding: 60px 0;
    background: #fafafa;
}

.tabs-nav {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 40px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    padding: 15px 40px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: #333;
}

.tab-btn.active {
    color: #d4a574;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #d4a574;
}

.tab-content {
    display: none;
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.tab-content.active {
    display: block;
}

/* 상세정보 탭 */
.detail-content h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 30px;
    text-align: center;
}

.product-description {
    font-size: 16px;
    line-height: 1.8;
    color: #666;
    margin-bottom: 40px;
}

.detail-images {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-images img {
    width: 100%;
    border-radius: 8px;
}

/* 리뷰 탭 */
.review-summary {
    margin-bottom: 40px;
    text-align: center;
}

.review-summary h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 30px;
}

.rating-overview {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.avg-rating {
    text-align: center;
}

.big-score {
    font-size: 48px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.avg-rating .stars {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 10px;
}

.avg-rating .star {
    font-size: 24px;
    color: #ddd;
}

.avg-rating .star.filled {
    color: #ffc107;
}

.total-reviews {
    font-size: 14px;
    color: #999;
}

/* 리뷰 목록 */
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.no-reviews {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.no-reviews p {
    margin: 10px 0;
}

.review-item {
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.review-rating {
    display: flex;
    gap: 2px;
}

.review-rating .star {
    font-size: 16px;
    color: #ddd;
}

.review-rating .star.filled {
    color: #ffc107;
}

.review-author {
    font-weight: 500;
    color: #333;
}

.review-date {
    color: #999;
    font-size: 14px;
    margin-left: auto;
}

.review-content {
    line-height: 1.6;
    color: #666;
    margin-bottom: 15px;
}

.review-image {
    margin-top: 15px;
}

.review-image img {
    max-width: 300px;
    border-radius: 8px;
}

/* 상품문의 탭 */
#qna-tab h2, #qna-tab h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 30px;
}

.qna-form-area {
    background: #f8f9fa;
    padding: 40px;
    border-radius: 8px;
    margin-bottom: 40px;
}

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

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

.qna-form label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.qna-form input,
.qna-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.qna-form input:focus,
.qna-form textarea:focus {
    outline: none;
    border-color: #d4a574;
}

.qna-form textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-submit-qna {
    width: 100%;
    padding: 14px;
    background: #d4a574;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-submit-qna:hover {
    background: #c49564;
}

/* 문의 목록 */
.qna-list {
    margin-top: 40px;
}

.no-qna {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.qna-item {
    border-bottom: 1px solid #eee;
    padding: 20px 0;
}

.qna-item:last-child {
    border-bottom: none;
}

.qna-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.qna-status {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.qna-status.waiting {
    background: #fff3cd;
    color: #856404;
}

.qna-status.answered {
    background: #d4edda;
    color: #155724;
}

.qna-title {
    font-weight: 500;
    color: #333;
    flex: 1;
}

.qna-author {
    color: #666;
    font-size: 14px;
}

.qna-date {
    color: #999;
    font-size: 14px;
}

.qna-content {
    padding-left: 20px;
}

.question {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
    line-height: 1.6;
    color: #666;
}

.answer {
    padding: 15px;
    background: #e8f5e9;
    border-radius: 8px;
    line-height: 1.6;
    color: #666;
    position: relative;
}

.answer-date {
    display: block;
    margin-top: 10px;
    font-size: 12px;
    color: #999;
}

.question strong,
.answer strong {
    color: #333;
    margin-right: 10px;
}

/* 반응형 */
@media (max-width: 768px) {
    .product-main {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .product-image-area {
        position: relative;
        top: 0;
    }
    
    .product-title {
        font-size: 22px;
    }
    
    .sale-price {
        font-size: 26px;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .tabs-nav {
        overflow-x: auto;
    }
    
    .tab-btn {
        padding: 12px 20px;
        font-size: 14px;
        white-space: nowrap;
    }
    
    .tab-content {
        padding: 20px;
    }
    
    .qna-form-area {
        padding: 20px;
    }
    
    .qna-form .form-row {
        grid-template-columns: 1fr;
    }
    
    .qna-header {
        flex-wrap: wrap;
    }
}