/* Витрина Metreon. Цвета — из логотипа: тёмный #1b3a41, синий #03a9ee, голубой #5ad8f8. */
:root {
  --ink: #1b3a41;
  --blue: #0390cc;
  --blue-bright: #03a9ee;
  --cyan: #5ad8f8;
  --text: #17262a;
  --muted: #56676c;
  --line: #dde5e8;
  --surface: #f4f7f8;
  --ok: #1f7a4d;
  --bad: #b3261e;
  --radius: 10px;
  --wrap: 1240px;
  font-family:
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    Arial,
    sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.5;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #fff;
  overflow-x: hidden;
}
[hidden] {
  display: none !important;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: var(--blue);
}
a:hover {
  color: var(--ink);
}
h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.2;
}
h1 {
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  margin: 0.4em 0 0.6em;
}
h2 {
  font-size: 1.3rem;
}
:focus-visible {
  outline: 3px solid var(--blue-bright);
  outline-offset: 2px;
}
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #fff;
  padding: 8px 12px;
  z-index: 10;
}
.skip:focus {
  left: 8px;
}
.todo {
  background: #ffe1df;
  color: var(--bad);
  font-weight: 700;
  padding: 0 4px;
  border-radius: 4px;
}

/* ---------- кнопки ---------- */
.btn {
  display: inline-block;
  background: var(--ink);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 12px 26px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}
.btn:hover {
  background: var(--blue);
  color: #fff;
}
.btn:disabled,
.btn.is-disabled {
  background: #9aa8ac;
  cursor: not-allowed;
}
.link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--blue);
  text-decoration: underline;
  cursor: pointer;
}

/* ---------- шапка ---------- */
.topbar {
  background: var(--ink);
  color: #e6f4f8;
  font-size: 0.82rem;
}
.topbar ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 32px;
  margin: 0 auto;
  padding: 7px 20px;
}
.site-header {
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.header-row {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.logo img {
  width: 160px;
  height: auto;
}
.search {
  flex: 1;
  display: flex;
  max-width: 520px;
}
.search input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 999px 0 0 999px;
  padding: 10px 16px;
  font: inherit;
  background: var(--surface);
}
.search button {
  border: 0;
  border-radius: 0 999px 999px 0;
  background: var(--ink);
  color: #fff;
  padding: 0 18px;
  font: inherit;
  cursor: pointer;
}
.header-contact {
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
  color: var(--muted);
  margin-left: auto;
}
.header-contact a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.cart-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  position: relative;
}
.cart-icon {
  width: 22px;
  height: 20px;
  border: 2px solid currentColor;
  border-top-width: 4px;
  border-radius: 2px 2px 6px 6px;
}
.cart-count {
  background: var(--blue-bright);
  color: #fff;
  border-radius: 999px;
  min-width: 22px;
  padding: 0 6px;
  font-size: 0.8rem;
  text-align: center;
}
.cat-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 26px;
  margin: 0 auto;
  padding-top: 10px;
  padding-bottom: 12px;
}
.cat-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}
.cat-nav a:hover {
  color: var(--blue);
}

main {
  min-height: 60vh;
  padding-bottom: 56px;
}
.crumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 18px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.crumbs li + li::before {
  content: '›';
  margin-right: 6px;
}
.crumbs a {
  color: var(--muted);
}

/* ---------- главная ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px;
  align-items: center;
  background: linear-gradient(120deg, #eaf8fd 0%, #f6fbfc 55%, #fff 100%);
  border-radius: 18px;
  padding: 48px;
  margin-top: 24px;
}
.hero h1 {
  font-size: clamp(1.8rem, 3.2vw, 2.7rem);
  margin-top: 0;
}
.hero p {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 34em;
}
.hero-brands {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.hero-brands li {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.benefits {
  list-style: none;
  padding: 0;
  margin: 28px 0 8px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.benefits li {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.benefits strong {
  color: var(--ink);
}
.benefits span {
  color: var(--muted);
  font-size: 0.92rem;
}
section > h2 {
  margin-top: 40px;
}
.tiles {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  text-align: center;
}
.tile:hover {
  border-color: var(--blue-bright);
}
.tile img {
  aspect-ratio: 1;
  object-fit: contain;
  width: 100%;
}

/* ---------- карточки ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  transition:
    box-shadow 0.15s,
    border-color 0.15s;
}
.card:hover {
  border-color: #b9dcea;
  box-shadow: 0 6px 20px rgba(27, 58, 65, 0.08);
}
.card a {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}
.card-img {
  background: #fff;
  padding: 16px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-img img {
  max-height: 100%;
  object-fit: contain;
}
.noimg {
  width: 60%;
  aspect-ratio: 1;
  background: var(--surface);
  border-radius: var(--radius);
}
.card-body {
  padding: 4px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.card-brand {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.card-name {
  font-size: 1rem;
  margin: 0;
  color: var(--ink);
}
.card-variants {
  font-size: 0.82rem;
  color: var(--muted);
}
.card-price {
  margin-top: auto;
  padding-top: 8px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
}
.card-price .from {
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- каталог ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: flex-end;
  margin-bottom: 20px;
}
.filters label {
  display: flex;
  flex-direction: column;
  font-size: 0.82rem;
  color: var(--muted);
  gap: 4px;
}
select,
input,
textarea {
  font: inherit;
  color: var(--text);
}
.filters select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  min-width: 190px;
}
.count {
  color: var(--muted);
  margin: 0 0 0 auto;
}
.empty {
  color: var(--muted);
  padding: 24px 0;
}

/* ---------- товар ---------- */
.product {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 48px;
  margin-top: 20px;
}
.gallery-main {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-main img {
  max-height: 100%;
  object-fit: contain;
}
.gallery-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.thumb {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 4px;
  cursor: pointer;
  width: 76px;
  height: 76px;
}
.thumb:hover {
  border-color: var(--blue-bright);
}
.buybox .brand {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
}
.buybox h1 {
  margin-top: 6px;
}
.buybox .lead {
  color: var(--muted);
}
.variants .label {
  font-size: 0.9rem;
  margin: 18px 0 8px;
}
.variants .label span {
  font-weight: 600;
}
.variant {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  margin: 0 6px 8px 0;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}
.variant[aria-pressed='true'] {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
  font-weight: 600;
}
.variant.is-off {
  color: #8a9599;
  text-decoration: line-through;
}
.variant-note {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 4px;
}
.price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--ink);
  margin: 18px 0 2px;
}
.price-note {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0 0 12px;
}
/* Энергоэтикетка (2023/1669) и значок зарядки (2022/2380): стрелка класса цветом шкалы A-G. */
.energy,
.charger {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0;
  font-size: 0.86rem;
  color: var(--muted);
}
.energy:empty {
  display: none;
}
.energy-arrow {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-width: 52px;
  height: 30px;
  padding: 0 16px 0 10px;
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  clip-path: polygon(0 0, calc(100% - 13px) 0, 100% 50%, calc(100% - 13px) 100%, 0 100%);
}
.cls-A {
  background: #00a651;
}
.cls-B {
  background: #50b848;
}
.cls-C {
  background: #bed630;
}
.cls-D {
  background: #fff200;
  color: var(--text);
}
.cls-E {
  background: #fdb913;
}
.cls-F {
  background: #f37021;
}
.cls-G {
  background: #ed1c24;
}
.charger-icon {
  flex: none;
  color: var(--ink);
}
.charger-label {
  flex: none;
  border: 2px solid var(--ink);
  border-radius: 4px;
  padding: 2px 6px;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.8rem;
  line-height: 1.25;
  text-align: center;
}
.stock {
  color: var(--ok);
  font-weight: 600;
  margin: 0;
}
.stock::before {
  content: '●';
  margin-right: 6px;
}
.stock.is-off {
  color: var(--bad);
}
.stock.is-expected {
  color: var(--muted);
}
.dispatch {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 2px 0 16px;
}
.add {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.add label {
  font-size: 0.9rem;
}
.add input {
  width: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}
.codes {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  font-size: 0.88rem;
  color: var(--muted);
  margin: 18px 0;
}
.codes dd {
  margin: 0;
}
.rights {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 4px 18px 10px;
}
.rights h2 {
  font-size: 1rem;
}
.rights ul {
  padding-left: 18px;
  font-size: 0.92rem;
}
.product-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 48px;
  margin-top: 24px;
}
.product-info section:first-child {
  grid-column: 1 / -1;
  max-width: 860px;
}
.ticks {
  padding-left: 20px;
}
.specs {
  width: 100%;
  border-collapse: collapse;
}
.specs th,
.specs td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.specs th {
  width: 45%;
  font-weight: 500;
  color: var(--muted);
}
.safety dl {
  font-size: 0.92rem;
}
.safety dt {
  font-weight: 600;
  margin-top: 10px;
}
.safety dd {
  margin: 2px 0 0;
  color: var(--muted);
}
.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(27, 58, 65, 0.18);
  padding: 8px 20px 14px;
  z-index: 20;
  max-width: 340px;
}

/* ---------- корзина и заказ ---------- */
.cart-table {
  width: 100%;
  border-collapse: collapse;
}
.cart-table th {
  text-align: left;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
  border-bottom: 1px solid var(--line);
  padding: 8px;
}
.cart-table td {
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.c-img img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}
.c-name a {
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.c-name span,
.c-name em {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
}
.c-name em {
  color: var(--bad);
  font-style: normal;
}
.c-name em.is-expected {
  color: var(--muted);
}
tr.is-off .c-sum {
  text-decoration: line-through;
  color: var(--muted);
}
.c-sum {
  font-weight: 600;
  white-space: nowrap;
}
.c-price {
  white-space: nowrap;
}
.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.qty button {
  border: 0;
  background: none;
  width: 34px;
  height: 34px;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--ink);
}
.qty button:disabled {
  color: #b6c0c3;
  cursor: default;
}
.qty span {
  min-width: 24px;
  text-align: center;
}
.cart-summary {
  margin: 24px 0 0 auto;
  max-width: 380px;
  background: var(--surface);
  border-radius: 14px;
  padding: 18px 22px 22px;
}
.cart-summary dl,
.checkout-side dl,
.thanks-box dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  margin: 0 0 12px;
}
.cart-summary dd,
.checkout-side dd,
.thanks-box dd {
  margin: 0;
  text-align: right;
  white-space: nowrap;
}
.total {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ink);
  padding-top: 6px;
  border-top: 1px solid var(--line);
}
.hint {
  font-size: 0.88rem;
  color: var(--muted);
}
.cart-summary .btn {
  width: 100%;
  text-align: center;
}
.checkout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 40px;
  align-items: start;
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 20px 8px;
  margin: 0 0 18px;
}
legend {
  font-weight: 700;
  color: var(--ink);
  padding: 0 6px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
}
.field label {
  font-size: 0.9rem;
  font-weight: 500;
}
.req {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.8rem;
}
.field input,
.field textarea {
  border: 1px solid #c9d4d7;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}
.field input[readonly] {
  background: var(--surface);
}
.help {
  font-size: 0.82rem;
  color: var(--muted);
}
.invalid input,
.invalid textarea {
  border-color: var(--bad);
  background: #fff6f5;
}
.invalid.options,
label.invalid {
  outline: 2px solid var(--bad);
  outline-offset: 4px;
  border-radius: 8px;
}
.row2 {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 14px;
}
.options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.option {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 2px 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
}
.option:has(input:checked) {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.opt-name {
  font-weight: 600;
}
.opt-eta,
.opt-text {
  grid-column: 2 / -1;
  font-size: 0.85rem;
  color: var(--muted);
}
.opt-price {
  grid-row: 1;
  grid-column: 3;
  font-weight: 600;
}
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 12px;
  cursor: pointer;
}
.check input {
  margin-top: 4px;
}
.hp {
  position: absolute;
  left: -9999px;
}
.checkout-side {
  position: sticky;
  top: 16px;
  background: var(--surface);
  border-radius: 14px;
  padding: 4px 22px 22px;
}
.sum-lines {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
}
.sum-lines li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
.sum-lines small {
  display: block;
  color: var(--muted);
}
.sum-lines li > span:last-child {
  white-space: nowrap;
}
.consent {
  font-size: 0.9rem;
}
.btn-order {
  width: 100%;
  margin-top: 4px;
  padding: 14px;
}
.order-note {
  font-size: 0.85rem;
  color: var(--muted);
}
.form-error {
  color: var(--bad);
  font-weight: 600;
}
.order-no {
  font-size: 1.15rem;
}
.thanks-box {
  max-width: 560px;
  background: var(--surface);
  border-radius: 14px;
  padding: 8px 22px 12px;
}
.steps {
  max-width: 720px;
  padding-left: 20px;
}
.steps li {
  margin-bottom: 8px;
}

/* ---------- юридические страницы ---------- */
.doc {
  max-width: 860px;
}
.doc h2 {
  margin-top: 1.8em;
}
.doc table {
  border-collapse: collapse;
  width: 100%;
  margin: 12px 0;
}
.doc th,
.doc td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}
.doc th {
  background: var(--surface);
}
.notfound {
  padding: 60px 0;
  text-align: center;
}

/* ---------- подвал ---------- */
.site-footer {
  background: var(--ink);
  color: #d6e6ea;
  padding: 40px 0 24px;
  font-size: 0.92rem;
}
.site-footer a {
  color: #fff;
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--cyan);
}
.site-footer h2 {
  color: #fff;
  font-size: 1rem;
  margin: 0 0 12px;
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.footer-cols ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.footer-legal {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin-top: 28px;
  padding-top: 16px;
  font-size: 0.82rem;
  color: #a9c3ca;
}
.footer-legal p {
  margin: 4px 0;
}
.site-footer .todo {
  color: var(--bad);
}

/* ---------- узкие экраны ---------- */
@media (max-width: 1000px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .tiles {
    grid-template-columns: repeat(3, 1fr);
  }
  .benefits {
    grid-template-columns: repeat(2, 1fr);
  }
  .checkout {
    grid-template-columns: 1fr;
  }
  .checkout-side {
    position: static;
  }
}
@media (max-width: 800px) {
  .header-row {
    flex-wrap: wrap;
    gap: 12px 16px;
  }
  .search {
    order: 3;
    flex-basis: 100%;
    max-width: none;
  }
  .header-contact {
    display: none;
  }
  .cart-link {
    margin-left: auto;
  }
  .hero {
    grid-template-columns: 1fr;
    padding: 28px 22px;
  }
  .product,
  .product-info {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .footer-cols {
    grid-template-columns: repeat(2, 1fr);
  }
  .cat-nav ul {
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
  }
}
@media (max-width: 600px) {
  .wrap {
    padding: 0 16px;
  }
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .tiles {
    grid-template-columns: repeat(2, 1fr);
  }
  .benefits {
    grid-template-columns: 1fr;
  }
  .row2 {
    grid-template-columns: 1fr;
  }
  .topbar ul {
    gap: 2px 16px;
    font-size: 0.75rem;
  }
  .cart-table thead {
    display: none;
  }
  .cart-table tr {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    gap: 4px 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }
  .cart-table td {
    border: 0;
    padding: 0;
  }
  .c-img {
    grid-row: span 3;
  }
  .c-name {
    grid-column: 2 / -1;
  }
  .c-price {
    display: none;
  }
  .footer-cols {
    grid-template-columns: 1fr;
  }
  .filters select {
    min-width: 0;
  }
}
