/*
 * Новая главная (макет docs/home-design, правки 23.11). Цвета — только переменные gm-site.css (--bg, --surface,
 * --surface-2, --line, --line-strong, --ink, --ink-muted, --ink-faint, --accent, --on-accent, --accent-soft), чтобы
 * тёмная тема работала сама. Все классы с префиксом gmh-, чтобы не задеть стили сайта. На телефоне нажимаемое — от 44 px.
 */

.gmh-page { font-size: 15px; line-height: 1.45; }
.gmh-main { flex: 1; display: block; }
.gmh-wrap { max-width: 1360px; margin: 0 auto; padding: 0 32px; }
.gmh-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.gmh-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border: 1px solid transparent; border-radius: var(--radius-md); font: 600 15px/20px var(--font-text); text-decoration: none; cursor: pointer; transition: transform .12s var(--ease-out); }
.gmh-btn:active { transform: scale(.97); }
.gmh-btn--primary { background: var(--ink); color: var(--bg); }
.gmh-btn--ghost { border-color: var(--line-strong); background: none; color: var(--ink); }
.gmh-link { font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- шапка ---------- */
.gmh-hd { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.gmh-hd-row { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.gmh-logo { display: block; }
.gmh-logo img { height: 22px; width: auto; }
.gmh-search { flex: 1; max-width: 620px; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); color: var(--ink-faint); }
.gmh-search:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.gmh-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; color: var(--ink); }
.gmh-search input::placeholder { color: var(--ink-faint); }
.gmh-hd-act { margin-left: auto; display: flex; align-items: center; gap: 22px; font-weight: 500; }
.gmh-hd-act a { display: flex; align-items: center; gap: 6px; color: var(--ink); text-decoration: none; }
.gmh-hd-act a:active { opacity: .7; }
.gmh-hd-search { display: none; width: 44px; height: 44px; place-items: center; border: 0; border-radius: var(--radius-md); background: none; color: var(--ink); cursor: pointer; }
.gmh-hd-cart { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; }
.gmh-hd-cart .n { position: absolute; top: 2px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px; display: grid; place-items: center; border-radius: var(--radius-pill); background: var(--accent); color: var(--on-accent); font: 600 11px/1 var(--font-mono); font-variant-numeric: tabular-nums; }
.gmh-hd-cart .n[hidden] { display: none; }
.gmh-hd-act .gmh-hd-cta { min-height: 40px; padding: 0 16px; border-radius: var(--radius-md); background: var(--ink); color: var(--bg); font-weight: 600; }
.gmh-search-row { display: none; }
.gmh-search-row.is-open { display: block; padding-bottom: 10px; }
.gmh-search-row .gmh-search { display: flex; max-width: none; }
.gmh-nav { display: flex; gap: 4px; height: 46px; align-items: stretch; overflow-x: auto; scrollbar-width: none; }
.gmh-nav::-webkit-scrollbar { display: none; }
.gmh-nav a { display: flex; align-items: center; padding: 0 14px; border-bottom: 2px solid transparent; color: var(--ink); font-weight: 500; text-decoration: none; white-space: nowrap; }
.gmh-nav a:hover { border-bottom-color: var(--ink); }

/* ---------- полоса под шапкой ---------- */
.gmh-strip { background: var(--surface); border-bottom: 1px solid var(--line); color: var(--ink-muted); font-size: 13px; text-align: center; padding: 7px 16px; }

/* ---------- баннер ---------- */
.gmh-bn { position: relative; height: 440px; overflow: hidden; border-bottom: 1px solid var(--line); }
.gmh-bn-s { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); align-items: center; gap: 24px; padding: 0 max(72px, calc((100% - 1296px) / 2)); background: var(--surface-2); opacity: 0; visibility: hidden; transition: opacity .6s, visibility .6s; }
.gmh-bn-s.is-soft { background: var(--accent-soft); }
.gmh-bn-s.is-on { opacity: 1; visibility: visible; }
.gmh-bn-k { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
.gmh-bn-t h2 { font: 600 60px/1 var(--font-display); letter-spacing: -.02em; margin: 14px 0 28px; }
.gmh-bn-p { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; height: 100%; min-width: 0; padding: 28px 0 40px; }
.gmh-bn-p img { display: block; width: 100%; height: 100%; object-fit: contain; }
.gmh-bn-a { position: absolute; top: 50%; margin-top: -22px; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer; z-index: 2; }
.gmh-bn-a:hover { background: var(--ink); color: var(--bg); }
.gmh-bn-prev { left: 16px; }
.gmh-bn-next { right: 16px; }
.gmh-bn-d { position: absolute; left: 0; right: 0; bottom: 18px; display: flex; justify-content: center; gap: 8px; z-index: 2; }
.gmh-bn-d button { position: relative; width: 24px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; }
.gmh-bn-d button::before { content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 8px; height: 8px; border-radius: 4px; background: var(--line-strong); transition: width .3s, background .3s; }
.gmh-bn-d button.is-on::before { width: 28px; background: var(--ink); }
@media (prefers-reduced-motion: reduce) { .gmh-bn-s { transition: none; } .gmh-bn-d button::before { transition: none; } }
/* без скриптов стрелки и точки ничем не управляют — их не показываем, виден первый слайд */
html:not(.js) .gmh-bn-a, html:not(.js) .gmh-bn-d, html:not(.js) .gmh-rail-nav { display: none; }

/* ---------- разделы ---------- */
.gmh-sec { padding: 36px 0; }
.gmh-sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.gmh-h2 { font: 600 22px/28px var(--font-display); letter-spacing: -.01em; }
.gmh-sec-act { display: flex; align-items: center; gap: 16px; }
#how { scroll-margin-top: 130px; }

.gmh-cats { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 12px; }
.gmh-cat { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; color: var(--ink); text-decoration: none; transition: border-color .15s; }
.gmh-cat:hover { border-color: var(--ink); }
.gmh-cat .ph { display: block; aspect-ratio: 1; overflow: hidden; }
.gmh-cat .ph img { display: block; width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.gmh-cat .nm { display: block; padding: 10px 12px 12px; font-weight: 600; font-size: 14px; line-height: 1.25; }
.gmh-cat .nm span { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--ink-faint); }

.gmh-how { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; position: relative; text-align: center; }
.gmh-how::before { content: ""; position: absolute; top: 36px; left: 12.5%; right: 12.5%; border-top: 2px dashed var(--line-strong); }
.gmh-how li { position: relative; list-style: none; }
.gmh-how .ic { position: relative; width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; box-shadow: 0 0 0 8px var(--bg); }
.gmh-how .ic em { position: absolute; top: -4px; right: -4px; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font: 600 12px/24px var(--font-text); font-style: normal; }
.gmh-how b { display: block; font: 600 17px/1.3 var(--font-display); }
.gmh-how p { margin: 4px 0 0; font-size: 14px; color: var(--ink-muted); }

.gmh-rail { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 5 * 16px) / 6); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.gmh-rail::-webkit-scrollbar { display: none; }
.gmh-rail > * { scroll-snap-align: start; }
.gmh-rail-nav { display: flex; gap: 8px; }
.gmh-rail-nav button { width: 36px; height: 36px; border: 1px solid var(--line-strong); border-radius: 50%; background: none; color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.gmh-rail-nav button:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.gmh-brands { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.gmh-brands a { display: block; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 22px 18px; background: var(--surface); color: var(--ink); text-decoration: none; transition: background .15s, color .15s; }
.gmh-brands a:hover { background: var(--ink); color: var(--bg); }
.gmh-brands b { display: block; font: 600 16px/1.2 var(--font-display); }
.gmh-brands span { font-size: 12px; color: var(--ink-faint); }
.gmh-brands a:hover span { color: inherit; opacity: .75; }

.gmh-photos-sub { margin: -10px 0 16px; color: var(--ink-muted); }
.gmh-photos { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.gmh-photos a { display: block; border-radius: var(--radius-lg); overflow: hidden; background: var(--line); }
.gmh-photos a:active { opacity: .7; }
.gmh-photos img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.gmh-revs { display: flex; justify-content: space-between; align-items: center; gap: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px 28px; }
.gmh-rev { display: flex; gap: 16px; align-items: center; }
.gmh-rev b { font: 600 40px/1 var(--font-display); }
.gmh-rev-n { display: block; color: var(--ink-muted); }
.gmh-stars { display: block; letter-spacing: 2px; color: var(--ink); }

/* ---------- подвал ---------- */
.gmh-ft { border-top: 1px solid var(--line); margin-top: 40px; padding: 36px 0 48px; }
.gmh-ft-g { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; font-size: 14px; }
.gmh-ft-g img { height: 20px; width: auto; margin-bottom: 12px; }
.gmh-ft-g p { color: var(--ink-muted); }
.gmh-ft b { display: block; margin-bottom: 10px; font-size: 12px; font-weight: 600; color: var(--ink-faint); }
.gmh-ft nav a { display: flex; align-items: center; min-height: 32px; color: var(--ink); text-decoration: none; }
.gmh-ft nav a:hover { text-decoration: underline; }
.gmh-cp { display: block; margin-top: 32px; font-size: 13px; color: var(--ink-faint); }

@media (max-width: 1100px) {
    .gmh-cats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .gmh-brands { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .gmh-rail { grid-auto-columns: calc((100% - 3 * 16px) / 4); }
}

@media (max-width: 760px) {
    .gmh-photos { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .gmh-wrap { padding: 0 16px; }
    .gmh-hd-row { gap: 8px; min-height: 58px; }
    .gmh-search { display: none; }
    .gmh-hd-act { gap: 12px; }
    .gmh-hd-act .gmh-hd-link { display: none; }
    .gmh-hd-search { display: grid; }
    .gmh-hd-act .gmh-hd-cta { min-height: 44px; }
    .gmh-nav a { padding: 0 10px; }

    .gmh-bn { height: 430px; }
    .gmh-bn-s { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); align-items: start; padding: 32px 20px 44px; gap: 8px; }
    .gmh-bn-t h2 { font-size: 36px; margin: 8px 0 16px; }
    .gmh-bn-p { margin: 0 -12px; padding: 6px 0 40px; }
    .gmh-bn-a { display: none; }
    .gmh-bn-d button { width: 28px; }

    .gmh-cats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
    .gmh-cat .nm { padding: 8px 6px; font-size: 11.5px; letter-spacing: -.01em; }
    .gmh-cat .nm span { display: none; }

    .gmh-rail { grid-auto-columns: 44%; }
    .gmh-rail-nav { display: none; }
    .gmh-brands { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gmh-brands a { padding: 18px 14px; }

    .gmh-how { grid-template-columns: 1fr 1fr; row-gap: 28px; }
    .gmh-how::before { display: none; }

    .gmh-revs { flex-direction: column; align-items: flex-start; gap: 16px; }
    .gmh-link { display: inline-flex; align-items: center; min-height: 44px; }
    .gmh-ft-g { grid-template-columns: 1fr 1fr; }
    .gmh-ft nav a { min-height: 44px; }
}

@media (max-width: 380px) {
    .gmh-cats { gap: 6px; }
    .gmh-cat .nm { font-size: 10.5px; padding: 8px 4px; }
}
