@import url("https://fonts.googleapis.com/css2?family=Jost:ital,wght@0,100..900;1,100..900&display=swap");

body {
    background-color: #f4f4f4;
    font-family: "Jost", sans-serif;
    margin: 0;
    height: 200vh;
}

body.chat {
    background-color: white;
    height: 100vh;
}

header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 48px;
    height: 108px;
    background: #ffffff;
}

.modal-head {
    display: block;
    padding: 0;
    margin: 0;
    height: 56px;
}

button {
    font: inherit;
    border: none;
    background: none;
}

a {
    text-decoration: none;
    color: inherit;
}

h1 {
    font-weight: 500;
    font-size: 64px;
    line-height: 68px;
    margin: 0;
    padding: 0;
}

h3 {
    line-height: 44px;
    font-size: 40px;
    font-weight: 500;
    margin: 0;
    padding: 0;
}

h5 {
    font-size: 24px;
    line-height: 32px;
    font-weight: 500;
    margin: 0;
    padding: 0;
}

h6 {
    font-size: 16px;
    line-height: 24px;
    font-weight: 500;
    letter-spacing: 0%;
    margin: 0;
    padding: 0;
}

.text-regular {
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
    margin: 0;
    padding: 0;
}

.text-regular.secondary {
    color: #777778;
}

.layout {
    max-width: 1344px;
    width: 100%;

    display: flex;
    flex-direction: column;
    margin: auto;
}

.header-top {
    height: 24px;
    width: 100%;

    display: flex;
    justify-content: space-between;
    padding: 12px 0 0;
}

.header-top-left {
    display: flex;
    align-items: center;
    padding: 0px;
    gap: 16px;

    width: 588px;
    height: 24px;
}

.header-top-center {
    display: flex;
    gap: 10px;

    margin: 0 auto;
    width: 168px;
    height: 24px;
}

.header-top-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;

    width: 588px;
    height: 24px;
}

.button-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    gap: 4px;

    width: fit-content;
    height: 24px;
}

.button-navigation > svg#mobile {
    display: none;
}

.button-navigation-vertical {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0;

    height: 40px;
    font-size: 12px;
}

.button-navigation-vertical.active {
    color: #478c25;
}

.header-bottom {
    height: 40px;
    width: 100%;

    display: flex;
    align-items: center;
    padding: 16px 0;
    gap: 16px;
}

.header-bottom-left {
    display: flex;
    align-items: center;
    padding: 0;
    gap: 16px;

    width: 1060px;
}

.button-dropdown-accent {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 16px;
    gap: 4px;

    width: fit-content;
    max-width: 108px;
    min-width: 64px;
    height: 40px;

    background: #4db027;
    border-radius: 8px;

    color: #ffffff;
    font-size: 16px;
}

.button-base-outline {
    padding: 8px 16px;

    min-width: 134px;
    height: 40px;

    background: #ffffff;
    border: 1px solid #4db027;
    border-radius: 8px;

    font-size: 14px;
    color: #4db027;
    white-space: nowrap;
}

.button-base-fill {
    padding: 8px 16px;

    min-width: 71px;

    background: #4db027;
    border: 1px solid #4db027;
    border-radius: 8px;

    font-size: 16px;
    color: #ffffff;
}

.button-base-secondary {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 4px;

    min-width: 64px;

    background: #f4f4f4;
    border-radius: 8px;
}

.very-large {
    height: 48px;
    padding: 12px 16px;
}

.large {
    height: 40px;
    padding: 8px 16px;
}

.medium {
    height: 32px;
    padding: 6px 12px;
}

#open-modal {
    position: absolute;
    bottom: 32px;
    left: 32px;
}

.search-40 {
    padding: 8px 16px;

    background: #f4f4f4;
    border-radius: 8px;
    border: none;

    height: 24px;

    flex-grow: 1;

    font: inherit;
    font-size: 16px;
}

.header-bottom-right {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;

    width: 268px;
}

.slider-container {
    width: 100%;
    height: 340px;

    padding-top: 24px;
}

.slider#slider1 {
    display: flex;
    gap: 16px;

    width: 100%;
    height: 100%;
    border-radius: 24px;

    overflow: auto hidden;
    white-space: nowrap;

    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;

    -ms-overflow-style: none;
    scrollbar-width: none;
}

.slider::-webkit-scrollbar {
    display: none;
}

.slide {
    max-width: 1300px;
    width: calc(1285 * 100vw / 1344);
    height: 340px;
    scroll-snap-align: center;
    flex-shrink: 0;
    position: relative;
}

.slide > .slide-background {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    position: absolute;
}

.avatar {
    position: absolute;
    width: 234px;
    right: 46px;
}

.message {
    position: absolute;
    top: 16px;
    right: 184px;

    box-sizing: border-box;
    width: 185px;
    height: 86px;

    border-radius: 16px 16px 0 16px;

    padding: 7px 14px;

    background-color: #f4f4f4;
    white-space: normal;
    font-size: 14.5px;
}

.message > text {
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
}

.pagination-slider {
    display: flex;
    justify-content: center;
    gap: 4px;
    z-index: 1;
    align-items: center;
    height: 12px;
}

.slider-container > .pagination-slider {
    position: relative;
    bottom: 20px;
    left: 0;
    right: 0;
}

.pagination-point {
    width: 8px;
    height: 8px;
    border-radius: 4px;

    cursor: pointer;

    transition: all 0.3s ease;
    flex-shrink: 0;
}

.slider-container * .pagination-point {
    background: #ffffff99;
}

.slider-container * .pagination-point.active {
    width: 16px;
    background-color: #ffffff;
}

.popular-container > .pagination-slider {
    padding-top: 8px;
}

.popular-container * .pagination-point {
    background: #1c1c1c1f;
}

.popular-container * .pagination-point.active {
    width: 16px;
    background-color: #a4a4a5;
}

.popular-container {
    padding-top: 48px;
    gap: 16px;
    height: 492px;
}

.slider#slider2 {
    display: flex;
    gap: 8px;

    width: 100%;

    padding-top: 16px;

    overflow: auto hidden;
    white-space: nowrap;

    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;

    -ms-overflow-style: none;
    scrollbar-width: none;
}

.card-product {
    box-sizing: border-box;

    display: flex;
    flex-direction: column;
    padding: 12px;
    gap: 8px;

    width: 280px;
    height: 416px;

    background: #ffffff;
    border: 1px solid #ededed;
    border-radius: 16px;
}

.card-preview-slider {
    align-items: center;
    width: 256px;
    height: 256px;
}

.card-preview-slider > img {
    width: 256px;
    height: 256px;
    border-radius: 8px;
}

.card-info {
    display: flex;
    flex-direction: column;

    width: 256px;
    height: 80px;
}

.card-title {
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    letter-spacing: 0;

    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.card-name {
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    color: #777778;
}

.card-price {
    display: flex;
    justify-content: space-between;
}

.price {
    font-size: 24px;
    line-height: 32px;
    font-weight: 500;
    letter-spacing: 0;
    height: 16px;
}

.rating-wrap {
    display: flex;
    flex-direction: column;
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    letter-spacing: 0;
}

.rating {
    display: flex;
    align-items: center;
    justify-content: end;
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    letter-spacing: 0;
    justify-content: end;
    gap: 4px;
}

.card-button-wrap {
    display: flex;
    justify-content: space-between;
    width: 256px;
    gap: 8px;
}

.select-large {
    display: flex;
    align-items: center;
    padding-left: 16px;

    height: 40px;

    min-width: 85px;
    max-width: 140px;

    background: #f4f4f4;
    border: #f4f4f4;
    border-radius: 8px;

    flex-grow: 1;

    font: inherit;

    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("icons/fill/16/chevron-down.svg");
    background-repeat: no-repeat;
    background-position: right 10px center; /* Позиция иконки */
}

.select-large > option {
    font: inherit;
}

.title {
    color: white;
    position: absolute;
    top: 32px;
    left: 32px;
    max-width: 510px;
    white-space: normal;
}

.button-floating {
    width: 96px;
    height: 96px;

    background-color: white;
    border: 1px solid #e4e4e4;
    border-radius: 48px;

    position: fixed;
    left: 32px;
    bottom: 32px;

    transition: opacity 0.3s;
    cursor: pointer;

    padding: 0;
    margin: 0;
}

.button-floating > img {
    width: 100%;
    height: 100%;
    border-radius: 48px;
}

.button-floating.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal {
    box-sizing: border-box;
    display: none;
    position: fixed;
    padding-bottom: 24px;
    top: 0;
    left: 0;
    background-color: white;
    width: 100vw;
    height: 100vh;

    z-index: 2;
}

.modal-main {
    box-sizing: border-box;
    height: calc(100% - 56px);
    padding-bottom: 24px;
}

.modal-header {
    box-sizing: border-box;
    padding: 16px 24px 0 24px;
    height: 56px;

    display: flex;
    justify-content: space-between;

    position: sticky;
}

.modal-header-button-wrap {
    max-width: none;
    height: 40px;
    display: flex;
    gap: 32px;

    align-items: center;
    justify-content: space-between;
}

.modal-header-button-group {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.modal-content {
    position: relative;

    max-width: 700px;
    height: calc(100% - 56px);
    margin: auto;

    box-sizing: border-box;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;

    box-sizing: border-box;
}

.modal-main .modal-content {
    height: 100%;
}

.modal-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.prompt-wrap {
    position: relative;
}

.prompt-area {
    box-sizing: border-box;
    display: flex;
    padding: 8px 8px 8px 16px;
    gap: 4px;

    width: 100%;
    height: 84px;
    min-height: 84px;

    background: #f4f4f4;
    border-radius: 12px;
    border: none;
    outline: none;

    resize: none;

    font: inherit;
}

.button-base-accent {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;

    background: #e4e4e4;
    border-radius: 8px;

    transition: background 0.3s;
}

#send-prompt-btn {
    position: absolute;
    right: 8px;
    bottom: 8px;
}

.badge-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.badge {
    font: inherit;
    font-size: 13px;
    line-height: 20px;
    box-sizing: border-box;
    padding: 8px 16px;
    height: 36px;
    background: #f6fbf4;
    border-radius: 8px;
    color: #4db027;
    cursor: pointer;
}

#modal-avatar {
    position: absolute;
    bottom: 0px;
    left: -298px;

    width: 234px;
    height: 423px;
}

.message-list {
    display: none;
    overflow-y: auto;
    width: 100%;
    height: 100%;
}

.message-list.show {
    display: flex;
}

.message-items-container {
    display: flex;
    flex-grow: 1;
    flex-direction: column;
    gap: 24px;

    overflow-y: auto;

    width: 100%;
    height: 100%;
}

.message-item-container {
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;

    width: 100%;
    height: fit-content;

    flex-grow: 0 1;
}

.message-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.message-item-container.send {
    align-items: end;
}

.message-item-container.send > .message-item {
    box-sizing: border-box;
    padding: 8px 16px;

    max-width: 500px;
    min-height: 40px;
    width: 100%;

    background: #f4f4f4;
    border-radius: 16px;
}

.message-product-card {
    box-sizing: border-box;

    display: flex;
    flex-direction: column;

    width: 100%;
    height: fit-content;

    padding: 12px;

    gap: 12px;

    border-radius: 16px;
    border: 1px solid #ededed;
}

.message-product-card > .top-wrap {
    display: flex;
    gap: 8px;
    width: 100%;
}

.message-product-card > .top-wrap > .text-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.message-product-card > .top-wrap > .preview-wrap > img {
    width: 96px;
    height: 96px;
    border-radius: 8px;
}

.preview-wrap {
    position: relative;
}

.message-product-card > .bottom-wrap {
    display: flex;
    justify-content: space-between;
}

.message-product-card > .bottom-wrap > .button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.add-button-variant-1 {
    min-width: 138px;
}

.add-button-variant-2 {
    box-sizing: border-box;
    padding: 8px 16px;

    min-width: 138px;

    display: none;
    justify-content: space-between;
    align-items: center;

    min-height: 40px;

    background: #f1f9ee;
    border-radius: 8px;
}

.add-button-variant-2 > button {
    display: flex;
    justify-content: center;
    align-items: center;
}

.text-regular.count {
    color: #4db027;
}

.header-top.mobile {
    display: none;
}

.tab-bar {
    display: none;
}

.badge-stack.mobile {
    display: none;
}

#close-modal-mobile {
    display: none;
}

.favourite-toggle {
    display: none;
}

.favourite-icon {
    cursor: pointer;
    transition: all 0.3s ease;
}

.favourite-icon {
    min-width: 0;
    width: 32px;
    height: 32px;

    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 4px;

    background: #1c1c1e05;
    border-radius: 8px;

    cursor: pointer;
    transition: all 0.3s ease;

    position: absolute;
    top: 4px;
    right: 4px;
}

.toggle-icon-filled {
    display: none;
}

.favourite-toggle:checked + .favourite-icon .toggle-icon-filled {
    display: block;
}

.favourite-toggle:checked + .favourite-icon .toggle-icon-empty {
    display: none;
}

.favourite-toggle:checked + .favourite-icon {
    background-color: rgba(0, 0, 0, 0);
}

.scroll-down-button {
    display: none;
}

#bucket-btn {
    position: relative;
}

.bucket-indicator {
    display: none;
    aspect-ratio: 1;
    width: 8px;
    border-radius: 4px;
    background-color: #f03434;
    position: absolute;
    top: 0;
    right: 4px;
}

@media (max-width: 860px) {
    header {
        height: 48px;
        padding: 0 16px;
    }

    .layout {
        margin: 0;
    }

    .header-top.desktop {
        display: none;
    }

    .header-top.mobile {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100%;
        padding: 0;
    }

    .header-top.mobile > .header-top-center {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        width: 100%;
        height: 100%;
        box-sizing: border-box;
    }

    .header-top.mobile > .header-top-center > .button-navigation {
        width: 32px;
        height: 32px;

        background: #f4f4f4;
        border-radius: 8px;
    }

    .header-bottom {
        display: none;
    }

    h1.mobile {
        font-size: 32px;
        line-height: 32px;
        font-weight: 500;
        letter-spacing: 0%;
    }

    .slider-container {
        padding-top: 16px;
    }

    .slider#slider1 {
        gap: 8px;
    }

    .slider#slider1 > :first-child {
        margin-left: 16px;
    }

    .slider#slider1 > :last-child {
        margin-right: 16px;
    }

    .slide {
        width: calc(1230 * 100vw / 1344);
    }

    img.avatar {
        right: 0;
        top: 123px;
        width: 188px;
    }

    .message {
        top: 123px;
        right: 105px;
        height: 74px;
    }

    .button-base-secondary#open-modal {
        box-sizing: border-box;
        left: 24px;
        bottom: 24px;
        right: 24px;
        width: calc(100% - 48px);
        margin: 0 auto;
        z-index: 1;
    }

    .tab-bar {
        display: flex;
        justify-content: space-between;

        box-sizing: border-box;
        padding: 16px 16px 0 16px;

        width: 100%;
        height: 90px;
        position: fixed;
        bottom: 0;
        z-index: 1;
    }

    .button-floating {
        display: none;
    }

    .modal-header-button-wrap > .modal-header-button-group {
        display: none;
    }

    .modal-header {
        padding: 24px 16px 0 16px;
    }

    .modal-header {
        align-items: center;
    }

    #close-modal-desktop {
        display: none;
    }

    #close-modal-mobile {
        display: flex;
        min-width: 0;
        width: 32px;
        height: 32px;
    }

    .modal * .slider-container.badge-stack.show {
        height: auto;
        padding-top: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .modal * .slider-container.badge-stack {
        display: none;
    }

    .modal * .slider {
        padding-top: 0 !important;
    }

    .modal * .slide {
        display: flex;
        flex-direction: row;
        gap: 4px;

        width: auto;
        height: auto;
        flex-direction: row;
    }

    .modal * .slider > :first-child {
        margin-left: 16px;
    }

    .modal * .slider > :last-child {
        margin-right: 16px;
    }

    .modal * .pagination-slider {
        position: static;
        left: 0;
        right: 0;
        bottom: 0;
    }

    .modal * .pagination-slider > .pagination-point {
        background: #1a1a1a1f;
    }

    .modal * .pagination-slider > .pagination-point.active {
        background: #a4a4a5;
    }

    .prompt-wrap {
        padding: 0 16px;
    }

    #send-prompt-btn {
        right: 24px;
    }

    .badge-stack.desktop {
        display: none;
    }

    .modal-avatar {
        display: none;
    }

    .message-list {
        box-sizing: border-box;
        padding: 16px 16px 0 16px;
    }

    .modal-content {
        gap: 8px;
    }

    .message-product-card > .top-wrap > .preview-wrap {
        order: 1;
    }

    .message-product-card > .top-wrap > .text-wrap {
        order: 2;
    }

    .message-product-card > .top-wrap {
        flex-direction: column;
    }

    .favourite-icon {
        top: 0;
        right: 0;
    }

    .message-product-card > .bottom-wrap {
        flex-direction: column;
        gap: 12px;
    }

    .message-product-card > .bottom-wrap > .button-group {
        order: 2;
    }

    .message-list {
        position: relative;
    }

    .scroll-down-button {
        min-width: 0;
        width: 40px;
        height: 40px;
        position: absolute;
        bottom: 0px;
        left: calc(50% - 20px);
        z-index: 200;
    }

    .scroll-down-button.visible {
        display: flex;
    }
}
