﻿/* =========================================================
                   PAGE
                ========================================================== */



.checkout-page {
    direction: rtl;
    padding:20px 0px;
}

/* =========================================================
                   CART
                ========================================================== */

.cart-wrapper-box {
    background: white;
    border-radius: 20px;
    border: 1px solid #ececec;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,.03);
}
.cart-header-with-margin{
    margin-bottom:10px !important;
}
.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 0px;
}

.cart-title-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--royal-red);
    margin-bottom: 0;
}

.cart-count {
    color: var(--silver-dark);
    font-size: 14px;
    font-weight: 500;
}



    .clear-cart-btn:hover {
        background: var(--royal-red);
        color:var(--silver);
    }

/* =========================================================
                   PRODUCT ITEM
                ========================================================== */

.cart-item {
    padding: 20px 0;
    border-bottom: 1px solid #ececec;
}

    .cart-item:last-child {
        border-bottom: 0;
        padding-bottom: 0;
    }

.product-thumb {
    width: 85px;
    border-radius: 20px;
    padding: 0px;
}

.product-title {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 10px;
}

.product-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--silver-dark);
    font-size: 12px;
    margin-bottom: 10px;
}

.meta-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--silver);
}

.gold-color {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4af37, #f8e08e);
    border: 1px solid #e5c158;
}

/* =========================================================
                   FOOTER ACTIONS
                ========================================================== */

.product-footer {
    margin-top: 0px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.quantity-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    width: 30px;
    height: 30px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: white;
    color: #111827;
    font-size: 18px;
    font-weight: 800;
    transition: .2s ease;
}

    .qty-btn:hover {
        background: #f9fafb;
    }

.qty-count {
    min-width: 24px;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
}
.btn-action {
    width:30px;
    height:30px;
    color:var(--primary);
}
    .product-price {
    font-size: 13px;
    font-weight: 600;
    color: var(--black);
}

    .item-price-toman {
        font-size: 10px;
        font-weight: 300;
        color: var(--royal-red);
        margin-right: 5px;
    }
.item-guarantee-price {
    font-size: 12px;
    font-weight: 300;
    color: dimgrey;
}
/* =========================================================
                   SIDEBAR
                ========================================================== */
.checkout-sidebar {
    background: white;
    border-radius: 24px;
    border: 1px solid #ececec;
    padding: 20px;
    position: sticky;
    top: 150px;
    box-shadow: 0 10px 30px rgba(0,0,0,.03);
}

.summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom:10px;
}

.summary-title {
    color: #6b7280;
    font-size: 14px;
}

.summary-price {
    color: var(--black);
    font-size: 15px;
    font-weight: 300;
}

.summary-total {
    padding-top: 10px;
    border-top: 1px solid #ececec;
}



    .summary-total .summary-price {
        font-size: 16px;
        color: var(--primary-dark);
        font-weight:900;
    }

/* =========================================================
                   BUTTON
                ========================================================== */

.checkout-btn {
    width: 100%;
    height: 46px;
    border: none;
    border-radius: 18px;
    margin-top: 10px;
    background: linear-gradient(135deg, #ef4444, #9333ea);
    color: white;
    font-size: 15px;
    font-weight: 800;
    transition: .25s ease;
}

    .checkout-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 14px 30px rgba(147,51,234,.18);
    }

.checkout-note {
    margin-top: 18px;
    color: var(--silver-dark);
    font-size: 12px;
    line-height: 2;
}

/* =========================================================
                   MOBILE
                ========================================================== */

@media(max-width:991px) {



    .product-footer {
        align-items: flex-start;
        flex-direction: column;
    }


}



.checkout-card {
    background: #fff;
    border: 1px solid var(--gray-border);
    border-radius: 22px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(111, 66, 193, 0.04);
}



/* address box */

.address-item {
    border: 1px solid var(--gray-border);
    border-radius: 10px;
    padding: 10px;
    transition: all .2s ease;
    background: #fff;
}

    .address-item.active {
        border: 2px solid var(--primary);
        background: linear-gradient(to left, #fcf9ff, #ffffff);
    }

.address-title {
    font-size: .9rem;
    color: var(--gray-muted);
    margin-bottom: .35rem;
}

.address-item.active .address-title {
    color: var(--danger-soft);
    font-weight: 700;
}

.address-text {
    font-size: .95rem;
    color: #3d3d45;
    line-height: 1.9;
}

.address-action {
    color: var(--primary);
    text-decoration: none;
    font-weight: 300;
    font-size:13px;
    white-space: nowrap;
}

    .address-action:hover {
        color: var(--danger-soft);
    }

/* days */

.delivery-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
}

.day-box {
    border: 1px solid #f0f0f4;
    border-radius: 18px;
    padding: 1rem .5rem;
    text-align: center;
    background: #fff;
    transition: all .2s ease;
    cursor: pointer;
}

    .day-box:hover,
    .day-box.active {
        border-color: var(--primary);
        background: var(--primary-light);
    }

.day-name {
    font-size: 1rem;
    font-weight: 700;
    color: #34343c;
    margin-bottom: .75rem;
}

.day-date {
    display: flex;
    align-items: end;
    justify-content: center;
    gap: 4px;
    margin-bottom: .75rem;
}

    .day-date strong {
        font-size: 1.8rem;
        line-height: 1;
        color: #212529;
    }

    .day-date span {
        color: var(--gray-muted);
        font-size: .9rem;
        margin-bottom: 3px;
    }

.day-price {
    color: var(--danger-soft);
    font-size: .9rem;
    font-weight: 700;
}

/* time list */

.time-wrapper {
    margin-top: 1.5rem;
    background: var(--primary-light);
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--silver);
}

.time-item {
    padding: 1rem 1.25rem;
}

    .time-item + .time-item {
        border-top: 1px solid var(--silver);
    }

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-check-label {
    width: 100%;
    cursor: pointer;
    font-weight: 500;
    color: #444;
}

.free-shipping {
    display: inline-block;
    margin-top: 1.25rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
}

    .free-shipping:hover {
        color: var(--danger-soft);
    }




@media(max-width: 992px) {
    .delivery-days {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media(max-width: 576px) {
    .delivery-days {
        grid-template-columns: repeat(2, 1fr);
    }

    .checkout-card {
        padding: 1rem;
    }
}


.new-address-link {
    text-decoration: none;
    font-weight: 300;
    transition: .2s ease;
    background-color: var(--silver);
    border-radius:20px;
    color: var(--black);
    padding:2px 10px;
}

    .new-address-link:hover {
        background-color: var(--royal-red);
        color: var(--silver);
    }


.day-box {
    border: none;
    background: white;
}

    .day-box.disabled {
        opacity: 0.5;
        cursor: not-allowed;
        pointer-events: none;
    }



/* =========================================================
                           FOOTER ACTIONS
                        ========================================================== */



.checkout-card {
    background: #fff;
    border: 1px solid var(--gray-border);
    border-radius: 22px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(111, 66, 193, 0.04);
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2f2f35;
    margin-bottom: .4rem;
}

.section-muted {
    color: var(--gray-muted);
    font-size: .92rem;
    line-height: 1.9;
}

/* payment methods */

.payment-method {
    border: 1px solid var(--gray-border);
    border-radius: 18px;
    padding: 1rem 1.25rem;
    transition: all .2s ease;
    cursor: pointer;
    background: #fff;
}

    .payment-method.active {
        border: 2px solid var(--primary);
        background: linear-gradient(to left, #fcf9ff, #ffffff);
    }

    .payment-method + .payment-method {
        margin-top: 1rem;
    }

.payment-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.payment-title {
    font-weight: 700;
    color: #30303a;
    margin-bottom: .2rem;
}

.payment-desc {
    color: var(--gray-muted);
    font-size: .9rem;
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* discount */

.discount-toggle-btn {
    border: none;
    background: transparent;
    color: var(--primary);
    font-weight: 500;
    transition: .2s;
}

    .discount-toggle-btn:hover {
        color: var(--danger-soft);
    }

.discount-box {
    margin-top: 1rem;
    display: none;
}

    .discount-box.show {
        display: block;
    }

.discount-input-wrapper {
    position: relative;
}

.discount-input {
    height: 56px;
    border-radius: 16px;
    border: 1px solid var(--gray-border);
    padding-right: 1rem;
    padding-left: 90px;
    background: #fff;
}

    .discount-input:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 .15rem rgba(111, 66, 193, .08);
    }

.discount-submit, .discount-remove {
    position: absolute;
    top: 7px;
    left: 7px;
    height: 42px;
    border: none;
    border-radius: 12px;
    padding: 0 1.1rem;
    background: var(--danger-soft);
    color: #fff;
    font-weight: 700;
}

/* order summary */

.summary-header {
    border-bottom: 1px solid #f1f1f4;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.shipping-time {
    font-weight: 500;
    color: #30303a;
}

.collapse-btn {
    border: none;
    background: transparent;
    color: var(--primary);
    font-weight: 500;
}

.parcel-details {
    background: white;
    border-radius: 16px;
    padding: 1rem;
    color: var(--gray-muted);
    line-height: 1.9;
    border: 1px dashed #e7dcff;
}

/* note */

.note-box {
    background: #fafafa;
    border: 1px dashed #d9d9e3;
    border-radius: 18px;
    padding: 1rem 1.25rem;
    color: var(--gray-muted);
    line-height: 2;
}



@media(max-width: 768px) {
    .payment-method {
        padding: 1rem;
    }
}
/* wallet */

.wallet-balance {
    background: var(--primary-light);
    color: var(--primary);
    padding: .6rem 1rem;
    border-radius: 14px;
    font-size: .92rem;
    font-weight: 600;
}

    .wallet-balance span {
        font-weight: 500;
        margin-right: .3rem;
    }

.wallet-box {
    background: linear-gradient(to left, #fff8fc, #ffffff);
    border: 1px solid #f5d7e6;
    border-radius: 18px;
    padding: 1rem 1.25rem;
}

.wallet-label {
    color: #444;
    font-weight: 500;
    cursor: pointer;
    line-height: 1.9;
}