/* Onest — self-host, кириллица + латиница по подмножествам (SIL OFL).
   Не с Google CDN: на проде CSP будет font-src 'self', и внешний источник
   потребовал бы его расширять. */
@font-face{font-family:'Onest';font-style:normal;font-weight:400;font-display:swap;src:url('/assets/fonts/onest-400-lat.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'Onest';font-style:normal;font-weight:400;font-display:swap;src:url('/assets/fonts/onest-400.woff2') format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;}
@font-face{font-family:'Onest';font-style:normal;font-weight:500;font-display:swap;src:url('/assets/fonts/onest-500-lat.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'Onest';font-style:normal;font-weight:500;font-display:swap;src:url('/assets/fonts/onest-500.woff2') format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;}
@font-face{font-family:'Onest';font-style:normal;font-weight:600;font-display:swap;src:url('/assets/fonts/onest-600-lat.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'Onest';font-style:normal;font-weight:600;font-display:swap;src:url('/assets/fonts/onest-600.woff2') format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;}
@font-face{font-family:'Onest';font-style:normal;font-weight:700;font-display:swap;src:url('/assets/fonts/onest-700-lat.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'Onest';font-style:normal;font-weight:700;font-display:swap;src:url('/assets/fonts/onest-700.woff2') format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;}
@font-face{font-family:'Onest';font-style:normal;font-weight:800;font-display:swap;src:url('/assets/fonts/onest-800-lat.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'Onest';font-style:normal;font-weight:800;font-display:swap;src:url('/assets/fonts/onest-800.woff2') format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;}

/* Сайт iTech. Палитра повторяет приложение (mobile/theme.ts):
   единственный акцент — фирменный синий #0071E3, остальное нейтральное. */
:root {
  color-scheme: light;   /* сайт всегда светлый, тёмной темы нет */
  --blue: #0071E3;
  --blue-dark: #0058B0;
  --blue-soft: #EAF2FE;
  --navy: #221D4F;
  --ink: #26224A;
  --muted: #6B6890;
  --line: #E1E3EE;
  --bg: #EEEFF5;
  --surface: #FFFFFF;
  --success: #2E9E52;
  --warning: #C77A0A;
  --warn-soft: #F8ECE2;
  --radius: 16px;
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--frame);
  color: var(--ink);
  font: 16px/1.6 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}
img { max-width: 100%; height: auto; }
a { color: var(--blue); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--surface); padding: 10px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---- секции ---- */
section { padding: 44px 0; }
main > section:first-child { padding-top: 28px; }
h1, h2, h3 { color: var(--blue); }
h1 { font-size: clamp(28px, 4.5vw, 40px); line-height: 1.15; margin: 0 0 14px; text-wrap: balance; letter-spacing: -.02em; }
h2 { font-size: clamp(21px, 3vw, 27px); line-height: 1.25; margin: 0 0 16px; text-wrap: balance; }
h3 { font-size: 18px; line-height: 1.3; margin: 0 0 8px; }
p { margin: 0 0 14px; }
.lead { font-size: 18px; color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }
.prose { max-width: 68ch; }
.prose h2 { margin-top: 34px; }
.prose h3 { margin-top: 26px; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 6px; }

/* ---- герой ---- */
.hero { background: linear-gradient(180deg, var(--blue-soft), transparent); padding: 56px 0 40px; }
.hero .badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.badge { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 13px; color: var(--muted); }

/* ---- кнопки ---- */
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--blue); color: #fff; text-decoration: none;
       padding: 12px 22px; border-radius: 999px; font-weight: 600; border: 0; cursor: pointer; font-size: 16px; }
.btn:hover { background: var(--blue-dark); }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

/* ---- карточки ---- */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.card:hover { border-color: var(--blue); }
.card-img { aspect-ratio: 1; background: #fff; display: flex; align-items: center; justify-content: center; }
.card-img img { width: 100%; height: 100%; object-fit: contain; }
.card-body { padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.card-title { font-weight: 600; }
.card-price { font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; color: var(--blue); }
/* карточка trade-in — как в приложении: цвет+память и батарея, ниже цена и филиал */
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px;
             font-size: 13px; color: var(--muted); }
.card-meta-l { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }
.card-branch { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; color: var(--muted); }
.battery { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); white-space: nowrap; }
.battery.bat-hi { color: var(--success); }
.battery.bat-mid { color: var(--warning); }
.card-note { font-size: 13px; color: var(--muted); }

/* ---- выбор раздела каталога (как в приложении) ---- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px;
            align-items: start; margin: 20px 0 32px; }
.cat-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
            border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit;
            transition: transform .18s, border-color .18s; }
.cat-card img { width: 100%; aspect-ratio: 400 / 260; object-fit: cover; display: block; }
.cat-card:hover { transform: translateY(-2px); border-color: var(--blue); }
.cat-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; }
.cat-name { font-weight: 600; font-size: 16px; }
.cat-arrow { color: var(--blue); font-size: 18px; line-height: 1; }
/* iPhone крупнее прочих, но пропорции родные — иначе product-фото обрезается */
.cat-hero { grid-column: span 2; }
.cat-hero .cat-name { font-size: 20px; }
@media (max-width: 640px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cat-hero img { aspect-ratio: 400 / 230; }
}
/* новые товары продаются под заказ: вместо цены и наличия — акцентный призыв */
.card-order { font-size: 14px; font-weight: 600; color: var(--blue); }
.hero-order { color: var(--blue); font-size: 13px; font-weight: 600; }
.card:hover .card-order { color: var(--blue-dark); }
.order-note { font-size: 14px; max-width: 46ch; margin: 4px 0 2px; }
.dots { display: flex; gap: 4px; margin-top: 6px; }
.dot { width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--line); }

.status-in { color: var(--success); font-size: 13px; font-weight: 600; }
.status-order { color: var(--warning); font-size: 13px; font-weight: 600; }
.status-out { color: var(--muted); font-size: 13px; }

/* ---- филиалы ---- */
.branches { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.branch { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.branch h3 { margin-bottom: 6px; }
.branch p { margin: 0 0 6px; }
.branch .links { display: flex; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
/* метка филиала — в правом верхнем углу карточки, заголовок под неё ужимается */
.branch-badge { position: absolute; top: 16px; right: 20px;
  font-size: 11px; font-weight: 600; border-radius: 999px; padding: 3px 11px; letter-spacing: .02em; }
.badge-opening_soon { color: var(--warning); background: var(--warn-soft); border: 1px solid var(--warning); }
.badge-new { color: var(--blue); background: var(--blue-soft); border: 1px solid var(--blue); }
.badge-sale { color: #B3261E; background: #FCEBEA; border: 1px solid #B3261E; }
.branch-badged h3 { padding-right: 118px; }
.branch-badged:has(.badge-opening_soon) { border-style: dashed; }

/* ---- блог: новости Apple ---- */
.blog-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
             margin: 22px 0 28px; }
.blog-card { display: flex; flex-direction: column; background: var(--surface);
             border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
             text-decoration: none; color: inherit; transition: transform .18s, border-color .18s; }
.blog-card:hover { transform: translateY(-2px); border-color: var(--blue); }
.blog-img { aspect-ratio: 16 / 9; background: var(--bg); }
.blog-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.blog-body h3 { margin: 0; color: var(--ink); font-size: 17px; line-height: 1.3; }
.blog-body .muted { font-size: 14px; line-height: 1.5; margin: 0; }
.blog-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.blog-source { color: var(--blue); font-weight: 600; }
.blog-hero { width: 100%; border-radius: var(--radius); margin: 8px 0 18px; }
.chips + .chips-branch { margin-top: -6px; }
.blog-own { align-self: flex-start; font-size: 12px; font-weight: 600; color: var(--blue);
            background: var(--blue-soft); border-radius: 999px; padding: 2px 10px; }
.blog-note { font-size: 13px; margin-top: 22px; }

/* ---- «как купить» ---- */
/* предзаказ баннером — как в приложении: широкий цветной блок с CTA */
.preorder-banner { display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  min-height: 200px; justify-content: flex-end; padding: 26px; margin-bottom: 16px;
  border-radius: 20px; text-decoration: none; color: #fff; overflow: hidden;
  background: var(--blue);
  background-size: cover; background-position: center; }
.pb-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.pb-title { font-size: clamp(30px, 5vw, 46px); font-weight: 800; line-height: 1.03; letter-spacing: -.02em; }
.pb-sub { font-size: 14px; opacity: .9; }
.pb-cta { margin-top: 12px; display: inline-flex; align-items: center; gap: 8px;
  background: #fff; color: var(--head); font-weight: 600; font-size: 14px;
  padding: 11px 20px; border-radius: 999px; }
.preorder-banner:hover .pb-cta { background: var(--blue-dark); color: #fff; }

.model-filter { display: flex; align-items: center; gap: 10px; margin: 2px 0 18px; flex-wrap: wrap; }
.model-filter label { font-size: 13px; color: var(--muted); }
.model-filter select { font: inherit; font-size: 14px; padding: 8px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--surface); color: var(--ink); max-width: 100%; cursor: pointer; }
.model-filter select:hover { border-color: var(--blue); }

.steps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.step .num { display: inline-flex; width: 28px; height: 28px; border-radius: 50%; background: var(--blue-soft); color: var(--blue-dark);
             align-items: center; justify-content: center; font-weight: 700; margin-bottom: 10px; }

/* ---- формы ---- */
.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; max-width: 520px; display: grid; gap: 12px; }
.form label { display: grid; gap: 5px; font-size: 14px; color: var(--muted); }
.form input, .form textarea, .form select {
  font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; width: 100%;
}
.form textarea { min-height: 90px; resize: vertical; }
.hp { position: absolute; left: -9999px; }

/* ---- подвал ---- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); margin-top: 40px; padding: 36px 0 24px; font-size: 14px; }
.footer-grid { display: grid; gap: 24px; grid-template-columns: 2fr 1fr 1fr 1.4fr; }
.footer-grid nav { display: flex; flex-direction: column; gap: 8px; }
.footer-grid a { color: var(--ink); text-decoration: none; }
.footer-grid a:hover { color: var(--blue-dark); }
.footer-brand { margin: 0 0 8px; }
.footer-brand img { display: block; height: 26px; width: auto; }
/* значки соцсетей — круглые иконки в правом нижнем углу подвала */
.footer-social { display: flex; gap: 8px; margin-left: 4px; }
.footer-social a { width: 38px; height: 38px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center; color: var(--head); }
.footer-social a:hover { border-color: var(--blue); color: var(--blue); }
.footer-by { margin-left: auto; }

/* Instagram: иконка с плашкой-списком аккаунтов (нативный <details>, как меню-бургер) */
.ig-menu { position: relative; display: inline-flex; }
.ig-menu > summary { list-style: none; cursor: pointer; }
.ig-menu > summary::-webkit-details-marker { display: none; }
.footer-social .ig-menu > summary { width: 38px; height: 38px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center; color: var(--head); }
.footer-social .ig-menu > summary:hover,
.footer-social .ig-menu[open] > summary { border-color: var(--blue); color: var(--blue); }
.hero-rail .ig-menu > summary { width: 42px; height: 42px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center; color: var(--head); }
.hero-rail .ig-menu > summary:hover,
.hero-rail .ig-menu[open] > summary { border-color: var(--blue); color: var(--blue); }
.ig-pop { position: absolute; z-index: 30; min-width: 232px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 8px; display: grid; gap: 2px; box-shadow: 0 20px 50px rgba(0,0,0,.14); }
.ig-pop-head { margin: 4px 12px 6px; font-size: 11px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted); }
/* .ig-menu-префикс поднимает специфичность выше .hero-rail a / .footer-social a,
   иначе те навязывают ссылкам плашки размер круглой иконки */
.ig-menu .ig-pop a { display: grid; gap: 1px; width: auto; height: auto;
  padding: 9px 12px; border-radius: 10px; background: none; border: 0; text-decoration: none; }
.ig-menu .ig-pop a:hover { background: var(--bg); border-color: transparent; color: inherit; }
.ig-pop .ig-h { font-size: 14px; font-weight: 600; color: var(--head); }
.ig-pop .ig-l { font-size: 12px; color: var(--muted); }
.ig-footer .ig-pop { bottom: 46px; right: 0; }        /* подвал: раскрывается вверх */
.ig-rail .ig-pop { right: 52px; top: 50%; transform: translateY(-50%); }  /* рейл: влево от иконки */
/* список аккаунтов на странице контактов */
.ig-list { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 4px; }
.ig-list li { font-size: 14px; }
.legal p { margin: 0 0 4px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) {
  .site-footer { padding: 24px 0 18px; font-size: 12.5px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 16px 18px; }
  .footer-grid nav { gap: 6px; }
  .footer-brand img { height: 22px; }
  .footer-bottom { margin-top: 18px; padding-top: 12px; font-size: 11.5px; gap: 6px; }
}

/* ---- фильтры-чипсы ---- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 20px; }
.chip { display: inline-block; background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
        padding: 7px 14px; font-size: 14px; text-decoration: none; color: var(--ink); }
.chip-on { background: var(--blue); border-color: var(--blue); color: #fff; }
.chip-on .muted { color: #ffffffcc; }

/* ---- карточка товара ---- */
.crumbs { font-size: 14px; margin: 20px 0 16px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.detail { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: start; }
.detail-gallery { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.detail-photo { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: 10px; }
.thumbs { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.thumbs img { width: 64px; height: 64px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; transition: border-color .15s; }
.thumbs img:hover { border-color: var(--blue); }
.thumbs img.on { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.detail-info h1 { margin-top: 0; }
.price-big { font-size: 30px; font-weight: 700; margin: 18px 0 6px; font-variant-numeric: tabular-nums; }
.small { font-size: 13px; }

.opt-row { display: flex; gap: 12px; align-items: baseline; margin: 14px 0; flex-wrap: wrap; }
.opt-label { color: var(--muted); font-size: 14px; min-width: 64px; }
.opt-values { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.swatch { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px;
          padding: 5px 12px 5px 8px; font-size: 14px; background: var(--surface); }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 20px 0; }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 2px; }
.fact span { font-size: 13px; }
.fact b { overflow-wrap: anywhere; font-size: 15px; }

.stock-table, .specs { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stock-row, .spec-row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.stock-row:last-child, .spec-row:last-child { border-bottom: 0; }

@media (max-width: 860px) {
  .detail { grid-template-columns: 1fr; gap: 20px; }
  .price-big { font-size: 26px; }
}

/* ================= Главная: hero-фрейм в стиле референса =================
   Чёрная обёртка с вырезом-язычком сверху, внутри светлая сцена с моделью. */
:root { --head: #14131A; --head-dim: #A7A6AE; --frame: #0C0C0E; }

.frame {
  position: relative;
  background: var(--frame);
  padding: 14px;
  min-height: 100vh;
}
/* внутренняя светлая карточка — общая для всех страниц */
.shell {
  position: relative;
  background: var(--hero-bg, #EFEFF1);
  border-radius: 30px;
  min-height: calc(100vh - 28px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
/* главная: hero занимает высоту, поэтому раскладка колонкой на весь экран */
.home .shell { }
.home .hero { flex: 1; display: grid; grid-template-rows: 1fr auto; padding: 0 30px 30px; }

/* вырез-язычок сверху по центру. Три слоя одного цвета фрейма без зазоров:
   центральный свисающий язычок + два боковых квадрата, из которых радиальный
   градиент выедает вогнутую четверть — плавный переход язычка в край карточки. */
.shell::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 150px; height: 28px; background: var(--frame);
  border-radius: 0 0 16px 16px; z-index: 3;
}
.notch-l, .notch-r {
  content: ""; position: absolute; top: 0; width: 16px; height: 16px; z-index: 2; background: var(--frame);
}
/* левый: вогнутость в нижне-левом углу (карточка «поднимается» к язычку слева) */
.notch-l { left: calc(50% - 91px); border-bottom-left-radius: 16px;
  -webkit-mask: radial-gradient(circle at 0 100%, transparent 16px, #000 16.5px);
          mask: radial-gradient(circle at 0 100%, transparent 16px, #000 16.5px); }
.notch-r { right: calc(50% - 91px); border-bottom-right-radius: 16px;
  -webkit-mask: radial-gradient(circle at 100% 100%, transparent 16px, #000 16.5px);
          mask: radial-gradient(circle at 100% 100%, transparent 16px, #000 16.5px); }

/* --- шапка внутри карточки (общая) --- */
.topbar { display: flex; align-items: center; gap: 30px; padding: 20px 30px 6px; }
/* логотип: «i» голубая, «Tech» тёмный, точка-акцент — как в приложении */
.logo { display: inline-flex; align-items: center; text-decoration: none; }
.logo img { display: block; height: 30px; width: auto; }
.logo-i { color: var(--blue); }
.logo-dot { width: 6px; height: 6px; background: var(--blue); border-radius: 50%; margin-left: 3px; align-self: flex-end; margin-bottom: 4px; }

.logo-reg { font-size: 10px; vertical-align: super; color: var(--muted); font-weight: 600; }
.topbar-nav { display: flex; gap: 30px; flex: 1; justify-content: center; }
.topbar-nav a { color: var(--head); text-decoration: none; font-size: 14px; font-weight: 500; }
.topbar-nav a:hover { color: var(--blue); }
.topbar-tools { display: flex; align-items: center; gap: 10px; }
.hero-search {
  display: flex; align-items: center; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 6px 8px 6px 16px; width: 220px;
}
.hero-search input { border: 0; background: none; font: inherit; font-size: 14px; color: var(--ink);
                     padding: 6px 0; width: 100%; outline: none; }
.hero-search button { border: 0; background: none; cursor: pointer; font-size: 17px; color: var(--muted);
                      width: 30px; height: 30px; border-radius: 8px; }
.hero-search button:hover { color: var(--ink); }
.hero-icon, .hero-lang {
  width: 44px; height: 44px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  color: var(--head); font-size: 16px;
}
.hero-icon:hover, .hero-lang:hover { border-color: var(--blue); color: var(--blue); }
.hero-lang { font-size: 12px; font-weight: 600; }
.hero-menu { position: relative; }
.hero-menu > summary { list-style: none; cursor: pointer; }
.hero-menu > summary::-webkit-details-marker { display: none; }
.hero-menu[open] > summary { border-color: var(--blue); color: var(--blue); }
.hero-menu-list {
  position: absolute; right: 0; top: 52px; z-index: 20; min-width: 210px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 8px; display: grid; gap: 2px; box-shadow: 0 20px 50px rgba(0,0,0,.14);
}
.hero-menu-list a { padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); font-size: 14px; }
.hero-menu-list a:hover { background: var(--bg); }

/* --- сцена --- */
.hero-stage { position: relative; display: flex; align-items: center; justify-content: center; }
.hero-photo { max-height: min(54vh, 540px); width: auto; object-fit: contain; transition: opacity .25s ease;
              mix-blend-mode: multiply; }
.hero-photo.swap { opacity: 0; }
.hero-rule { position: absolute; left: 2px; top: 34%; width: 2px; height: 26%; background: var(--head); opacity: .8; }

.anno { position: absolute; display: flex; align-items: center; font-size: 12px; line-height: 1.35; color: var(--muted); }
.anno b { color: var(--head); font-weight: 600; }
.anno-line { height: 1px; background: var(--line); display: block; }
.anno-line::after { content: ""; display: block; width: 5px; height: 5px; border-radius: 50%; background: var(--muted); position: relative; top: -2px; }
.anno-1 .anno-line, .anno-3 .anno-line { width: clamp(50px, 11vw, 200px); order: 2; margin-left: 14px; }
.anno-1 .anno-line::after, .anno-3 .anno-line::after { margin-left: auto; }
.anno-2 .anno-line, .anno-4 .anno-line { width: clamp(50px, 11vw, 200px); margin-right: 14px; }
.anno-2 .anno-text, .anno-4 .anno-text { order: 2; }
.anno-1 { top: 27%; left: 4%; }
.anno-2 { top: 25%; right: 4%; }
.anno-3 { bottom: 24%; left: 6%; }
.anno-4 { bottom: 28%; right: 6%; }

.hero-rail { position: absolute; right: 0; top: 50%; transform: translateY(-50%); display: grid; gap: 10px; }
.hero-rail a { width: 42px; height: 42px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line);
               display: flex; align-items: center; justify-content: center; text-decoration: none; color: var(--head); font-size: 16px; }
.hero-rail a:hover { border-color: var(--blue); color: var(--blue); }

/* --- низ карточки --- */
.hero-foot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 24px; }
.eyebrow { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.hero-statement { font-size: clamp(16px, 1.4vw, 20px); line-height: 1.35; font-weight: 600; color: var(--head);
                  max-width: 24ch; margin: 0 0 20px; }
.hero-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 16px; background: var(--blue); color: #fff; text-decoration: none;
        padding: 7px 7px 7px 26px; border-radius: 999px; font-weight: 600; font-size: 15px; }
.pill:hover { background: var(--blue-dark); }
.pill-arrow { width: 38px; height: 38px; border-radius: 50%; background: #fff; color: var(--blue);
              display: inline-flex; align-items: center; justify-content: center; font-size: 16px; }
.pill-text { text-decoration: none; color: var(--head); border-bottom: 1px solid var(--head); font-size: 15px; padding-bottom: 2px; }
.pill-text:hover { color: var(--blue); border-color: var(--blue); }

.hero-thumbs { display: flex; gap: 14px; justify-content: center; }
.hero-thumb { width: 104px; height: 104px; border-radius: 18px; background: var(--surface); border: 1px solid transparent;
              display: flex; align-items: center; justify-content: center; padding: 10px; transition: transform .2s, border-color .2s; }
.hero-thumb img { max-height: 100%; width: auto; object-fit: contain; mix-blend-mode: multiply; }
.hero-thumb:hover { transform: translateY(-4px); }
.hero-thumb.on { border-color: var(--head); }

.hero-title { text-align: left; max-width: 480px; justify-self: end; }
.hero-title h1 { font-size: clamp(34px, 4.8vw, 60px); line-height: .98; letter-spacing: -.03em; margin: 0 0 10px; font-weight: 800; }
.t-brand { color: var(--head-dim); }
.t-model { color: var(--blue); }
.hero-stock { margin: 0 0 12px; font-size: 13px; }
.hero-desc { font-size: 13.5px; line-height: 1.55; color: var(--muted); margin: 0; max-width: 46ch; }

.hero-badges { display: none; }

@media (max-width: 1180px) {
  .hero-nav { display: none; }
  .hero-search { width: 170px; }
  .hero-title h1 { font-size: clamp(30px, 4.2vw, 42px); }
}
@media (max-width: 900px) {
  /* фрейм и вырез сохраняем — тот же стиль, что на десктопе, но компактнее.
     Выносные линии не помещаются в узкую колонку, вместо них ряд бейджей. */
  .frame { padding: 8px; min-height: 100vh; }
  .shell { min-height: calc(100vh - 16px); border-radius: 24px; }
  .shell::before { width: 116px; height: 22px; border-radius: 0 0 13px 13px; }
  .notch-l { left: calc(50% - 71px); width: 13px; height: 13px;
    -webkit-mask: radial-gradient(circle at 0 100%, transparent 13px, #000 13.5px); mask: radial-gradient(circle at 0 100%, transparent 13px, #000 13.5px); }
  .notch-r { right: calc(50% - 71px); width: 13px; height: 13px;
    -webkit-mask: radial-gradient(circle at 100% 100%, transparent 13px, #000 13.5px); mask: radial-gradient(circle at 100% 100%, transparent 13px, #000 13.5px); }
  .anno, .hero-rule, .hero-rail { display: none; }

  /* компактная шапка: логотип + язык + бургер, поиск и навигация скрыты */
  .topbar { gap: 10px; padding: 14px 16px 10px; }
  .topbar-nav, .hero-search, .topbar-tools > .hero-icon { display: none; }
  .topbar-tools { margin-left: auto; gap: 8px; }
  .hero-menu-list { right: 0; left: auto; min-width: 190px; }
  .hero-icon, .hero-lang { width: 40px; height: 40px; }

  .home .hero { padding: 0 16px 22px; }
  .hero-stage { flex-direction: column; gap: 16px; padding-top: 6px; }
  .hero-photo { max-height: 40vh; }
  .hero-badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
  .hero-badges span { font-size: 12px; color: var(--muted); background: var(--surface);
    border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }
  .hero-badges b { color: var(--head); font-weight: 600; }

  .hero-foot { grid-template-columns: 1fr; align-items: start; gap: 18px; }
  .hero-claim { order: 2; }
  .hero-thumbs { order: 1; justify-content: flex-start; overflow-x: auto; padding-bottom: 4px; }
  .hero-thumb { width: 72px; height: 72px; flex: none; }
  .hero-title { order: 0; max-width: none; justify-self: start; }
  .hero-title h1 { font-size: clamp(30px, 9vw, 44px); }
  .hero-desc { max-width: none; }
}

/* ---- каталог на телефоне: две карточки в ряд (по одной слишком крупно) ---- */
@media (max-width: 640px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card-body { padding: 10px 10px 12px; gap: 3px; }
  .card-title { font-size: 14px; }
  .card-price { font-size: 15px; }
  .card-note { font-size: 12px; }
  .wrap { padding: 0 14px; }
  section { padding: 30px 0; }
  main > section:first-child { padding-top: 22px; }
}
