﻿
.checkout-page {
    /*background: #f5f7fa;*/
    padding: 20px 0 40px;
    border-color: red;
}

.checkout-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    border-color: red;
}

.checkout-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 25px;
}

.section-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid #e4e4e7; /* ← اضافه کن */
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
    .section-card .btn-checkout {
        width: 100%;
        background: #265a48;
        color: #fff;
        border: none;
        border-radius: 10px;
        padding: 14px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: 0.3s;
        margin-top: 16px;
        text-align: center;
        display: block;
        text-decoration: none;
    }
    /* ===== خط زیر تایتل ===== */
    .section-card .section-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 16px;
        padding-bottom: 12px; /* ← فاصله از خط */
        border-bottom: 1px solid #e4e4e7; /* ← خط زیر تایتل */
    }

        /* ===== خط زیر تایتل در بخش اقلام سفارش ===== */
        .section-card .section-header h3 {
            font-size: 16px;
            font-weight: 700;
            color: #1a1a2e;
            margin: 0;
        }

        .section-card .section-header .edit-link {
            font-size: 13px;
            color: #00a99d;
            text-decoration: none;
            font-weight: 500;
            cursor: pointer;
        }

.address-display {
    background: #f0f6ff;
    border-radius: 8px;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border: 2px solid transparent;
    border-color: #bfdbfe;
    transition: 0.3s;
}

    .address-display:hover {
        border-color: #00a99d;
    }

    .address-display .address-text {
        font-size: 14px;
        color: #333;
    }

        .address-display .address-text .label {
            color: #888;
        }

    .address-display .change-btn {
        color: #00a99d;
        font-size: 14px;
        font-weight: 500;
        background: none;
        border: none;
        cursor: pointer;
    }

.shipping-methods {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ===== رنگ Border جدید ===== */
.shipping-option {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    border: 2px solid #e4e4e7; /* ← رنگ جدید */
    border-radius: 12px;
    cursor: pointer;
    transition: 0.3s;
    background: #fff;
}

    .shipping-option:hover {
        border-color: #00a99d;
        background: #f8fdfc;
    }

    .shipping-option.selected {
        border-color: #00a99d;
        background: #f0faf8;
    }


    .shipping-option .radio-circle {
        width: 20px;
        height: 20px;
        border-radius: 50%;
        border: 2px solid #d0d5dd;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: 0.3s;
        margin-top: 2px;
    }

    .shipping-option.selected .radio-circle {
        border-color: #00a99d;
    }

        .shipping-option.selected .radio-circle::after {
            content: '';
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: #00a99d;
        }

    .shipping-option .info {
        flex: 1;
    }

        .shipping-option .info .title {
            font-size: 15px;
            font-weight: 700;
            color: #1a1a2e;
        }

        .shipping-option .info .desc {
            font-size: 13px;
            color: #666;
            margin-top: 4px;
            line-height: 1.6;
        }

        .shipping-option .info .free-tag {
            background: #e8f5e9;
            color: #2e7d32;
            font-size: 12px;
            padding: 3px 14px;
            border-radius: 20px;
            font-weight: 500;
            display: inline-block;
            margin-top: 6px;
        }

    .shipping-option .cost {
        font-size: 15px;
        font-weight: 600;
        color: #1a1a2e;
        white-space: nowrap;
        margin-top: 2px;
    }

/* ===== تغییرات برای بخش اقلام سفارش ===== */
.order-items-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.order-item-row {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #f0f2f5;
}

    .order-item-row:last-child {
        border-bottom: none;
    }

    .order-item-row .item-image {
        width: 180px;
        height: 180px;
        border-radius: 10px;
        border: 1px solid #f0f2f5;
        overflow: hidden;
        flex-shrink: 0;
        background: #fafafa;
        display: flex;
        align-items: center;
        justify-content: center;
    }

        .order-item-row .item-image img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            padding: 6px;
        }

    .order-item-row .item-details {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

        .order-item-row .item-details .name {
            font-size: 15px;
            font-weight: 600;
            color: #1a1a2e;
            line-height: 1.4;
        }

        .order-item-row .item-details .variant {
            font-size: 13px;
            color: #888;
        }

        .order-item-row .item-details .expiry {
            font-size: 12px;
            color: #888;
        }

            .order-item-row .item-details .expiry i {
                color: #bbb;
            }

    .order-item-row .item-price {
        text-align: left;
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 2px;
    }

        .order-item-row .item-price .original {
            font-size: 13px;
            color: #aaa;
            text-decoration: line-through;
        }

        .order-item-row .item-price .final {
            font-size: 16px;
            font-weight: 700;
            color: #1a1a2e;
        }

        .order-item-row .item-price .discount-badge {
            background: #e03a3a;
            color: #fff;
            font-size: 12px;
            padding: 1px 12px;
            border-radius: 20px;
            display: inline-block;
            margin-top: 2px;
            font-weight: 600;
        }

    .order-item-row .item-details .quantity-badge {
        background: #f0f2f5;
        color: #666;
        font-size: 12px;
        padding: 2px 12px;
        border-radius: 20px;
        display: inline-block;
        margin-top: 4px;
        width: fit-content;
    }
/* ===== خط زیر عنوان "اقلام سفارش" ===== */
.order-items-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid #e4e4e7;
    margin-bottom: 16px;
}

    .order-items-header h3 {
        font-size: 16px;
        font-weight: 700;
        color: #1a1a2e;
        margin: 0;
    }
/* ===== تغییرات برای بخش خلاصه سفارش ===== */
.cost-summary {
    padding-top: 16px;
    border-top: 2px solid #e8ecf0;
}

.cost-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    color: #555;
}

    .cost-row.total {
        font-size: 18px;
        font-weight: 700;
        color: #1a1a2e;
        border-top: 1px solid #e8ecf0;
        padding-top: 16px;
        margin-top: 8px;
    }

.btn-submit-order {
    width: 100%;
    background: #265a48;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 20px;
}

    .btn-submit-order:hover {
        background: #1a3f32;
    }

    .btn-submit-order:disabled {
        background: #ccc;
        cursor: not-allowed;
    }

/* ===== استایل مودال انتخاب آدرس ===== */
.address-modal .modal-content {
    border-radius: 16px;
    border: none;
    padding: 20px;
}

.address-modal .modal-header {
    border-bottom: none;
    padding-bottom: 0;
}

.address-modal .modal-body {
    padding: 20px 0;
    min-height: 150px;
}

.address-modal .address-option {
    padding: 14px 16px;
    border: 2px solid #e8ecf0;
    border-radius: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: 0.3s;
}

    .address-modal .address-option:hover {
        border-color: #00a99d;
    }

    .address-modal .address-option.selected {
        border-color: #00a99d;
        background: #f0faf8;
    }

    .address-modal .address-option .name {
        font-weight: 600;
        font-size: 14px;
    }

    .address-modal .address-option .detail {
        font-size: 13px;
        color: #666;
    }

.address-modal .no-address {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    text-align: center;
    gap: 15px;
}

    .address-modal .no-address p {
        margin: 0;
        font-size: 15px;
        color: #888;
    }

    .address-modal .no-address .btn-add-address-modal {
        background: #00a99d;
        color: #fff;
        border: none;
        padding: 10px 30px;
        border-radius: 8px;
        font-weight: 500;
        cursor: pointer;
        transition: 0.3s;
        text-decoration: none;
        display: inline-block;
    }

        .address-modal .no-address .btn-add-address-modal:hover {
            background: #008a7a;
            color: #fff;
        }

/* ===== استایل مودال افزودن آدرس ===== */
.add-address-modal .modal-content {
    border-radius: 16px;
    border: none;
    padding: 20px 25px;
}

.add-address-modal .modal-header {
    border-bottom: none;
    padding: 0 0 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .add-address-modal .modal-header .modal-title {
        font-size: 18px;
        font-weight: 700;
        color: #1a1a2e;
    }

    .add-address-modal .modal-header .close-btn {
        background: none;
        border: none;
        padding: 0;
        cursor: pointer;
        opacity: 0.7;
        transition: 0.3s;
        font-size: 20px;
    }

        .add-address-modal .modal-header .close-btn:hover {
            opacity: 1;
            transform: rotate(90deg);
        }

.add-address-modal .modal-body {
    padding: 0;
}

.add-address-modal .form-row {
    margin-bottom: 16px;
}

.add-address-modal .form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

    .add-address-modal .form-label .text-danger {
        color: #e03a3a;
    }

.add-address-modal .form-control,
.add-address-modal .form-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: 0.3s;
    background: #fff;
}

    .add-address-modal .form-control:focus,
    .add-address-modal .form-select:focus {
        border-color: #00a99d;
        box-shadow: 0 0 0 3px rgba(0, 169, 157, 0.15);
        outline: none;
    }

    .add-address-modal .form-control::placeholder {
        color: #aaa;
    }

.add-address-modal .submit-btn {
    width: 100%;
    background: #265a48;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 10px;
}

    .add-address-modal .submit-btn:hover {
        background: #1a3f32;
    }

    .add-address-modal .submit-btn:disabled {
        background: #ccc;
        cursor: not-allowed;
    }

/* ===== نمایش آدرس ثبت شده ===== */
.address-display .address-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .address-display .address-info .address-line {
        font-size: 14px;
        color: #333;
    }

        .address-display .address-info .address-line .label {
            color: #0284c7;
            font-size: 18px;
        }

        .address-display .address-info .address-line .value {
            /*font-weight: 400;*/
            color: #1a1a2e;
        }

        .address-display .address-info .address-line .phone {
            color: #666;
            font-size: 13px;
        }

            .address-display .address-info .address-line .phone i {
                color: #00a99d;
            }

        .address-display .address-info .address-line .badge-default {
            background: #e8f5e9;
            color: #2e7d32;
            font-size: 11px;
            padding: 2px 10px;
            border-radius: 12px;
            font-weight: 500;
        }

            .address-display .address-info .address-line .badge-default i {
                font-size: 10px;
            }



/* ===== استایل‌های اختصاصی سبد خرید ===== */
.cart-item {
    border: 1px solid #e4e4e7;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: 0.3s;
    flex-wrap: wrap;
}

.cart-item:hover {
    border-color: #00a99d;
}

.cart-item .item-image {
    width: 180px;
    height: 180px;
    border-radius: 10px;
    border: 1px solid #f0f2f5;
    overflow: hidden;
    flex-shrink: 0;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .cart-item .item-image img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        padding: 6px;
    }

.cart-item .item-info {
    flex: 1;
    min-width: 0;
    max-width:150px;
    display: flex;
    flex-direction: column;
    gap: 4px;

}

    .cart-item .item-info .title {
        font-size: 15px;
        font-weight: 600;
        color: #1a1a2e;
        line-height: 1.4;
        white-space: normal;
    }

    .cart-item .item-info .variant {
        font-size: 13px;
        color: #888;
    }

    .cart-item .item-info .price-row {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
    }

        .cart-item .item-info .price-row .final-price {
            font-size: 16px;
            font-weight: 700;
            color: #1a1a2e;
        }

        .cart-item .item-info .price-row .original-price {
            font-size: 13px;
            color: #aaa;
            text-decoration: line-through;
        }

        .cart-item .item-info .price-row .discount-badge {
            background: #e03a3a;
            color: #fff;
            font-size: 12px;
            padding: 1px 12px;
            border-radius: 20px;
            font-weight: 600;
        }

.cart-item .item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

    .cart-item .item-actions .btn-quantity {
        width: 32px;
        height: 32px;
        border-radius: 8px;
        border: 1px solid #e2e8f0;
        background: #fff;
        color: #333;
        font-size: 16px;
        cursor: pointer;
        transition: 0.3s;
        display: flex;
        align-items: center;
        justify-content: center;
    }

        .cart-item .item-actions .btn-quantity:hover {
            border-color: #00a99d;
            background: #f8fdfc;
        }

    .cart-item .item-actions .quantity-input {
        width: 50px;
        text-align: center;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        padding: 6px 8px;
        font-size: 14px;
        height: 32px;
    }

        .cart-item .item-actions .quantity-input:focus {
            border-color: #00a99d;
            box-shadow: 0 0 0 3px rgba(0, 169, 157, 0.15);
            outline: none;
        }

    .cart-item .item-actions .btn-remove {
        border: none;
        background: none;
        color: #e03a3a;
        font-size: 18px;
        cursor: pointer;
        transition: 0.3s;
        padding: 4px 8px;
    }

        .cart-item .item-actions .btn-remove:hover {
            color: #c0392b;
            transform: scale(1.1);
        }



/* ===== سبد خرید خالی ===== */
.empty-cart {
    text-align: center;
    padding: 80px 20px;
}

    .empty-cart i {
        font-size: 80px;
        color: #ddd;
        margin-bottom: 20px;
    }

    .empty-cart h5 {
        font-weight: 700;
        color: #1a1a2e;
        margin-bottom: 8px;
    }

    .empty-cart p {
        color: #888;
        margin-bottom: 20px;
    }

    .empty-cart .btn-shop {
        background: #265a48;
        color: #fff;
        border: none;
        border-radius: 10px;
        padding: 12px 30px;
        font-weight: 600;
        transition: 0.3s;
        text-decoration: none;
        display: inline-block;
    }

        .empty-cart .btn-shop:hover {
            background: #1a3f32;
            color: #fff;
        }

/* ===== ریسپانسیو ===== */
@@media (max-width: 768px) {
    .cart-item {
        flex-wrap: wrap;
    }

        .cart-item .item-image {
            width: 60px;
            height: 60px;
        }

        .cart-item .item-actions {
            width: 100%;
            justify-content: flex-end;
            padding-top: 12px;
            border-top: 1px solid #f0f2f5;
        }
}

/* ===== استایل روش‌های پرداخت ===== */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 2px solid #e4e4e7;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;
    background: #fff;
}

    .payment-option:hover {
        border-color: #148d7f;
        background: #f8fdfc;
    }

    .payment-option.selected {
        border-color: #148d7f;
        background: #f0faf8;
    }

    .payment-option .radio-circle {
        width: 20px;
        height: 20px;
        border-radius: 50%;
        border: 2px solid #d0d5dd;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: 0.3s;
    }

    .payment-option.selected .radio-circle {
        border-color: #148d7f;
    }

        .payment-option.selected .radio-circle::after {
            content: '';
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: #148d7f;
        }

    .payment-option .info {
        flex: 1;
    }

        .payment-option .info .title {
            font-size: 15px;
            font-weight: 600;
            color: #1a1a2e;
        }

        .payment-option .info .desc {
            font-size: 13px;
            color: #666;
            margin-top: 2px;
        }

    .payment-option .payment-icon {
        flex-shrink: 0;
    }