/* =========================================================================
   «МаркетЛайт» — the shop's own pages in the app look: the product page, the listings (section,
   brand, search, all products), the filter sheet, the cart and the rest of the buyer's pages.
   The shop's templates and scripts are the module's; only the look is here (plus the product page's
   markup in templates/entry-shop_product.twig and shop/product/gallery.twig).
   ========================================================================= */

/* ---- the parent's and the module's tokens, in this look: every page that has none of its own
   rules below still reads white cards, soft greys and the teal accent ---- */
:root {
    --c-surface: #fff;
    --c-surface-sunk: var(--ml-grey);
    --c-link: var(--ml-blue-d);
    --c-accent-text: var(--ml-blue-d);
    --r-sm: 10px;
    --r-md: 12px;
    --r-lg: var(--ml-radius);
    --shadow-lift: 0 12px 32px rgba(13, 59, 74, .16);
}
.ml-main .shop-wrap { max-width: 1360px; padding-inline: 16px; }
.ml-main .cms-btn { font-family: var(--ml-font-text); font-weight: 700; }
.ml-main .cms-btn--primary { background: var(--ml-blue); border-color: var(--ml-blue); color: #fff; border-radius: var(--ml-r-btn); }
.ml-main .cms-btn--primary:hover { background: var(--ml-blue-d); border-color: var(--ml-blue-d); }
.ml-main .cms-btn--ghost { border-radius: var(--ml-r-btn); border-color: var(--ml-blue-b); color: var(--ml-blue-d); background: #fff; }
.ml-main .cms-btn--ghost:hover { background: var(--ml-blue-l); }
.ml-main h1, .ml-main h2, .ml-main h3 { font-family: var(--ml-font-display); }

/* the page's end keeps clear of the tab bar */
@media (max-width: 1023.98px) {
    .ml-main:not(:has(.ml-hero)) { padding-bottom: 24px; }
}

/* breadcrumbs */
.ml-main .shop-crumbs, .ml-main .cms-crumbs { font: 500 12.5px var(--ml-font-text); color: var(--ml-ink3); }
.ml-main .cms-crumbs a { color: var(--ml-ink3); text-decoration: none; }
.ml-main .cms-crumbs a:hover { color: var(--ml-blue-d); }
.ml-main .cms-crumbs [aria-current], .ml-main .cms-crumbs li:last-child { color: var(--ml-ink); }
@media (max-width: 1023.98px) { .ml-main .shop-page--product .shop-crumbs { display: none; } }

/* ======================================================================
   THE PRODUCT PAGE
   ====================================================================== */
.ml-cardbox { background: #fff; border: 1px solid var(--ml-line2); border-radius: var(--ml-r); padding: 16px; box-shadow: 0 1px 2px rgba(18, 44, 58, .04); min-width: 0; }

.shop-page--product { padding-bottom: 150px; }
.shop-page--product > .shop-wrap { padding-inline: 0; }
.shop-page--product .shop-note { margin-inline: 16px; }
.ml-pdp.shop-product { display: block; }
.ml-pdp .shop-product__top { display: flex; flex-direction: column; gap: 14px; padding: 0; }
.ml-pdp .shop-product__summary, .ml-pdp .ml-pdp__info { margin-inline: 16px; }

/* the gallery: full width, 340 high, dots, nav buttons over it */
.ml-gallery { position: relative; min-width: 0; top: auto; }
.ml-gallery .shop-gallery__stage { position: relative; border-radius: 0; background: linear-gradient(160deg, #eaf1f5, #e2ecf2); height: 340px; overflow: hidden; }
.ml-gallery .shop-gallery__track { height: 100%; }
.ml-gallery .shop-gallery__slide { aspect-ratio: auto; height: 100%; display: grid; place-items: center; }
.ml-gallery .shop-gallery__link { display: grid; place-items: center; width: 100%; height: 100%; }
.ml-gallery .shop-gallery__img { object-fit: contain; width: 100%; height: 100%; mix-blend-mode: multiply; }
.ml-gallery .shop-gallery__empty { aspect-ratio: auto; width: 100%; height: 100%; display: grid; place-items: center; }
.ml-gallery .shop-gallery__empty .ml-art { width: 280px; height: 280px; }
.ml-gallery .shop-gallery__counter, .ml-gallery .shop-gallery__expand { display: none; }
.ml-gallery__dots { bottom: 12px; }
.ml-gallery__dots i { background: #c0d0d9; }
.ml-gallery__dots i.is-on { background: var(--ml-blue); }
.ml-gallery .shop-gallery__thumbs { display: none; }
.ml-gallery .shop-stickers { position: absolute; left: 12px; bottom: 12px; display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; z-index: 2; }
.ml-gallery .shop-sticker { border-radius: 8px; padding: 4px 8px; font: 800 11.5px var(--ml-font-display); }
.ml-gallery .shop-sticker svg { display: none; }
.ml-gallery .shop-sticker--discount, .ml-gallery .shop-sticker--sale { background: var(--ml-red) !important; color: #fff !important; }
.ml-gallery .shop-sticker--hit { background: var(--ml-deep) !important; color: #fff !important; text-transform: uppercase; }
.ml-gallery .shop-sticker--new { background: var(--ml-green) !important; color: #fff !important; text-transform: uppercase; }

.ml-pdp-nav { position: absolute; top: 10px; left: 0; right: 0; display: flex; justify-content: space-between; padding: 0 12px; z-index: 5; pointer-events: none; }
.ml-pdp-nav > * { pointer-events: auto; }
.ml-pdp-nav__grp { display: flex; gap: 8px; align-items: center; }
.ml-nbtn, .ml-pdp-nav .shop-toggle { width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .92); display: grid; place-items: center; box-shadow: 0 2px 10px rgba(18, 44, 58, .16); color: var(--ml-ink); border: 0; padding: 0; cursor: pointer; transition: transform .15s var(--ml-ease), color .15s; }
.ml-nbtn:active, .ml-pdp-nav .shop-toggle:active { transform: scale(.94); }
.ml-pdp-nav .shop-toggles { display: flex; gap: 8px; }
.ml-pdp-nav .shop-toggle--compare { display: none; }
.ml-pdp-nav .shop-toggle svg { width: 18px; height: 18px; }
.ml-pdp-nav .shop-toggle[aria-pressed="true"] { color: var(--ml-red); }
.ml-pdp-nav .shop-toggle[aria-pressed="true"] svg { fill: currentColor; }
/* the module's own «в избранное / сравнить» row under the title is replaced by the nav on a phone */
.ml-pdp .shop-product__summary > .shop-toggles { display: none; }

/* the buy card */
.ml-pdp .shop-product__summary { display: flex; flex-direction: column; gap: 14px; }
.ml-pdp .shop-product__brand { margin: 0; font: 700 11px var(--ml-font-text); letter-spacing: .6px; text-transform: uppercase; color: var(--ml-ink3); }
.ml-pdp .shop-product__brand a { text-decoration: none; color: inherit; }
.ml-pdp .shop-product__title { font: 800 18px/1.3 var(--ml-font-display); margin: 0; letter-spacing: 0; color: var(--ml-ink); }
.ml-pdp .shop-product__social { display: flex; align-items: center; gap: 8px; margin: 0; font: 500 11.5px var(--ml-font-text); color: var(--ml-ink3); flex-wrap: wrap; }
.ml-pdp .shop-product__rating { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: inherit; }
.ml-pdp .shop-product__avg { font: 700 12.5px var(--ml-font-text); color: var(--ml-ink); }
.ml-pdp .shop-product__count, .ml-pdp .shop-product__qa { color: var(--ml-ink3); font-size: 11.5px; }
.ml-pdp .shop-stars, .ml-pdp .shop-rating__stars { color: var(--ml-amber); }
.ml-pdp .shop-buy { display: flex; flex-direction: column; gap: 14px; margin: 0; border: 0; padding: 0; background: none; box-shadow: none; border-radius: 0; }
.ml-pdp .shop-buy__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between; }
.ml-pdp .shop-price--lg { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0; }
.ml-pdp .shop-price--lg p { margin: 0; }
.ml-pdp .shop-price--lg .shop-price__now, .ml-pdp .shop-price--lg .shop-price__value { font: 800 26px var(--ml-font-display); color: var(--ml-ink); }
.ml-pdp .shop-price--lg .shop-price__was { display: inline-flex; align-items: center; gap: 8px; }
.ml-pdp .shop-price--lg .shop-price__old { font: 500 14px var(--ml-font-text); color: var(--ml-ink3); }
.ml-pdp .shop-price--lg .shop-price__off { font: 800 12px var(--ml-font-display); background: var(--ml-red-l); color: var(--ml-red); border-radius: 8px; padding: 3px 8px; }
.ml-pdp .shop-stock { display: inline-flex; align-items: center; gap: 6px; font: 600 11.5px var(--ml-font-text); background: var(--ml-green-l); color: var(--ml-green); border-radius: 999px; padding: 5px 11px; margin: 0; }
.ml-pdp .shop-stock--out { background: var(--ml-line2); color: var(--ml-ink3); }
.ml-pdp .shop-stock__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ml-pdp .shop-buy__form { display: flex; flex-direction: column; gap: 14px; margin: 0; }

/* the options: axes as chips (a row of values), variants as the same chips */
.ml-pdp .shop-axes { display: flex; flex-direction: column; gap: 14px; }
.ml-pdp .shop-axis, .ml-pdp .shop-variants { border: 0; padding: 0; margin: 0; min-width: 0; }
.ml-pdp .shop-axis__legend, .ml-pdp .shop-variants__legend { font: 700 13.5px var(--ml-font-display); color: var(--ml-ink); padding: 0; margin-bottom: 8px; }
.ml-pdp .shop-axis__value { color: var(--ml-ink2); font-family: var(--ml-font-text); font-weight: 600; }
.ml-pdp .shop-axis__options, .ml-pdp .shop-variants__list { display: flex; gap: 8px; flex-wrap: wrap; }
.ml-pdp .shop-chip, .ml-pdp .shop-variant { position: relative; display: inline-flex; }
.ml-pdp .shop-chip__input, .ml-pdp .shop-variant__input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.ml-pdp .shop-chip__label, .ml-pdp .shop-variant { font: 600 12.5px var(--ml-font-text); padding: 9px 15px; border-radius: 999px; background: var(--ml-line2); color: #37474f; border: 1.5px solid transparent; transition: background-color .15s, border-color .15s, color .15s; display: inline-flex; gap: 8px; align-items: center; min-height: 0; box-shadow: none; }
.ml-pdp .shop-chip:hover .shop-chip__label, .ml-pdp .shop-variant:hover { border-color: var(--ml-blue-b); }
.ml-pdp .shop-chip__input:checked + .shop-chip__label, .ml-pdp .shop-variant:has(input:checked) { background: var(--ml-blue); border-color: var(--ml-blue); color: #fff; }
.ml-pdp .shop-chip__input:focus-visible + .shop-chip__label, .ml-pdp .shop-variant:has(input:focus-visible) { outline: 2px solid var(--ml-blue); outline-offset: 2px; }
.ml-pdp .shop-chip__input:disabled + .shop-chip__label, .ml-pdp .shop-variant.is-out { opacity: .5; text-decoration: line-through; }
.ml-pdp .shop-variant__label, .ml-pdp .shop-variant__price { padding: 0; font: inherit; }
.ml-pdp .shop-variant__price { opacity: .7; }
.ml-pdp .shop-link-btn { font: 600 11.5px var(--ml-font-text); color: var(--ml-blue-d); background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }

/* quantity, «В корзину» and the second-line buttons */
.ml-pdp .shop-buy__row { display: flex; gap: 10px; align-items: center; }
.ml-pdp .shop-qty { display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 1.5px solid var(--ml-line); border-radius: var(--ml-r-btn); padding: 4px; }
.ml-pdp .shop-qty__btn { width: 32px; height: 32px; border-radius: 9px; background: var(--ml-line2); border: 0; display: grid; place-items: center; cursor: pointer; color: var(--ml-ink); padding: 0; }
.ml-pdp .shop-qty__btn svg { width: 16px; height: 16px; }
.ml-pdp .shop-qty__input { width: 42px; min-width: 0; text-align: center; border: 0; background: none; font: 800 14px var(--ml-font-display); padding: 0; box-shadow: none; -moz-appearance: textfield; appearance: textfield; }
.ml-pdp .shop-buy__add { flex: 1; height: 50px; border-radius: 14px; background: var(--ml-blue); color: #fff; font: 700 15px var(--ml-font-text); display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; transition: background-color .15s, transform .15s var(--ml-ease); }
.ml-pdp .shop-buy__add:hover { background: var(--ml-blue-d); }
.ml-pdp .shop-buy__add:active { transform: scale(.98); }
.ml-pdp .shop-buy__add svg { width: 18px; height: 18px; }
.ml-pdp .shop-buy__more { display: flex; gap: 8px; flex-wrap: wrap; }
.ml-pdp .shop-buy__more .cms-btn { flex: 1; min-height: 44px; border-radius: var(--ml-r-btn); font-size: 13px; }
.ml-pdp .shop-buy__links { display: flex; gap: 14px; flex-wrap: wrap; font: 600 11.5px var(--ml-font-text); }
.ml-pdp .shop-buy__sku, .ml-pdp .shop-buy__rule { font: 500 11.5px var(--ml-font-text); color: var(--ml-ink3); margin: 0; }
.ml-pdp .shop-sale, .ml-pdp .shop-tiers, .ml-pdp .shop-calc { background: var(--ml-blue-l); border-radius: var(--ml-r-btn); padding: 12px; font: 600 12px var(--ml-font-text); color: var(--ml-blue-d); }

/* delivery */
.ml-pdp .shop-ship { border-top: 1px solid var(--ml-line2); padding-top: 12px; }
.ml-pdp .shop-ship__title { font: 700 13px var(--ml-font-display); display: flex; gap: 8px; align-items: center; margin: 0 0 6px; }
.ml-pdp .shop-ship__list { list-style: none; margin: 0; padding: 0; }
.ml-pdp .shop-ship__item { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font: 500 12.5px var(--ml-font-text); color: #37474f; }
.ml-pdp .shop-ship__price { font-weight: 700; white-space: nowrap; }
.ml-pdp .shop-ship__price.is-free { color: var(--ml-green); }
.ml-pdp .shop-trust { list-style: none; margin: 0; padding: 12px 0 0; border-top: 1px solid var(--ml-line2); display: flex; flex-direction: column; gap: 8px; }
.ml-pdp .shop-trust__item { display: flex; gap: 11px; align-items: flex-start; font: 500 12.5px var(--ml-font-text); color: #37474f; }
.ml-pdp .shop-trust__icon { color: var(--ml-blue); flex: none; display: grid; place-items: center; width: 19px; height: 19px; background: none; }

/* the info card: lead, advantages, key characteristics, then the tabs */
.ml-pdp__info { display: flex; flex-direction: column; gap: 14px; }
.ml-pdp .shop-product__lead { font: 400 13.5px/1.65 var(--ml-font-text); color: #37474f; margin: 0; }
.ml-pdp .shop-pros { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ml-pdp .shop-pros__item { display: flex; gap: 8px; font: 500 12.5px var(--ml-font-text); }
.ml-pdp .shop-pros__item svg { color: var(--ml-green); flex: none; width: 16px; height: 16px; }
.ml-pdp .shop-keyspecs__title { font: 700 13px var(--ml-font-display); margin: 0 0 6px; }
.ml-pdp .shop-keyspecs__list, .ml-pdp .shop-specs { margin: 0; }
.ml-pdp .shop-keyspecs__row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--ml-line2); font: 500 12.5px var(--ml-font-text); }
.ml-pdp .shop-keyspecs__row dt { color: var(--ml-ink2); }
.ml-pdp .shop-keyspecs__row dd { margin: 0; font-weight: 600; text-align: right; }
.ml-pdp .shop-keyspecs__all { font: 600 12px var(--ml-font-text); color: var(--ml-blue-d); text-decoration: none; display: inline-flex; gap: 6px; margin-top: 8px; }
.ml-pdp .shop-specs { width: 100%; border-collapse: collapse; }
.ml-pdp .shop-specs th, .ml-pdp .shop-specs td { padding: 8px 0; border-bottom: 1px solid var(--ml-line2); font: 500 12.5px var(--ml-font-text); text-align: left; vertical-align: top; }
.ml-pdp .shop-specs th { color: var(--ml-ink2); font-weight: 500; width: 46%; }
.ml-pdp .shop-specs td { font-weight: 600; text-align: right; }
.ml-pdp .shop-specs__group th { font: 700 11px var(--ml-font-text); letter-spacing: .6px; text-transform: uppercase; color: var(--ml-ink3); padding-top: 14px; }
.ml-pdp .shop-tabs { margin: 0; }
.ml-pdp .shop-tabs__bar { display: flex; gap: 20px; border-bottom: 1px solid var(--ml-line); margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.ml-pdp .shop-tabs__tab { font: 700 13.5px var(--ml-font-text); color: var(--ml-ink3); padding: 0 0 10px; border: 0; border-bottom: 2.5px solid transparent; background: none; cursor: pointer; margin-bottom: -1px; white-space: nowrap; }
.ml-pdp .shop-tabs__tab[aria-selected="true"] { color: var(--ml-blue-d); border-bottom-color: var(--ml-blue); }
.ml-pdp .shop-tabs__heading { font: 800 15px var(--ml-font-display); margin: 0 0 10px; }
.ml-pdp .shop-tabs[data-ready] .shop-tabs__heading { display: none; }
.ml-pdp .shop-tabs__n { background: var(--ml-line2); border-radius: 999px; padding: 0 7px; font: 600 11px var(--ml-font-text); color: var(--ml-ink2); }
.ml-pdp .shop-desc__body, .ml-pdp .cms-prose { font: 400 13.5px/1.65 var(--ml-font-text); color: #37474f; }
.ml-main .shop-related, .ml-main .shop-recent { margin-top: 24px; }
.ml-main .shop-related__title, .ml-main .shop-recent__title { font: 800 17px var(--ml-font-display); margin: 0 0 12px; }

/* the shop's bottom bar of the product page: above the tab bar, price + stepper + button */
/* .ml-body: the shop prints its product.css again after the theme, and its inset: auto 0 0 would put the bar under the tab bar */
.ml-body .shop-stickybar { position: fixed; inset: auto 0 calc(56px + env(safe-area-inset-bottom)) 0; z-index: 55; background: #fff; border-top: 1px solid var(--ml-line); box-shadow: 0 -10px 26px rgba(18, 44, 58, .10); transform: none; visibility: visible; padding: 0; }
.shop-stickybar.is-shown { transform: none; visibility: visible; }
.shop-stickybar .shop-wrap { padding: 10px 14px; max-width: none; }
.shop-stickybar__inner { display: flex; align-items: center; gap: 10px; }
.shop-stickybar__media, .shop-stickybar__name { display: none; }
.shop-stickybar__price { margin: 0; min-width: 96px; font: 800 19px var(--ml-font-display); color: var(--ml-ink); flex: none; }
.ml-stepper { display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 1.5px solid var(--ml-line); border-radius: var(--ml-r-btn); padding: 4px; flex: none; }
.ml-stepper button { width: 32px; height: 32px; border-radius: 9px; background: var(--ml-line2); font: 700 16px var(--ml-font-text); display: grid; place-items: center; border: 0; cursor: pointer; padding: 0; }
.ml-stepper .q { min-width: 30px; text-align: center; font: 800 14px var(--ml-font-display); }
.shop-stickybar__buy { flex: 1; height: 50px; border-radius: 14px; background: var(--ml-blue); color: #fff; font: 700 15px var(--ml-font-text); display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; min-height: 0; cursor: pointer; }
.shop-stickybar__buy svg { width: 18px; height: 18px; }
.shop-page--product:has(.shop-stickybar.is-shown) { padding-bottom: 150px; }

/* the notice «ссылка скопирована» */
.ml-notice { position: fixed; left: 50%; bottom: calc(130px + env(safe-area-inset-bottom)); transform: translate(-50%, 16px); z-index: 90; background: var(--ml-deep); color: #fff; border-radius: 999px; padding: 11px 18px; font: 600 12.5px var(--ml-font-text); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s var(--ml-ease); white-space: nowrap; margin: 0; }
.ml-notice.is-on { opacity: 1; transform: translate(-50%, 0); }

/* a desktop: three columns — gallery | buy card | info; the buy card sticks */
@media (min-width: 1024px) {
    .shop-page--product, .shop-page--product:has(.shop-stickybar.is-shown) { padding-bottom: 48px; }
    .shop-page--product > .shop-wrap { padding-inline: 16px; padding-top: 24px; }
    .ml-main .shop-page--product .shop-crumbs { display: block; padding-bottom: 14px; margin: 0; }
    .ml-pdp .shop-product__top { display: grid; grid-template-columns: minmax(0, 1.15fr) 400px minmax(0, 1fr); gap: 24px; align-items: start; }
    .ml-pdp .shop-product__summary, .ml-pdp .ml-pdp__info { margin-inline: 0; }
    .ml-pdp .shop-product__summary { position: sticky; top: 176px; }
    .ml-pdp .shop-product__title { font-size: 22px; }
    .ml-gallery { position: relative; top: auto; }
    .ml-gallery .shop-gallery__stage { height: 480px; border-radius: 20px; }
    .ml-gallery .shop-gallery__empty .ml-art { width: 340px; height: 340px; }
    .ml-gallery .shop-gallery__thumbs { display: flex; gap: 10px; margin: 12px 0 0; padding: 0; list-style: none; }
    .ml-gallery .shop-gallery__thumb { width: 84px; height: 84px; border-radius: 14px; background: var(--ml-grey); border: 2px solid transparent; display: grid; place-items: center; overflow: hidden; }
    .ml-gallery .shop-gallery__thumb[aria-current] { border-color: var(--ml-blue); }
    .ml-gallery .shop-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
    .ml-pdp-nav { display: none; }
    .ml-body .shop-stickybar { display: none; }
    .ml-notice { bottom: 28px; }
}

/* ======================================================================
   LISTINGS: a section, a brand, the search, all products
   ====================================================================== */
.ml-main .shop-page--category .shop-layout, .ml-main .shop-layout { display: block; }
.ml-main .shop-head__title { font: 800 22px/1.2 var(--ml-font-display); margin: 0 0 8px; letter-spacing: 0; color: var(--ml-ink); }
.ml-main .shop-head__lead { font: 400 13.5px/1.55 var(--ml-font-text); color: var(--ml-ink2); margin: 0 0 12px; }
.ml-main .shop-section-title { font: 800 17px var(--ml-font-display); margin: 18px 0 10px; }
.ml-main .shop-products > .shop-section-title.visually-hidden { margin: 0; }

/* subsections as chips */
.ml-main .shop-subs__list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 6px; padding: 0; }
.ml-main .shop-subs__list li { display: block; }
.ml-main .shop-subs .shop-tile { display: block; }
.ml-main .shop-subs .shop-tile__media, .ml-main .shop-subs .shop-tile__img, .ml-main .shop-subs .shop-tile__ph, .ml-main .shop-subs .shop-tile__go, .ml-main .shop-subs .shop-tile svg { display: none; }
.ml-main .shop-subs .shop-tile, .ml-main .shop-subs .shop-tile__link { text-decoration: none; }
.ml-main .shop-subs .shop-tile { position: relative; border: 1.5px solid var(--ml-blue-b); border-radius: 999px; background: #fff; padding: 8px 13px; font: 600 12px var(--ml-font-text); color: #37474f; transition: background-color .15s, color .15s; box-shadow: none; aspect-ratio: auto; min-height: 0; }
.ml-main .shop-subs .shop-tile:hover { background: var(--ml-blue-l); border-color: var(--ml-blue); color: var(--ml-blue-d); }
.ml-main .shop-subs .shop-tile__link, .ml-main .shop-subs .shop-tile:hover .shop-tile__link { color: inherit; }
.ml-main .shop-subs .shop-tile__title, .ml-main .shop-subs .shop-tile__name { font: inherit; margin: 0; color: inherit; display: inline; }
.ml-main .shop-subs .shop-tile__count, .ml-main .shop-subs .shop-tile__meta { font: 500 10.5px var(--ml-font-text); opacity: .65; margin-left: 4px; display: inline; }

/* the toolbar: filters and the sort as buttons on top */
.ml-main .shop-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 12px; }
.ml-main .shop-toolbar__count { margin: 0; font: 500 12px var(--ml-font-text); color: var(--ml-ink3); order: 3; flex: 1 1 100%; }
.ml-main .shop-sort { display: flex; gap: 8px; align-items: center; margin: 0; flex: 1; min-width: 0; }
.ml-main .shop-sort__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ml-main .shop-sort__select { height: 42px; border: 1.5px solid var(--ml-blue-b); border-radius: 999px; background: #fff; color: var(--ml-blue-d); font: 700 12.5px var(--ml-font-text); padding: 0 34px 0 14px; min-width: 0; flex: 1; max-width: 240px; cursor: pointer; box-shadow: none; -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23078a9c' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; background-size: 16px; }
.ml-main .shop-sort__select--limit { flex: none; width: 72px; padding-right: 30px; }
html.ml-js .ml-main .shop-sort__apply { display: none; }
.ml-main .shop-sort__apply { height: 42px; border-radius: 999px; }
.ml-main .shop-toolbar__end { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.ml-main .shop-views { display: flex; gap: 4px; }
.ml-main .shop-views__btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #fff; border: 1.5px solid var(--ml-line); color: var(--ml-ink2); }
.ml-main .shop-views__btn[aria-current] { background: var(--ml-blue-l); border-color: var(--ml-blue-b); color: var(--ml-blue-d); }
.ml-main .shop-toolbar__print { display: none; }
.ml-main .shop-fchips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }
.ml-main .shop-fchips__open { height: 42px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--ml-blue); background: #fff; color: var(--ml-blue-d); font: 700 12.5px var(--ml-font-text); display: inline-flex; gap: 8px; align-items: center; text-decoration: none; min-height: 0; }
.ml-main .shop-fchips__open svg { width: 16px; height: 16px; }
.ml-main .shop-fchips__n { min-width: 18px; height: 18px; border-radius: 999px; background: var(--ml-blue); color: #fff; font: 800 10px var(--ml-font-display); display: grid; place-items: center; padding: 0 5px; }
.ml-main .shop-fchips__list { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.ml-main .shop-fchips .shop-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 999px; background: var(--ml-blue-l); color: var(--ml-blue-d); font: 600 11.5px var(--ml-font-text); text-decoration: none; }
.ml-main .shop-fchips .shop-chip svg { width: 12px; height: 12px; }
.ml-main .shop-fchips__reset { font: 600 12px var(--ml-font-text); color: var(--ml-ink2); }

/* the grid of cards: the shelf's grid, 2 / 3 / 4 / 5 */
.ml-main .shop-grid, .ml-main .shop-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; list-style: none; margin: 0; padding: 0; }
.ml-main .shop-grid__item { display: flex; min-width: 0; }
.ml-main .shop-grid .ml-card, .ml-main .shop-grid__item > .ml-card { max-width: none; }
@media (min-width: 520px) { .ml-main .shop-grid, .ml-main .shop-grid--4, .ml-main .shop-grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .ml-main .shop-grid, .ml-main .shop-grid--4, .ml-main .shop-grid--3 { grid-template-columns: repeat(4, 1fr); gap: 12px; } }
@media (min-width: 1024px) {
    .ml-main .shop-grid { gap: 16px; }
    .ml-main .shop-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; }
    .ml-main .shop-head__title { font-size: 26px; }
    .ml-main .shop-grid--4 { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1280px) { .ml-main .shop-layout .shop-grid { grid-template-columns: repeat(4, 1fr); } .ml-main .shop-layout:not(:has(.shop-side)) .shop-grid { grid-template-columns: repeat(5, 1fr); } }

/* the section tree and the filter column of a desktop */
.ml-main .shop-side { display: flex; flex-direction: column; gap: 14px; }
.ml-main .shop-tree, .ml-main .shop-filter--side { background: #fff; border: 1px solid var(--ml-line2); border-radius: var(--ml-r); padding: 14px; }
.ml-main .shop-tree__title { font: 800 13px var(--ml-font-display); margin: 0 0 8px; }
.ml-main .shop-tree__title a { text-decoration: none; }
.ml-main .shop-tree__list, .ml-main .shop-tree__sub { list-style: none; margin: 0; padding: 0; }
.ml-main .shop-tree__sub { padding-left: 12px; }
.ml-main .shop-tree__link { display: block; padding: 5px 0; font: 500 13px var(--ml-font-text); color: var(--ml-ink); text-decoration: none; }
.ml-main .shop-tree__link:hover, .ml-main .shop-tree__link[aria-current] { color: var(--ml-blue-d); }
.ml-main .shop-tree__link[aria-current] { font-weight: 700; }
@media (max-width: 1023.98px) { .ml-main .shop-tree { display: none; } }

/* the filter: a sheet from the bottom on a phone (the module's drawer, re-seated) */
@media (max-width: 1023.98px) {
    .ml-main .shop-filter, .shop-filter { inset: auto 12px 0 12px; margin: 0 auto; width: auto; max-width: 620px; max-height: 85vh; height: auto; border-radius: 24px 24px 0 0; box-shadow: 0 -20px 60px rgba(13, 59, 74, .28); transform: translateY(105%); z-index: 1000; overflow: hidden; }
    .shop-filter:target, .shop-filter.is-open { transform: none; }
    .shop-filter__head { padding: 14px 16px 10px; position: relative; }
    .shop-filter__head::before { content: ""; position: absolute; top: 8px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: #d9e2e9; }
    .shop-filter__title { font: 800 18px var(--ml-font-display); }
    .shop-filter__close { background: var(--ml-line2); width: 34px; height: 34px; }
    .shop-filter__body { padding: 0 16px 8px; }
    .shop-filter__foot { padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); }
    .shop-filter__foot .cms-btn { border-radius: var(--ml-r-btn); }
    .shop-filter__backdrop { background: rgba(11, 26, 34, .45); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
}
.shop-facet { border: 1.5px solid var(--ml-blue-b); border-radius: 16px; background: #fff; margin: 0 0 10px; overflow: hidden; }
.shop-facet__head { font: 700 14px var(--ml-font-display); }
.shop-fv { font: 500 13px var(--ml-font-text); }
.shop-filter .shop-fv__input, .shop-filter input[type="checkbox"], .shop-filter input[type="radio"] { accent-color: var(--ml-blue); }

/* the pager */
.ml-main .shop-pager { margin: 18px 0; }
.ml-main .shop-pager__link, .ml-main .shop-pager a, .ml-main .shop-pager span { border-radius: 12px; font: 700 13px var(--ml-font-text); }
.ml-main .shop-empty { text-align: center; padding: 40px 20px; background: #fff; border-radius: var(--ml-r); }
.ml-main .shop-empty__title { font: 800 16px var(--ml-font-display); margin: 8px 0 4px; }
.ml-main .shop-empty__hint { color: var(--ml-ink3); margin: 0 0 12px; }


/* ======================================================================
   THE OPTIONS AS DROP-DOWNS, «ONE EYE / BOTH EYES»
   ====================================================================== */
html[data-ml-eyes="off"] .ml-seg, html[data-ml-eyes="off"] .ml-eye-tags { display: none; }
.ml-opts { display: flex; flex-direction: column; gap: 12px; }
.ml-seg { display: flex; background: var(--ml-line2); border-radius: var(--ml-r-btn); padding: 4px; gap: 4px; }
.ml-seg button { flex: 1; height: 38px; border-radius: 9px; font: 700 12.5px var(--ml-font-text); color: var(--ml-ink2); transition: background-color .15s, color .15s, box-shadow .15s; border: 0; background: none; cursor: pointer; padding: 0; }
.ml-seg button.is-on { background: #fff; color: var(--ml-ink); box-shadow: 0 1px 4px rgba(18, 44, 58, .14); }
.ml-eye-tags { display: flex; gap: 0; margin-top: -4px; }
.ml-eye-tags[hidden] { display: none; }
.ml-eye-tags span { flex: 1; font: 700 10.5px var(--ml-font-text); letter-spacing: .4px; text-transform: uppercase; color: var(--ml-ink3); padding: 0 4px; }
.ml-pg__t { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.ml-pg__t b { font: 700 13.5px var(--ml-font-display); }
.ml-selrow { display: flex; background: #fff; border: 1.5px solid var(--ml-line); border-radius: var(--ml-r-btn); overflow: hidden; }
.ml-selwrap { flex: 1; position: relative; display: flex; min-width: 0; }
.ml-selwrap.sb { display: none; border-left: 1px solid var(--ml-line); }
[data-ml-mode="both"] .ml-selwrap.sb { display: flex; }
.ml-selwrap select { width: 100%; border: 0; background: none; outline: 0; padding: 12px 30px 12px 12px; font: 600 13px var(--ml-font-text); color: var(--ml-ink); -webkit-appearance: none; appearance: none; border-radius: 0; box-shadow: none; min-height: 44px; text-overflow: ellipsis; cursor: pointer; }
.ml-selwrap select:focus-visible { outline: 2px solid var(--ml-blue); outline-offset: -2px; }
.ml-selwrap__chv { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: #93a3af; pointer-events: none; }
.ml-selrow:focus-within { border-color: var(--ml-blue); }
.ml-hidden-ctl { display: none !important; }
.ml-pair { display: flex; align-items: baseline; gap: 8px; margin: 0; }
.ml-pair[hidden] { display: none; }
.ml-pair b { font: 800 26px var(--ml-font-display); }
.ml-pair span { font: 600 12px var(--ml-font-text); color: var(--ml-ink3); }
[data-ml-mode="both"] .shop-buy__head .shop-price, [data-ml-mode="both"] .shop-qty, [data-ml-mode="both"] .shop-buy__quick, [data-ml-mode="both"] .shop-calc { display: none; }
[data-ml-mode="both"] .shop-buy__add.is-problem { background: var(--ml-line); color: var(--ml-ink3); }
body:has([data-ml-mode="both"]) .ml-stepper { display: none; }
body:has([data-ml-mode="both"]) .shop-stickybar__price { min-width: 0; font-size: 15px; }

/* ---- fixes found on a desktop ---- */
@media (min-width: 1024px) {
    .ml-main .shop-page .shop-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; }
    /* no inner scroll: a long category tree made a second scrollbar beside the page */
    .ml-main .shop-side { position: static; max-height: none; overflow: visible; }
}
.ml-main .shop-subs .shop-tile__media, .ml-main .shop-subs .shop-tile__arrow, .ml-main .shop-subs .shop-tile__icon, .ml-main .shop-subs .shop-tile__children { display: none; }
.ml-main .shop-subs .shop-tile { display: inline-block; background: #fff; }
.ml-main .shop-subs .shop-tile__link { position: static; display: inline-flex; gap: 6px; align-items: baseline; padding: 0; }
.ml-main .shop-subs .shop-tile__link::after { content: ""; position: absolute; inset: 0; border-radius: 999px; }
.ml-main .shop-subs .shop-tile__body, .ml-main .shop-subs .shop-tile__text { display: inline-flex; gap: 6px; align-items: baseline; padding: 0; background: none; position: static; }
.ml-main .shop-subs .shop-tile__title { font: inherit; margin: 0; }
.ml-main .shop-subs .shop-tile__count { font: 500 10.5px var(--ml-font-text); opacity: .65; }
@media (min-width: 1024px) { .ml-main .shop-fchips__open { display: none; } }
.ml-gallery .shop-stickers { top: auto; right: auto; bottom: 12px; left: 12px; flex-direction: row; }
.ml-pdp-nav .shop-toggles { position: static; inset: auto; transform: none; }
.ml-pdp-nav .shop-toggles__form { margin: 0; }

/* ---- side filter: one card, facets split by lines (nested frames left 176px for the price fields) ---- */
@media (min-width: 1024px) {
    .ml-main .shop-filter--side { padding: 14px 16px 6px; }
    .ml-main .shop-filter--side .shop-filter__body { padding: 0; overflow: visible; max-height: none; }
    .ml-main .shop-filter--side .shop-facet { border: 0; border-top: 1px solid var(--ml-line2); border-radius: 0; margin: 0; overflow: visible; background: none; }
    .ml-main .shop-filter--side .shop-facet__head { padding-left: 0; padding-right: 0; }
    .ml-main .shop-filter--side .shop-facet__body { padding-left: 0; padding-right: 0; }
    .ml-main .shop-filter--side .shop-range__fields { gap: 6px; }
    .ml-main .shop-filter--side .shop-range__field { flex: 1 1 0; min-width: 0; }
    .ml-main .shop-filter--side .shop-range__input { width: 100%; min-width: 0; }
}

/* ---- product info column is narrow: tabs wrap, the reviews head stacks ---- */
.ml-pdp .shop-tabs__bar { flex-wrap: wrap; row-gap: 6px; overflow: visible; }
.ml-pdp .shop-tabs__panel { min-width: 0; }
.ml-pdp .shop-reviews, .ml-pdp .shop-reviews__top { grid-template-columns: minmax(0, 1fr); }
.ml-pdp .shop-reviews__cta { justify-items: start; text-align: left; }

/* ---- phone fixes from the live check (2026-10-23) ---- */
.ml-gallery .shop-gallery__link .shop-gallery__img { height: 100%; }
.ml-pdp .shop-buy__more .cms-btn { white-space: nowrap; padding-left: 10px; padding-right: 10px; }
@media (max-width: 599px) {
    /* grid only on a phone: the three view keys squeezed the sort to «Сначала попу…» */
    .ml-main .shop-views { display: none; }
    .ml-main .shop-toolbar__end { margin-left: 0; }
    .ml-main .shop-sort__select:not(.shop-sort__select--limit) { flex: 1; min-width: 0; }
    /* bottom bar: price, a compact stepper and a one-line button */
    .ml-body .shop-stickybar .shop-wrap { padding: 8px 12px; }
    .ml-body .shop-stickybar__inner { gap: 8px; }
    .shop-stickybar__price { min-width: 0; font-size: 17px; }
    .shop-stickybar .ml-stepper { padding: 3px; gap: 2px; }
    .shop-stickybar .ml-stepper button { width: 28px; height: 28px; }
    .shop-stickybar .ml-stepper .q { min-width: 22px; }
    .ml-body .shop-stickybar__buy { white-space: nowrap; font-size: 14px; padding: 0 10px; min-width: 0; }
    .ml-body .shop-stickybar__buy svg { flex: none; }
}
/* a desktop has the thumbnails: the dots only sat under the stickers */
@media (min-width: 1024px) { .ml-gallery__dots { display: none; } }
