.cart-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 27, 35, 0.58);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

.cart-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-modal {
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
    transform: translateY(25px) scale(0.97);
    transition: all 0.3s ease;
    direction: rtl;
    display: flex;
    flex-direction: column;
}

.cart-modal-overlay.active .cart-modal {
    transform: translateY(0) scale(1);
}

.cart-modal-header {
    padding: 20px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #edf1f3;
    background: #ffffff;
}

.cart-modal-title {
    display: flex;
    align-items: center;
    gap: 13px;
}

.cart-modal-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #3d606a, #284952);
    color: #ffffff;
    font-size: 21px;
    box-shadow: 0 8px 20px rgba(61, 96, 106, 0.22);
}

.cart-modal-title h3 {
    margin: 0;
    color: #24363d;
    font-size: 18px;
    font-weight: 800;
}

.cart-modal-title span {
    display: block;
    margin-top: 4px;
    color: #8a9aa1;
    font-size: 12px;
}

.cart-modal-close {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 12px;
    background: #f3f6f7;
    color: #64767d;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cart-modal-close:hover {
    background: #e8edef;
    color: #263940;
    transform: rotate(90deg);
}

.cart-modal-body {
    padding: 18px;
    overflow-y: auto;
    min-height: 180px;
    max-height: 55vh;
}

.cart-modal-body::-webkit-scrollbar {
    width: 6px;
}

.cart-modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.cart-modal-body::-webkit-scrollbar-thumb {
    background: #d6e0e3;
    border-radius: 10px;
}

.cart-loading {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 13px;
    color: #819299;
    font-size: 13px;
}

.cart-spinner {
    width: 35px;
    height: 35px;
    border: 3px solid #e6edef;
    border-top-color: #3d606a;
    border-radius: 50%;
    animation: cartSpinner 0.8s linear infinite;
}

@keyframes cartSpinner {
    to {
        transform: rotate(360deg);
    }
}

.cart-empty {
    min-height: 270px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.cart-empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    background: #f1f5f6;
    color: #9aabb1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    margin-bottom: 16px;
}

.cart-empty h4 {
    margin: 0 0 7px;
    color: #30434a;
    font-size: 17px;
    font-weight: 800;
}

.cart-empty p {
    margin: 0;
    color: #94a2a7;
    font-size: 13px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px;
    background: #f9fbfb;
    border: 1px solid #edf2f3;
    border-radius: 17px;
    margin-bottom: 11px;
    transition: all 0.2s ease;
}

.cart-item:hover {
    border-color: #dce6e9;
    background: #ffffff;
    box-shadow: 0 7px 22px rgba(38, 61, 69, 0.06);
}

.cart-item:last-child {
    margin-bottom: 0;
}

.cart-item-icon {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 15px;
    background: #edf3f4;
    color: #3d606a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 23px;
}

.cart-item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.cart-item-title {
    font-size: 14px;
    color: #263f47;
    font-weight: 800;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cart-item-variants {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px 13px;
    margin-bottom: 9px;
}

.cart-item-variant {
    display: inline-flex;
    align-items: center;
    padding: 0;
    background: transparent;
    color: #7b8c92;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.7;
    white-space: nowrap;
}

.cart-item-variant::before {
    content: "";
    width: 4px;
    height: 4px;
    min-width: 4px;
    border-radius: 50%;
    background: #aab9bd;
    margin-left: 5px;
}

.cart-item-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    color: #89979c;
    font-size: 11px;
}

.cart-item-price strong {
    color: #314f58;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: -0.2px;
}

.cart-item-price span {
    color: #89979c;
    font-size: 10px;
    font-weight: 600;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-shrink: 0;
}

.cart-quantity {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #dfe7e9;
    border-radius: 12px;
    overflow: hidden;
}

.cart-quantity button {
    width: 30px;
    height: 32px;
    border: 0;
    background: transparent;
    color: #4a646d;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cart-quantity button:hover {
    background: #edf3f4;
    color: #263f47;
}

.cart-quantity span {
    min-width: 28px;
    text-align: center;
    color: #33484f;
    font-size: 13px;
    font-weight: 800;
}

.cart-delete {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 10px;
    background: #fff1f1;
    color: #c66a6a;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cart-delete:hover {
    background: #ffe1e1;
    color: #ad4141;
}

.cart-modal-footer {
    border-top: 1px solid #edf1f3;
    padding: 18px 20px;
    background: #ffffff;
}

.cart-summary {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.cart-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #71838a;
    font-size: 13px;
}

.cart-summary-row strong {
    color: #3c525a;
    font-size: 14px;
}

.cart-summary-row.final {
    padding-top: 11px;
    border-top: 1px dashed #dce4e6;
    color: #344b53;
}

.cart-summary-row.final strong {
    color: #274e59;
    font-size: 19px;
    font-weight: 900;
}

.cart-summary-currency {
    font-size: 11px;
    color: #829399;
    margin-right: 3px;
}

.cart-checkout-button {
    width: 100%;
    height: 49px;
    border: 0;
    border-radius: 15px;
    background: linear-gradient(145deg, #3d606a, #284952);
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    transition: all 0.2s ease;
    box-shadow: 0 9px 22px rgba(61, 96, 106, 0.18);
}

.cart-checkout-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 13px 27px rgba(61, 96, 106, 0.25);
}

.cart-clear-button {
    width: 100%;
    height: 40px;
    border: 0;
    background: transparent;
    color: #9a6b6b;
    font-size: 12px;
    cursor: pointer;
    margin-top: 5px;
}

.cart-clear-button:hover {
    color: #b34e4e;
}

@media (max-width: 576px) {

    .cart-modal-overlay {
        padding: 10px;
        align-items: flex-end;
    }

    .cart-modal {
        max-height: 92vh;
        border-radius: 23px 23px 0 0;
        max-width: 100%;
    }

    .cart-modal-body {
        max-height: 52vh;
        padding: 13px;
    }

    .cart-item {
        align-items: flex-start;
        gap: 9px;
        padding: 12px;
    }

    .cart-item-icon {
        width: 45px;
        height: 45px;
        min-width: 45px;
        font-size: 20px;
    }

    .cart-item-title {
        font-size: 13px;
        margin-bottom: 7px;
    }

    .cart-item-variants {
        gap: 3px 9px;
        margin-bottom: 7px;
    }

    .cart-item-variant {
        font-size: 10px;
    }

    .cart-item-price strong {
        font-size: 13px;
    }

    .cart-item-actions {
        gap: 5px;
    }

    .cart-quantity button {
        width: 27px;
    }

    .cart-quantity span {
        min-width: 24px;
    }

    .cart-delete {
        width: 30px;
        height: 30px;
    }
}



.cart-item {
    position: relative;
    padding: 16px;
    gap: 15px;
    background: linear-gradient(135deg, #fbfcfc 0%, #f7fafa 100%);
    border: 1px solid #e7edef;
    border-radius: 18px;
    margin-bottom: 10px;
    transition: all 0.22s ease;
}

.cart-item:hover {
    transform: translateY(-1px);
    border-color: #d5e1e4;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(38, 61, 69, 0.07);
}

.cart-item-icon {
    width: 54px;
    height: 54px;
    min-width: 54px;
    border-radius: 16px;
    background: linear-gradient(145deg, #edf4f5, #e7eff1);
    color: #3d606a;
    border: 1px solid #e0eaec;
    font-size: 22px;
    box-shadow: 0 5px 13px rgba(61, 96, 106, 0.07);
}

.cart-item-content {
    gap: 0;
}

.cart-item-title {
    color: #263f47;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.7;
    margin-bottom: 6px;
}

.cart-item-variants {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 14px;
    margin-bottom: 10px;
}

.cart-item-variant {
    color: #819197;
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.8;
}

.cart-item-variant::before {
    width: 3px;
    height: 3px;
    min-width: 3px;
    background: #b5c2c6;
    margin-left: 5px;
}

.cart-item-price {
    display: flex;
    align-items: baseline;
    gap: 5px;
    padding-top: 8px;
    border-top: 1px solid #edf1f2;
    color: #89979c;
    font-size: 10px;
}

.cart-item-price strong {
    color: #294d58;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: -0.3px;
}

.cart-item-price span {
    color: #89979c;
    font-size: 10px;
}

.cart-item-actions {
    gap: 7px;
}

.cart-quantity {
    height: 34px;
    border-radius: 11px;
    border: 1px solid #dce6e8;
    box-shadow: 0 2px 7px rgba(38, 61, 69, 0.04);
}

.cart-quantity button {
    width: 29px;
    height: 34px;
    color: #506a72;
}

.cart-quantity button:hover {
    background: #eef4f5;
}

.cart-quantity span {
    min-width: 27px;
    color: #304c55;
    font-size: 12px;
}

.cart-delete {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: #fff5f5;
    color: #c47b7b;
    border: 1px solid #f5e5e5;
}

.cart-delete:hover {
    background: #ffebeb;
    color: #ae5555;
}

@media (max-width: 576px) {

    .cart-item {
        padding: 13px;
        gap: 10px;
        border-radius: 16px;
    }

    .cart-item-icon {
        width: 46px;
        height: 46px;
        min-width: 46px;
        border-radius: 14px;
        font-size: 19px;
    }

    .cart-item-title {
        font-size: 13px;
    }

    .cart-item-variants {
        gap: 2px 9px;
    }

    .cart-item-variant {
        font-size: 10px;
    }

    .cart-item-price {
        padding-top: 6px;
    }

    .cart-item-price strong {
        font-size: 13px;
    }
}


.toastify,
.toastify.on,
[class*="toastify"] {
    position: fixed !important;
    z-index: 2147483647 !important;
}



.cart-login-wrapper {
    max-width: 460px;
    margin: 0 auto;
    padding: 30px 15px;
    text-align: center;
}

.cart-login-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 83, 252, 0.1);
    color: var(--bs-primary);
    font-size: 30px;
}

.cart-login-wrapper h4 {
    margin-bottom: 10px;
    font-weight: 700;
}

.cart-login-wrapper > p {
    margin-bottom: 25px;
    color: var(--gray);
}

.cart-login-wrapper .loginform {
    width: 100%;
}

.cart-login-wrapper .otp-inputs {
    justify-content: center;
}


