:root {
    --clr-btn: #2E1065;
    --clr-pink: #EC1D5C;
    --clr-text: #1F1330;
    --clr-muted: #8B8593;
    --clr-line: #ECECEC;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
}

.cw-wrap {
    max-width: 1500px;
    margin: 0 auto;
    padding: 28px 0 70px;
}

.cw-topbar {
    display: flex;
    gap: 25px;
    align-items: center;
    margin-bottom: 22px;
}

.cw-topbar__title {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.cw-topbar__count {
    font-size: 16px;
    font-weight: 400;
    color: #000000;
}


.cw-row {
    display: grid;
    grid-template-columns: 9fr 3fr;
    gap: 24px;
    align-items: start;
}

.cw-col-3,
.cw-col-9 {
    min-width: 0;
}

/* ---------- col-3: bill ---------- */
.cw-bill {
    border: 1px solid var(--clr-line);
    border-radius: 12px;
    padding: 22px;
    background: #fff;
}

.cw-bill__heading {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 16px;

}

.cw-bill__line {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    padding: 10px 0;
}

.cw-bill__line:last-of-type {
    border-bottom: none;
}

.cw-bill__line-label {
    color: #000000;
    font-size: 16px;
    font-weight: 400;
}

.cw-bill__line-value {
    font-weight: 700;
    font-size: 16px;
    color: #000000;

}

.cw-bill__line--off .cw-bill__line-value {
    color: #FF025A;
}

.cw-bill__line--sum .cw-bill__line-value {
    font-weight: 800;
}

.cw-bill__cta {
    width: 100%;
    margin-top: 16px;
    background: #0F0A95;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 0;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.cw-bill__cta:hover {
    opacity: .92;
}

/* ---------- col-9: item cards ---------- */
.cw-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cw-item {
    display: flex;
    align-items: stretch;
    height: 291px;
    border: 1px solid var(--clr-line);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    padding: 15px;
}

.cw-item-title {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: right;
    padding: 26px 30px;
    gap: 58px;
    min-width: 0;
}


.cw-item-title__top {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cw-item__name {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    line-height: 1.5;
}

.cw-item__code {
    font-size: 15px;
    font-weight: 400;
    color: #73737A;
    margin: 0;
}

.cw-item-title__perks {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-left: auto;
    margin-right: 0;
}

.cw-item__perk {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: #464646;
}

.cw-item__perk-icon {
    font-size: 14px;
}


.cw-item-info__row {
    flex: 0 0 auto;
    display: flex;
    align-items: stretch;
}

.cw-item-info__center {
    flex: 0 0 380px;
    width: 380px;
    display: flex;
    align-items: flex-end;
}

.cw-item-info__mid {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 14px;
    padding: 15px 16px;
    border: 1px solid #F0F0F0;
    border-radius: 10px;
    box-sizing: border-box;
}

.cw-item__prices {
    width: 100%;
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: nowrap;
}


.cw-item__price-now {
    font-size: 18px;
    font-weight: 700;
    white-space: nowrap;
}

.cw-item__price-old {
    font-size: 14px;
    color: #AFAFAF;
    text-decoration: line-through;
    white-space: nowrap;
    font-weight: 400;
}

.cw-item__badge {
    background: #FF025A;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    padding: 1px 10px;
    flex-shrink: 0;
}

.cw-item__options {
    display: flex;
    align-items: center;
    gap: 49px;
    width: 100%;
    justify-content: flex-end;
    flex-direction: row-reverse;
}

.cw-item__qty {
    display: flex;
    align-items: center;
    gap: 27px;
}

.cw-item__btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid #F8F8F8;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--clr-text);
    font-size: 14px;
    box-shadow: 0px 4px 4px 0px #00000040;

}

.cw-item__qty-num {
    width: 16px;
    text-align: center;
    font-size: 20.89px;
    font-weight: 700;
}

.cw-item__color {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid #F0F0F0;
    flex-direction: row-reverse;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 16px;
    font-weight: 700;
    flex: 1;
}

.cw-item__color-dot {
    width: 16px;
    height: 16px;
    background: #111;
    display: inline-block;
}


.cw-item-media {
    flex: 0 0 231.76px;
    width: 258.76px;
    height: 235px;
}

.cw-item-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cw-recent {
    margin-top: 24px;
    border: 1px solid #F0F0F0;
    border-radius: 12px;
    padding: 22px 22px 22px 205px;
    position: relative;
}

.cw-recent__heading {
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 16px;
}

/* خود Swiper */
.cw-recent__slider {
    width: 100%;
    overflow: hidden;
}

.cw-recent__slider .swiper-wrapper {
    display: flex;
    align-items: stretch;
}

.cw-recent__slider .swiper-slide {
    height: auto;
    flex-shrink: 0;
    box-sizing: border-box;
}

.cw-recent-card {
    width: 100%;
    height: 100%;
    border: 1px solid var(--clr-line);
    border-radius: 10px;
    background: #fff;
    padding: 12px;
    display: flex;
    flex-direction: column;
}

.cw-recent-card__media {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    overflow: hidden;
}

.cw-recent-card__media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.cw-recent-card__name {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.8;
    margin: 0 0 12px;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cw-recent-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    flex-direction: row-reverse;
}



.cw-recent-card__price {
    font-size: 13px;
    font-weight: 700;
    color: #222;
}

.cw-recent-card__rating {
    display: flex;
    align-items: center;
    gap: 4px;
    direction: ltr;
}

.cw-recent-card__rating-value {
    font-size: 13px;
    font-weight: 600;
    color: #000;
    line-height: 1;
}

.cw-recent-card__star {
    font-size: 16px;
    color: #F5B800;
    line-height: 1;
}

.cw-recent-card__price {
    font-size: 11.5px;
    font-weight: 700;
}

.cw-recent-card__rating {
    font-size: 10.5px;
    color: #000;
    display: flex;
    align-items: center;
    gap: 3px;
}

.cart-item-mobile {
    display: none;
}

.cart-item-desktop {
    display: block;
}

.cw-bill {
    position: static;
}

.cw-bill-mobile {
    display: none;
}

.cw-recent .swiper-button-prev,
.cw-recent .swiper-button-next {
    width: 42px;
    height: 42px;

    background: transparent;

    color: #0F0A95;

    display: flex;
    align-items: center;
    justify-content: center;

    transition: all 0.2s ease;
}

.cw-recent .swiper-button-prev::after,
.cw-recent .swiper-button-next::after {
    font-size: 16px;
    font-weight: 700;
}

.cw-recent .swiper-button-prev {
    left: 8px;
}

.cw-recent .swiper-button-next {
    right: 8px;
}

@media (max-width:960px) {
    .cw-row {
        grid-template-columns: 1fr;
    }

    .cw-col-3,
    .cw-bill {
        background-color: #F8F8F8;
    }

    .cw-bill {
        border: none;
    }

    .cw-row {
        gap: 0;
    }

    .cw-bill__heading {
        margin: 16px;
    }

    .cw-topbar {
        margin-right: 15px;
        margin-bottom: 16px;
    }

    .cw-item {
        flex-direction: column;
        height: auto;
    }

    .cw-item-info__row {
        flex-direction: column;
    }

    .cw-item-info__center {
        width: 100%;
        flex-basis: auto;
    }

    .cw-item-media {
        width: 100%;
        height: 240px;
        order: -1;
    }

    .cw-item-title {
        align-items: flex-end;
    }

    .cw-row {
        grid-template-columns: 1fr;
    }

    .cw-item {
        display: grid;
        grid-template-columns: 1fr 96px;
        grid-template-areas:
            "top    media"
            "perks  media"
            "color  color"
            "qty   prices";
        column-gap: 14px;
        row-gap: 10px;
        height: auto;
        padding: 20px;
        text-align: right;
        border-radius: 0;
    }


    .cw-item-title,
    .cw-item-info__row,
    .cw-item-info__center,
    .cw-item-info__mid,
    .cw-item__options {
        display: contents;
    }

    .cw-item-media {
        grid-area: media;
        width: 100%;
        height: 100%;
        min-height: 100px;
        border-radius: 14px;
        overflow: hidden;
    }

    .cw-item-media img {
        border-radius: 14px;
    }

    .cw-item-title__top {
        grid-area: top;
        align-items: flex-start;
        gap: 4px;
    }

    .cw-item__name {
        font-size: 14px;
        line-height: 1.4;
    }

    .cw-item__code {
        font-size: 11px;
    }

    .cw-item-title__perks {
        grid-area: perks;
        gap: 8px;
        margin: 0;
        align-items: flex-start;
    }

    .cw-item__perk {
        font-size: 11px;
        gap: 5px;
    }

    .cw-item__perk-icon svg {
        width: 16px;
        height: 16px;
    }

    .cw-item__color {
        grid-area: color;
        width: 30%;
        font-size: 14px;
        padding: 5px 12px;
        justify-self: end;
    }

    .cw-item__qty {
        grid-area: qty;
        gap: 37px;
        align-self: center;
    }

    .cw-item__btn {
        width: 30px;
        height: 30px;
    }

    .cw-item__qty-num {
        font-size: 16px;
    }

    .cw-item__prices {
        grid-area: prices;
        flex-direction: column;
        align-items: flex-end;
        gap: 4px;
        justify-self: end;
    }

    .cw-item__price-now {
        font-size: 16px;
        font-weight: 700;
    }

    .cw-item__price-old {
        font-size: 12px;
        font-weight: 400;
    }

    .cw-item__badge {
        align-self: flex-end;
        margin-top: 4px;
        font-size: 12px;
    }

    .cw-item-info__center,
    .cw-item-info__row {
        display: contents;
    }

    .cw-items {
        display: flex;
        flex-direction: column;
        gap: 0;
    }


    .cw-bill__top {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 14px;
    }

    .cw-bill__top .cw-bill__line {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .cw-bill__sticky {
        position: fixed;
        left: 16px;
        right: 16px;
        bottom: 16px;
        z-index: 1000;

        height: 64px;
        background: #11099d;
        border-radius: 14px;
        display: flex;
        align-items: center;
        direction: rtl;
        overflow: hidden;
        box-shadow: 0 6px 18px rgba(17, 9, 157, 0.18);
    }

    .cw-bill__cta {
        flex: 1;
        height: 100%;
        border: 0;
        background: transparent;
        color: #fff;
        font-size: 18px;
        font-weight: 700;
        cursor: pointer;
    }

    .cw-bill__divider {
        width: 1px;
        height: 28px;
        background: rgba(255, 255, 255, 0.7);
        flex: 0 0 1px;
    }

    .cw-bill__sum-mobile {
        flex: 1;
        color: #fff;
        font-size: 16px;
        font-weight: 700;
        text-align: center;
        white-space: nowrap;
    }

    .cw-bill__cta {
        display: none;
    }

    .cw-bill-mobile {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;

        width: 100%;
        height: 83px;

        z-index: 99999;

        display: flex;
        align-items: center;
        justify-content: center;
        gap: 14px;

        background: #fff;
        border-top: 1px solid #eee;
        box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.08);
    }

    .cw-bill-mobile__inner {
        width: calc(100% - 35px);
        margin: 0 auto;

        background: #0F0A95;
        border-radius: 10px;
        padding: 12px 16px;

        display: flex;
        align-items: center;
        justify-content: center;
        gap: 58px;
    }

    .cw-bill-mobile__price {
        font-size: 16px;
        font-weight: 700;
        color: #FFFFFF;
        direction: rtl;
    }

    .cw-bill-mobile__divider {
        font-size: 18px;
        color: #999;
    }

    .cw-bill-mobile__cta {
        border: 0;
        background: transparent;
        padding: 0;
        margin: 0;

        font-family: inherit;
        font-size: 18px;
        font-weight: 700;
        color: #FFFFFF;

        cursor: pointer;
    }

    .cw-bill {
    padding:10px 22px;
     width: 100%;
}

.cw-recent {
    margin-top: 24px;
    border: 1px solid #F0F0F0;
    border-radius: 12px;
    padding: 22px !important;
    position: relative;
}

.cw-recent-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 10px;
}

.cw-recent-card__price {
    font-size: 13px;
    font-weight: 700;
    color: #222;
}

.cw-recent-card__rating {
    display: flex;
    align-items: center;
    gap: 4px;
    direction: ltr;
}

.cw-recent-card__rating-value {
    font-size: 13px;
    font-weight: 600;
    color: #555;
}

.cw-recent-card__star {
    font-size: 16px;
    color: #F5B800;
    line-height: 1;
}
}

body.basket-page--empty {
    background-color: #F8F9FC;
}

.cw-wrap--empty .cw-row {
    grid-template-columns: 1fr;
}

.cw-wrap--empty .cw-col-9 {
    width: 100%;
}

.empty-basket {
    width: 100%;
    max-width: 850px;
    margin: 48px auto 0;
    background-color: #FFFFFF;
    border: 1px solid #E0E0E0;
    border-radius: 12px;
}

    .empty-basket .card-body {
        min-height: 680px;
        padding: 48px 24px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

.empty-basket__image {
    width: 240px;
    height: 240px;
    flex-shrink: 0;
    margin-bottom: 35px;
}

.empty-basket__title {
    color: #0F0A95;
    font-size: 32px;
    line-height: 1.6;
}

.empty-basket__description {
    max-width: 850px;
    margin-top: 28px;
    color: #77777F;
    font-size: 18px;
    line-height: 2;
}

.empty-basket__button {
    direction:ltr;
    width: 348px;
    max-width: 100%;
    height: 52px;
    min-height: 52px;
    margin-top: 32px;
    padding: 0 20px;
    background-color: #FF025A;
    border: 1px solid #FF025A;
    border-radius: 10px;
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 700;
    transition: 0.2s ease-in-out;
}

    .empty-basket__button:hover,
    .empty-basket__button:focus,
    .empty-basket__button:active {
        background-color: #E90050 !important;
        border-color: #E90050 !important;
        color: #FFFFFF !important;
    }
/*mobile*/
@media (max-width: 960px) {

    body.basket-page--empty {
        background-color: #FFFFFF;
    }

    .cw-wrap--empty {
        padding-bottom: 0;
    }

        .cw-wrap--empty .cw-row {
            grid-template-columns: 1fr;
        }

    .empty-basket {
        width: 100%;
        max-width: none;
        margin: 0 auto;
        background-color: #FFFFFF;
        border: none;
        border-radius: 0;
    }

        .empty-basket .card-body {
            min-height: calc(100dvh - 180px);
            padding: 32px 16px 48px;
            justify-content: center;
        }

    .empty-basket__image {
        width: 200px;
        height: 200px;
        margin-bottom: 30px;
    }

    .empty-basket__title {
        font-size: 18px;
        line-height: 1.6;
    }

    .empty-basket__description {
        max-width: 500px;
        margin-top: 22px;
        font-size: 12px;
        line-height: 2;
    }

    .empty-basket__button {
        width: 348px;
        max-width: calc(100vw - 32px);
        height: 46px;
        min-height: 46px;
        margin-top: 32px;
        padding: 0 16px;
        border-radius: 10px;
        font-size: 12px;
    }

        .empty-basket__button svg {
            width: 24px;
            height: 24px;
        }

    .cw-topbar__title {
        font-size: 16px;
        font-weight: 700;
        margin: 0;
    }

    .cw-wrap {
        max-width: 1500px;
        margin: 0 auto;
        padding: 19px 0 70px;
    }
}