/* Modal 樣式覆蓋 */
.modal {
    .modal-content

{
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid #f0f0f0;
    padding: 24px;
    background: white;
    border-radius: 16px 16px 0 0;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
}

.btn-close {
    width: 40px;
    height: 40px;
    background: #f5f5f5;
    border-radius: 8px;
}

    .btn-close:hover {
        background: #e8eef7;
    }

.modal-body {
    padding: 40px;
}

/* 內容網格 */
.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

/* 圖片區域 */
.product-image-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.product-main-image {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, #e8eef7 0%, #f5f7fa 100%);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

    .product-main-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #ff6b9d;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

/* 信息區域 */
.product-info-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.product-title {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.3;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #666;
}

.stars {
    display: flex;
    gap: 4px;
    font-size: 16px;
}

.price-section {
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #fff 100%);
    border-radius: 12px;
    border-left: 4px solid #5d5fef;
}

.price-label {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.price-current {
    font-size: 32px;
    font-weight: 700;
    color: #5d5fef;
}

.price-original {
    font-size: 16px;
    color: #999;
    text-decoration: line-through;
    margin-left: 8px;
}

.discount-tag {
    display: inline-block;
    background: #ff6b9d;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    margin-top: 8px;
    font-weight: 600;
}

.description-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.description-text {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.product-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.spec-item {
    padding: 12px;
    background: #f5f7fa;
    border-radius: 8px;
    font-size: 13px;
}

.spec-label {
    color: #999;
    margin-bottom: 4px;
}

.spec-value {
    color: #2c3e50;
    font-weight: 600;
}

.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.btn-favorite {
    width: 50px;
    height: 50px;
    border: 2px solid #e8eef7;
    background: white;
    border-radius: 8px;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

    .btn-favorite:hover {
        border-color: #ff6b9d;
        background: #fff5f8;
    }

    .btn-favorite.active {
        border-color: #ff6b9d;
        background: #ff6b9d;
    }

.btn-add-cart {
    flex: 1;
    height: 50px;
    background: linear-gradient(135deg, #5d5fef 0%, #4c4dd8 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .btn-add-cart:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(93, 95, 239, 0.3);
        color: white;
    }

    .btn-add-cart.added {
        background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    }

/* RWD */
@media (max-width: 768px) {
    .product-detail-grid {
        display: flex;
        flex-direction: column;
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .modal-body {
        padding: 24px;
    }

    .product-main-image {
        height: 300px;
    }

    .product-title {
        font-size: 22px;
    }

    .price-current {
        font-size: 24px;
    }

    .product-specs {
        grid-template-columns: 1fr;
    }
}

/* 測試按鈕 */
.btn-test {
    padding: 12px 24px;
    background: linear-gradient(135deg, #5d5fef 0%, #4c4dd8 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

    .btn-test:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(93, 95, 239, 0.3);
    }

/* 結帳 Modal 樣式 */
.checkout-section {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #f0f0f0;
}

.price-breakdown {
    background: white;
    padding: 16px;
    border-radius: 8px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: 14px;
}

.price-label {
    color: #666;
    font-weight: 500;
}

.price-value {
    color: #2c3e50;
    font-weight: 600;
}

.price-divider {
    height: 1px;
    background: #e8eef7;
    margin: 12px 0;
}

.total-row {
    font-size: 16px;
    padding: 16px 0;
}

    .total-row .price-label {
        font-weight: 700;
        color: #2c3e50;
    }

.total-value {
    font-size: 24px;
    color: #5d5fef;
    font-weight: 700;
}

.discount-row .discount-value {
    color: #10b981;
}

.coupon-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.form-check-input {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #5d5fef;
}

.form-check-label {
    cursor: pointer;
    margin-bottom: 0;
    font-weight: 500;
    color: #2c3e50;
}

.coupon-form {
    padding: 16px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e8eef7;
}

.form-label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    margin-bottom: 8px;
}

.form-control {
    border: 1px solid #e8eef7;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
}

    .form-control:focus {
        border-color: #5d5fef;
        box-shadow: 0 0 0 3px rgba(93, 95, 239, 0.1);
    }

.btn-verify {
    width: 100%;
    height: 40px;
    background: linear-gradient(135deg, #5d5fef 0%, #4c4dd8 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

    .btn-verify:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(93, 95, 239, 0.3);
    }

.btn-change-coupon {
    width: 100%;
    height: 40px;
    background: #ff6d47;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

    .btn-change-coupon:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(93, 95, 239, 0.3);
    }

.coupon-message {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}

    .coupon-message.success {
        background: #d4edda;
        color: #155724;
        border: 1px solid #c3e6cb;
    }

    .coupon-message.error {
        background: #f8d7da;
        color: #721c24;
        border: 1px solid #f5c6cb;
    }

.checkout-footer {
    padding: 20px;
    border-top: 1px solid #f0f0f0;
    background: white;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-secondary {
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    background: #f5f5f5;
    color: #2c3e50;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .btn-secondary:hover {
        background: #e8eef7;
        color: #2c3e50;
    }

.btn-confirm-order {
    padding: 10px 32px;
    height: 40px;
    background: linear-gradient(135deg, #5d5fef 0%, #4c4dd8 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

    .btn-confirm-order:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(93, 95, 239, 0.3);
        color: white;
    }

/* RWD */
@media (max-width: 768px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .modal-body {
        padding: 24px;
    }

    .product-main-image {
        height: 300px;
    }

    .product-title {
        font-size: 22px;
    }

    .price-current {
        font-size: 24px;
    }

    .product-specs {
        grid-template-columns: 1fr;
    }
}

/* 測試按鈕 */
.btn-test {
    padding: 12px 24px;
    background: linear-gradient(135deg, #5d5fef 0%, #4c4dd8 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

    .btn-test:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(93, 95, 239, 0.3);
    }
