/* Catalog — Figma mobile 401:1851 + desktop 453:4 */

body.medagg-body.medagg-body--catalog {
    --bb-navy: #003670;
    --bb-ink: #2d3748;
    --bb-muted: #718096;
    --bb-line: #e2e8f0;
    --bb-deal-bg: #fed7d7;
    --bb-deal: #e53e3e;
    --bb-font: "Schibsted Grotesk", "Inter", sans-serif;
    --bb-display: "Outfit", "Schibsted Grotesk", sans-serif;
    --bb-container: 1200px;
    background: var(--bb-navy);
    color: var(--bb-ink);
    font-family: var(--bb-font);
}

.medagg-body--catalog .medagg-main {
    padding: 0 0 88px;
    min-height: 0;
    background: var(--bb-navy);
}

.medagg-v2-search--header {
    display: none;
}

.medagg-cat {
    width: 100%;
    background: var(--bb-navy);
    padding-bottom: 0;
}

.medagg-cat-search {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 48px;
    margin: 8px 20px 12px;
    padding: 12px 20px;
    background: #fff;
    border-radius: 100px;
}

.medagg-cat-search__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.medagg-cat-search__icon img {
    display: block;
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.medagg-cat-search__input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    color: var(--bb-ink);
    font-family: var(--bb-font);
    font-size: 14px;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.medagg-cat-search__input::-webkit-search-decoration,
.medagg-cat-search__input::-webkit-search-cancel-button,
.medagg-cat-search__input::-webkit-search-results-button,
.medagg-cat-search__input::-webkit-search-results-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

.medagg-cat-search__input::placeholder {
    color: var(--bb-muted);
}

.medagg-cat-banners {
    padding-bottom: 24px;
    overflow: hidden;
}

.medagg-cat-banners__track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: calc((100% - min(300px, 76.923vw)) / 2);
    padding: 0;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.medagg-cat-banners__track.is-jumping {
    scroll-snap-type: none;
}

.medagg-cat-banners__track::-webkit-scrollbar {
    display: none;
}

.medagg-cat-banners__card {
    position: relative;
    flex: 0 0 min(300px, 76.923vw);
    width: min(300px, 76.923vw);
    height: 120px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    scroll-snap-align: center;
    scroll-snap-stop: always;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
}

.medagg-cat-banners__card img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.medagg-cat-banners__dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 8px;
    margin-top: 12px;
}

.medagg-cat-banners__dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
}

.medagg-cat-banners__dot.is-active {
    background: #fff;
}

.medagg-cat-panel {
    background: #fff;
}

.medagg-cat-panel--collections {
    border-radius: 24px;
    padding: 24px 0 16px 20px;
}

.medagg-cat-gap {
    height: 8px;
    background: var(--bb-navy);
}

.medagg-cat-panel--list {
    border-radius: 24px 24px 0 0;
    padding: 24px 20px;
}

.medagg-cat-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    padding-right: 20px;
}

.medagg-cat-panel--list .medagg-cat-panel__head {
    padding-right: 0;
}

.medagg-cat-panel__title {
    margin: 0;
    color: var(--bb-navy);
    font-family: var(--bb-display);
    font-size: 18px;
    font-weight: 700;
}

.medagg-cat-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--bb-navy);
    font-family: var(--bb-font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.medagg-cat-more img {
    display: block;
    width: 14px;
    height: 14px;
    filter: brightness(0) saturate(100%) invert(16%) sepia(62%) saturate(1842%) hue-rotate(190deg) brightness(92%) contrast(104%);
}

.medagg-cat-tiles {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 20px;
    padding-right: 20px;
    scrollbar-width: none;
}

.medagg-cat-tiles::-webkit-scrollbar {
    display: none;
}

.medagg-cat-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    width: 72px;
    text-decoration: none;
    color: var(--bb-ink);
}

.medagg-cat-tile__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    padding: 16px;
    border-radius: 16px;
    background: #e6ebf2;
    box-shadow: 0 4px 10px rgba(26, 39, 68, 0.08);
    overflow: hidden;
    box-sizing: border-box;
}

.medagg-cat-tile__icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.medagg-cat-tile__icon:not(:has(img))::after {
    content: "";
    display: block;
    width: 29px;
    height: 29px;
    border-radius: 50%;
    background: #c5cedb;
}

.medagg-cat-tile__name {
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.medagg-cat-side {
    display: none;
}

.medagg-cat-search-info {
    margin: 0 0 16px;
    color: var(--bb-muted);
    font-size: 13px;
}

.medagg-cat-search-info a {
    margin-left: 8px;
    color: var(--bb-navy);
    font-weight: 600;
    text-decoration: none;
}

.medagg-cat-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.medagg-cat-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.medagg-cat-card__hit {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
}

.medagg-cat-card__btn {
    position: relative;
    z-index: 2;
}

.medagg-cat-card.is-unavailable {
    opacity: 0.72;
}

.medagg-cat-card__meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
}

.medagg-cat-card__badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.medagg-cat-card__deal {
    display: inline-flex;
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--bb-deal-bg);
    color: var(--bb-deal);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.medagg-cat-card__sale {
    display: inline-flex;
    padding: 2px 6px;
    border-radius: 6px;
    background: #e8eef6;
    color: var(--bb-navy);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.medagg-cat-card__labs {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--bb-muted);
    font-size: 12px;
}

.medagg-cat-card__complex {
    display: inline-flex;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--bb-navy);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.medagg-cat-card__name {
    margin: 0;
    color: var(--bb-ink);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.medagg-cat-card__name a {
    color: var(--bb-ink);
    text-decoration: none;
}

.medagg-cat-card__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.medagg-cat-card__price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.medagg-cat-card__now {
    color: var(--bb-ink);
    font-size: 18px;
    font-weight: 700;
}

.medagg-cat-card__old {
    color: var(--bb-muted);
    font-size: 13px;
    text-decoration: line-through;
}

.medagg-cat-card__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border: 0;
    border-radius: 100px;
    background: var(--bb-navy);
    color: #fff;
    font-family: var(--bb-font);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    text-transform: lowercase;
}

.medagg-cat-card__btn.is-in-cart {
    background: transparent;
    color: var(--bb-navy);
    border: 1px solid var(--bb-navy);
    cursor: pointer;
}

.medagg-cat-card__btn:disabled {
    background: transparent;
    color: var(--bb-navy);
    border: 1px solid var(--bb-navy);
    cursor: default;
}

.medagg-cat-card__off {
    color: #b54747;
    font-size: 13px;
    font-weight: 600;
}

.medagg-cat-empty {
    padding: 32px 16px;
    text-align: center;
    color: var(--bb-muted);
    background: #fff;
    border-radius: 20px;
}

.medagg-body--catalog .medagg-tabbar {
    border-top: 1px solid var(--bb-line);
}

.medagg-body--catalog .medagg-tabbar__inner {
    max-width: none;
    width: 100%;
    height: 64px;
    min-height: 64px;
    padding: 0 16px;
}

.medagg-body--catalog .medagg-tabbar__item {
    flex: 1 0 0;
    width: auto;
    min-width: 0;
    height: 34px;
    gap: 4px;
    color: var(--bb-muted);
    font-family: var(--bb-font);
    font-size: 10px;
    font-weight: 600;
}

.medagg-body--catalog .medagg-tabbar__item.is-active {
    color: var(--bb-navy);
}

.medagg-body--catalog .medagg-tabbar__icon,
.medagg-body--catalog .medagg-tabbar__icon-wrap {
    width: 18px;
    height: 18px;
}

.medagg-body--catalog .medagg-tabbar__icon svg {
    display: block;
    width: 18px;
    height: 18px;
}

@media (min-width: 768px) {
    .medagg-body--catalog .medagg-main {
        padding-bottom: 0;
    }

    .medagg-body--catalog .medagg-v2-header__inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 24px;
    }

    .medagg-v2-search--header {
        display: flex;
        flex: 1 1 auto;
        max-width: 857px;
        height: 44px;
        margin: 0;
        padding: 6px;
        gap: 12px;
        border: 0;
    }

    .medagg-v2-search--header .medagg-v2-search__catalog {
        display: inline-flex;
        align-items: center;
        align-self: stretch;
        padding: 0 24px;
        font-size: 14px;
        font-weight: 700;
        line-height: 1;
        pointer-events: none;
    }

    .medagg-v2-search--header .medagg-v2-search__input {
        font-size: 15px;
        appearance: none;
        -webkit-appearance: none;
    }

    .medagg-v2-search--header .medagg-v2-search__input::-webkit-search-decoration,
    .medagg-v2-search--header .medagg-v2-search__input::-webkit-search-cancel-button,
    .medagg-v2-search--header .medagg-v2-search__input::-webkit-search-results-button,
    .medagg-v2-search--header .medagg-v2-search__input::-webkit-search-results-decoration {
        -webkit-appearance: none;
        appearance: none;
        display: none;
    }

    .medagg-v2-search--header .medagg-v2-search__btn {
        width: auto;
        height: 18px;
        padding: 0 16px 0 0;
        flex-shrink: 0;
    }

    .medagg-v2-search--header .medagg-v2-search__btn img {
        display: block;
        width: 18px;
        height: 18px;
        object-fit: contain;
    }

    .medagg-cat-search,
    .medagg-cat-banners__dots,
    .medagg-cat-more--mobile,
    .medagg-cat-gap {
        display: none;
    }

    .medagg-cat-banners {
        width: min(var(--bb-container), calc(100% - 48px));
        margin: 0 auto;
        padding: 40px 0 28px;
    }

    .medagg-cat-banners__track {
        display: flex;
        gap: 24px;
        overflow: visible;
        padding: 0;
        scroll-snap-type: none;
        scroll-padding-inline: 0;
    }

    .medagg-cat-banners__card {
        flex: 1 1 0;
        width: auto;
        min-width: 0;
        height: 140px;
        box-shadow: none;
        scroll-snap-align: unset;
    }

    .medagg-cat-banners__card[data-clone] {
        display: none;
    }

    .medagg-cat-panel--collections,
    .medagg-cat-panel--list {
        width: min(var(--bb-container), calc(100% - 48px));
        margin-left: auto;
        margin-right: auto;
        border-radius: 0;
        padding-left: 0;
        padding-right: 0;
    }

    .medagg-cat-panel--collections {
        background: #fff;
        border-radius: 24px 24px 0 0;
        padding: 32px 40px 24px;
    }

    .medagg-cat-panel--list {
        background: #fff;
        border-radius: 0;
        padding: 40px 40px 80px;
    }

    .medagg-cat-panel__head {
        padding-right: 0;
        padding-bottom: 16px;
    }

    .medagg-cat-panel__title {
        font-size: 24px;
    }

    .medagg-cat-more {
        font-weight: 500;
    }

    .medagg-cat-tiles {
        display: flex;
        justify-content: flex-start;
        gap: 16px;
        overflow: hidden;
        padding: 0;
    }

    .medagg-cat-tile {
        flex: 0 0 calc((100% - 80px) / 6);
        width: calc((100% - 80px) / 6);
        min-width: 0;
    }

    .medagg-cat-tile__icon {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
        padding: 18%;
        border-radius: 16px;
        box-shadow: none;
    }

    .medagg-cat-tile__name {
        max-width: none;
        width: 100%;
        color: var(--bb-navy);
        font-weight: 500;
        white-space: nowrap;
    }

    .medagg-cat-layout {
        display: flex;
        align-items: flex-start;
        gap: 40px;
        padding-top: 16px;
    }

    .medagg-cat-side {
        display: block;
        width: 220px;
        flex-shrink: 0;
    }

    .medagg-cat-side__label {
        margin: 0;
        color: var(--bb-muted);
        font-size: 13px;
    }

    .medagg-cat-side__all {
        margin: 12px 0 16px;
        color: var(--bb-ink);
        font-size: 15px;
        font-weight: 700;
    }

    .medagg-cat-side__nav.is-collapsed .medagg-cat-side__item:nth-child(n + 6) {
        display: none;
    }

    .medagg-cat-side__item {
        display: flex;
        align-items: center;
        padding: 10px 12px;
        border-radius: 8px;
        color: var(--bb-ink);
        font-size: 15px;
        text-decoration: none;
    }

    .medagg-cat-side__item.is-active {
        background: #f2f2f7;
        border-left: 2px solid var(--bb-navy);
        color: var(--bb-navy);
        font-weight: 500;
        border-radius: 0 8px 8px 0;
    }

    .medagg-cat-side__more {
        margin-top: 8px;
        padding: 8px 16px;
        border: 0;
        border-radius: 8px;
        background: #f2f2f2;
        color: var(--bb-ink);
        font-family: var(--bb-font);
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
    }

    .medagg-cat-cards {
        flex: 1;
        min-width: 0;
        gap: 16px;
    }

    .medagg-cat-card {
        gap: 16px;
        padding: 24px;
        box-shadow: 0 4px 8px rgba(26, 39, 68, 0.05);
    }

    .medagg-cat-card__deal {
        padding: 2px 8px;
        border-radius: 4px;
        font-size: 12px;
        font-weight: 500;
        text-transform: none;
    }

    .medagg-cat-card__sale {
        padding: 2px 8px;
        border-radius: 4px;
        font-size: 12px;
        font-weight: 500;
        text-transform: none;
    }

    .medagg-cat-card__labs {
        font-size: 14px;
        gap: 8px;
    }

    .medagg-cat-card__complex {
        padding: 2px 8px;
        font-size: 12px;
        font-weight: 500;
        text-transform: none;
    }

    .medagg-cat-card__name {
        min-height: 48px;
        font-size: 16px;
        line-height: 1.4;
    }

    .medagg-cat-card__price {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .medagg-cat-card__now {
        font-size: 20px;
        order: 2;
    }

    .medagg-cat-card__old {
        order: 1;
    }

    .medagg-cat-card__btn {
        padding: 12px 24px;
        font-size: 14px;
        font-weight: 700;
        text-transform: none;
    }

    .medagg-body--catalog .medagg-tabbar {
        display: none;
    }
}

.medagg-colpick[hidden] {
    display: none;
}

.medagg-colpick {
    position: fixed;
    inset: 0;
    z-index: 1300;
}

.medagg-colpick__backdrop {
    display: none;
}

.medagg-colpick__panel {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 24px 24px 0 0;
    overflow: hidden;
}

.medagg-colpick__head {
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    align-items: center;
    flex-shrink: 0;
    height: 56px;
    padding: 0 20px;
    border-bottom: 1px solid #e2e8f0;
    box-sizing: border-box;
}

.medagg-colpick__iconbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.medagg-colpick__iconbtn img {
    display: block;
    object-fit: contain;
}

.medagg-colpick__iconbtn img[width="24"] {
    width: 24px;
    height: 24px;
}

.medagg-colpick__title {
    margin: 0;
    color: #2d3748;
    font-family: var(--bb-display);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

.medagg-colpick__spacer {
    width: 40px;
    height: 40px;
}

.medagg-colpick__close {
    display: none;
}

.medagg-colpick__close img {
    width: 16px;
    height: 16px;
}

.medagg-colpick__search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin: 8px 20px;
    padding: 10px 16px;
    background: #f2f5f7;
    border-radius: 100px;
}

.medagg-colpick__search-icon {
    display: flex;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.medagg-colpick__search-icon img {
    display: block;
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.medagg-colpick__search-input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    color: var(--bb-ink);
    font-family: var(--bb-font);
    font-size: 14px;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.medagg-colpick__search-input::placeholder {
    color: #99a6b2;
}

.medagg-colpick__list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.medagg-colpick__row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    text-decoration: none;
    color: #1a202c;
}

.medagg-colpick__row.is-active .medagg-colpick__name {
    color: var(--bb-navy);
    font-weight: 700;
}

.medagg-colpick__row[hidden] {
    display: none;
}

.medagg-colpick__thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #edf2f7;
}

.medagg-colpick__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.medagg-colpick__name {
    flex: 1;
    min-width: 0;
    font-family: var(--bb-font);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.3;
}

.medagg-colpick__chevron {
    display: block;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    object-fit: contain;
}

.medagg-colpick__empty {
    margin: 0;
    padding: 32px 20px;
    color: var(--bb-muted);
    font-size: 14px;
    text-align: center;
}

.medagg-colpick__foot {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
    padding: 20px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

.medagg-colpick__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 48px;
    padding: 0 16px;
    border-radius: 100px;
    font-family: var(--bb-font);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.medagg-colpick__btn--ghost {
    border: 1px solid #e2e8f0;
    background: #f7fafc;
    color: #1a202c;
}

.medagg-colpick__btn--navy {
    border: 0;
    background: var(--bb-navy);
    color: #fff;
}

body.medagg-colpick-open {
    overflow: hidden;
}

body.medagg-colpick-open .medagg-tabbar {
    visibility: hidden;
    pointer-events: none;
}

@media (min-width: 768px) {
    .medagg-colpick__backdrop {
        display: block;
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
    }

    .medagg-colpick__panel {
        inset: auto;
        top: 50%;
        left: 50%;
        width: 600px;
        height: 700px;
        max-width: calc(100% - 48px);
        max-height: calc(100vh - 48px);
        transform: translate(-50%, -50%);
        border-radius: 16px;
        box-shadow: 0 12px 32px rgba(26, 39, 68, 0.12);
    }

    .medagg-colpick__title {
        color: #1a202c;
    }

    .medagg-colpick__spacer {
        display: none;
    }

    .medagg-colpick__close {
        display: inline-flex;
        grid-column: 3;
        justify-self: end;
    }

    .medagg-colpick__search {
        margin: 12px 20px;
        background: #f4f7f9;
    }

    .medagg-colpick__thumb {
        border-radius: 20px;
    }

    .medagg-colpick__foot {
        padding-bottom: 20px;
        background: #fff;
    }

    .medagg-colpick__btn--ghost {
        background: #f4f7f9;
    }
}
