/* /dox/style/product_detail.css */

/* 상품 상세 페이지 */
.product-detail-page {
    padding: 20px 0 60px;
}

.product-detail-page .container {
    margin: 0 auto;
    padding: 0 20px;
}

/* 빵가루 네비게이션 */
.product-detail-page .breadcrumb {
    margin-bottom: 30px;
    font-size: 14px;
    color: #666;
}

.product-detail-page .breadcrumb a {
    color: #666;
    text-decoration: none;
}

.product-detail-page .breadcrumb a:hover {
    color: #333;
    text-decoration: underline;
}

.product-detail-page .breadcrumb .separator {
    margin: 0 8px;
    color: #999;
}

/* 상품 메인 영역 */
.product-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

/* 왼쪽: 이미지 영역 */
.product-images {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.main-image {
    width: 100%;
    aspect-ratio: 1;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.main-image .no-image {
    color: #999;
    font-size: 16px;
}

/* 썸네일 리스트 */
.thumbnail-list {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    overflow-x: auto;
}

.thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s;
}

.thumbnail:hover {
    border-color: #333;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 오른쪽: 상품 정보 */
.product-info-area {
    padding: 20px 0;
}

.product-title {
    font-size: 28px;
    font-weight: 600;
    color: #222;
    margin: 0 0 10px;
    line-height: 1.4;
}

/* 가격 영역 */
.product-price-area {
    margin-bottom: 15px;
}

.original-price {
    font-size: 18px;
    color: #999;
    text-decoration: line-through;
    margin-bottom: 8px;
}

.sale-price-wrap {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.discount-rate {
    font-size: 28px;
    font-weight: 700;
    color: #e74c3c;
}

.sale-price {
    font-size: 32px;
    font-weight: 700;
    color: #222;
}

.price {
    font-size: 32px;
    font-weight: 700;
    color: #e74c3c;
	text-align:right
}

/* 옵션 추가금액 */
.price-adjust {
    margin-top: 10px;
    padding: 10px 15px;
    background: #f0f8ff;
    border-left: 3px solid #3498db;
    border-radius: 4px;
    font-size: 15px;
}

.price-adjust .adjust-label {
    color: #666;
    margin-right: 8px;
}

.price-adjust .adjust-amount {
    font-weight: 600;
    color: #3498db;
}

.price-adjust .adjust-amount.positive {
    color: #e74c3c;
}

.price-adjust .adjust-amount.negative {
    color: #27ae60;
}

/* 입력형 옵션 */
.input-options {
    background: #f9f9f9;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

.option-row {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.option-row:last-child {
    border-bottom: none;
}

.option-row .option-label {
    width: 100px;
    color: #666;
    font-size: 14px;
}

.option-row .option-value {
    flex: 1;
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

/* 구분선 */
.divider {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 25px 0;
}

/* 선택형 옵션 */
.select-options {
    margin-bottom: 20px;
}

.option-group {
    margin-bottom: 15px;
}

.option-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.option-label .required {
    color: #e74c3c;
    margin-left: 4px;
}

.option-select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.option-select:hover {
    border-color: #999;
}

.option-select:focus {
    outline: none;
    border-color: #333;
}

/* 수량 선택 */
.quantity-area {
    margin-bottom: 20px;
}

.quantity-control {
    display: flex;
    align-items: center;
    width: fit-content;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #f5f5f5;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s;
}

.qty-btn:hover {
    background: #e0e0e0;
}

.qty-btn:active {
    background: #d0d0d0;
}

#quantity {
    width: 60px;
    height: 40px;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}

/* 재고 상태 */
.stock-status {
    font-size: 14px;
    margin-bottom: 20px;
}

.in-stock {
    color: #27ae60;
    font-weight: 600;
}

.out-of-stock {
    color: #e74c3c;
    font-weight: 600;
}

.select-option {
    color: #f39c12;
    font-weight: 600;
}

/* 총 가격 */
.total-price-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 6px;
    margin-bottom: 15px;
}

.total-label {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.total-price {
    font-size: 28px;
    font-weight: 700;
    color: #e74c3c;
}

/* 구매 버튼 */
.action-buttons {
    display: flex;
    gap: 10px;
}

.action-buttons button {
    flex: 1;
    height: 56px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cart {
    background: white;
    color: #333;
    border: 2px solid #333;
}

.btn-cart:hover {
    background: #333;
    color: white;
}

.btn-buy {
    background: #333;
    color: white;
}

.btn-buy:hover {
    background: #000;
}

/* 옵션 추가 버튼 */
.btn-add-option {
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-add-option:hover {
    background: #2980b9;
}

/* 중복 선택 메시지 */
.option-duplicate-message {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 15px;
    margin-top: 15px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    color: #856404;
    font-size: 14px;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.option-duplicate-message svg {
    flex-shrink: 0;
    color: #ffc107;
}

/* 선택된 옵션 컨테이너 */
.selected-options-container {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.selected-options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 선택된 옵션 항목 */
.selected-option-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.option-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.option-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.option-price {
    font-size: 14px;
    color: #666;
}

.option-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
}

.option-quantity button {
    width: 28px;
    height: 28px;
    border: 1px solid #ddd;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.option-quantity button:hover {
    background: #e0e0e0;
    border-color: #999;
}

.option-quantity input {
    width: 50px;
    height: 28px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
}

.option-subtotal {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    min-width: 100px;
    text-align: right;
}

.btn-remove-option {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    transition: color 0.2s;
}

.btn-remove-option:hover {
    color: #e74c3c;
}

/* 공지사항 */
.product-notices {
    margin: 40px 0;
    padding: 25px;
    background: #fffbf0;
    border: 1px solid #ffe599;
    border-radius: 8px;
}

.product-notices.top {
    border-color: #e3f2fd;
    background: #f1f8ff;
}

.notice-item {
    margin-bottom: 20px;
}

.notice-item:last-child {
    margin-bottom: 0;
}

.notice-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px;
}

.notice-content {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}

.notice-content img {
    max-width: 100%;
    height: auto;
}

/* 상품 상세 설명 */
.product-description {
    margin: 60px 0;
}

.section-title {
    font-size: 22px;
    font-weight: 600;
    color: #222;
    margin: 0 0 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #333;
}

.description-content {
    font-size: 15px;
    line-height: 1.8;
    color: #444;
}

.description-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px 0;
}

.description-content p {
    margin: 15px 0;
}

.description-content ul,
.description-content ol {
    margin: 15px 0;
    padding-left: 25px;
}

.description-content li {
    margin: 8px 0;
}

.description-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.description-content th,
.description-content td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

.description-content th {
    background: #f5f5f5;
    font-weight: 600;
}

/* 반응형 */
@media (max-width: 768px) {
    .product-main {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .product-images {
        position: static;
    }
    
    .product-title {
        font-size: 22px;
    }
    
    .sale-price,
    .price {
        font-size: 26px;
    }
    
    .total-price {
        font-size: 24px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons button {
        width: 100%;
    }
}