:root {
    color-scheme: light;
    /* Тёплый off-white фон каталога (макет 2026) */
    --bg: #f4f2ef;
    --card: #ffffff;
    --text: #111113;
    --muted: #6b6b70;
    --graphite: #3a3a40;
    --accent: #9e0e1f;
    --accent-dark: #7f0c1a;
    --accent-soft: #fff1f2;
    --line: #e6e4e1;
    --shadow: 0 14px 36px rgba(24, 20, 18, .07);
    --radius-lg: 28px;
    --radius-md: 18px;
    --ozon-blue: #005bff;
    --ozon-blue-dark: #0046c7;
    --bottom-nav-stack: 62px;
    --stock-chip-ok: #127a56;
    --stock-chip-ok-bg: rgba(18, 122, 86, .11);
    /* Спокойное выделение строк / карточек при наведении (без яркого красного фона кнопки) */
    --row-hover-bg: rgba(26, 26, 30, .055);
    --row-hover-border: rgba(26, 26, 30, .11);
    --row-hover-shadow: rgba(16, 24, 40, .1);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    border: 0;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    padding: 13px 18px;
    font-weight: 650;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

button:hover {
    background: var(--accent-dark);
    box-shadow: 0 10px 24px rgba(193, 18, 31, .24);
    transform: translateY(-1px);
}

button.secondary {
    background: var(--accent-soft);
    color: var(--text);
    box-shadow: none;
}

.app {
    max-width: 100%;
    margin: 0 auto;
    --app-pad-x: 12px;
    padding: 0 var(--app-pad-x) 72px;
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

.catalog-screen {
    padding-top: 12px;
}

.screen {
    max-width: 1180px;
    margin: 0 auto;
}

.page-screen {
    max-width: 760px;
}

/* Карточка товара: фото от верха экрана, на всю ширину вьюпорта */
.product-screen {
    margin-left: calc(-1 * var(--app-pad-x));
    margin-right: calc(-1 * var(--app-pad-x));
    width: calc(100% + 2 * var(--app-pad-x));
    max-width: none;
}

.product-screen .product-page-card {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    box-shadow: none;
}

.product-page-hero {
    position: relative;
    width: 100%;
    background: #fff;
    border-radius: 0 0 18px 18px;
    overflow: hidden;
}

.product-screen [data-product-details] {
    padding-bottom: calc(118px + env(safe-area-inset-bottom, 0px));
}

/* Плавающая панель как в Ozon: поверх фото */
.product-float-bar--top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 48;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(6px + env(safe-area-inset-top, 0px)) 10px 8px calc(8px + env(safe-area-inset-left, 0px));
    padding-right: calc(10px + env(safe-area-inset-right, 0px));
    pointer-events: none;
}

.product-float-bar__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}

.product-float-btn {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .9);
    color: #1a1a1e;
    box-shadow: 0 2px 14px rgba(0, 0, 0, .1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.product-float-btn:hover {
    transform: none;
    background: #fff;
    color: #000;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .12);
}

.product-float-btn--back {
    font-size: 28px;
    line-height: 1;
    font-weight: 300;
}

.product-float-btn.is-active {
    color: var(--accent);
}

.product-float-btn.is-active .product-float-ico--heart path {
    fill: rgba(193, 18, 31, .15);
    stroke: var(--accent);
}

.product-float-ico {
    display: block;
}

/* Плавающая кнопка «В корзину» над нижней навигацией */
.product-float-cta {
    position: fixed;
    left: var(--app-pad-x);
    right: var(--app-pad-x);
    bottom: calc(var(--bottom-nav-stack) + 8px + env(safe-area-inset-bottom, 0px));
    z-index: 42;
    pointer-events: none;
}

.cart-added-tooltip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translate(-50%, 8px);
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(22, 163, 74, .94);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
    box-shadow: 0 10px 22px rgba(22, 163, 74, .28);
}

.cart-added-tooltip.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.product-float-cta__btn {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    border-radius: 16px;
    padding: 14px 18px;
    font-size: 16px;
    font-weight: 750;
    background: var(--ozon-blue);
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 91, 255, .35);
}

.product-float-cta__btn:hover {
    background: var(--ozon-blue-dark);
    transform: translateY(-1px);
}

.product-float-cta__ico {
    flex-shrink: 0;
}

/* PDP: скругление hero, остатки-чипы, заметка, кнопки + бордо */
.product-page-card .product-page-hero {
    border-radius: 0 0 22px 22px;
    overflow: hidden;
    background: #fff;
}

.product-stock-detail {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 13px 14px;
    border-radius: 16px;
    background: #fafaf9;
    border: 1px solid rgba(42, 39, 37, .06);
}

.product-stock-detail__title {
    font-size: 11px;
    font-weight: 780;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #8b8f96;
}

.product-stock-detail__chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.product-chip--detail {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    max-width: 50%;
    padding: 7px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 720;
    letter-spacing: -.015em;
    white-space: nowrap;
}

.product-chip--detail .product-chip__text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-chip--detail .product-chip__ico {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.product-stock-detail .product-chip--ok,
.product-chip--detail.product-chip--ok,
.product-companion-row .product-chip--ok {
    background: var(--stock-chip-ok-bg);
    color: var(--stock-chip-ok);
}

.product-stock-detail .product-chip--moderate,
.product-chip--detail.product-chip--moderate,
.product-companion-row .product-chip--moderate {
    background: rgba(180, 130, 20, .12);
    color: #9a7310;
}

.product-stock-detail .product-chip--low,
.product-chip--detail.product-chip--low,
.product-companion-row .product-chip--low {
    background: rgba(194, 65, 12, .12);
    color: #b45309;
}

.product-stock-detail .product-chip--critical,
.product-chip--detail.product-chip--critical,
.product-companion-row .product-chip--critical {
    background: rgba(185, 28, 28, .12);
    color: #b91c1c;
}

.notice--roll-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 13px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.38;
}

.notice__ico {
    flex-shrink: 0;
    margin-top: 1px;
    color: #ea580c;
    opacity: .92;
}

.notice__text {
    flex: 1;
    min-width: 0;
}

.product-buy-sheet .product-inline-add {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(158, 14, 31, .28);
}

.product-buy-sheet .product-inline-add:hover {
    background: var(--accent-dark);
    color: #fff;
    transform: none;
    box-shadow: 0 4px 14px rgba(158, 14, 31, .32);
}

.product-buy-sheet .product-inline-add:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.product-screen .product-page-body,
.product-screen .companions {
    padding-left: var(--app-pad-x);
    padding-right: var(--app-pad-x);
}

.product-screen .companions {
    padding-bottom: 8px;
}

[hidden] {
    display: none !important;
}

.hero,
.toolbar,
.product-card,
.dialog-card,
.cart-item {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.hero {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    overflow: hidden;
    position: relative;
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto -80px -120px auto;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(193, 18, 31, .14), rgba(193, 18, 31, 0) 68%);
    pointer-events: none;
}

.hero h1 {
    margin: 6px 0 10px;
    font-size: clamp(30px, 7vw, 54px);
    letter-spacing: -.04em;
    line-height: .98;
}

.hero p {
    margin: 0;
    color: var(--muted);
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: .16em;
    font-size: 12px;
    font-weight: 750;
    color: var(--accent) !important;
}

/* —— Каталог: шапка TONITEKS и блок фильтров (макет плитки 2026) —— */
.hero--catalog-premium {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 4px 2px 4px;
    align-items: flex-start;
    justify-content: flex-start;
}

.hero--catalog-premium::after {
    background: radial-gradient(circle, rgba(158, 14, 31, .11), rgba(158, 14, 31, 0) 68%);
}

.hero__copy {
    position: relative;
    z-index: 1;
    max-width: 100%;
}

.brand-mark {
    letter-spacing: .22em !important;
    font-size: 11px !important;
    font-weight: 820 !important;
}

.hero--catalog-premium h1 {
    margin: 4px 0 8px;
    font-size: clamp(26px, 6.5vw, 42px);
    line-height: 1.03;
}

.hero__subtitle {
    margin: 0;
    font-size: 15px;
    line-height: 1.38;
    color: var(--muted);
}

.toolbar.toolbar--catalog-premium {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(124px, 36%);
    gap: 10px;
    align-items: stretch;
    padding: 14px;
    margin: 10px 0 18px;
    border-radius: 20px;
    box-shadow: 0 2px 14px rgba(24, 20, 18, .055);
}

.toolbar-search {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    padding: 0 14px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #fff;
}

.toolbar-search:focus-within {
    border-color: rgba(158, 14, 31, .48);
    box-shadow: 0 0 0 4px rgba(158, 14, 31, .08);
}

.toolbar-search input {
    flex: 1 1 auto;
    min-width: 0;
    border: none !important;
    padding: 12px 0 !important;
    background: transparent;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.toolbar-search input:focus {
    border: none !important;
    box-shadow: none !important;
}

.toolbar-search__icon {
    flex-shrink: 0;
    color: #95959c;
}

.toolbar-select-wrap {
    position: relative;
    min-width: 0;
}

.toolbar-select-wrap::after {
    content: "";
    position: absolute;
    right: 13px;
    top: 50%;
    width: 7px;
    height: 7px;
    margin-top: -5px;
    border-right: 2px solid #9ca3af;
    border-bottom: 2px solid #9ca3af;
    transform: rotate(45deg);
    pointer-events: none;
}

.toolbar.toolbar--catalog-premium select.toolbar-select {
    width: 100%;
    height: 100%;
    min-height: 50px;
    padding: 12px 32px 12px 14px;
    border-radius: 16px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

@media (max-width: 360px) {
    .toolbar.toolbar--catalog-premium {
        grid-template-columns: 1fr;
    }
}

.catalog-screen > .products {
    row-gap: 6px;
    column-gap: 9px;
}

.wishlist-screen-inner > .products {
    row-gap: 6px;
    column-gap: 9px;
}

.cart-button {
    white-space: nowrap;
    min-width: 124px;
    position: relative;
    z-index: 1;
}

.toolbar {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 14px;
    margin: 22px 0;
    padding: 18px;
}

.page-head strong {
    text-align: center;
    font-size: 17px;
}

.page-screen[data-screen="cart"],
.page-screen[data-screen="wishlist"],
.page-screen[data-screen="profile"] {
    padding-top: 8px;
}

.page-head {
    position: sticky;
    top: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: 44px 1fr 64px;
    gap: 8px;
    align-items: center;
    padding: 10px 0 14px;
    background: rgba(244, 242, 239, .92);
    backdrop-filter: blur(16px);
}

.page-head--compact {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 8px 0 12px;
    background: transparent;
    backdrop-filter: none;
}

.page-head--compact .page-spacer {
    display: none;
}

.page-head--wishlist {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    gap: 0 4px;
}

.page-head__title {
    margin: 0;
    font-size: 16px;
    font-weight: 650;
    text-align: center;
    letter-spacing: -0.02em;
}

.page-head__pad {
    width: 44px;
    height: 1px;
}

.wishlist-screen-inner {
    padding: 0 0 12px;
}

.profile-screen-inner {
    padding: 8px 0 20px;
    max-width: 560px;
    margin: 0 auto;
}

.profile-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    box-shadow: var(--shadow);
}

.profile-card__name {
    margin: 0 0 8px;
    font-size: 18px;
}

.profile-card__hint {
    margin: 14px 0 0;
}

.profile-demo-hint {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    border: 1px dashed var(--line);
    background: var(--row-hover-bg);
    font-size: 13px;
    line-height: 1.4;
}

.profile-hub {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.profile-hub__tile {
    display: grid;
    gap: 4px;
    width: 100%;
    margin: 0;
    padding: 14px 16px;
    text-align: left;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: var(--card);
    box-shadow: var(--shadow);
    color: inherit;
    font: inherit;
    cursor: pointer;
    position: relative;
}

.profile-hub__tile:hover,
.profile-hub__tile:focus-visible {
    border-color: var(--row-hover-border);
    background: var(--row-hover-bg) !important;
    color: inherit !important;
    transform: none !important;
    box-shadow: var(--shadow) !important;
}

.profile-hub__tile:disabled {
    cursor: default;
    opacity: .92;
}

.profile-hub__tile--contact {
    border-color: rgba(193, 18, 31, .24);
    background: linear-gradient(135deg, rgba(193, 18, 31, .08), var(--card));
}

.profile-hub__label {
    font-size: 16px;
    font-weight: 650;
    letter-spacing: -0.02em;
}

.profile-hub__badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
}

.profile-hub__badge--count {
    text-transform: none;
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
    min-width: 1.5em;
    text-align: center;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--row-hover-bg);
    border: 1px solid var(--line);
    color: inherit;
}

.profile-list-inner {
    padding-bottom: 16px;
}

.profile-delivery-summary {
    margin: 0;
    padding-left: 18px;
    font-size: 14px;
    line-height: 1.45;
}

.profile-delivery-summary li {
    margin-bottom: 6px;
}

.profile-delivery-options {
    display: grid;
    margin-top: 12px;
    overflow: visible;
    border-radius: var(--radius-md);
    background: var(--card);
}

.profile-delivery-option {
    position: relative;
    display: grid;
    grid-template-columns: 18px 1fr 40px;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    background: var(--card);
}

.profile-delivery-option:last-child {
    border-bottom: 0;
}

.profile-delivery-option input {
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    width: 14px !important;
    min-width: 14px;
    max-width: 14px;
    height: 14px !important;
    min-height: 14px;
    max-height: 14px;
    margin: 4px 0 0 !important;
    padding: 0 !important;
    border-radius: 50%;
    border: 1.5px solid #c1121f;
    background: #fff;
    box-shadow: none;
}

.profile-delivery-option input:checked {
    border-color: #c1121f;
    background: radial-gradient(circle at center, #c1121f 0 4px, transparent 4.5px);
}

.profile-delivery-option__body {
    display: grid;
    gap: 3px;
    font-size: 14px;
    line-height: 1.35;
    cursor: pointer;
}

.profile-delivery-option__head {
    display: grid;
    gap: 4px;
    align-items: baseline;
}

.profile-delivery-option__menu {
    width: 34px;
    height: 28px;
    padding: 0 !important;
    border-radius: 10px !important;
    background: transparent !important;
    color: var(--muted);
    font-weight: 700;
    letter-spacing: 2px;
    line-height: 1;
    box-shadow: none !important;
    transform: none !important;
}

.profile-delivery-option__menu:hover,
.profile-delivery-option__menu:focus-visible {
    background: var(--row-hover-bg) !important;
    color: var(--text);
}

.profile-delivery-option__actions {
    position: relative;
    display: flex;
    justify-content: flex-end;
}

.profile-delivery-option__dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 5;
    display: none;
    min-width: 132px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow);
}

.profile-delivery-option__dropdown.is-open {
    display: block;
}

.profile-delivery-option__delete {
    width: 100%;
    padding: 9px 10px !important;
    border-radius: 9px !important;
    background: transparent !important;
    color: var(--accent);
    text-align: left;
    box-shadow: none !important;
}

.profile-delivery-option__delete:hover,
.profile-delivery-option__delete:focus-visible {
    background: var(--accent-soft) !important;
    transform: none;
}

.profile-delivery-option__address {
    color: var(--text);
}

.profile-delivery-option__ok {
    color: #21a667;
}

.profile-delivery-actions {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.profile-delivery-add-form {
    display: grid;
    gap: 12px;
}

.profile-order-detail {
    display: grid;
    gap: 12px;
}

.profile-order-detail__back {
    justify-self: start;
}

.copy-inline {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .3em;
    width: auto;
    min-height: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    box-shadow: none;
    font: inherit;
    font-weight: inherit;
    line-height: inherit;
    vertical-align: baseline;
}

.copy-inline:hover {
    background: transparent;
    color: var(--accent);
    box-shadow: none;
    transform: none;
}

.copy-inline--title {
    font-weight: 700;
}

.copy-inline__icon {
    flex: 0 0 auto;
    width: 1em;
    height: 1em;
    opacity: .62;
}

.copy-tooltip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 4px);
    z-index: 5;
    transform: translateX(-50%);
    padding: 3px 7px;
    border-radius: 999px;
    background: #ecfdf3;
    color: #16803a;
    box-shadow: 0 8px 18px rgba(22, 128, 58, .14);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    pointer-events: none;
}

.profile-order-detail__contact {
    justify-self: stretch;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, #229ed9, #168acd);
    color: #fff;
    box-shadow: 0 14px 34px rgba(34, 158, 217, .24);
    text-align: left;
}

.profile-order-detail__contact:hover {
    background: linear-gradient(135deg, #168acd, #0f78b6);
    box-shadow: 0 16px 38px rgba(34, 158, 217, .3);
}

.profile-order-detail__contact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
}

.profile-order-detail__contact-text {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.profile-order-detail__contact-text strong {
    font-size: 16px;
    line-height: 1.2;
}

.profile-order-detail__contact-text small {
    color: rgba(255, 255, 255, .78);
    font-size: 13px;
    font-weight: 550;
}

.profile-order-detail__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--card);
    box-shadow: var(--shadow);
}

.profile-order-detail__head h3 {
    margin: 0 0 4px;
}

.profile-order-detail__items {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fill, minmax(250px, 250px));
    justify-content: start;
}

.profile-order-product-card {
    cursor: pointer;
    width: 250px;
    max-width: 100%;
}

.profile-order-product-card.is-focused {
    border-color: var(--accent);
}

.profile-order-product-card__image {
    background: linear-gradient(135deg, var(--accent-soft), #fff);
    border: 1px solid var(--line);
}

.profile-order-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 12px 14px 14px;
    margin-bottom: 10px;
    box-shadow: var(--shadow);
}

.profile-order-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    font-size: 14px;
}

.profile-order-card__total {
    font-weight: 650;
    white-space: nowrap;
}

.profile-order-card__delivery {
    margin: 8px 0 0;
    font-size: 13px;
}

.profile-order-pay {
    margin-top: 12px;
    width: 100%;
    max-width: 280px;
}

/* Внутренний статус «Проверка оплаты»: неактивная кнопка — светло-серая, «уже нажата» */
.profile-order-pay.is-disabled,
.profile-order-pay:disabled {
    opacity: 1;
    cursor: not-allowed;
    pointer-events: none;
    color: #5a5a62;
    background: linear-gradient(180deg, #e9eaee 0%, #dcdee4 100%);
    border: 1px solid #cfd1d8;
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, .1),
        inset 0 1px 0 rgba(255, 255, 255, .55);
    transform: translateY(1px);
}

.profile-order-pay.is-disabled:hover,
.profile-order-pay:disabled:hover {
    color: #5a5a62;
    background: linear-gradient(180deg, #e9eaee 0%, #dcdee4 100%);
    transform: translateY(1px);
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, .1),
        inset 0 1px 0 rgba(255, 255, 255, .55);
}

.profile-order-pay-hint {
    margin: 0 0 8px;
    font-size: 12px;
    line-height: 1.35;
}

.profile-order-detail .profile-order-pay {
    max-width: none;
}

.profile-purchase-row .profile-order-pay {
    margin-top: 10px;
    max-width: 100%;
}

.profile-order-lines {
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}

.profile-order-line {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 8px;
    align-items: baseline;
    font-size: 13px;
    padding: 6px 0;
    border-top: 1px solid var(--line);
}

.profile-order-line__name {
    min-width: 0;
}

.profile-order-line__qty,
.profile-order-line__sum {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.profile-purchase-row {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 10px 12px 12px;
    margin-bottom: 8px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.profile-purchase-row:hover {
    border-color: var(--row-hover-border);
    background: var(--row-hover-bg);
    transform: translateY(-1px);
}

.profile-purchase-row__ctx {
    font-size: 12px;
    margin-bottom: 6px;
}

.profile-purchase-row__body {
    font-size: 14px;
}

.profile-purchase-row__meta {
    margin-top: 6px;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.page-head__slot-end {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 44px;
    min-height: 44px;
}

.page-head__slot-end .page-head__pad {
    display: block;
    width: 44px;
    height: 44px;
}

.profile-block {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 14px 16px 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}

.profile-block__title {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 650;
}

.profile-block__btn {
    margin-top: 12px;
}

.profile-block--clickable {
    display: block;
    width: 100%;
    margin: 0 0 12px;
    padding: 14px 16px 16px;
    text-align: left;
    font: inherit;
    color: inherit;
    cursor: pointer;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--card);
    box-shadow: var(--shadow);
    position: relative;
    transition: border-color .15s ease;
}

.profile-block--clickable:hover,
.profile-block--clickable:focus-visible {
    border-color: var(--row-hover-border);
    background: var(--row-hover-bg) !important;
    color: inherit !important;
    transform: none !important;
    box-shadow: var(--shadow) !important;
}

.profile-block--clickable .profile-block__title {
    padding-right: 28px;
}

.profile-block--clickable::after {
    content: '›';
    position: absolute;
    top: 12px;
    right: 14px;
    font-size: 22px;
    font-weight: 300;
    color: var(--muted);
    line-height: 1;
}

.profile-edit-inner {
    padding-top: 4px;
    padding-bottom: calc(20px + var(--bottom-nav-stack) + env(safe-area-inset-bottom, 0px));
}

.profile-edit-form__label {
    display: grid;
    gap: 6px;
    font-size: 13px;
    font-weight: 650;
    color: var(--muted);
}

.profile-edit-readonly {
    display: grid;
    gap: 4px;
    padding: 10px 0 4px;
    font-size: 15px;
}

.profile-edit-legal-lead {
    margin: 14px 0 8px;
    font-size: 14px;
    line-height: 1.4;
}

.profile-edit-legal-btn {
    width: 100%;
    margin-bottom: 8px;
}

.profile-legal-inner {
    padding-top: 4px;
    padding-bottom: calc(20px + var(--bottom-nav-stack) + env(safe-area-inset-bottom, 0px));
}

.profile-edit-form.order-form,
.profile-legal-form.order-form {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    box-shadow: var(--shadow);
}

.profile-placeholder {
    margin: 0;
    font-size: 14px;
    color: var(--muted);
    line-height: 1.45;
}

.profile-kv {
    display: grid;
    gap: 8px;
    margin: 0;
    font-size: 14px;
}

.profile-kv dt {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.profile-kv dd {
    margin: 0 0 4px;
}

.profile-recent {
    margin-top: 22px;
}

.profile-recent__title {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 650;
}

.profile-recent .products {
    display: grid;
    gap: 12px;
}

.profile-recent .product-card {
    margin: 0;
}

.icon-button {
    position: relative;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--text);
    font-size: 30px;
    line-height: 1;
    box-shadow: 0 8px 22px rgba(16, 24, 40, .08);
}

.notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid #fff;
}

.cart-mini {
    width: auto;
    min-width: 58px;
    font-size: 15px;
}

.page-spacer {
    display: block;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    color: var(--text);
    padding: 15px 16px;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(193, 18, 31, .55);
    box-shadow: 0 0 0 5px rgba(193, 18, 31, .08);
}

textarea {
    min-height: 80px;
    resize: vertical;
}

.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 18px;
    min-height: 120px;
}

.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

/* Выравнивание строк соседних плиток (остатки, цены — на одной горизонтали). Требует 6 прямых потомков. */
@supports (grid-template-rows: subgrid) {
    .product-card.product-card--premium {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: subgrid;
        grid-row: span 6;
        height: auto;
    }
}

.product-card:hover {
    border-color: var(--row-hover-border);
    box-shadow: 0 16px 38px var(--row-hover-shadow);
    transform: translateY(-2px);
}

.product-card img,
.product-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: linear-gradient(135deg, #fff1f2, #f3f4f6);
}

.product-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 11px;
    min-height: 0;
    padding: 18px;
}

.product-stock-file {
    font-size: 0.85rem;
    line-height: 1.35;
    color: var(--muted, #6b7280);
}

.product-stock-file--catalog {
    font-size: 0.82rem;
    margin-top: 2px;
}

.product-stock-file--catalog .product-stock-file__title {
    font-size: 0.82rem;
    margin-bottom: 4px;
}

.product-stock-file--catalog .product-stock-file__row {
    margin-top: 2px;
}

.product-stock-file__title {
    font-weight: 650;
    color: var(--text, #111827);
    margin-bottom: 6px;
    font-size: 0.88rem;
}

.product-stock-file__row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 12px;
    margin-top: 4px;
}

.product-stock-file__label {
    flex: 1 1 auto;
    min-width: 0;
}

.product-stock-file__val {
    font-weight: 600;
    white-space: nowrap;
    color: var(--text, #111827);
}

.product-stock-val {
    font-weight: 600;
}

.product-stock-file__val.product-stock-val--critical,
.product-stock-val.product-stock-val--critical {
    color: #b91c1c;
}

.product-stock-file__val.product-stock-val--low,
.product-stock-val.product-stock-val--low {
    color: #c2410c;
}

.product-stock-file__val.product-stock-val--moderate,
.product-stock-val.product-stock-val--moderate {
    color: #a16207;
}

.product-stock-file__val.product-stock-val--ok,
.product-stock-val.product-stock-val--ok {
    color: #15803d;
}

.product-companion-row__stock-wrap {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    min-width: 0;
    width: 100%;
}

.product-companion-row__stock-heading {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
}

.product-companion-row__stock-chips {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1 1 auto;
}

.product-chip--companion {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    max-width: calc(50% - 12px);
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 720;
    letter-spacing: -.015em;
    white-space: nowrap;
}

.product-chip--companion .product-chip__text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-chip--companion .product-chip__ico {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.product-companion-stock-sep {
    flex-shrink: 0;
    color: #c5c9d0;
    font-weight: 700;
    font-size: 13px;
    line-height: 1;
}

.product-body button {
    margin-top: auto;
    width: 100%;
    flex-shrink: 0;
}

/* Плитка каталога «премиум» (иконки остатков, цены, pill CTA) */
.product-card--premium {
    border-radius: 18px;
    border: 1px solid rgba(42, 39, 37, .06);
    box-shadow: 0 3px 14px rgba(24, 20, 18, .06), 0 1px 2px rgba(24, 20, 18, .04);
}

.product-card--premium:hover {
    border-color: rgba(42, 39, 37, .09);
    box-shadow: 0 10px 28px rgba(24, 20, 18, .1);
}

.product-card--premium .product-card__media {
    padding: 11px 11px 0;
}

.product-card--premium .product-card__media img,
.product-card--premium .product-card__media .product-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 14px;
    vertical-align: middle;
}

/* Плоская вёрстка премиум-плитки: отступы и ритм как у бывшего .product-card__body */
.product-card--premium > .product-card__title {
    margin: 0;
    padding: 13px 14px 0;
}

.product-card--premium > .product-card__sku {
    margin: 9px 0 0;
    padding: 0 14px;
}

.product-card--premium > .product-card__stock {
    margin: 9px 0 0;
    padding: 0 14px;
}

.product-card--premium > .product-card__prices {
    margin: 9px 0 0;
    padding: 0 14px;
}

.product-card--premium > .product-card__cta-row {
    margin: 9px 0 0;
    padding: 5px 14px 14px;
}

@supports not (grid-template-rows: subgrid) {
    .product-card.product-card--premium > .product-card__title {
        min-height: calc(1.26em * 4);
    }

    .product-card.product-card--premium > .product-card__cta-row {
        margin-top: auto;
        padding-top: 14px;
    }
}

.product-card__title {
    margin: 0;
    font-size: 15px;
    font-weight: 780;
    letter-spacing: -.025em;
    line-height: 1.26;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    line-clamp: 4;
    -webkit-line-clamp: 4;
    overflow: hidden;
}

.product-card__sku {
    margin: 0;
    font-size: 11.5px;
    font-weight: 500;
    color: #9ca0a8;
}

.product-card__stock {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 1px;
}

.product-card__stock-title {
    font-size: 11px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #8b8f96;
}

.product-card__chips {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 5px;
    width: 100%;
    min-width: 0;
}

.product-card--premium .product-chip {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    max-width: 50%;
    padding: 6px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 720;
    line-height: 1.15;
    letter-spacing: -.015em;
    white-space: nowrap;
}

.product-chip__text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-chip__ico {
    flex-shrink: 0;
    width: 15px;
    height: 15px;
}

.product-card--premium .product-chip--ok {
    background: var(--stock-chip-ok-bg);
    color: var(--stock-chip-ok);
}

.product-card--premium .product-chip--moderate {
    background: rgba(180, 130, 20, .12);
    color: #9a7310;
}

.product-card--premium .product-chip--low {
    background: rgba(194, 65, 12, .12);
    color: #b45309;
}

.product-card--premium .product-chip--critical {
    background: rgba(185, 28, 28, .12);
    color: #b91c1c;
}

.product-card__prices {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 3px;
}

.product-card__price-retail {
    font-size: 16px;
    font-weight: 820;
    color: var(--accent);
    letter-spacing: -.02em;
}

.product-card__price-wholesale {
    font-size: 13px;
    font-weight: 650;
    color: var(--graphite);
}

.product-card__price-roll {
    display: block;
    font-size: 11px;
    font-weight: 550;
    color: #b0b3ba;
}

.product-card__cta-row {
    display: flex;
    justify-content: flex-end;
    padding-top: 5px;
}

.product-card--premium button.product-card__open {
    width: auto !important;
    margin-top: 0 !important;
    margin-left: auto;
    padding: 9px 18px !important;
    font-size: 13px !important;
    font-weight: 750 !important;
    border-radius: 999px !important;
    box-shadow: 0 4px 16px rgba(158, 14, 31, .24) !important;
}

.product-card__open-arr {
    font-weight: 400;
    margin-left: 2px;
    opacity: .95;
}

.product-body h3 {
    margin: 0;
    font-size: 17px;
    letter-spacing: -.02em;
    line-height: 1.25;
}

.muted {
    color: var(--muted);
    font-size: 13px;
}

.price {
    display: grid;
    gap: 5px;
    color: var(--accent);
    font-weight: 760;
}

.price small {
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
}

.load-more {
    display: block;
    width: 100%;
    margin: 24px 0 0;
    border-radius: 18px;
}

.empty-state {
    grid-column: 1 / -1;
    margin: 18px 0;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
    color: var(--muted);
    text-align: center;
    box-shadow: var(--shadow);
}

.products.is-loading::before {
    content: "Загружаем каталог...";
    grid-column: 1 / -1;
    padding: 28px;
    border-radius: var(--radius-lg);
    background: #fff;
    color: var(--muted);
    text-align: center;
    box-shadow: var(--shadow);
}

dialog {
    width: min(760px, calc(100% - 24px));
    border: 0;
    border-radius: 30px;
    padding: 0;
    background: transparent;
}

.product-page-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow);
}

/* Страница товара: фото не выше 80% высоты экрана (Telegram / мобильные) */
.product-page-card .product-page-hero .product-image,
.product-page-card .product-page-hero img.product-image {
    display: block;
    width: 100%;
    max-height: 80vh;
    max-height: 80dvh;
    height: auto;
    aspect-ratio: auto;
    object-fit: contain;
    object-position: center;
    background: linear-gradient(135deg, #fff1f2, #f3f4f6);
}

.product-page-body {
    display: grid;
    gap: 18px;
    padding: 18px 0 14px;
}

.product-page-body h1 {
    margin: 0;
    font-size: clamp(24px, 7vw, 36px);
    line-height: 1.05;
    letter-spacing: -.04em;
}

.product-prices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* Не трогать вложенные div в карточке товара (.product-prices--dual) — там свой flex */
.product-prices:not(.product-prices--dual) div {
    display: grid;
    gap: 4px;
    padding: 14px;
    border-radius: 18px;
    background: var(--accent-soft);
}

.product-prices span,
.product-prices small {
    color: var(--muted);
    font-size: 13px;
}

.product-prices strong {
    color: var(--accent);
    font-size: 19px;
}

/* Карточка товара: две плитки (розница / опт), у каждой свой «Добавить» и количество */
.product-buy-sheet {
    display: grid;
    gap: 8px;
}

.product-prices--dual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    --product-price-label-w: 5.35rem;
}

.product-prices--dual .product-price-tile__label {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    margin: 0;
    padding: 0 6px 0 0;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.2;
    border-right: 1px solid var(--line);
    min-height: 2.25em;
    display: flex;
    align-items: center;
}

.product-prices--dual .product-price-tile {
    display: block;
    padding: 11px 12px;
    border-radius: 16px;
    background: var(--accent-soft);
    border: 1px solid var(--line);
    text-align: left;
    min-width: 0;
}

/* Плитки: колонка подписи (вне блока цены) + основной блок (цена | + / кол-во) */
.product-price-tile__row {
    display: grid;
    grid-template-columns: var(--product-price-label-w, 5.35rem) minmax(0, 1fr);
    align-items: center;
    column-gap: 8px;
    row-gap: 4px;
    width: 100%;
    min-width: 0;
}

.product-price-tile__main {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    min-width: 0;
}

.product-price-tile__price-block {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: baseline;
    gap: 4px 6px;
    min-width: 0;
    flex: 1 1 auto;
}

.product-prices--dual .product-price-tile__roll {
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.2;
}

.product-prices--dual .product-price-tile strong {
    font-size: 14px;
    color: var(--accent);
    white-space: nowrap;
    flex-shrink: 0;
}

.product-price-tile__slot {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    min-width: 0;
}

.product-inline-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    padding: 0;
    border-radius: 10px;
    background: #fff;
    color: var(--accent);
    font-weight: 700;
    box-shadow: none;
    border: 1px solid var(--line);
}

.product-inline-add__ico {
    display: block;
    pointer-events: none;
}

.product-inline-add:hover {
    background: var(--accent-soft);
    transform: none;
    box-shadow: none;
    color: var(--accent-dark);
}

.product-inline-add:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.product-add-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    margin: 0;
    flex-shrink: 0;
}

.product-add-row input[type="number"] {
    width: 52px;
    min-width: 48px;
    max-width: 64px;
    flex: 0 1 auto;
    padding: 4px 4px;
    font-size: 14px;
    line-height: 1.2;
    text-align: center;
}

.product-quantity-unit {
    flex-shrink: 0;
    font-weight: 750;
    font-size: 12px;
    color: var(--muted);
}

.product-inline-cancel {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--accent);
    font-size: 22px;
    line-height: 1;
    font-weight: 300;
    box-shadow: none;
}

.product-inline-cancel:hover {
    background: rgba(193, 18, 31, .1);
    transform: none;
    color: var(--accent-dark);
    box-shadow: none;
}

.notice {
    margin: 0;
    padding: 13px 14px;
    border-radius: 16px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 14px;
}

dialog::backdrop {
    background: rgba(0, 0, 0, .45);
}

.dialog-card {
    padding: 22px;
}

.dialog-head,
.mode-row,
.quantity-row,
.cart-item {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}

.mode-row {
    justify-content: flex-start;
    margin: 16px 0;
    flex-wrap: wrap;
}

.mode-row label {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 14px;
    background: #fff;
}

.quantity-row input {
    max-width: 130px;
}

.attributes {
    display: grid;
    gap: 0;
    margin: 16px 0;
}

.attributes__row {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 10px;
    border-bottom: 1px solid var(--line);
    padding: 10px 0;
}

.attributes__row:last-child {
    border-bottom: none;
}

.attributes__ico {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(42, 39, 37, 0.42);
}

.attributes__svg {
    display: block;
    flex-shrink: 0;
}

.attributes__label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 550;
    min-width: 0;
}

.attributes__value {
    font-size: 14px;
    font-weight: 750;
    text-align: right;
    margin: 0;
}

.attributes--pdp {
    margin: 8px 0 6px;
}

.attributes--pdp .attributes__row {
    padding: 11px 0;
    border-bottom: 1px solid rgba(42, 39, 37, .07);
}

.attributes--pdp .attributes__row:last-child {
    border-bottom: none;
}

.companions {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.companions h3 {
    margin: 6px 0 0;
}

.product-companion-row {
    display: grid;
    grid-template-columns: 1fr 42px;
    gap: 8px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.product-companion-row__open {
    display: grid;
    gap: 2px;
    padding: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--text);
    text-align: left;
    box-shadow: none !important;
}

.product-companion-row__open span {
    color: var(--muted);
    font-size: 13px;
}

.product-companion-row__plus {
    width: 38px;
    height: 38px;
    padding: 0 !important;
    border-radius: 12px !important;
    font-size: 22px;
    line-height: 1;
    background: var(--accent) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 3px 12px rgba(158, 14, 31, .28) !important;
}

.product-companion-row__plus:hover {
    background: var(--accent-dark) !important;
    color: #fff !important;
    transform: none !important;
}

.product-companion-row__qty {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
}

.product-companion-row__qty input {
    width: 96px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    text-align: center;
}

.product-companion-row.is-selected {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.companion-offer-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    align-items: flex-end;
    padding: 16px;
    background: rgba(18, 20, 24, .42);
}

.companion-offer-modal__sheet {
    width: min(100%, 720px);
    max-height: min(88vh, 780px);
    margin: 0 auto;
    overflow: auto;
    padding: 18px;
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow);
}

.companion-offer-modal__sheet h3 {
    margin: 0 0 8px;
}

.companion-offer-modal__list {
    display: grid;
    gap: 10px;
    margin: 14px 0;
}

.companion-offer-modal__row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.companion-offer-modal__row > div:first-child {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.companion-offer-modal__row > div:first-child strong {
    display: block;
    font-size: 16px;
    line-height: 1.28;
    overflow-wrap: anywhere;
}

.companion-offer-modal__row > button {
    min-width: 132px;
}

.companion-offer-modal__qty {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-start;
    color: var(--muted);
    font-size: 13px;
}

.companion-offer-modal__qty input {
    width: 96px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    text-align: center;
}

.companion-offer-modal__qty + button {
    justify-self: end;
    grid-row: 2;
}

.companion-offer-modal__row {
    grid-template-columns: minmax(0, 1fr) auto;
}

.companion-offer-modal__row > div:first-child {
    grid-column: 1 / -1;
}

.companion-offer-modal [data-offer-companion-skip] {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 12px auto 0;
    text-align: center;
}

.cart-item {
    margin: 10px 0;
    padding: 14px;
    border-radius: var(--radius-md);
}

.swipe-content.cart-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: flex-start;
}

.swipe-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    touch-action: pan-y;
}

.swipe-content {
    position: relative;
    z-index: 1;
    margin: 10px 0;
    transition: transform .22s ease;
}

.swipe-item.is-swiped .swipe-content {
    transform: translateX(-86px);
}

.swipe-item:hover .swipe-content.cart-item {
    border-color: var(--row-hover-border);
    background-color: rgba(247, 247, 249, .97);
}

.swipe-item.is-swiped:hover .swipe-content.cart-item {
    background-color: var(--card);
}

.swipe-delete {
    position: absolute;
    inset: 10px 0 10px auto;
    width: 92px;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    background: #ef233c;
    box-shadow: none;
    font-size: 22px;
}

.cart-item-text {
    min-width: 0;
}

.cart-item-body {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: start;
}

.cart-item-qty {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
}

.cart-item-qty__label {
    font-size: 12px;
    font-weight: 650;
    color: var(--muted);
}

.cart-qty-input {
    width: 5.25rem;
    max-width: 100%;
    padding: 8px 8px;
    font-size: 16px;
    line-height: 1.2;
    border-radius: 10px;
    border: 1px solid var(--line);
    text-align: center;
    background: #fff;
}

.cart-qty-input--small {
    width: 4.5rem;
    padding: 6px 8px;
    font-size: 14px;
}

.cart-companion-list {
    grid-column: 1 / -1;
    display: grid;
    gap: 8px;
    margin: 10px 0 4px 18px;
    padding: 10px 12px;
    border-left: 3px solid var(--accent);
    border-radius: 0 12px 12px 0;
    background: rgba(193, 18, 31, .04);
}

.cart-companion-list__title {
    font-size: 12px;
    font-weight: 750;
    color: var(--accent);
}

.cart-companion-line {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    padding: 8px 0;
}

.cart-companion-line__text {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.cart-companion-line__qty {
    justify-content: flex-end;
    flex-wrap: nowrap;
}

.cart-companion-line__remove {
    width: 28px;
    height: 28px;
    padding: 0 !important;
    border-radius: 50% !important;
    background: var(--accent-soft) !important;
    color: var(--accent);
    box-shadow: none !important;
}

.cart-companion-add {
    grid-column: 1 / -1;
    margin-top: 8px;
}

.cart-companion-add__toggle {
    padding: 7px 10px !important;
    border-radius: 10px !important;
    background: transparent !important;
    color: var(--accent);
    box-shadow: none !important;
    font-size: 13px;
}

.cart-companion-add__box {
    display: grid;
    gap: 8px;
    margin-top: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.cart-companion-add__field {
    display: grid;
    gap: 4px;
    font-size: 12px;
    font-weight: 650;
    color: var(--muted);
}

.cart-companion-add__field select,
.cart-companion-add__field input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.cart-companion-add__qty {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-item-qty__unit {
    font-size: 14px;
    font-weight: 700;
    color: var(--muted);
}

.cart-item > button.secondary {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
}

.order-form {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.total {
    text-align: right;
    font-size: 18px;
}

.page-head--cart {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    gap: 0 4px;
    position: sticky;
    top: 0;
    z-index: 12;
    margin: 0 calc(-1 * var(--app-pad-x));
    padding: 8px var(--app-pad-x) 12px;
    background: rgba(247, 247, 249, .96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.cart-panel .total {
    margin: 12px 0 8px;
}

.cart-to-checkout {
    width: 100%;
    margin-top: 4px;
    margin-bottom: 8px;
}

.cart-to-checkout:disabled {
    opacity: .45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.cart-panel--checkout .checkout-form {
    gap: 14px;
    margin-top: 0;
    padding-bottom: calc(24px + var(--bottom-nav-stack) + env(safe-area-inset-bottom, 0px));
}

.checkout-total-line {
    margin: 8px 0 12px;
    font-size: 15px;
    text-align: center;
}

.checkout-fieldset {
    min-width: 0;
    border: 0;
    border-radius: 22px;
    padding: 14px 18px;
    margin: 0;
    background: var(--card);
    box-shadow: var(--shadow);
}

.checkout-legend {
    display: block;
    padding: 0 0 10px;
    margin: 0;
    font-size: 13px;
    font-weight: 650;
    color: var(--muted);
    line-height: 1.25;
}

.checkout-segment {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.checkout-segment__item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    min-height: 48px;
    padding: 10px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.15;
    text-align: center;
    cursor: pointer;
}

.checkout-segment__item input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 0;
    padding: 0;
    border-radius: 50%;
}

.checkout-profile-preview {
    margin-top: 10px;
    white-space: pre-wrap;
    word-break: break-word;
}

.checkout-custom-fields,
.checkout-address-block {
    display: grid;
    gap: 10px;
}

.checkout-cdek {
    display: grid;
    gap: 10px;
}

.checkout-cdek__btn {
    width: 100%;
}

.checkout-cdek__info {
    margin: 0;
    line-height: 1.35;
}

.checkout-delivery-current {
    display: grid;
    gap: 8px;
}

.checkout-delivery-selected {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
}

.checkout-delivery-actions {
    display: grid;
    gap: 8px;
}

.checkout-delivery-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    align-items: end;
    padding: 18px;
    background: rgba(18, 20, 24, .42);
}

.checkout-delivery-modal__sheet {
    width: min(100%, 720px);
    max-height: min(88vh, 820px);
    margin: 0 auto;
    overflow: auto;
    padding: 18px;
    border-radius: 26px;
    background: var(--bg);
    box-shadow: var(--shadow);
}

.checkout-delivery-modal__head {
    display: grid;
    grid-template-columns: 1fr 44px;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.checkout-delivery-modal__head h3 {
    margin: 0;
    text-align: center;
}

.checkout-delivery-modal__body {
    display: grid;
    gap: 12px;
}

.checkout-delivery-modal__option {
    background: #fff;
}

.profile-notifications-modal {
    position: fixed;
    inset: 0;
    z-index: 65;
    padding: calc(66px + env(safe-area-inset-top, 0px)) 12px 12px;
    background: transparent;
}

.profile-notifications-modal__sheet {
    width: min(calc(100vw - 24px), 460px);
    max-height: min(76vh, 680px);
    margin-left: auto;
    overflow: auto;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(16, 24, 40, .2);
    padding: 18px;
    border: 1px solid var(--line);
}

.profile-notifications-modal__sheet::before {
    content: "";
    position: absolute;
    top: calc(58px + env(safe-area-inset-top, 0px));
    right: 28px;
    width: 16px;
    height: 16px;
    transform: rotate(45deg);
    background: #fff;
    border-left: 1px solid var(--line);
    border-top: 1px solid var(--line);
}

.profile-notifications-modal__head {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    margin-bottom: 8px;
}

.profile-notifications-modal__head h3 {
    grid-column: 2;
    margin: 0;
    text-align: center;
    font-size: 22px;
}

.profile-notifications-modal__head .icon-button {
    grid-column: 3;
}

.profile-notifications-modal__list {
    display: grid;
    gap: 0;
}

.profile-notification {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 12px;
    padding: 14px 0;
    border-top: 1px solid var(--line);
}

.profile-notification:first-child {
    border-top: 0;
}

.profile-notification__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-top: 3px;
    border-radius: 50%;
    background: #22b573;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

.profile-notification__body {
    display: grid;
    gap: 4px;
}

.profile-notification__time {
    color: #9aa0aa;
    font-size: 13px;
}

.profile-notification__body strong {
    color: #1d2b53;
    line-height: 1.25;
}

.profile-notification__body p {
    margin: 0;
    color: #1d2b53;
    line-height: 1.35;
}

.profile-notifications-empty {
    margin: 18px 0 6px;
    text-align: center;
}

.checkout-form > .profile-edit-form__label {
    gap: 8px;
}

.checkout-place-order {
    width: 100%;
    margin-top: 6px;
}

.checkout-place-order.is-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: wait;
    opacity: .9;
}

.checkout-place-order.is-loading:hover {
    transform: none;
}

.button-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: button-spin .75s linear infinite;
}

@keyframes button-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Подвал: полоска на всю ширину, только иконки. Перебиваем глобальные стили button (красные «таблетки»). */
.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    gap: 0;
    padding: 2px 4px calc(2px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, .98);
    backdrop-filter: blur(16px);
}

button.bottom-nav__btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 8px 4px !important;
    border-radius: 12px !important;
    background: transparent !important;
    color: #8a8f98 !important;
    box-shadow: none !important;
    transform: none !important;
    border: none !important;
    font-weight: 400;
    line-height: 0;
}

button.bottom-nav__btn:hover,
button.bottom-nav__btn:focus-visible {
    background: var(--row-hover-bg) !important;
    color: #5c6169 !important;
    transform: none !important;
    box-shadow: none !important;
}

button.bottom-nav__btn.is-active {
    color: var(--accent) !important;
    background: transparent !important;
}

button.bottom-nav__btn.is-active:hover,
button.bottom-nav__btn.is-active:focus-visible {
    background: var(--row-hover-bg) !important;
    color: var(--accent) !important;
}

.bottom-nav__icon {
    display: block;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    pointer-events: none;
}

.cart-badge {
    position: absolute;
    top: 4px;
    right: max(8px, 18%);
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 750;
    line-height: 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(193, 18, 31, .35);
}

.cart-badge.is-empty {
    display: none;
}

.wishlist-badge {
    position: absolute;
    top: 4px;
    right: max(6px, 14%);
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 750;
    line-height: 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(193, 18, 31, .3);
}

.wishlist-badge.is-empty {
    display: none;
}

/* Подписи к иконкам в нижней навигации */
.bottom-nav--labeled {
    padding: 4px 2px calc(4px + env(safe-area-inset-bottom));
}

.bottom-nav--labeled button.bottom-nav__btn {
    flex-direction: column;
    gap: 3px;
    min-height: 52px;
    padding: 5px 2px 8px !important;
    line-height: 1;
}

.bottom-nav__label {
    font-size: 10px;
    font-weight: 650;
    color: #9298a3;
    letter-spacing: .01em;
    pointer-events: none;
}

button.bottom-nav__btn.is-active .bottom-nav__label,
.bottom-nav__btn.is-active .bottom-nav__label {
    color: var(--accent);
}

.bottom-nav--labeled .cart-badge {
    top: 0;
    right: 18%;
}

.bottom-nav--labeled .wishlist-badge {
    top: 0;
    right: 16%;
}

@media (max-width: 640px) {
    .app {
        --app-pad-x: 8px;
        padding: 0 var(--app-pad-x) 68px;
        padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    }

    .catalog-screen {
        padding-top: 8px;
    }

    .toolbar {
        grid-template-columns: 1fr;
    }

    .toolbar.toolbar--catalog-premium {
        grid-template-columns: minmax(0, 1fr) minmax(96px, 32%);
        gap: 8px;
        margin: 8px 0 14px;
        padding: 12px;
        border-radius: 18px;
    }

    .toolbar.toolbar--catalog-premium select.toolbar-select {
        min-height: 46px;
        font-size: 14px;
    }

    .toolbar-search {
        min-height: 46px;
    }

    .hero--catalog-premium {
        padding: 2px 0 0;
    }

    .hero--catalog-premium h1 {
        font-size: clamp(22px, 6vw, 32px);
    }

    .hero {
        display: grid;
        padding: 22px;
    }

    .products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 6px;
        column-gap: 8px;
    }

    .catalog-screen > .products,
    .wishlist-screen-inner > .products {
        row-gap: 5px;
        column-gap: 7px;
    }

    .profile-order-detail__items {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .profile-order-product-card {
        width: auto;
    }

    .toolbar {
        gap: 8px;
        margin: 12px 0;
        padding: 10px;
        border-radius: 22px;
    }

    .product-card {
        border-radius: 18px;
    }

    .product-body {
        padding: 10px;
        gap: 7px;
    }

    .product-card--premium > .product-card__title {
        padding: 10px 10px 0;
    }

    .product-card--premium > .product-card__sku {
        margin-top: 6px;
        padding: 0 10px;
    }

    .product-card--premium > .product-card__stock {
        margin-top: 6px;
        padding: 0 10px;
    }

    .product-card--premium > .product-card__prices {
        margin-top: 6px;
        padding: 0 10px;
    }

    .product-card--premium > .product-card__cta-row {
        margin-top: 6px;
        padding: 5px 10px 11px;
    }

    @supports not (grid-template-rows: subgrid) {
        .product-card.product-card--premium > .product-card__cta-row {
            margin-top: auto;
            padding-top: 11px;
        }
    }

    .product-card__title {
        font-size: 13.5px;
    }

    .product-card__price-retail {
        font-size: 14px;
    }

    .product-card--premium .product-chip {
        font-size: 10.5px;
        padding: 5px 4px;
        gap: 3px;
    }

    .product-card__chips {
        gap: 4px;
    }

    .product-chip__ico {
        width: 14px;
        height: 14px;
    }

    .product-body h3 {
        font-size: 14px;
    }

    .muted,
    .price small {
        font-size: 11px;
    }

    .price {
        font-size: 13px;
    }

    .product-prices {
        grid-template-columns: 1fr;
    }

    .cart-item > button.secondary {
        display: none;
    }
}
