/* MJM theme — base + components. Використовує лише змінні з tokens.css. */
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }   /* запобіжник: жоден блок не може зробити сторінку ширшою за екран (на телефоні це зсуває все й ламає натискання) */
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: var(--fs-body); line-height: var(--lh-body); -webkit-font-smoothing: antialiased; }
body.mjm-drawer-open { overflow: hidden; }
*, *::before, *::after { box-sizing: border-box; }
a { color: inherit; text-decoration: none; }
a:hover { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.mjm-num, .mjm-price, .mjm-money { font-variant-numeric: tabular-nums; }
.mjm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- layout ---------- */
.mjm-wrap { width: 100%; max-width: var(--page-max); margin: 0 auto; padding: 0 var(--page-x); }
main.mjm-main { display: flex; flex-direction: column; gap: var(--section-gap); padding: 24px 0 var(--section-gap); min-height: 50vh; }
.mjm-section { display: flex; flex-direction: column; gap: 18px; }
.mjm-section-head { display: flex; align-items: flex-end; gap: 16px; }
.mjm-section-head h1, .mjm-section-head h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); font-weight: 700; letter-spacing: -0.02em; }
.mjm-section-head .mjm-sub { font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.mjm-section-head .mjm-grow { flex-grow: 1; }
.mjm-section-head .mjm-more { font-size: 14px; font-weight: 600; color: var(--brand); margin-bottom: 4px; white-space: nowrap; transition: color var(--t-fast) ease; }
.mjm-section-head .mjm-more:hover { color: var(--ink); }
.mjm-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--grid-gap); }
.mjm-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--grid-gap); }

/* breadcrumbs */
.mjm-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); list-style: none; padding: 0; margin: 0; }
.mjm-crumbs li { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.mjm-crumbs li + li::before { content: ''; width: 4px; height: 4px; border-radius: 999px; background: var(--border-3); }
.mjm-crumbs a:hover { color: var(--brand); }
.mjm-crumbs li:last-child { color: var(--text-2); }
@media (max-width: 767px) {
  .mjm-crumbs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--page-x)); padding: 0 var(--page-x); -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
  .mjm-crumbs::-webkit-scrollbar { display: none; }
  .mjm-crumbs li { flex-shrink: 0; }
}

/* ---------- buttons ---------- */
.mjm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--h-btn); padding: 0 18px; border-radius: var(--r-btn); border: 1.5px solid var(--ink); background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; white-space: nowrap; flex-shrink: 0; transition: transform var(--t-fast) ease, filter var(--t-fast) ease, background var(--t-fast) ease, color var(--t-fast) ease, border-color var(--t-fast) ease; }
.mjm-btn:hover { transform: translateY(-1px); filter: brightness(1.05); color: #fff; }
.mjm-btn:active { transform: translateY(0); }
.mjm-btn:disabled, .mjm-btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; filter: none; }
.mjm-btn--accent { background: var(--brand); border-color: var(--brand); }
.mjm-btn--secondary { background: var(--surface); color: var(--ink); }
.mjm-btn--secondary:hover { color: var(--ink); }
.mjm-btn--ghost { background: transparent; border-color: var(--border-2); color: var(--ink); }
.mjm-btn--ghost:hover { color: var(--ink); border-color: var(--border-3); }
.mjm-btn--white { background: #fff; border-color: #fff; color: var(--ink); }
.mjm-btn--white:hover { color: var(--ink); }
.mjm-btn--lg { height: var(--h-btn-lg); padding: 0 24px; font-size: 15.5px; font-weight: 700; border-radius: 14px; }
.mjm-btn--sm { height: var(--h-btn-sm); padding: 0 14px; font-size: 13px; }
.mjm-btn--grow { flex-grow: 1; }
.mjm-btn--icon { width: var(--h-btn); padding: 0; }
.mjm-btn--icon.mjm-btn--lg { width: var(--h-btn-lg); }
.mjm-btn--icon.mjm-btn--sm { width: var(--h-btn-sm); }
.mjm-btn.is-loading { pointer-events: none; }
.mjm-btn.is-loading > * { visibility: hidden; }
.mjm-btn.is-loading::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 999px; border: 2px solid currentColor; border-right-color: transparent; animation: mjm-spin .7s linear infinite; }
.mjm-btn { position: relative; }
@keyframes mjm-spin { to { transform: rotate(360deg); } }

/* ---------- inputs ---------- */
.mjm-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mjm-label { font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.mjm-label small { font-weight: 400; color: var(--muted); }
.mjm-input, .mjm-select, .mjm-textarea { width: 100%; height: 46px; padding: 0 14px; border: 1.5px solid var(--border-2); border-radius: var(--r-input); background: var(--surface); color: var(--ink); font-size: 14px; transition: border-color var(--t-fast) ease, box-shadow var(--t-fast) ease; appearance: none; }
.mjm-textarea { height: auto; min-height: 92px; padding: 12px 14px; resize: vertical; line-height: 20px; }
.mjm-select { padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236E6C66' stroke-width='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 12px center; }
.mjm-input::placeholder, .mjm-textarea::placeholder { color: var(--muted-2); }
.mjm-input:focus, .mjm-select:focus, .mjm-textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.mjm-input.is-invalid, .mjm-select.is-invalid { border-color: var(--price-sale); }
.mjm-error { font-size: 12px; color: var(--price-sale); display: none; }
.mjm-error.d-block, .mjm-error.is-visible { display: block; }
.mjm-check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.mjm-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.mjm-check .mjm-box { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--border-3); background: #fff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background var(--t-fast) ease, border-color var(--t-fast) ease; }
.mjm-check .mjm-box svg { opacity: 0; transform: scale(.6); transition: opacity var(--t-fast) ease, transform var(--t-fast) ease; }
.mjm-check input:checked + .mjm-box { background: var(--brand); border-color: var(--brand); }
.mjm-check input:checked + .mjm-box svg { opacity: 1; transform: scale(1); }
.mjm-check input:focus-visible + .mjm-box { box-shadow: 0 0 0 3px var(--brand-tint); }
.mjm-radio .mjm-box { border-radius: 999px; }
.mjm-radio .mjm-box::after { content: ''; width: 8px; height: 8px; border-radius: 999px; background: #fff; opacity: 0; transform: scale(.4); transition: opacity var(--t-fast) ease, transform var(--t-fast) ease; }
.mjm-radio input:checked + .mjm-box::after { opacity: 1; transform: scale(1); }

/* ---------- chips, badges, segmented ---------- */
.mjm-chip { display: inline-flex; align-items: center; gap: 6px; height: var(--h-chip); padding: 0 14px; border-radius: 10px; border: 1.5px solid var(--border-2); background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 500; white-space: nowrap; flex-shrink: 0; transition: border-color var(--t-fast) ease, background var(--t-fast) ease, color var(--t-fast) ease; }
.mjm-chip:hover { border-color: var(--ink); }
.mjm-chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.mjm-chip .mjm-count { font-size: 12px; color: var(--muted-2); }
.mjm-chip.is-active .mjm-count { color: #B9B6AC; }
.mjm-chip--pill { border-radius: var(--r-pill); }
.mjm-chip--filter { background: var(--brand-tint); border-color: var(--brand-tint); color: var(--brand); font-weight: 600; }
.mjm-chip--filter:hover { border-color: var(--brand); }
.mjm-chip--filter .mjm-x { display: inline-flex; width: 18px; height: 18px; border-radius: 999px; align-items: center; justify-content: center; }
.mjm-chip--filter .mjm-x:hover { background: rgba(91,75,219,.12); }
.mjm-badge { display: inline-flex; align-items: center; height: var(--h-badge); padding: 0 9px; border-radius: var(--r-chip); font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--ink); color: #fff; }
.mjm-badge--new { background: var(--brand); }
.mjm-badge--original { background: var(--info); }
.mjm-badge--deal { background: var(--good); }
/* текст промо-плашок завжди білий; фон підібрано так, щоб білий читався (контраст ≥ 4.5:1) */
.mjm-badge--top { background: #B45F06; font-weight: 700; }
.mjm-badges { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.mjm-badge--out { background: var(--surface-3); color: var(--muted); }
.mjm-badge--warn { background: var(--warn-tint); color: var(--warn); }
.mjm-badge--pct { background: var(--price-sale); font-weight: 700; padding: 0 8px; }
.mjm-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 7px; background: var(--bg); font-size: 12px; font-weight: 500; color: var(--text-2); white-space: nowrap; }
.mjm-tag--good { background: var(--good-tint); color: var(--good); font-weight: 600; }
.mjm-tag--brand { background: var(--brand-tint); color: var(--brand); font-weight: 600; }
.mjm-tag--sale { background: var(--price-sale-tint); color: var(--price-sale); font-weight: 600; }
.mjm-segmented { display: inline-flex; gap: 4px; padding: 3px; border-radius: var(--r-btn); background: var(--surface-3); }
.mjm-segmented > a, .mjm-segmented > button { height: 32px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; font-size: 13px; font-weight: 500; color: var(--muted); display: inline-flex; align-items: center; white-space: nowrap; transition: color var(--t-fast) ease, background var(--t-fast) ease; }
.mjm-segmented > .is-active { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(17,17,17,.08); }
.mjm-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; }

/* ---------- cards / surfaces ---------- */
.mjm-surface { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); }
.mjm-tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-tile); transition: transform var(--t-hover) var(--ease), box-shadow var(--t-hover) ease, border-color var(--t-hover) ease; }
a.mjm-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); }

/* ---------- header ---------- */
.mjm-header { background: var(--surface); border-bottom: 1px solid var(--border); position: relative; }
.mjm-header__row1 { height: 80px; display: flex; align-items: center; gap: 18px; }
.mjm-logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.mjm-logo__img { display: block; height: 40px; width: auto; }
.mjm-mheader .mjm-logo__img { height: 30px; }
.mjm-cheader .mjm-logo__img { height: 34px; }
.mjm-footer__brand .mjm-logo__img { height: 36px; }
.mjm-logo__mark { width: 40px; height: 40px; border-radius: 11px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; letter-spacing: -0.02em; }
.mjm-logo__text { display: flex; flex-direction: column; line-height: 1; }
.mjm-logo__name { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.mjm-logo__tag { font-size: 11px; color: var(--muted); margin-top: 4px; }
.mjm-catalog-btn { padding: 0 16px 0 14px; }
.mjm-catalog-btn[aria-expanded="true"] { background: var(--brand); border-color: var(--brand); }
.mjm-search { flex-grow: 1; display: flex; align-items: center; gap: 10px; height: var(--h-btn); padding: 0 6px 0 16px; border: 1.5px solid var(--border-2); border-radius: var(--r-input); background: var(--surface-2); color: var(--muted); min-width: 0; margin: 0; transition: border-color var(--t-fast) ease, box-shadow var(--t-fast) ease; }
.mjm-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); background: #fff; }
.mjm-search input { flex-grow: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 14px; color: var(--ink); height: 100%; }
.mjm-search input::placeholder { color: var(--muted); }
.mjm-search button { height: 34px; padding: 0 14px; border-radius: 8px; background: #fff; border: 1px solid var(--border-2); color: var(--ink); font-size: 13px; font-weight: 600; white-space: nowrap; transition: border-color var(--t-fast) ease; }
.mjm-search button:hover { border-color: var(--ink); }
.mjm-hnav { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.mjm-hnav__phone { display: flex; align-items: center; gap: 9px; height: 44px; padding: 0 12px; border-radius: var(--r-btn); transition: color var(--t-fast) ease; }
.mjm-hnav__phone:hover { color: var(--brand); }
.mjm-hnav__phone b { display: block; font-size: 14px; font-weight: 600; line-height: 1; }
.mjm-hnav__phone small { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1; }
.mjm-hnav__item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; width: 64px; height: 48px; border-radius: var(--r-btn); font-size: 10.5px; font-weight: 500; position: relative; transition: color var(--t-fast) ease; }
.mjm-hnav__item:hover { color: var(--brand); }
.mjm-hnav__item .mjm-pill { position: absolute; top: 2px; right: 10px; min-width: 16px; height: 16px; font-size: 10px; }
.mjm-cart-btn { display: flex; align-items: center; gap: 9px; height: 44px; padding: 0 14px 0 12px; border-radius: var(--r-btn); border: 1.5px solid var(--ink); background: transparent; color: var(--ink); font-size: 14px; font-weight: 600; margin-left: 6px; white-space: nowrap; transition: background var(--t-fast) ease, color var(--t-fast) ease, transform var(--t-fast) ease; }
.mjm-cart-btn:hover { background: var(--ink); color: #fff; }
.mjm-cart-btn.is-bump { animation: mjm-bump .4s var(--ease); }
@keyframes mjm-bump { 30% { transform: scale(1.06); } }
/* top strip: service pages · promo · language */
.mjm-topbar { background: var(--surface-2); border-bottom: 1px solid var(--row-sep); }
.mjm-topbar__inner { height: 36px; display: flex; align-items: center; gap: 24px; font-size: 12.5px; font-weight: 500; line-height: 1; }
.mjm-topbar__links { display: flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; }
.mjm-topbar__links a { color: var(--muted); white-space: nowrap; padding: 0 10px; height: 36px; display: inline-flex; align-items: center; position: relative; transition: color var(--t-fast) ease; }
.mjm-topbar__links a:first-child { margin-left: -10px; }
.mjm-topbar__links a::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform var(--t-fast) ease; }
.mjm-topbar__links a:hover { color: var(--ink); }
.mjm-topbar__links a.is-active { color: var(--ink); font-weight: 600; }
.mjm-topbar__links a.is-active::after { transform: scaleX(1); }
.mjm-topbar__links a:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; border-radius: 4px; }
.mjm-topbar__side { margin-left: auto; display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
@media (max-width: 1199px) { .mjm-msgs__label { display: none; } }
.mjm-topbar .mjm-special { color: var(--price-sale); font-weight: 600; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; transition: filter var(--t-fast) ease; }
.mjm-topbar .mjm-special:hover { filter: brightness(.85); }
/* messengers: brand-colored discs, white glyph */
.mjm-msgs { display: inline-flex; align-items: center; gap: 6px; }
.mjm-msgs__label { color: var(--muted); margin-right: 2px; white-space: nowrap; }
.mjm-msgs__btn { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: var(--m); transition: transform var(--t-fast) ease, box-shadow var(--t-fast) ease; }
.mjm-msgs__btn:hover { transform: translateY(-1px); box-shadow: 0 4px 10px -4px var(--m); color: #fff; }
.mjm-msgs__btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.mjm-msgs__btn--telegram { --m: #2AABEE; }
.mjm-msgs__btn--viber { --m: #7360F2; }
.mjm-msgs__btn--whatsapp { --m: #25D366; }
.mjm-msgs--lg { gap: 8px; margin-top: 2px; }
.mjm-msgs--lg .mjm-msgs__btn { width: auto; height: 36px; padding: 0 12px 0 10px; border-radius: var(--r-btn); gap: 7px; font-size: 13px; font-weight: 600; }
.mjm-topbar__side .mjm-msgs { padding-right: 14px; border-right: 1px solid var(--border-2); }
.mjm-header__row1 { height: 72px; }
.mjm-lang { display: inline-flex; gap: 2px; font-size: 12px; font-weight: 600; }
.mjm-lang button { height: 24px; padding: 0 8px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); }
.mjm-lang button.is-active { background: var(--surface-3); color: var(--ink); }
.mjm-lang button:hover { color: var(--ink); }
/* mega menu */
.mjm-mega { position: absolute; left: 0; right: 0; top: 100%; display: none; z-index: 50; pointer-events: none; }
.mjm-mega.is-open { display: block; }
/* Каталог: ліва колонка — розділи, нижче сторінки для покупців, контакти й графік; права — підкатегорії розділу під курсором */
.mjm-cmenu { pointer-events: auto; display: grid; grid-template-columns: 320px minmax(0, 1fr); height: min(600px, calc(100vh - 140px)); background: var(--surface); border: 1px solid var(--border); border-top: 0; border-radius: 0 0 20px 20px; box-shadow: 0 32px 60px -28px rgba(17,17,17,.4); overflow: hidden; animation: mjm-suggest-in 180ms var(--ease); }
.mjm-cmenu__rail { overflow-y: auto; overscroll-behavior: contain; padding: 10px; border-right: 1px solid var(--row-sep); background: var(--surface-2); }
.mjm-cmenu__cats { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mjm-cmenu__cat { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 6px 10px; border-radius: 12px; font-size: 14.5px; line-height: 18px; font-weight: 600; color: var(--ink); transition: background var(--t-fast) ease; }
.mjm-cmenu__cat:hover { color: var(--ink); }
.mjm-cmenu__cat.is-active { background: var(--surface); box-shadow: 0 1px 2px rgba(17,17,17,.06), 0 0 0 1px var(--border); }
.mjm-cmenu__cat .mjm-cat-ic { width: 32px; height: 32px; border-radius: 9px; }
.mjm-cmenu__name { flex: 1 1 auto; min-width: 0; }
.mjm-cmenu__chev { color: var(--muted-2); display: flex; flex-shrink: 0; transition: transform var(--t-fast) ease, color var(--t-fast) ease; }
.mjm-cmenu__cat.is-active .mjm-cmenu__chev { color: var(--ink); transform: translateX(2px); }
.mjm-cmenu__cat--sale { color: var(--price-sale); }
.mjm-cmenu__cat--sale:hover { color: var(--price-sale); }
.mjm-cmenu__block { margin: 12px 0 0; padding: 14px 10px 4px; border-top: 1px solid var(--border-2); display: grid; gap: 2px; }
.mjm-cmenu__label { font-size: 12px; line-height: 16px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.mjm-cmenu__link { padding: 6px 0; font-size: 13.5px; line-height: 18px; font-weight: 500; color: var(--text-2); }
.mjm-cmenu__link:hover, .mjm-cmenu__link.is-active { color: var(--brand); }
.mjm-cmenu__phone { display: inline-flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
.mjm-cmenu__hours { font-size: 13px; line-height: 18px; color: var(--muted); margin-bottom: 8px; }
.mjm-cmenu__block .mjm-msgs { flex-wrap: wrap; margin-bottom: 8px; }
.mjm-cmenu__panes { overflow-y: auto; overscroll-behavior: contain; padding: 26px 36px 32px; }
.mjm-cmenu__pane { display: none; }
.mjm-cmenu__pane.is-active { display: block; }
.mjm-cmenu__title { display: inline-flex; font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.mjm-cmenu__title:hover { color: var(--brand); }
.mjm-cmenu__all { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; height: 40px; padding: 0 16px; border: 1.5px solid var(--border-2); border-radius: var(--r-btn); font-size: 13.5px; font-weight: 600; color: var(--ink); transition: border-color var(--t-fast) ease; }
.mjm-cmenu__all:hover { border-color: var(--ink); color: var(--ink); }
.mjm-cmenu__all .mjm-count { font-size: 12px; font-weight: 500; color: var(--muted-2); font-variant-numeric: tabular-nums; }
/* підкатегорії — одним стовпчиком, з мініатюрою найпопулярнішого товару (як рядки розділів ліворуч) */
.mjm-cmenu__subs { margin-top: 14px; display: grid; gap: 2px; max-width: 460px; }
.mjm-cmenu__subs a { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 10px; margin: 0 -10px; border-radius: 12px; font-size: 14.5px; line-height: 19px; font-weight: 500; color: var(--ink); transition: background var(--t-fast) ease; }
.mjm-cmenu__subs a:hover { background: var(--surface-2); color: var(--ink); }
.mjm-cmenu__subs a > span:first-of-type { flex: 1 1 auto; min-width: 0; }
.mjm-cmenu__subs img, .mjm-cmenu__subs i, .mjm-msub__link img, .mjm-msub__link i { width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; background: var(--tint-warm); object-fit: contain; padding: 3px; mix-blend-mode: multiply; display: block; }
.mjm-cmenu__subs .mjm-count { font-size: 12px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
@media (max-width: 991px) { .mjm-cmenu { grid-template-columns: 270px minmax(0, 1fr); } .mjm-cmenu__panes { padding: 22px 24px; } }
@media (prefers-reduced-motion: reduce) { .mjm-cmenu { animation: none; } }
.mjm-cat-ic { width: 28px; height: 28px; border-radius: 8px; background: var(--c-bg, var(--bg)); color: var(--c-fg, var(--ink)); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mjm-cat-ic svg { width: 16px; height: 16px; }
.mjm-mobile-menu__cat-main { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.mjm-mobile-menu__cat .mjm-cat-ic { width: 32px; height: 32px; border-radius: 9px; }
.mjm-mobile-menu__cat .mjm-cat-ic svg { width: 17px; height: 17px; }
.mjm-backdrop { position: fixed; inset: 0; background: rgba(17,17,17,.4); opacity: 0; pointer-events: none; transition: opacity 320ms var(--ease); z-index: 60; }
.mjm-backdrop.is-open { opacity: 1; pointer-events: auto; }
/* mobile header */
.mjm-mheader { display: none; background: var(--surface); border-bottom: 1px solid var(--border); }
.mjm-mheader__row { height: 60px; display: flex; align-items: center; gap: 8px; padding: 0 12px 0 8px; }
.mjm-mheader__row .mjm-grow { flex-grow: 1; }
.mjm-mheader__icon { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: var(--r-btn); position: relative; border: 0; background: transparent; color: var(--ink); padding: 0; }
.mjm-mheader__icon .mjm-pill { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; font-size: 10px; }
.mjm-mheader__search { flex: 1 1 auto; min-width: 0; margin-left: 4px; }
.mjm-mheader__search .mjm-search { height: 40px; padding: 0 4px 0 12px; gap: 8px; }
.mjm-mheader__search .mjm-search input { font-size: 15px; }
.mjm-mheader__search .mjm-search > button { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.mjm-bottomnav { display: none; position: fixed; left: 0; right: 0; bottom: 0; height: 76px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--border); z-index: 45; grid-template-columns: repeat(4, 1fr); }
.mjm-bottomnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 10.5px; font-weight: 500; color: var(--muted); position: relative; border-radius: var(--r-btn); }
.mjm-bottomnav a.is-active { color: var(--ink); }
.mjm-bottomnav a .mjm-pill { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 16px; height: 16px; font-size: 10px; }
.mjm-mobile-menu { position: fixed; top: 0; bottom: 0; left: 0; width: min(360px, 88vw); background: var(--surface); z-index: 70; transform: translateX(-100%); transition: transform 320ms var(--ease); overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.mjm-mobile-menu.is-open { transform: none; }
.mjm-mobile-menu__head { display: flex; align-items: center; justify-content: space-between; height: 44px; margin-bottom: 8px; font-weight: 700; font-size: 16px; }
.mjm-mobile-menu__cat { display: flex; align-items: center; justify-content: space-between; height: 48px; padding: 0 12px; border-radius: var(--r-btn); font-size: 15px; font-weight: 600; }
.mjm-mobile-menu__cat:hover { background: var(--surface-2); }
button.mjm-mobile-menu__cat { width: 100%; border: 0; background: none; color: var(--ink); text-align: left; flex-shrink: 0; }
a.mjm-mobile-menu__cat { flex-shrink: 0; }
.mjm-mobile-menu__chev { display: flex; color: var(--muted-2); }
/* другий рівень: підкатегорії розділу виїжджають поверх списку, «Назад» повертає до розділів */
.mjm-mobile-menu.has-sub { overflow: hidden; }
/* Панель з'являється одразу непрозорим тлом (попередній список миттєво закрито), рухається лише її власний вміст —
   два списки ніколи не видно одночасно. */
.mjm-msub { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; padding: 16px; background: var(--surface); overflow-y: auto; overscroll-behavior: contain; }
.mjm-msub[hidden] { display: none; }
.mjm-msub.is-active > * { animation: mjm-msub-in 200ms var(--ease) both; }
@keyframes mjm-msub-in { from { opacity: 0; transform: translateX(10px); } }
.mjm-msub__head { display: flex; align-items: center; justify-content: space-between; height: 44px; margin-bottom: 8px; flex-shrink: 0; }
.mjm-msub__back { display: inline-flex; align-items: center; gap: 4px; height: 44px; padding: 0 12px 0 4px; margin-left: -4px; border: 0; border-radius: var(--r-btn); background: none; color: var(--ink); font-size: 15px; font-weight: 600; }
.mjm-msub__back svg { transform: rotate(180deg); }
.mjm-msub__title { padding: 4px 12px 10px; font-size: 20px; line-height: 24px; font-weight: 700; letter-spacing: -0.02em; }
.mjm-msub__link > span:first-of-type { flex: 1 1 auto; min-width: 0; }
.mjm-msub__all { justify-content: space-between; }
.mjm-msub__all, .mjm-msub__link { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 12px; border-radius: var(--r-btn); font-size: 15px; line-height: 20px; color: var(--ink); flex-shrink: 0; }
.mjm-msub__all { font-weight: 600; color: var(--brand); margin-top: 8px; border-top: 1px solid var(--border-2); border-radius: 0; }
.mjm-msub__link + .mjm-msub__link { border-top: 1px solid var(--row-sep); border-radius: 0; }
.mjm-msub .mjm-count { font-size: 12px; font-weight: 500; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.mjm-mobile-menu__sub { display: block; padding: 10px 12px 10px 24px; font-size: 14px; color: var(--text-2); }
.mjm-mobile-menu__info { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); display: flex; flex-direction: column; }
.mjm-mobile-menu__info a { display: flex; align-items: center; height: 40px; padding: 0 12px; border-radius: var(--r-btn); font-size: 14px; font-weight: 500; color: var(--text-2); }
.mjm-mobile-menu__info a.is-active { color: var(--ink); font-weight: 600; }
.mjm-mobile-menu__info a:hover { background: var(--surface-2); }
.mjm-mobile-menu__foot .mjm-msgs { flex-wrap: wrap; }
.mjm-mobile-menu__foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; font-size: 14px; }

/* ---------- product card ---------- */
.mjm-card { display: flex; flex-direction: column; min-height: 440px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; position: relative; transition: transform var(--t-hover) var(--ease), box-shadow var(--t-hover) ease, border-color var(--t-hover) ease; }
.mjm-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); border-color: var(--border-3); }
.mjm-card__media { position: relative; height: 260px; flex-shrink: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--tint-warm); }
.mjm-card__media--cool { background: var(--tint-cool); } .mjm-card__media--green { background: var(--tint-green); } .mjm-card__media--sand { background: var(--tint-sand); }
.mjm-card__media img { width: 100%; height: 100%; object-fit: contain; padding: 12px; mix-blend-mode: multiply; transition: transform 350ms var(--ease); }
.mjm-card:hover .mjm-card__media img { transform: scale(1.05); }
.mjm-card__media .mjm-badge, .mjm-card__media .mjm-badges { position: absolute; top: 12px; left: 12px; }
.mjm-card__media .mjm-badges .mjm-badge { position: static; }
.mjm-card__media .mjm-badge--pct { left: auto; right: 12px; }
.mjm-card__wish { position: absolute; right: 12px; bottom: 12px; width: 34px; height: 34px; border-radius: 10px; border: 0; background: rgba(255,255,255,.9); color: var(--ink); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity var(--t-fast) ease, color var(--t-fast) ease; }
.mjm-card:hover .mjm-card__wish, .mjm-card__wish.is-active { opacity: 1; }
.mjm-card__wish:hover, .mjm-card__wish.is-active { color: var(--price-sale); }
.mjm-card__body { flex-grow: 1; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; min-height: 0; }
.mjm-card__code { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mjm-card__stars { display: inline-flex; align-items: center; gap: 1px; margin-left: auto; color: var(--star); }
.mjm-card__stars svg { color: var(--border-3); }
.mjm-card__stars svg.is-on { color: var(--star); }
.mjm-card__count { margin-left: 4px; font-size: 11.5px; color: var(--muted); }
.mjm-card__row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.mjm-card__rating { display: flex; align-items: center; gap: 4px; color: var(--ink); font-weight: 600; }
.mjm-card__rating svg { color: var(--star); }
.mjm-card__stock { margin-left: auto; color: var(--good); font-weight: 500; white-space: nowrap; }
.mjm-card__stock--out { color: var(--muted); }
.mjm-card__title { font-size: 14.5px; font-weight: 500; line-height: 20px; height: 40px; margin-bottom: 20px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mjm-card__title a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.mjm-card__meta { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 16px; }
.mjm-card__foot { display: flex; align-items: flex-end; gap: 10px; margin-top: auto; position: relative; z-index: 2; }
.mjm-card__prices { display: flex; flex-direction: column; line-height: 1; gap: 4px; min-height: 36px; justify-content: flex-end; }
.mjm-card__old { font-size: 12px; color: var(--muted-2); text-decoration: line-through; }
.mjm-card__price { font-size: var(--fs-price-card); font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; }
.mjm-card__price--sale { color: var(--price-sale); }
.mjm-card__price small { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.mjm-card__foot > form { margin-left: auto; }
.mjm-card__buy { margin-left: auto; width: 44px; height: 44px; border: 1.5px solid var(--brand); border-radius: var(--r-btn); background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background var(--t-fast) ease, border-color var(--t-fast) ease; }
.mjm-card__buy:hover { background: #4A3BC4; border-color: #4A3BC4; color: #fff; }
.mjm-card__buy--out { background: var(--surface); color: var(--ink); border-color: var(--border-3); }
.mjm-card__buy--out:hover { background: var(--surface-2); border-color: var(--ink); color: var(--ink); }
.mjm-card__wish, .mjm-card__buy { z-index: 2; }
.mjm-card--out .mjm-card__media img { opacity: .55; }

/* skeleton */
.mjm-skel { background: var(--surface-3); border-radius: 8px; position: relative; overflow: hidden; }
.mjm-skel::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent); transform: translateX(-100%); animation: mjm-shimmer 1.4s infinite; }
@keyframes mjm-shimmer { to { transform: translateX(100%); } }
.mjm-card--skel { pointer-events: none; }
.mjm-card--skel .mjm-card__media { background: var(--surface-3); }

/* ---------- cart drawer ---------- */
.mjm-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); background: var(--surface); z-index: 70; display: flex; flex-direction: column; transform: translateX(20px); opacity: 0; pointer-events: none; transition: transform 320ms var(--ease), opacity 320ms var(--ease); box-shadow: -24px 0 48px -32px rgba(17,17,17,.35); }
.mjm-drawer.is-open { transform: none; opacity: 1; pointer-events: auto; }
.mjm-drawer__head { display: flex; align-items: center; gap: 10px; height: 64px; padding: 0 20px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.mjm-drawer__head h3 { font-size: 18px; font-weight: 700; }
.mjm-drawer__head .mjm-count { font-size: 13px; color: var(--muted); }
.mjm-drawer__close { margin-left: auto; width: 40px; height: 40px; border-radius: var(--r-btn); border: 0; background: transparent; display: flex; align-items: center; justify-content: center; }
.mjm-drawer__close:hover { background: var(--surface-2); }
.mjm-drawer__body { flex-grow: 1; overflow-y: auto; padding: 8px 20px; }
.mjm-cart-item { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--row-sep); }
.mjm-cart-item__img { width: 64px; height: 64px; border-radius: 12px; background: var(--tint-warm); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.mjm-cart-item__img img { width: 100%; height: 100%; object-fit: contain; padding: 6px; mix-blend-mode: multiply; }
.mjm-cart-item__name { font-size: 13.5px; font-weight: 500; line-height: 18px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mjm-cart-item__opt { font-size: 12px; color: var(--muted); margin-top: 2px; }
.mjm-cart-item__row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.mjm-qty { display: inline-flex; align-items: center; border: 1.5px solid var(--border-2); border-radius: 9px; height: 28px; }
.mjm-qty button { width: 28px; height: 100%; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; color: var(--text-2); }
.mjm-qty button:hover { color: var(--brand); }
.mjm-qty input { width: 30px; height: 100%; border: 0; background: transparent; text-align: center; font-size: 13px; font-weight: 600; padding: 0; }
.mjm-qty input:focus { outline: 0; }
.mjm-cart-item__price { margin-left: auto; font-size: 14px; font-weight: 700; white-space: nowrap; }
.mjm-cart-item__remove { width: 28px; height: 28px; border: 0; background: transparent; color: var(--muted-2); display: flex; align-items: center; justify-content: center; border-radius: 8px; }
.mjm-cart-item__remove:hover { color: var(--price-sale); background: var(--price-sale-tint); }
.mjm-drawer__foot { padding: 16px 20px calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; flex-shrink: 0; background: var(--surface); }
.mjm-drawer__line { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--text-2); }
.mjm-drawer__line--total { font-size: 16px; font-weight: 700; color: var(--ink); padding-top: 6px; border-top: 1px solid var(--row-sep); }
.mjm-drawer__line .mjm-good { color: var(--good); font-weight: 600; }
.mjm-drawer__parts { font-size: 12.5px; color: var(--muted); text-align: right; margin-top: -6px; }
.mjm-drawer__empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 64px 16px; color: var(--muted); }
.mjm-drawer__empty svg { color: var(--border-3); }
.mjm-drawer__empty b { font-size: 16px; color: var(--ink); }

/* ---------- toasts (OC #alert) ---------- */
#alert { position: fixed; right: 20px; bottom: 20px; z-index: 65; display: flex; flex-direction: column; gap: 8px; max-width: min(360px, calc(100vw - 32px)); }
#alert .alert { margin: 0; padding: 12px 40px 12px 14px; border-radius: 12px; border: 0; box-shadow: var(--shadow-fab); font-size: 13.5px; font-weight: 500; display: block; line-height: 19px; animation: mjm-toast 320ms var(--ease); position: relative; }
#alert .alert a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
#alert .alert-success { background: var(--ink); color: #fff; }
#alert .alert-danger { background: var(--price-sale); color: #fff; }
#alert .alert .btn-close { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); filter: invert(1); opacity: .7; }
#alert .alert i { display: none; }
@keyframes mjm-toast { from { opacity: 0; transform: translateY(12px); } }

/* ---------- footer ---------- */
.mjm-footer { background: var(--ink); color: #ECEAE4; margin-top: auto; }
.mjm-footer__inner { padding: 48px var(--page-x) 28px; display: flex; flex-direction: column; gap: 32px; }
.mjm-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1.2fr; gap: 32px; }
.mjm-footer__brand { display: flex; flex-direction: column; gap: 14px; }
.mjm-footer__brand .mjm-logo__mark { background: #fff; color: var(--ink); border-radius: 12px; font-size: 15px; }
.mjm-footer__brand p { font-size: 13.5px; line-height: 21px; color: #B9B6AC; max-width: 320px; }
.mjm-footer__social { display: flex; gap: 8px; margin-top: 4px; }
.mjm-footer__social a { width: 38px; height: 38px; border-radius: 10px; border: 1px solid #3A3833; display: flex; align-items: center; justify-content: center; color: #ECEAE4; transition: border-color var(--t-fast) ease, color var(--t-fast) ease; }
.mjm-footer__social a:hover { border-color: #fff; color: #fff; }
.mjm-footer h4 { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #8F8C83; margin-bottom: 8px; }
.mjm-footer__col a { display: block; color: #B9B6AC; font-size: 13.5px; line-height: 30px; transition: color var(--t-fast) ease; }
.mjm-footer__col a:hover { color: #fff; }
.mjm-footer__contacts { display: flex; flex-direction: column; gap: 10px; }
.mjm-footer__contacts h4 { margin-bottom: 4px; }
.mjm-footer__phone { color: #fff; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.mjm-footer__contacts span, .mjm-footer__contacts a.mjm-footer__mail { font-size: 13px; color: #B9B6AC; }
.mjm-footer__contacts a.mjm-footer__mail:hover { color: #fff; }
.mjm-footer__tg { align-self: flex-start; margin-top: 6px; height: 40px; padding: 0 16px; font-size: 13.5px; }
.mjm-footer__bottom { display: flex; align-items: center; gap: 16px; padding-top: 22px; border-top: 1px solid #2E2C28; font-size: 12.5px; color: #8F8C83; flex-wrap: wrap; }
.mjm-footer__bottom .mjm-grow { flex-grow: 1; }
.mjm-footer__pay { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mjm-footer__pay span { height: 26px; padding: 0 9px; border-radius: 6px; background: #2A2825; color: #ECEAE4; font-size: 11px; font-weight: 700; display: flex; align-items: center; white-space: nowrap; }

/* ---------- reveal ---------- */
.mjm-rv { opacity: 0; transform: translateY(12px); animation: mjm-rv var(--t-reveal) var(--ease) forwards; }
.mjm-rv.d1 { animation-delay: 70ms; } .mjm-rv.d2 { animation-delay: 140ms; } .mjm-rv.d3 { animation-delay: 210ms; } .mjm-rv.d4 { animation-delay: 280ms; } .mjm-rv.d5 { animation-delay: 350ms; }
@keyframes mjm-rv { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .mjm-rv { animation: none; opacity: 1; transform: none; }
  .mjm-card, .mjm-card__media img, .mjm-btn, .mjm-drawer, .mjm-backdrop, .mjm-mobile-menu { transition: none; }
  .mjm-msub.is-active > * { animation: none; }
}

/* ---------- pagination ---------- */
.mjm-pagination { display: flex; align-items: center; gap: 6px; }
.mjm-pagination a, .mjm-pagination span { min-width: 36px; height: 36px; padding: 0 10px; border-radius: 10px; border: 1.5px solid var(--border-2); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; }
.mjm-pagination a:hover { border-color: var(--ink); }
.mjm-pagination .is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- generic content page (information, account) ---------- */
.mjm-page { display: flex; flex-direction: column; gap: 20px; }
.mjm-page h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); font-weight: 800; letter-spacing: -0.02em; }
.mjm-prose { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-tile); padding: 32px 36px; max-width: 760px; font-size: 15px; line-height: 24px; color: var(--text-2); }
.mjm-prose h2 { font-size: 20px; line-height: 26px; font-weight: 700; color: var(--ink); margin: 20px 0 8px; }
.mjm-prose h2:first-child { margin-top: 0; }
.mjm-prose p { margin: 0 0 12px; }
.mjm-prose ul, .mjm-prose ol { margin: 0 0 12px; padding-left: 22px; }
.mjm-prose a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.mjm-prose img { border-radius: 12px; }

/* ---------- bootstrap-driven pages (account etc.) get a card look ---------- */
.mjm-legacy { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-tile); padding: 28px 32px; }
.mjm-legacy .btn-primary { background: var(--ink); border-color: var(--ink); border-radius: var(--r-btn); font-weight: 600; }
.mjm-legacy .btn-primary:hover { background: var(--brand); border-color: var(--brand); }
.mjm-legacy .btn-light { border-radius: var(--r-btn); border: 1.5px solid var(--border-2); background: #fff; font-weight: 600; }
.mjm-legacy .form-control, .mjm-legacy .form-select { height: 46px; border: 1.5px solid var(--border-2); border-radius: var(--r-input); }
.mjm-legacy .form-control:focus, .mjm-legacy .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.mjm-legacy .card { border: 1px solid var(--border); border-radius: var(--r-card); }
.mjm-legacy .list-group-item { border-color: var(--border); }
.mjm-legacy .list-group-item.active { background: var(--ink); border-color: var(--ink); }
.mjm-legacy .table { font-size: 14px; }
.mjm-legacy h1, .mjm-legacy h2 { font-weight: 700; letter-spacing: -0.02em; }
.mjm-legacy a { color: var(--brand); }

/* ---------- responsive ---------- */
@media (max-width: 1199px) {
  :root { --page-x: 32px; }
  .mjm-grid-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mjm-hnav__phone small { display: none; }
  .mjm-footer__grid { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 991px) {
  .mjm-grid-4, .mjm-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mjm-hnav__phone { display: none; }
}
@media (max-width: 767px) {
  :root { --page-x: 16px; --section-gap: 32px; }
  body { padding-bottom: 0; }
  body.mjm-checkout-checkout { padding-bottom: 0; }
  .mjm-header { border: 0; background: transparent; }
  .mjm-header > .mjm-wrap { padding: 0; }
  .mjm-header__row1 { height: 0; gap: 0; }
  .mjm-header__row1 > :not(.mjm-hnav), .mjm-hnav > :not(#cart), #cart > .mjm-cart-btn, .mjm-topbar, .mjm-header .mjm-mega { display: none; }
  .mjm-mheader { display: block; }
  main.mjm-main { padding-top: 16px; }
  .mjm-section-head h1, .mjm-section-head h2 { font-size: 22px; line-height: 26px; }
  .mjm-grid-4, .mjm-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .mjm-card { min-height: 0; border-radius: 14px; }
  .mjm-card__media { height: 160px; }
  .mjm-card__media img { padding: 10px; }
  .mjm-card__media .mjm-badge { top: 8px; left: 8px; height: 22px; font-size: 11px; padding: 0 7px; }
  .mjm-card__media .mjm-badges { top: 8px; left: 8px; gap: 3px; }
  .mjm-card__media .mjm-badge--pct { left: auto; right: 8px; }
  .mjm-card__body { padding: 10px 12px 12px; gap: 4px; }
  .mjm-card__row { font-size: 11px; gap: 6px; }
  .mjm-card__stars svg { width: 10px; height: 10px; }
  .mjm-card__count { display: none; }
  .mjm-card__title { font-size: 12.5px; line-height: 17px; height: 34px; margin-bottom: 10px; }
  .mjm-card__price { font-size: 15px; }
  .mjm-card__price small { font-size: 11px; }
  .mjm-card__buy { width: 36px; height: 36px; border-radius: 10px; }
  .mjm-card__buy svg { width: 15px; height: 15px; }
  .mjm-card__wish { display: none; }
  .mjm-footer__inner { padding: 32px var(--page-x) 24px; gap: 24px; }
  .mjm-footer__grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .mjm-footer__brand { grid-column: 1 / -1; }
  .mjm-footer__contacts { grid-column: 1 / -1; }
  .mjm-prose { padding: 20px; }
  .mjm-rv { transform: translateY(10px); animation-duration: 450ms; }
  .mjm-rv.d1 { animation-delay: 60ms; } .mjm-rv.d2 { animation-delay: 120ms; } .mjm-rv.d3 { animation-delay: 180ms; } .mjm-rv.d4 { animation-delay: 240ms; } .mjm-rv.d5 { animation-delay: 300ms; }
  #alert { right: 12px; left: 12px; bottom: 88px; max-width: none; }
}
/* toasts: не перекривати відкритий дровер */
body.mjm-drawer-open #alert { right: auto; left: 20px; }
@media (max-width: 767px) { body.mjm-drawer-open #alert { top: 12px; bottom: auto; left: 12px; right: 12px; } }

/* ===== Живий пошук ===== */
.mjm-search { position: relative; }
.mjm-suggest { position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 60; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 24px 48px -16px rgba(17,17,17,.28), 0 2px 6px rgba(17,17,17,.06); padding: 6px; max-height: min(70vh, 520px); overflow-y: auto; animation: mjm-suggest-in 160ms var(--ease); }
.mjm-suggest[hidden] { display: none; }
@keyframes mjm-suggest-in { from { opacity: 0; transform: translateY(-4px); } }
/* Рядок підказки: фото 64 · повна назва + ціна · кнопка «Купити» праворуч. Посилання й кнопка — сусіди, не вкладені. */
.mjm-suggest__item { display: flex; align-items: center; gap: 12px; padding: 4px 10px 4px 4px; border-radius: 12px; transition: background var(--t-fast) ease; }
.mjm-suggest__item + .mjm-suggest__item { margin-top: 2px; }
.mjm-suggest__item:hover, .mjm-suggest__item:has(.is-active) { background: var(--surface-2); }
.mjm-suggest__link { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 6px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.mjm-suggest__link:hover { color: var(--ink); }
.mjm-suggest__link.is-active { outline: 2px solid var(--brand); outline-offset: -2px; }
.mjm-suggest__link img, .mjm-suggest__noimg { width: 64px; height: 64px; flex-shrink: 0; border-radius: 12px; background: var(--tint-warm); object-fit: contain; padding: 4px; mix-blend-mode: multiply; display: block; }
.mjm-suggest__body { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.mjm-suggest__name { font-size: 14px; line-height: 19px; font-weight: 500; overflow-wrap: anywhere; }
.mjm-suggest__rate { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; line-height: 16px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mjm-suggest__rate svg { color: var(--star); flex-shrink: 0; }
.mjm-suggest__rate b { font-weight: 700; color: var(--ink); }
.mjm-suggest__price { display: flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mjm-suggest__price b { font-size: 16px; line-height: 20px; font-weight: 700; letter-spacing: -0.01em; }
.mjm-suggest__price.is-sale b { color: var(--price-sale); }
.mjm-suggest__price s { font-size: 12.5px; color: var(--muted-2); }
.mjm-suggest .mjm-suggest__buy { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 112px; height: 42px; padding: 0 16px; border: 1.5px solid var(--brand); border-radius: var(--r-btn); background: var(--brand); color: #fff; font-size: 14px; font-weight: 600; white-space: nowrap; transition: transform var(--t-fast) ease, filter var(--t-fast) ease, background var(--t-fast) ease, color var(--t-fast) ease, border-color var(--t-fast) ease; }
.mjm-suggest .mjm-suggest__buy:hover { filter: brightness(1.08); border-color: var(--brand); }
.mjm-suggest .mjm-suggest__buy:active { transform: scale(.97); }
.mjm-suggest .mjm-suggest__buy.is-busy { cursor: progress; }
.mjm-suggest .mjm-suggest__buy.is-busy svg { animation: mjm-suggest-busy 700ms ease-in-out infinite alternate; }
@keyframes mjm-suggest-busy { to { transform: translateY(-3px); opacity: .6; } }
.mjm-suggest .mjm-suggest__buy.is-done, .mjm-suggest .mjm-suggest__buy.is-done:hover { background: var(--good-tint); border-color: var(--good-tint); color: var(--good); filter: none; }
.mjm-suggest .mjm-suggest__buy.is-done svg { animation: mjm-suggest-done 260ms var(--ease); }
@keyframes mjm-suggest-done { from { transform: scale(.4); opacity: 0; } }
.mjm-suggest__out { flex-shrink: 0; max-width: 112px; font-size: 12.5px; line-height: 16px; font-weight: 500; color: var(--muted); text-align: right; }
.mjm-suggest__more { display: flex; align-items: center; justify-content: center; margin: 4px 0 0; padding: 10px; border-top: 1px solid var(--row-sep); color: var(--brand); font-size: 13.5px; font-weight: 600; text-decoration: none; border-radius: 0 0 12px 12px; }
.mjm-suggest__more:hover, .mjm-suggest__more.is-active { background: var(--brand-tint); color: var(--brand); }
.mjm-suggest__none { padding: 14px 12px; font-size: 13.5px; color: var(--muted); }
.mjm-mheader__search { position: relative; }
/* телефон: підказка на всю ширину екрана під липкою шапкою (поле пошуку вужче за рядок товару) */
.mjm-mheader__search .mjm-suggest { position: fixed; left: 8px; right: 8px; top: 64px; max-height: calc(100dvh - 80px); }
@media (max-width: 767px) {
  .mjm-suggest__item { gap: 8px; padding: 2px 8px 2px 2px; }
  .mjm-suggest__link { gap: 10px; }
  .mjm-suggest__link img, .mjm-suggest__noimg { width: 56px; height: 56px; }
  .mjm-suggest__name { font-size: 13.5px; line-height: 18px; }
  .mjm-suggest .mjm-suggest__buy { min-width: 0; height: 40px; padding: 0 12px; font-size: 13.5px; }
  .mjm-suggest__out { max-width: 84px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { .mjm-suggest__buy.is-busy svg, .mjm-suggest__buy.is-done svg { animation: none; } }

/* ---------- плаваючий контакт + «нагору» ---------- */
.mjm-fab { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.mjm-fab__btn { position: relative; width: 56px; height: 56px; border: 0; border-radius: 999px; background: var(--ink); color: #fff; box-shadow: 0 10px 24px -8px rgba(17,17,17,.55); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform var(--t-fast) var(--ease), background var(--t-fast) ease; }
.mjm-fab__btn:hover { transform: translateY(-2px); }
.mjm-fab__btn:active { transform: scale(.96); }
.mjm-fab__btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.mjm-fab__ic { position: absolute; display: flex; transition: opacity 180ms var(--ease), transform 220ms var(--ease); }
.mjm-fab__ic--close { opacity: 0; transform: rotate(-90deg) scale(.6); }
.mjm-fab.is-open .mjm-fab__ic--chat { opacity: 0; transform: rotate(90deg) scale(.6); }
.mjm-fab.is-open .mjm-fab__ic--close { opacity: 1; transform: none; }
.mjm-fab.is-open .mjm-fab__btn { background: var(--brand); }
.mjm-fab__top { width: 44px; height: 44px; border: 1px solid var(--border-2); border-radius: 999px; background: rgba(255,255,255,.96); color: var(--ink); box-shadow: var(--shadow-fab); cursor: pointer; display: flex; align-items: center; justify-content: center; margin-right: 6px; opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity 200ms var(--ease), transform 200ms var(--ease); }
.mjm-fab__top svg { transform: rotate(-90deg); }
.mjm-fab__top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.mjm-fab__top:hover { border-color: var(--border-3); }
.mjm-fab__panel { width: 272px; padding: 8px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 24px 48px -16px rgba(17,17,17,.35), 0 2px 8px rgba(17,17,17,.06); display: grid; gap: 2px; transform-origin: 100% 100%; animation: mjm-fab-in 220ms var(--ease); }
.mjm-fab__panel[hidden] { display: none; }
@keyframes mjm-fab-in { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
.mjm-fab__head { display: grid; gap: 2px; padding: 10px 12px 12px; }
.mjm-fab__head b { font-size: 15px; font-weight: 700; }
.mjm-fab__head span { font-size: 12.5px; color: var(--muted); }
.mjm-fab__item { display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 12px; border-radius: 12px; font-size: 14px; font-weight: 500; color: var(--ink); transition: background var(--t-fast) ease; }
.mjm-fab__item:hover { background: var(--surface-2); }
.mjm-fab__item svg { flex-shrink: 0; width: 32px; height: 32px; padding: 7px; border-radius: 10px; background: var(--surface-3); color: var(--ink); }
.mjm-fab__item--tg svg { background: #E6F2FB; color: #229ED9; }
.mjm-fab__item--vb svg { background: #F0E9FA; color: #7360F2; }
.mjm-fab__item--wa svg { background: #E7F8EC; color: #25D366; }
.mjm-fab__item span b { font-weight: 700; }
@media (max-width: 767px) {
  .mjm-fab { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); }
  .mjm-fab__btn { width: 52px; height: 52px; }
  .mjm-fab__panel { width: min(272px, calc(100vw - 24px)); }
}
@media (prefers-reduced-motion: reduce) { .mjm-fab__panel { animation: none; } .mjm-fab__ic, .mjm-fab__top, .mjm-fab__btn { transition: none; } }

/* ---------- липка шапка ----------
   Телефон: рядок меню·лого·пошук·кошик завжди зверху. Десктоп: службова смужка (36px + 1px) їде вгору,
   рядок лого·каталог·пошук·кошик лишається. Тінь з'являється лише після відриву від верху (.is-stuck, mjm.js). */
html { scroll-padding-top: 88px; }
.mjm-mheader { position: sticky; top: 0; z-index: 50; transition: box-shadow var(--t-hover) ease; }
.mjm-mheader.is-stuck, .mjm-header.is-stuck { box-shadow: 0 10px 24px -20px rgba(17,17,17,.45); }
@media (min-width: 768px) {
  .mjm-header { position: sticky; top: -37px; z-index: 50; transition: box-shadow var(--t-hover) ease; }
  /* дровер кошика живе всередині шапки: поки він відкритий, шапка має бути над затемненням і сама затемнена */
  body.mjm-drawer-open .mjm-header { z-index: 70; }
  body.mjm-drawer-open .mjm-header::before { content: ''; position: absolute; inset: 0; z-index: 1; background: rgba(17,17,17,.4); }
}

/* ---------- режим редагування порядку (editor.js; бачить лише користувач адмін-панелі) ---------- */
.mjm-editbar { position: fixed; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 58; display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 100px); padding: 6px 14px 6px 6px; border-radius: var(--r-pill); background: var(--ink); color: #fff; box-shadow: 0 12px 28px -12px rgba(17,17,17,.6); font-size: 13px; line-height: 16px; }
.mjm-editbar__btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border: 0; border-radius: var(--r-pill); background: rgba(255,255,255,.14); color: #fff; font-size: 13.5px; font-weight: 600; white-space: nowrap; transition: background var(--t-fast) ease; }
.mjm-editbar__btn:hover { background: rgba(255,255,255,.24); }
.mjm-editbar__btn[aria-pressed="true"] { background: var(--brand); }
.mjm-editbar__status { color: #D9D6CE; }
.mjm-editbar__status:empty { display: none; }
.mjm-editbar:has(.mjm-editbar__status:empty) { padding-right: 6px; }
.mjm-editbar__status.is-ok { color: #8FE0A5; }
.mjm-editbar__status.is-err { color: #FFB1A8; }
.mjm-drag { position: absolute; z-index: 6; top: 8px; right: 8px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(17,17,17,.12), 0 6px 14px -6px rgba(17,17,17,.45); cursor: grab; touch-action: none; }
.mjm-drag:active { cursor: grabbing; }
.mjm-card > .mjm-drag { right: auto; left: 50%; translate: 4px 0; }
/* плашка товару: кнопка-ярлик поруч із ручкою + меню вибору */
.mjm-tagbtn { position: absolute; z-index: 6; top: 8px; left: 50%; translate: calc(-100% - 4px) 0; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 10px; background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(17,17,17,.12), 0 6px 14px -6px rgba(17,17,17,.45); }
.mjm-card[data-badge] > .mjm-tagbtn { background: var(--brand); color: #fff; }
.mjm-card:not(:has(> .mjm-drag)) > .mjm-tagbtn { translate: -50% 0; }
.mjm-badgemenu { position: absolute; z-index: 75; min-width: 190px; padding: 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 24px 48px -16px rgba(17,17,17,.35); display: grid; gap: 2px; }
.mjm-badgemenu button { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 0; border-radius: 9px; background: none; color: var(--ink); font-size: 13.5px; font-weight: 500; text-align: left; white-space: nowrap; }
.mjm-badgemenu button:hover { background: var(--surface-2); }
.mjm-badgemenu button i { width: 18px; height: 18px; flex-shrink: 0; border-radius: 6px; border: 1.5px solid var(--border-3); background: #fff; }
.mjm-badgemenu button[aria-checked="true"] { font-weight: 600; }
.mjm-badgemenu button[aria-checked="true"] i { border-color: var(--brand); background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E") center / 12px no-repeat; }   /* на картці товару кути зайняті бейджами */
.mjm-editing .mjm-strip, .mjm-editing .mjm-home-cats__grid, .mjm-editing [data-mjm-reorder] { -webkit-user-select: none; user-select: none; }
.mjm-editing .mjm-card, .mjm-editing .mjm-home-cat, .mjm-editing .mjm-strip__card { position: relative; outline: 1.5px dashed var(--border-3); outline-offset: -1.5px; }
.mjm-editing .mjm-strip { scroll-snap-type: none; }
.mjm-drag-ghost { opacity: .35; }
.mjm-drag-chosen { outline-color: var(--brand) !important; }
.mjm-drag-fly { box-shadow: 0 24px 48px -16px rgba(17,17,17,.5); rotate: 1.5deg; }
@media (max-width: 767px) { .mjm-editbar { left: 10px; font-size: 12.5px; } .mjm-editing .mjm-home-cat:nth-child(n+7) { display: flex; } }

/* ---------- варіанти товару на картці каталогу ---------- */
/* заголовок картки має невидиме посилання на всю картку (z-index 1) — перемикач мусить бути над ним */
.mjm-card__title:has(+ .mjm-card__vars) { margin-bottom: 0; }
.mjm-card__vars { position: relative; z-index: 2; display: flex; align-items: center; gap: 2px; margin: 2px 0 10px -5px; min-height: 28px; }
/* кружечок кольору 18px у кнопці 28px (зручно натискати); тонкий внутрішній контур — щоб було видно білий */
.mjm-card__var { width: 28px; height: 28px; flex-shrink: 0; padding: 0; border: 0; border-radius: 50%; background: none; display: inline-flex; align-items: center; justify-content: center; }
.mjm-card__var i { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(17,17,17,.16); transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) ease; }
.mjm-card__var:hover i { transform: scale(1.12); }
.mjm-card__var.is-active i { box-shadow: inset 0 0 0 1px rgba(17,17,17,.16), 0 0 0 2px var(--surface), 0 0 0 3.5px var(--ink); }
.mjm-card__var:focus-visible { outline: 2px solid var(--brand); outline-offset: 0; }
.mjm-card__varmore { height: 24px; min-width: 24px; padding: 0 6px; margin-left: 2px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-pill); background: var(--surface-3); font-size: 11.5px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.mjm-card__media > img { transition: opacity 160ms ease; }
.mjm-card.is-swapping .mjm-card__media > img { opacity: .35; }
@media (max-width: 767px) { .mjm-card__vars { margin: 0 0 8px -5px; } .mjm-card__var:nth-of-type(n+6) { display: none; } }
@media (prefers-reduced-motion: reduce) { .mjm-card__media > img, .mjm-card__var i { transition: none; } }

/* Телефони в шапці: меню з двома номерами, графіком і приміткою про замовлення цілодобово */
.mjm-hphone { position: relative; }
.mjm-hphone > summary { list-style: none; cursor: pointer; user-select: none; }
.mjm-hphone > summary::-webkit-details-marker { display: none; }
.mjm-hphone__chev { display: flex; color: var(--muted); transform: rotate(90deg); transition: transform var(--t-fast) ease; }
.mjm-hphone[open] .mjm-hphone__chev { transform: rotate(-90deg); }
.mjm-hphone[open] > summary { background: var(--surface-2); }
.mjm-hphone__panel { position: absolute; top: calc(100% + 8px); right: 0; z-index: 65; width: 280px; padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-tile); box-shadow: var(--shadow-card-hover); }
.mjm-hphone__num { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px; border-radius: 10px; color: var(--ink); font-variant-numeric: tabular-nums; transition: background var(--t-fast) ease; }
.mjm-hphone__num:hover { background: var(--surface-2); color: var(--brand); }
.mjm-hphone__num b { font-size: 16px; font-weight: 700; }
.mjm-hphone__info { display: grid; gap: 4px; margin-top: 6px; padding: 10px 12px 6px; border-top: 1px solid var(--border); font-size: 13px; line-height: 18px; color: var(--muted); }
.mjm-hphone__247 { color: var(--ink); font-weight: 600; }
.mjm-mobile-menu__hours { display: block; font-size: 13px; line-height: 18px; color: var(--muted); }
@media (max-width: 991px) { .mjm-hphone { display: none; } }
.mjm-fab__item b { white-space: nowrap; }

/* ===== Телефон боком: екран широкий, але низький (висота до 480px) ===== */
@media (max-height: 480px) and (orientation: landscape) {
  .mjm-topbar { display: none; }                       /* службовий рядок над шапкою: шапка займала 110 із 390px */
  .mjm-fab__panel { max-height: calc(100dvh - 150px); overflow-y: auto; overscroll-behavior: contain; }
  .mjm-fab__head { display: none; }
  .mjm-drawer__foot { padding-top: 10px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .mjm-mobile-menu { padding: 10px 12px; }
}
/* підказки пошуку в шапці не вужчі за картку товару (на вузькому полі назва ламалася по складах) */
@media (min-width: 768px) { .mjm-header .mjm-suggest { min-width: min(480px, calc(100vw - 32px)); } }
/* поле пошуку: якщо текст усе ж не вміщається — три крапки, а не обрізане слово */
.mjm-search input, .mjm-search input::placeholder { text-overflow: ellipsis; }
/* поле пошуку без службових вставок браузера (лупа/відступи в Safari та Chrome забирали до 30px ширини під текст) */
.mjm-search input[type="search"] { -webkit-appearance: none; appearance: none; padding: 0; }
.mjm-search input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; display: none; }

/* Кількість у кошику: кнопка на межі (1 шт. або найбільша дозволена кількість) видимо вимкнена */
.mjm-qty button:disabled { opacity: .35; cursor: default; }
.mjm-qty button:disabled:hover { color: var(--text-2); }
