.cart-page,
.page-wishlist {
    padding: 60px 0;
}

p {
    margin-bottom: 0;
}

.cart__title {
    color: var(--Black, #16170C);
    font-size: 44px;
    font-style: normal;
    font-weight: 600;
    line-height: 100%;
    /* 44px */
    letter-spacing: -0.88px;
}

.cart__warpper {
    margin-top: 40px;
    display: flex;
    gap: 32px;
}

.cart-item-img {
    display: block;
    width: 187px;
    height: 187px;
    flex-shrink: 0;
}

.cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

.cart__items {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cart-item {
    display: flex;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #DDD;
}

.cart-item-wrapper {
    width: 100%;
    display: flex;
    gap: 32px;
}

.cart-item-content {
    width: 100%;
}

.cart-item-min-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.cart-item-min-wrapper .product-info__quantity {
    height: fit-content;
}

.product-info__quantity {
    margin-left: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-qty-btn {
    display: flex;
    width: 56px;
    height: 56px;
    justify-content: center;
    align-items: center;
    border-radius: 16px;
    background: #93764C;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.product-qty-btn svg path {
    transition: all 0.3s;
    stroke: #FFFFFF !important;
    fill: #FFFFFF !important;
}

.product-qty-btn:hover {
    background: #685236;
}

.cart-total {
    white-space: nowrap;
}

.cart-item-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 32px 32px 32px 0;
}

.cart-item-titles {
    max-width: 340px;
    width: 100%;
    flex-shrink: 0;
}

.cart-item-title {
    color: var(--Black, #0D0D0D);
    font-size: 24px;
    font-style: normal;
    font-weight: 400;
    line-height: 120%;
    letter-spacing: -0.24px;
}

.cart-item-attr-name {
    color: #5B595A;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 140%;
    /* 19.6px */
}

.cart-item-price {
    display: flex;
    gap: 5px;
    color: var(--Primary100, #93764c);
    font-size: 24px;
    font-style: normal;
    font-weight: 700;
    line-height: 120%;
    letter-spacing: -0.24px;
}

.cart-item-price-old {
    display: flex;
    gap: 4px;
    color: #626262;
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: 120%;
    text-decoration: line-through;
    /* 19.2px */
}

.cart-delete-item {
    width: fit-content;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: rgba(0, 0, 0, 0);
}

.cart-delete-item p {
    color: var(--Black, #0D0D0D);
    text-align: center;
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 125%;
    /* 20px */
}

.cart__order {
    width: 406px;
    flex-shrink: 0;
    padding: 32px 20px;
    border-radius: 20px;
    background: white;
}

.qty-value {
    color: var(--Black, #16170C);
    text-align: center;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 136%;
    /* 21.76px */
    letter-spacing: -0.16px;
}

.cart__order-title {
    color: var(--Black, #16170C);
    font-size: 24px;
    font-style: normal;
    font-weight: 600;
    line-height: 100%;
    /* 24px */
    letter-spacing: -0.48px;
}

.cart__order-subtotals {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
}

.cart__order-subtotals-name {
    color: var(--Grey60, #626262);
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 140%;
}

.cart__order-subtotals-num {
    color: var(--Grey80, #313131);
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: 120%;
    /* 19.2px */
}

.cart__order-discount {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.cart__order-total {
    margin-top: 16px;
}

.order-line {
    display: block;
    width: 100%;
    height: 1px;
    background: #DDD;
    margin: 24px 0;
}

.order-form-title {
    color: var(--Grey80, #313131);
    font-size: 24px;
    font-style: normal;
    font-weight: 700;
    line-height: 120%;
    /* 28.8px */
    letter-spacing: -0.24px;
}

.order-form-wrapepr {
    margin-top: 24px;
}

.order-form-subtitle {
    color: var(--Grey80, #313131);
    font-size: 18px;
    font-style: normal;
    font-weight: 700;
    line-height: 120%;
    letter-spacing: -0.18px;
    margin-bottom: 16px;
}

.order-form-input-wrapp {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.order-form-input {
    padding: 16px;
    width: 100%;
    border-radius: 12px;
    background: var(--White, #FFF);
    outline: none;
    border: 1px solid #626262;
    color: var(--Grey60, #626262);
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 140%;
    /* 22.4px */
}

.order-input-address {
    display: none;
}
.order-input-address.selected {
    display: block;
}

.order-form-textarea {
    font-family: Inter;
    padding: 16px;
    width: 100%;
    height: 124px;
    border-radius: 12px;
    background: var(--White, #FFF);
    outline: none;
    border: 1px solid #626262;
    color: var(--Grey60, #626262);
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 140%;
    resize: none;
}

.order-form-input:focus, .order-form-textarea:focus {
    border-color: #93764c;
}

.order-form-input::placeholder, .order-form-textarea::placeholder {
    font-family: Inter;
    color: var(--Grey60, #626262);
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 140%;
}



.order-form-cityes {
    display: flex;
    gap: 8px;
    justify-content: space-between;
    margin-bottom: 8px;
}

.order-form-city {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #626262;
    background: var(--White, #FFF);
    color: var(--Grey80, #313131);
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 140%;
    cursor: pointer;
    transition: all 0.3s;
}

.order-form-icons {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.order-form-delirery-ckech {
    display: block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #F2F2F2;
    transition: all 0.3s;
}

.order-form-city_active .order-form-delirery-ckech {
    background: var(--Golden, #93764c);
}

.order-form-city_active, .order-form-city:hover {
    color: #685236;
    border-color: #685236;
}

.order-form-city_active svg path, .order-form-city:hover svg path {
    fill: #685236;
}

.order-form-city:hover .order-form-delirery-ckech {
    background: var(--Golden, #685236);
}

.order-pickup-list-wrapper {
    background: white;
    border-radius: 8px;
    position: relative;
}

.order-pickup-lists {
    display: none;
    position: absolute;
    top: 100%;
    z-index: 5;
    background: white;
    border-radius: 8px;
}

.order-pickup-lists_active {
    display: block;
}

.order-pickup-li {
    padding: 16px;
    cursor: pointer;
    color: var(--Black, #16170C);
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 100%;
    letter-spacing: -0.32px;
}

.order-pickup-list-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    cursor: pointer;
}

.order-pickup-list-name {
    color: var(--Black, #16170C);
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 100%;
    /* 16px */
    letter-spacing: -0.32px;
}

.order-form-submit {
    width: 100%;
    border: none;
    cursor: pointer;
    padding: 16px 24px;
    margin-top: 24px;
    border-radius: 16px;
    background: #93764c;
    color: var(--White, #FFF);
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 125%;
    /* 20px */
    letter-spacing: -0.16px;
    transition: all 0.3s;
    /* 20px */
}

.order-form-present {
    padding: 16px;
    background: white;
    border-radius: 12px;
    width: 100%;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
}

.order-form-present-title {
    margin-top: 8px;
    color: var(--Grey80, #313131);
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 140%;
    /* 22.4px */
}

.order-form-present-ckeckbox {
    position: absolute;
    z-index: -1;
    opacity: 0;
}

.order-form-present-ckeckbox-custom {
    display: block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid #5B595A;

}

.order-form-present-ckeckbox:checked+.order-form-present-ckeckbox-custom {
    background: #5B595A;
}

.order-ckeck-label {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    border-radius: 4px;
    background: #FFF;
    cursor: pointer;
    border: 1px solid #93764c;
}

.order-ckeck-label span {
    display: block;
    height: 10px;
    width: 6px;
    border-bottom: 2px solid#FFF;
    border-right: 2px solid#FFF;
    transform: rotate(45deg);
    margin-bottom: 4px;
}

#order-ckeck:checked+.order-ckeck-label {
    background: #93764c;
}

.order-form-ckeckbox-wrapper {
    display: flex;
    gap: 10px;
    position: relative;
}

#order-ckeck {
    position: absolute;
    z-index: -1;
    opacity: 0;
}

.order-politic {
    color: var(--Grey60, #626262);
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    line-height: 150%;
}

.order-politic a {
    color: var(--Grey60, #626262);
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    line-height: 150%;
    text-decoration: underline;
}

.order-form-payment-wrapper {
    margin-top: 16px;
    display: flex;
    gap: 8px;
    flex-direction: column;
}

.order-form-payment {
    padding: 16px;
    background: white;
    cursor: pointer;
    border-radius: 12px;
    border: 1px solid #626262;
}

.order-form-payment-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-form-payment-check {
    display: block;
    width: 16px;
    height: 16px;
    border-radius: 64px;
    background: #F2F2F2;
    border-radius: 50%;
    transition: all 0.3s;
}

.order-form-payment_active .order-form-payment-check {
    background: #93764c;
}

.order-form-payment_active, .order-form-payment:hover {
    border-color: #685236;

}

.order-form-payment_active .order-form-payment-name, .order-form-payment:hover .order-form-payment-name {
    color: #685236;
}

.order-form-payment_active svg path, .order-form-payment:hover svg path {
    fill: #685236;
}

.order-form-payment:hover .order-form-payment-check {
    background: #685236;
}

.order-form-payment-name {
    margin-top: 8px;
    color: #626262;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 140%;
}

.form-promo {
    position: relative;
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.form-promo .order-form-submit {
    margin-top: 0;
}

.form-promo .order-form-submit {
    padding: 16px;
}

.promo-form-submit {
    border-radius: 16px;
    background: var(--Primary5, #ECEAF6);
    color: var(--Primary100, #93764c);
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 125%;
    width: 100%;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    /* 20px */
}

.promo-form-submit:hover{
    background: #685236;
    color: white;
}

.promo-message {
    color: var(--Primary100, #93764c);
    position: absolute;
    bottom: -23px;
    left: 0;
}

.message-cart{
    position: fixed;
    opacity: 0;
    z-index: -1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
}

.message-cart_active{
    opacity: 1;
    z-index: 50;
}

.message-cart .modal__submit{
    text-align: center;
}

@media (width < 1400px) {
    .cart-item-wrapper {
        flex-direction: row;
        gap: 32px;
    }
}

@media(width < 1200px) {

    .cart-page,
    .page-wishlist {
        padding: 40px 0;
    }

    .cart__warpper {
        flex-direction: column;
    }

    .cart__title {
        margin-bottom: 0;
        color: var(--Black, #16170C);
        font-size: 32px;
        font-style: normal;
        font-weight: 600;
        line-height: 100%;
        /* 32px */
        letter-spacing: -0.64px;
    }

    .cart__order {
        width: 100%;
    }

    .cart-item-titles {
        max-width: 100%;
    }



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

    .product-info__quantity {
        margin-bottom: 0;
    }

    .cart-item-min-wrapper {
        margin-top: 20px;
        align-items: center;
        max-width: 320px;
    }

    .order-form-city {
        width: 100%;
    }

    .wishlist-item-wrapper {
        align-items: flex-start;
        justify-content: flex-start;
        gap: 0;
    }
}

@media(width < 768px) {

    .cart__title {
        font-size: 32px;
        font-style: normal;
        font-weight: 600;
        line-height: 100%;
        /* 32px */
        letter-spacing: -0.64px;
    }

    .cart__warpper {
        margin-top: 24px;
    }

    .cart-item {
        flex-direction: column;
    }

    .cart__order {
        padding: 20px;
    }

    .cart-item-img {
        width: 100%;
        height: auto;

    }

    .cart-item-img img {
        aspect-ratio: 1/1;
    }

    .cart-item-min-wrapper {
        justify-content: space-between;
        width: 100%;
        max-width: 100%;
    }

    .cart-delete-item {
        margin-top: 20px;
    }

    .order-form-cityes {}

    .order-form-city {
        text-align: center;
    }

    .cart-item-title {
        font-size: 14px;
        font-style: normal;
        font-weight: 400;
        line-height: 136%;
        /* 19.04px */
        letter-spacing: -0.14px;
    }

}
.cart-limit-message {
    display: none;
}

.cart-limit-message_active {
    display: none;
}

/* Popup ограничения количества */
.cart-stock-popup {
    position: fixed;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: -1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100vh;
    padding: 20px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cart-stock-popup_active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 1000;
}

.cart-stock-popup__content {
    width: 100%;
    max-width: 460px;
    padding: 28px;
    box-sizing: border-box;
    border-radius: 20px;
    background: #FFFFFF;
    color: #16170C;
    text-align: center;
}

.cart-stock-popup__text {
    margin: 0;
    color: #16170C;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.35;
}

.cart-stock-popup__btn {
    margin-top: 24px;
    padding: 14px 28px;
    border: none;
    border-radius: 14px;
    background: #93764C;
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.25;
    cursor: pointer;
}

@media(width < 768px) {
    .cart-stock-popup__content {
        max-width: 100%;
        padding: 24px 18px;
        border-radius: 16px;
    }

    .cart-stock-popup__text {
        font-size: 16px;
    }

    .cart-stock-popup__btn {
        width: 100%;
    }
}

/* FINAL ROLLBACK FIX: возвращаем нормальное расположение товаров */
@media (min-width: 769px) {
    .cart-item {
        display: flex !important;
        flex-direction: row !important;
        gap: 20px !important;
    }

    .cart-item-wrapper {
        width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        gap: 32px !important;
    }

    .cart-item-img {
        flex-shrink: 0 !important;
        width: 187px !important;
        height: 187px !important;
    }

    .cart-item-content {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        padding: 32px 32px 32px 0 !important;
    }
}
