/* Product Detail Page Styles */

/* Main Image Container */
.product-images-container {
    position: relative;
}

.main-image {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: #f8f9fa;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.main-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Product Badge */
.product-badge {
    background: #252223 !important;
    color: #fff !important;
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
}

/* Image Thumbnails */
.image-thumbnails {
    margin-top: 15px;
}

.image-thumbnails .thumbnail {
    cursor: pointer;
    border: 3px solid #dee2e6;
    border-radius: 8px;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.image-thumbnails .thumbnail:hover {
    border-color: #252223;
    opacity: 1;
    transform: translateY(-2px);
}

.image-thumbnails .thumbnail.active {
    border-color: #252223 !important;
    opacity: 1;
    box-shadow: 0 4px 12px rgba(37, 34, 35, 0.25);
}

/* Product Info Section */
.product-info {
    padding: 10px 0;
}

/* Category Badges */
.product-category {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.product-category .badge {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    letter-spacing: 0.3px;
}

.badge.bg-secondary {
    background: #252223 !important;
}

.badge.badge-new {
    background: #198754 !important;
    color: #fff;
}

.badge.badge-best {
    background: #ffc107 !important;
    color: #000;
}

/* Product Name */
.product-name {
    font-size: 26px;
    font-weight: 700;
    color: #252223;
    line-height: 1.4;
    margin: 0;
}

/* Short Description */
.product-short-desc {
    font-size: 15px;
    line-height: 1.6;
    color: #6c757d;
    margin: 0;
}

/* Price Section */
.product-price-section {
    background: #f8f9fa;
    padding: 24px;
    border-radius: 12px;
    border: 2px solid #e9ecef;
}

.price-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.price-main .sale-price {
    font-size: 28px;
    font-weight: 700;
    color: #252223;
}

.price-details {
    background: #fff;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.6;
    color: #495057;
    border: 1px solid #e9ecef;
}

.price-notice-box {
    background: #fff3cd;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #ffc107;
}

.price-notice-box p {
    margin: 0;
    font-size: 13px;
    color: #856404;
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-notice-box i {
    font-size: 16px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-row.sale {
    padding-top: 8px;
    border-top: 1px dashed #dee2e6;
}

.price-row.sale:first-child {
    border-top: none;
    padding-top: 0;
}

.price-label {
    font-size: 15px;
    font-weight: 600;
    color: #495057;
}

.original-price {
    font-size: 16px;
    color: #adb5bd;
    text-decoration: line-through;
}

.price-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.discount-rate {
    background: #dc3545;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 700;
}

.sale-price {
    font-size: 28px;
    font-weight: 700;
    color: #252223;
}

/* Product Meta */
.product-meta {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.meta-row:not(:last-child) {
    border-bottom: 1px solid #f1f3f5;
}

.meta-label {
    font-size: 15px;
    font-weight: 600;
    color: #495057;
}

.meta-value {
    font-size: 15px;
    color: #252223;
    font-weight: 500;
}

/* Form Elements */
.form-label {
    font-size: 15px;
    font-weight: 600;
    color: #252223;
    margin-bottom: 12px;
    display: block;
}

.form-select {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 15px;
    transition: all 0.3s ease;
    background-color: #fff;
}

.form-select:focus {
    border-color: #252223;
    box-shadow: 0 0 0 0.2rem rgba(37, 34, 35, 0.1);
    outline: none;
}

/* Color Options */
.color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.color-options .form-check {
    margin: 0;
}

.color-options .form-check-input {
    display: none;
}

.color-options .form-check-label {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 14px;
    background: #fff;
}

.color-options .form-check-label:hover {
    border-color: #252223;
    background: #f8f9fa;
    transform: translateY(-1px);
}

.color-options .form-check-input:checked + label {
    border-color: #252223;
    background: #252223;
    color: #fff;
}

.color-swatch {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.1);
    margin-right: 8px;
}

/* Quantity Section */
.quantity-section .form-label {
    margin-bottom: 12px;
}

.quantity-control {
    display: inline-flex;
    align-items: center;
    border: 2px solid #252223;
    border-radius: 8px;
    overflow: hidden;
}

.btn-quantity {
    width: 44px;
    height: 44px;
    border: none;
    background: #fff;
    color: #252223;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-quantity:hover {
    background: #252223;
    color: #fff;
}

.btn-quantity:active {
    transform: scale(0.95);
}

.quantity-input {
    width: 80px;
    height: 44px;
    border: none;
    border-left: 2px solid #252223;
    border-right: 2px solid #252223;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #252223;
    background: #fff;
}

.quantity-input:focus {
    outline: none;
}

/* Total Price Section */
.total-price-section {
    background: #252223;
    padding: 20px;
    border-radius: 10px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-label {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.total-price {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
}

/* Action Buttons */
.product-actions .btn {
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: none;
}

.product-actions .btn-primary {
    background: #252223;
    color: #fff;
}

.product-actions .btn-primary:hover {
    background: #1a1819;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 34, 35, 0.3);
}

.product-actions .btn-outline-primary {
    border: 2px solid #252223;
    color: #252223;
    background: #fff;
}

.product-actions .btn-outline-primary:hover {
    background: #252223;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 34, 35, 0.2);
}

/* Custom Product Notice */
.custom-product-notice {
    display: flex;
    gap: 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #252223;
    border-radius: 10px;
    padding: 20px;
}

.notice-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: #252223;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.notice-content h5 {
    font-size: 17px;
    font-weight: 700;
    color: #252223;
    margin: 0 0 8px 0;
}

.notice-content p {
    font-size: 14px;
    color: #495057;
    margin: 0;
    line-height: 1.5;
}

/* Custom Price Info */
.custom-price-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

.price-notice {
    font-size: 13px;
    color: #6c757d;
    margin: 12px 0 0 0;
    padding-top: 12px;
    border-top: 1px dashed #dee2e6;
}

/* Product Tabs */
.nav-tabs {
    border-bottom: 3px solid #252223;
    gap: 5px;
}

.nav-tabs .nav-link {
    color: #6c757d;
    font-weight: 600;
    font-size: 16px;
    padding: 16px 32px;
    border: none;
    border-bottom: 3px solid transparent;
    background: transparent;
    transition: all 0.3s ease;
    margin-bottom: -3px;
}

.nav-tabs .nav-link:hover {
    color: #252223;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.nav-tabs .nav-link.active {
    color: #252223;
    background: transparent;
    border-bottom: 3px solid #252223;
}

.tab-content {
    border: 2px solid #e9ecef;
    border-top: none;
    border-radius: 0 0 10px 10px;
    padding: 30px;
    min-height: 300px;
    background: #fff;
}

.product-detail-content {
    font-size: 15px;
    line-height: 1.8;
    color: #495057;
}

.product-detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

/* Notification */
.product-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    min-width: 320px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 991px) {
    .product-name {
        font-size: 22px;
    }

    .sale-price {
        font-size: 24px;
    }

    .total-price {
        font-size: 24px;
    }

    .product-actions .btn {
        padding: 14px 20px;
        font-size: 15px;
    }

    .nav-tabs .nav-link {
        padding: 12px 20px;
        font-size: 15px;
    }

    .product-price-section,
    .product-meta {
        padding: 16px;
    }

    .total-price-section {
        padding: 16px;
    }
}

@media (max-width: 767px) {
    .product-name {
        font-size: 20px;
    }

    .sale-price {
        font-size: 22px;
    }

    .discount-rate {
        font-size: 16px;
        padding: 4px 10px;
    }

    .total-price {
        font-size: 22px;
    }

    .color-options {
        gap: 8px;
    }

    .color-options .form-check-label {
        padding: 8px 12px;
        font-size: 13px;
    }

    .nav-tabs .nav-link {
        padding: 10px 16px;
        font-size: 14px;
    }

    .tab-content {
        padding: 20px;
    }

    .custom-product-notice {
        flex-direction: column;
        text-align: center;
    }

    .notice-icon {
        margin: 0 auto;
    }
}

/* ========================================
   Review Section Styles
   ======================================== */

/* Review Summary */
.review-summary {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.review-summary h2 {
    font-size: 3rem;
    font-weight: 700;
    color: #252223;
    margin-bottom: 0.5rem;
}

.review-summary .text-warning {
    color: #ffc107 !important;
    font-size: 1.5rem;
}

.rating-breakdown {
    padding: 1rem 0;
}

.rating-breakdown .progress {
    background-color: #e9ecef;
    border-radius: 4px;
}

.rating-breakdown .progress-bar {
    background-color: #ffc107 !important;
}

.rating-breakdown span {
    font-size: 0.9rem;
    min-width: 40px;
}

/* Review List */
.review-list {
    margin-top: 1.5rem;
}

.review-item {
    padding: 1.5rem 0;
    border-bottom: 1px solid #dee2e6;
}

.review-item:last-child {
    border-bottom: none;
}

.review-item .text-warning {
    color: #ffc107 !important;
    font-size: 1.1rem;
}

.review-item .small {
    font-size: 0.875rem;
    color: #6c757d;
}

.review-content {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #495057;
    margin-top: 0.75rem;
}

/* Review Images */
.review-images {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.review-images img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
    border: 1px solid #dee2e6;
}

.review-images img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Review Answer (Seller Response) */
.review-answer {
    background: #f8f9fa;
    border-left: 3px solid #252223;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.review-answer .small {
    font-weight: 600;
    color: #252223;
}

.review-answer div:last-child {
    font-size: 0.9rem;
    color: #495057;
    line-height: 1.5;
}

/* Empty State */
.text-center.py-5 {
    padding: 3rem 1rem !important;
}

.text-center.py-5 i {
    color: #dee2e6 !important;
    margin-bottom: 1rem;
}

.text-center.py-5 p {
    color: #6c757d;
    font-size: 1rem;
}

/* Tab Styling */
.nav-tabs .nav-link {
    color: #6c757d;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 1rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    border-color: #dee2e6;
    color: #252223;
}

.nav-tabs .nav-link.active {
    color: #252223;
    border-bottom-color: #252223;
    background: transparent;
}

.tab-content {
    background: #fff;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 8px 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .review-summary {
        padding: 1.5rem;
    }

    .review-summary h2 {
        font-size: 2.5rem;
    }

    .review-item {
        padding: 1rem 0;
    }

    .review-images img {
        width: 60px;
        height: 60px;
    }

    .rating-breakdown {
        padding: 0.5rem 0;
    }

    .nav-tabs .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* ========================================
   Review Image Modal
   ======================================== */

.review-image-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.review-image-modal-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.review-image-modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 10001;
    line-height: 1;
    user-select: none;
}

.review-image-modal-close:hover,
.review-image-modal-close:focus {
    color: #ffc107;
}

/* Modal Responsive */
@media (max-width: 768px) {
    .review-image-modal-content {
        max-width: 95%;
        max-height: 85%;
    }

    .review-image-modal-close {
        top: 10px;
        right: 15px;
        font-size: 40px;
    }
}

/* 주문 선택 모달 */
.order-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.order-modal.active {
    display: flex;
}

.order-modal-content {
    background: #fff;
    border-radius: 16px;
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.order-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
}

.order-modal-header h5 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #252223;
}

.order-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #6c757d;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}

.order-modal-close:hover {
    color: #252223;
}

.order-modal-body {
    padding: 24px;
}

.order-modal-desc {
    color: #6c757d;
    margin-bottom: 20px;
    font-size: 14px;
}

.order-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    width: 100%;
}

.order-option:hover {
    background: #fff;
    border-color: #252223;
    transform: translateX(4px);
}

.order-option-icon {
    width: 48px;
    height: 48px;
    background: #252223;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.order-option-icon i {
    font-size: 22px;
    color: #fff;
}

.order-option-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.order-option-info strong {
    font-size: 15px;
    color: #252223;
}

.order-option-info span {
    font-size: 13px;
    color: #6c757d;
}

@media (max-width: 576px) {
    .order-modal-content {
        width: 95%;
        margin: 10px;
    }

    .order-option {
        padding: 14px 16px;
        gap: 12px;
    }

    .order-option-icon {
        width: 40px;
        height: 40px;
    }

    .order-option-icon i {
        font-size: 18px;
    }
}

/* Review Section Styles */
.review-header {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 15px;
}

.review-list {
    margin: 0;
}

.review-item {
    transition: background-color 0.2s ease;
}

.review-item:hover {
    background-color: #f8f9fa;
}

.review-item.review-other-product {
    background-color: #fafafa;
    border-left: 3px solid #dee2e6;
    padding-left: 15px;
    margin-left: -15px;
}

.review-product-badge .badge {
    font-size: 11px;
    font-weight: 500;
    padding: 4px 8px;
}

.review-rating i {
    font-size: 14px;
}

.review-content {
    line-height: 1.7;
    color: #333;
}

.review-images img {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.review-images img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.review-answer {
    border-left: 3px solid #252223;
}

/* Product Order Info (주문 전 안내) */
.product-order-info {
    margin-top: 1rem;
}

.order-info-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 1.25rem;
    border-left: 4px solid #252223;
}

.order-info-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #252223;
    margin-bottom: 0.75rem;
}

.order-info-title i {
    color: #252223;
}

.order-info-content {
    font-size: 0.9rem;
    color: #495057;
    line-height: 1.7;
}

.order-info-content p {
    margin-bottom: 0.5rem;
}

.order-info-content p:last-child {
    margin-bottom: 0;
}

/* ========================================
   Color Swatch Section (이미지 하단)
   ======================================== */
.product-color-swatch-section {
    padding: 12px 0;
    border-top: 1px solid #e9ecef;
}

.color-swatch-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.color-swatch-item {
    width: 22px;
    height: 22px;
    border-radius: 2px;
    display: inline-block;
    cursor: default;
    transition: transform 0.15s ease;
}

.color-swatch-item:hover {
    transform: scale(1.15);
}

.color-swatch-item.light {
    border: 1px solid #ccc;
}

.size-range-badge {
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    white-space: nowrap;
    margin-left: 12px;
}

/* Responsive */
@media (max-width: 576px) {
    .color-swatch-item {
        width: 18px;
        height: 18px;
    }

    .size-range-badge {
        font-size: 12px;
    }
}
