:root {
  --blue-900: #07305f;
  --blue-700: #0b4f9c;
  --blue-500: #1673d1;
  --cyan: #19a7e0;
  --cyan-50: #e8f6fc;
  --bg: #ffffff;
  --tint: #f3f7fb;
  --ink: #0f1b2d;
  --muted: #5b6b80;
  --line: #e2e9f1;
  --ok: #12a150;
  --warn: #d97706;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(11, 79, 156, .08);
  --shadow-lg: 0 24px 60px rgba(7, 48, 95, .18);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0; font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink); background: var(--bg); line-height: 1.55; -webkit-font-smoothing: antialiased;
  font-size: 16px;
}
img { max-width: 100%; display: block; }
a { color: var(--blue-500); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(30px, 5vw, 52px); font-weight: 800; }
h2 { font-size: clamp(24px, 3.2vw, 36px); font-weight: 800; }
h3 { font-size: 18px; font-weight: 700; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.wrap--narrow { width: min(780px, 100% - 32px); }
[hidden] { display: none !important; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border-radius: 999px; font: inherit; font-weight: 700; font-size: 15px;
  border: 0; cursor: pointer; text-decoration: none; transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: linear-gradient(135deg, var(--blue-500), var(--blue-700)); color: #fff; box-shadow: 0 8px 20px rgba(22, 115, 209, .3); }
.btn--primary:hover { box-shadow: 0 12px 28px rgba(22, 115, 209, .4); }
.btn--primary:disabled { opacity: .6; cursor: progress; }
.btn--ghost { background: #fff; color: var(--blue-700); border: 1.5px solid var(--line); }
.btn--ghost:hover { border-color: var(--blue-500); }
.btn--soft { background: var(--cyan-50); color: var(--blue-700); }
.btn--block { width: 100%; }
.btn--sm { padding: 10px 16px; font-size: 14px; }

/* Header */
.header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.88); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.header__row { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--blue-900); font-weight: 600; font-size: 18px; letter-spacing: -.01em; }
.logo b { font-weight: 800; color: var(--blue-500); }
.logo--light { color: #fff; }
.logo--light b { color: var(--cyan); }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; opacity: .8; }
.nav a:hover { opacity: 1; color: var(--blue-500); }
.cart-btn { position: relative; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; color: var(--blue-700); cursor: pointer; display: grid; place-items: center; }
.cart-btn__count { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; border-radius: 10px; background: var(--cyan); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; padding: 0 5px; }
@media (max-width: 860px) { .nav { display: none; } .cart-btn { margin-left: auto; } }

/* Hero */
.hero { background: radial-gradient(1200px 500px at 85% -10%, #d9f0fb 0%, transparent 60%), linear-gradient(180deg, #f6fafe, #fff); overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; padding: 56px 0 64px; }
.eyebrow { display: inline-block; font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--blue-500); background: var(--cyan-50); padding: 6px 12px; border-radius: 999px; margin: 0 0 18px; }
.lead { font-size: 18px; color: var(--muted); max-width: 560px; margin: 0 0 28px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.perks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.perks li { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.perks span { width: 34px; height: 34px; border-radius: 10px; background: #fff; box-shadow: var(--shadow); display: grid; place-items: center; font-size: 17px; flex: none; }
.hero__visual { position: relative; min-height: 420px; display: grid; place-items: center; }
.phone { width: 230px; height: 440px; border-radius: 38px; background: var(--blue-900); padding: 12px; box-shadow: var(--shadow-lg); transform: rotate(-4deg); }
.phone__screen { height: 100%; border-radius: 28px; background: linear-gradient(180deg, #fff, #f2f8fd); padding: 26px 18px; display: flex; flex-direction: column; }
.phone__top { display: flex; justify-content: space-between; align-items: center; font-weight: 700; color: var(--muted); font-size: 13px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(18,161,80,.15); }
.phone__value { font-size: 54px; font-weight: 800; color: var(--blue-900); margin-top: 24px; letter-spacing: -.03em; }
.phone__value small { font-size: 15px; font-weight: 700; color: var(--muted); }
.phone__trend { color: var(--ok); font-weight: 700; margin-bottom: 18px; }
.phone__chart { width: 100%; height: 110px; }
.phone__range { margin-top: auto; font-size: 12px; color: var(--muted); font-weight: 600; }
.hero__sensor { position: absolute; width: 190px; height: 190px; object-fit: cover; border-radius: 50%; right: 4%; bottom: 6%; border: 6px solid #fff; box-shadow: var(--shadow-lg); background: #fff; }
@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; padding: 32px 0 40px; gap: 8px; }
  .hero__visual { min-height: 0; display: none; }
  .lead { font-size: 16px; }
}

/* Sections */
.section { padding: 72px 0; }
.section--tint { background: var(--tint); }
.section--dark { background: linear-gradient(135deg, var(--blue-900), var(--blue-700)); color: #fff; }
.section__head { margin-bottom: 28px; }
.section__head p { color: var(--muted); margin: 0; }
@media (max-width: 640px) { .section { padding: 48px 0; } }

/* Product grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.grid--small { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card__img { position: relative; aspect-ratio: 1 / 1; background: #f7fafc; cursor: pointer; }
.card__img img { width: 100%; height: 100%; object-fit: contain; }
.card__stock { position: absolute; left: 12px; top: 12px; background: #fff; color: var(--warn); font-weight: 800; font-size: 12px; padding: 5px 10px; border-radius: 999px; box-shadow: var(--shadow); }
.card--out .card__img img { opacity: .55; filter: grayscale(.4); }
.card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__title { font-size: 19px; font-weight: 800; margin: 0; cursor: pointer; }
.card__subtitle { font-size: 13px; color: var(--muted); margin: -6px 0 0; }
.card__short { font-size: 14px; color: var(--muted); margin: 0; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: var(--cyan-50); color: var(--blue-700); }
.badge--warn { background: #fff4e5; color: #a35400; }
.card__more { background: none; border: 0; padding: 0; color: var(--blue-500); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; text-align: left; }
.card__foot { margin-top: auto; display: grid; gap: 12px; }
.price { font-size: 24px; font-weight: 800; color: var(--blue-900); letter-spacing: -.02em; }
.price small { font-size: 14px; color: var(--muted); font-weight: 600; }
.variants { display: flex; flex-wrap: wrap; gap: 6px; }
.variants label { cursor: pointer; }
.variants input { position: absolute; opacity: 0; pointer-events: none; }
.variants span { display: inline-block; padding: 7px 11px; border-radius: 10px; border: 1.5px solid var(--line); font-size: 13px; font-weight: 700; }
.variants input:checked + span { border-color: var(--blue-500); background: var(--cyan-50); color: var(--blue-700); }
.variants input:focus-visible + span { outline: 2px solid var(--blue-500); outline-offset: 2px; }
.buy { display: flex; gap: 8px; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; flex: none; }
.qty button { width: 38px; height: 44px; border: 0; background: none; font: inherit; font-size: 20px; font-weight: 700; color: var(--blue-700); cursor: pointer; }
.qty input { width: 32px; text-align: center; border: 0; font: inherit; font-weight: 800; font-size: 16px; -moz-appearance: textfield; background: transparent; color: var(--ink); }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.buy .btn { flex: 1; padding-inline: 12px; }

/* Compare */
.table-scroll { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
.compare { width: 100%; border-collapse: collapse; min-width: 640px; }
.compare th, .compare td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); font-size: 15px; }
.compare th { background: #f7fafd; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.compare tr:last-child td { border-bottom: 0; }
.compare .yes { color: var(--ok); font-weight: 800; }
.compare .no { color: #a0aec0; }
.note { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 22px; }
.tip { background: #fff; border-radius: 14px; padding: 16px 18px; border-left: 4px solid var(--cyan); font-size: 15px; }

/* Info cards */
.info-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.info-card { background: #fff; border-radius: var(--radius); padding: 20px 22px; border: 1px solid var(--line); }
.info-card p { margin: 0; color: var(--muted); font-size: 15px; }

/* FAQ */
.faq { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 17px; padding: 14px 32px 14px 0; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-size: 24px; color: var(--blue-500); transition: transform .2s; }
.faq[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 0 0 16px; color: var(--muted); }

/* Contacts */
.contacts { display: grid; grid-template-columns: 1fr 1.2fr; gap: 32px; align-items: center; }
.contacts p { opacity: .8; margin: 0; }
.contacts__links { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.contact { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); color: #fff; text-decoration: none; transition: background .15s; }
.contact:hover { background: rgba(255,255,255,.16); }
.contact b { display: block; }
.contact small { opacity: .75; font-size: 13px; }
.contact__icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.15); font-size: 18px; flex: none; }
.contact__icon--tg { background: #229ed9; }
.contact__icon--vb { background: #7360f2; }
@media (max-width: 760px) { .contacts { grid-template-columns: 1fr; } .contacts__links { grid-template-columns: 1fr; } }

/* Footer */
.footer { background: var(--blue-900); color: rgba(255,255,255,.8); padding: 32px 0 calc(24px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(255,255,255,.08); }
.footer__row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.footer a { color: rgba(255,255,255,.85); }
.footer__small { font-size: 14px; margin: 10px 0 0; }
.footer__links { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; }
.footer__disclaimer { font-size: 12px; opacity: .6; margin-top: 20px; }

/* Mobile cart bar */
.cart-bar { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 60; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; border: 0; border-radius: 16px; background: linear-gradient(135deg, var(--blue-500), var(--blue-700)); color: #fff; font: inherit; font-size: 15px; box-shadow: var(--shadow-lg); cursor: pointer; }
@media (min-width: 861px) { .cart-bar { left: auto; width: 360px; right: 24px; bottom: 24px; } }
body.has-cart .footer { padding-bottom: 100px; }

/* Modals */
.modal { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100%; height: 100%; margin: 0; }
.modal::backdrop { background: rgba(7, 26, 51, .5); backdrop-filter: blur(3px); }
.modal[open] { display: grid; place-items: center; }
.modal__box { position: relative; background: #fff; width: min(520px, 100% - 24px); max-height: calc(100dvh - 24px); overflow: auto; border-radius: 22px; padding: 28px 24px 24px; box-shadow: var(--shadow-lg); overscroll-behavior: contain; }
.modal__box--wide { width: min(860px, 100% - 24px); }
.modal__close { position: absolute; right: 12px; top: 12px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--tint); font-size: 24px; line-height: 1; cursor: pointer; color: var(--muted); z-index: 2; }
@media (max-width: 640px) {
  .modal[open] { place-items: end center; }
  .modal__box, .modal__box--wide { width: 100%; max-height: 92dvh; border-radius: 22px 22px 0 0; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
}

/* Product modal */
.pm { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.pm__gallery img.pm__main { width: 100%; aspect-ratio: 1/1; object-fit: contain; background: #f7fafc; border-radius: 16px; }
.pm__thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.pm__thumbs button { border: 2px solid transparent; border-radius: 10px; padding: 0; background: #f7fafc; cursor: pointer; flex: none; }
.pm__thumbs button[aria-current="true"] { border-color: var(--blue-500); }
.pm__thumbs img { width: 60px; height: 60px; object-fit: contain; border-radius: 8px; }
.pm__info { display: flex; flex-direction: column; gap: 12px; }
.pm__info ul { margin: 0; padding-left: 18px; color: var(--ink); font-size: 15px; }
.pm__info li { margin-bottom: 6px; }
.specs { width: 100%; border-collapse: collapse; font-size: 14px; }
.specs td { padding: 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.specs td:first-child { color: var(--muted); padding-right: 12px; width: 45%; }
@media (max-width: 720px) { .pm { grid-template-columns: 1fr; gap: 16px; } }

/* Cart */
.cart-items { display: grid; gap: 12px; margin: 8px 0 16px; }
.cart-item { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.cart-item img { width: 56px; height: 56px; object-fit: contain; border-radius: 10px; background: #f7fafc; }
.cart-item__name { font-weight: 700; font-size: 15px; line-height: 1.3; }
.cart-item__meta { font-size: 13px; color: var(--muted); }
.cart-item__right { display: grid; justify-items: end; gap: 6px; }
.cart-item .qty button { width: 30px; height: 34px; font-size: 18px; }
.cart-item .qty input { width: 26px; font-size: 15px; }
.cart-item__remove { background: none; border: 0; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; text-decoration: underline; padding: 0; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 18px; }
.cart-total b { font-size: 26px; color: var(--blue-900); }
.cart-empty { color: var(--muted); padding: 20px 0; text-align: center; }

/* Forms */
.form { display: grid; gap: 14px; margin-top: 20px; }
.form h3 { margin: 6px 0 0; }
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field legend { font-size: 14px; font-weight: 700; color: var(--ink); padding: 0; margin-bottom: 6px; }
.field input, .field textarea { width: 100%; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 12px; font: inherit; font-size: 16px; color: var(--ink); background: #fff; transition: border-color .15s; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(22,115,209,.12); }
.field input[aria-invalid="true"] { border-color: #d64545; }
.field-row { display: grid; grid-template-columns: 120px 1fr; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips--col { flex-direction: column; }
.chips label { cursor: pointer; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span { display: block; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 12px; font-weight: 600; font-size: 15px; }
.chips input:checked + span { border-color: var(--blue-500); background: var(--cyan-50); color: var(--blue-700); }
.chips input:focus-visible + span { outline: 2px solid var(--blue-500); outline-offset: 2px; }
.chips input:disabled + span { opacity: .45; cursor: not-allowed; text-decoration: line-through; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form__error { color: #b42318; background: #fef3f2; padding: 10px 12px; border-radius: 10px; font-size: 14px; margin: 0; }
.form__legal { font-size: 12px; color: var(--muted); text-align: center; margin: 0; }
.lead-product { font-weight: 800; font-size: 18px; color: var(--blue-700); margin: 0; }

.success { text-align: center; padding: 20px 4px; }
.success__icon { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center; font-size: 36px; color: #fff; background: var(--ok); }
.success p { color: var(--muted); }

.toast { position: fixed; left: 50%; top: 80px; transform: translateX(-50%); background: var(--blue-900); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 700; z-index: 100; box-shadow: var(--shadow-lg); font-size: 15px; }

/* Mobile compaction */
@media (max-width: 640px) {
  .grid { gap: 14px; }
  .card__img { aspect-ratio: 16 / 11; }
  .grid--small { grid-template-columns: 1fr 1fr; gap: 10px; }
  .grid--small .card__img { aspect-ratio: 1 / 1; }
  .grid--small .card__body { padding: 12px; gap: 8px; }
  .grid--small .card__title { font-size: 15px; line-height: 1.25; }
  .grid--small .card__short { display: none; }
  .grid--small .price { font-size: 19px; }
  .grid--small .buy { flex-direction: column; }
  .grid--small .qty { justify-content: space-between; }
  .grid--small .buy .btn { padding: 11px 8px; font-size: 14px; }
  .grid--small .variants span { padding: 6px 8px; font-size: 12px; }
  .grid--small .card__more { font-size: 13px; }
}
