.page {
    position: relative;
}

.profile__name {
    font-weight: 600;
    font-size: 19px;
    line-height: 120%;
    color: #222222;
    margin-bottom: 40px;
}

.profile__nav-wrapper > a {
    font-weight: 400;
    font-size: 14px;
}

.profile__nav-tabs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 40px;
}

input.on-focus:read-only ~ .clear-field-btn {
    display: none;
}

.profile__tabs-link,
.profile__tabs-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 17px;
    line-height: 120%;
    color: #222222;
    padding: 30px 20px;
    background: var(--gray-bg);
}

.profile__tab-content {
    position: absolute;
    width: 100%;
    min-height: 100vh;
    inset: 0;
    background: var(--white);
    padding: 15px;
    transform: translate3d(-100%, 0, 0);
    will-change: transform;
    transition: transform 0.15s ease;
}

.profile__tab-content.active {
    transform: translate3d(0, 0, 0);
}

.tab-content__title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 21px;
    line-height: 120%;
    color: #222222;
}

.tab-content__title svg {
    transform: rotate(180deg);
}

.profile__change-info {
    transition: all var(--anim);
}

.profile__change-info.button {
    width: auto;
    padding: 13.5px 45px;
}

.profile__change-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 10px;
    margin-top: 20px;
}

/* !!! */

.profile__history-list {
    display: grid;
    gap: 40px;
}

.profile__history-list-lots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(295px, 1fr));
    grid-auto-rows: auto;
    gap: 15px;
}
.item-order__lots {
    display: flex;
    flex-direction: column-reverse;
    padding: 0 8px 8px;
    border-radius: 8px;
    background: var(--gray-bg);
}

.completed-order__container .basket-item {
    width: 100%;
    display: flex;
    height: 100%;
    border-radius: 8px;
    gap: 20px;
}
/* !!! */



.profile__change-wrapper .link_blue {
    position: absolute;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--anim);
}

.profile__change-info.button + .link_blue {
    position: relative;
    opacity: 1;
    visibility: visible;
}

.profile__row-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#address {
    position: relative;
}

.basket-item {
    display: grid;
}

.basket-item__gallery {
    display: flex;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.basket-item__image img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.lots-item__image img {
    margin: 0 -8px;
    width: calc(100% + 16px);
    border-radius: 6px;
    min-height: 255px;
}

.bc_content {
    background: var(--blue-btn);
    border-radius: 12px;
    margin-bottom: 15px;
}

.bc_content .bc_block {
    display: block;
}

.bc_select {
    padding: 0;
}

.bc_block input {
    width: 100%;
}

.bc_select select {
    width: 100%;
    height: 100%;
    padding: 13.5px 30px 13.5px 14px;
}

.profile__find-order-btn {
    width: 100%;
}

.item-order {
    padding: 25px 20px 35px;
    background: var(--gray-bg);
    border-radius: 8px;
}

.item-order__info-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    font-weight: 400;
    font-size: 15px;
    line-height: 120%;
    color: #222222;
    margin-bottom: 15px;
}

.item-order__info-block a {
    font-weight: 400;
    font-size: 15px;
}

.item-order__quantity {
    font-weight: 600;
    font-size: 17px;
    line-height: 120%;
    color: #222222;
    margin-bottom: 20px;
}

.basket-item.item-order__good {
    display: grid;
    grid-auto-columns: 1fr 1fr;
    grid-template-areas:
        'head name'
        'head prices'
        'description description'
        'manage manage';
}

.basket-item__image {
    display: block;
    height: 100px;
    width: 123px;
}

.manage-info {
    padding: 10px;
    background: #f4f4f4;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    grid-area: manage;
}

.manage-info li:not(:last-of-type) {
    flex: 0 0 49%;
}

.manage-info li:last-of-type {
    margin-top: 10px;
    flex: 0 0 100%;
}

.manage-info li {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    color: var(--dark-gray);
}

.manage-info span {
    flex: 0 0 100%;
    margin-top: 4px;
}

.manage-info span:not(.txt-red) {
    color: var(--black);
}

.manage-info * {
    font-weight: 500;
    font-size: 13px;
    line-height: 120%;
}

.tab-content__header {
    width: 100%;
    margin-bottom: 20px;
}

#profileForm {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

#history .tab-content__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.profile .pages {
    justify-content: flex-end;
}

@media (min-width: 768px) {
    .client__field_medium {
        grid-column: span 2;
    }

    .tab-content__header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 20px;
    }

    .profile__change-info {
        margin-bottom: 0;
    }

    .basket-item.item-order__good {
        grid-template-areas:
            'head name description'
            'head prices description'
            'manage manage description';
    }

    .item-order__info-block {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 20px;
    }
}
.completed-order__container-lots .basket-item {
    width: 100%; 
    flex-direction: column;
    display: flex;
    height: 100%;
    border-radius: 8px;
}
@media (min-width: 1280px) {
    .tab-content__title svg {
        display: none;
    }

    .profile__section-block {
        display: grid;
        grid-template-columns: 360px 1fr;
        gap: 30px;
    }

    .profile__tab-content {
        display: none;
        position: relative;
        inset: unset;
        height: auto;
        min-height: auto;
        transform: translate3d(0, 0, 0);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.15s ease;
        padding: 0;
    }

    .profile__tab-content.active {
        opacity: 1;
        visibility: visible;
    }

    .client__row {
        max-width: 100%;
    }

    .profile__tabs-link,
    .profile__tabs-btn {
        padding: 30px 0;
        background: transparent;
        transition: all 0.1s ease;
    }

    .profile__tabs-link svg,
    .profile__tabs-btn svg {
        opacity: 0;
        transition: all 0.15s ease;
    }

    .profile__tabs-link:hover,
    .profile__tabs-btn.active,
    .profile__tabs-btn:hover {
        padding: 30px 20px;
        background: var(--gray-bg);
    }

    .profile__tabs-btn.active svg,
    .profile__tabs-btn:hover svg,
    .profile__tabs-link:hover svg {
        opacity: 1;
    }

    .profile__change-wrapper {
        align-items: center;
        margin: 0;
    }

    .tab-content .bc_block {
        flex: 0 0 160px;
        min-width: 160px;
    }

    .tab-content .bc_select {
        flex-grow: 1;
    }

    .profile__find-order-btn {
        flex: 0 0 150px;
    }
}

@media (min-width: 1440px) {
    .profile__section-block {
        gap: 60px;
    }

    .item-order__info-block {
        flex-wrap: nowrap;
        align-items: flex-start;
        margin-bottom: 0;
    }

    .item-order__info-block .completed-order__status {
        margin-left: auto;
    }

    .completed-order__container .basket-item {
        grid-template-areas:
            'head name prices'
            'head description manage';
        grid-template-columns: 180px 220px auto;
        gap: 10px 40px;
    }
}
