/* Asia pharm, магазин. Общая система: цвета и шрифт из брендбука, два радиуса, одна гарнитура */

/* ---------- Переменные ---------- */
:root {
  --navy: #162954;
  --navy-d: #0f1e40;
  --green: #00ba4b;
  --green-d: #007a34;
  --green-btn: #00873a;
  --green-ink: #00803a;
  --mint: #dfece4;
  --paper: #f4f7f5;
  --white: #fff;
  --ink: #162954;
  --ink-2: #4c5a7a;
  --line: rgba(22, 41, 84, 0.12);
  --r-s: 8px;
  --r-l: 20px;
  --wrap: min(1280px, 100% - 64px);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---------- Основа ---------- */
*,
*::before,
*::after { box-sizing: border-box; }
/* Якоря встают под липкую шапку: её высоту в --head-h кладёт js/main.js */
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head-h, 0px) + 16px); }
body {
  margin: 0;
  font-family: Roboto, system-ui, sans-serif;
  font-size: 16px;
  line-height: 24px;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
::selection { background: var(--navy); color: var(--white); }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; border-radius: var(--r-s); }
.wrap { width: var(--wrap); margin-inline: auto; }
.hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* ---------- Типографика ---------- */
h1, h2, h3 { font-weight: 500; text-wrap: balance; }
.h1 { font-size: clamp(32px, 3.4vw, 48px); line-height: 1.08; letter-spacing: -0.02em; }
.h2 { font-size: clamp(26px, 2.5vw, 36px); line-height: 1.15; letter-spacing: -0.015em; }
.h3 { font-size: 20px; line-height: 26px; letter-spacing: -0.005em; }
.lead { font-size: 18px; line-height: 28px; color: var(--ink-2); }
.muted { color: var(--ink-2); }
.small { font-size: 14px; line-height: 20px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Ссылки и кнопки ---------- */
.link {
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: color 0.2s var(--ease);
}
.link:hover { color: var(--green-ink); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 24px;
  border-radius: var(--r-s);
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.2s var(--ease), transform 0.15s var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn-green { background: var(--green-btn); color: var(--white); }
.btn-green:hover { background: var(--green-d); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-d); }
.btn-white { background: var(--white); color: var(--navy); }
.btn-white:hover { background: var(--mint); }
.btn-s { height: 40px; padding: 0 16px; font-size: 15px; }
.btn.is-added, .btn.is-added:hover { background: var(--mint); color: var(--navy); }

/* ---------- Шапка ---------- */
.topbar { background: var(--paper); font-size: 13px; line-height: 18px; color: var(--ink-2); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 36px; }
.topbar ul { display: flex; align-items: center; gap: 24px; }
.topbar a:hover { color: var(--navy); }
.topbar .phone { color: var(--navy); font-weight: 500; }
.lang { display: flex; gap: 10px; }
.lang .is-active { color: var(--navy); font-weight: 700; }

.header .wrap { display: flex; align-items: center; gap: 24px; height: 80px; }
.logo img { height: 30px; width: auto; }
.search { flex: 1; position: relative; }
.search input {
  width: 100%;
  height: 48px;
  padding: 0 52px 0 18px;
  border: 0;
  border-radius: var(--r-s);
  background: var(--paper);
  text-overflow: ellipsis;
  transition: background-color 0.2s var(--ease);
}
.search input::placeholder { color: var(--ink-2); }
/* Рамку фокуса у поля не снимаем: одной смены фона мало, чтобы увидеть, где курсор */
.search input:hover, .search input:focus { background: var(--mint); }
.search button { position: absolute; right: 0; top: 0; width: 52px; height: 48px; display: grid; place-items: center; }
.header-actions { display: flex; align-items: center; gap: 28px; }
.header-actions a { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: 15px; }
.header-actions a:hover { color: var(--green-ink); }
.cart-count {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--green-btn);
  color: var(--white);
  font-size: 13px;
  line-height: 22px;
  font-weight: 700;
  text-align: center;
}
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

.catnav { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.catnav ul { display: flex; gap: 28px; height: 52px; align-items: center; overflow-x: auto; scrollbar-width: none; }
.catnav ul::-webkit-scrollbar { display: none; }
.catnav a { font-size: 15px; white-space: nowrap; padding: 15px 0; border-bottom: 2px solid transparent; transition: border-color 0.2s var(--ease); }
.catnav a:hover, .catnav a.is-active { border-color: var(--green); }
.catnav .push { margin-left: auto; }

/* ---------- Первый экран ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; margin-top: 24px; }
.hero-main {
  position: relative;
  overflow: hidden;
  min-height: 440px;
  padding: 56px 48px;
  border-radius: var(--r-l);
  background: var(--mint);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-copy { position: relative; z-index: 2; max-width: 410px; }
.hero-copy .lead { margin-top: 18px; color: var(--ink); }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 32px; }
.hero-cta .link { white-space: nowrap; }
/* Плашка-параллелограмм из брендбука, один раз на странице */
.hero-plate {
  position: absolute;
  right: 40px;
  top: 0;
  bottom: 0;
  width: 44%;
  background: var(--white) url(../img/citrus.webp) center / cover no-repeat;
  clip-path: polygon(24% 0, 100% 0, 76% 100%, 0 100%);
}
.hero-shot { position: absolute; right: 0; bottom: 0; top: 0; width: 48%; z-index: 1; }
.hero-shot img { position: absolute; bottom: 36px; width: auto; filter: drop-shadow(0 22px 22px rgba(22, 41, 84, 0.22)); }
.hero-shot .b1 { height: 82%; left: 12%; z-index: 2; }
.hero-shot .b2 { height: 72%; left: 53%; }

.hero-side { display: grid; grid-template-rows: 1fr 1fr; gap: 20px; }
.promo {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-l);
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 210px;
}
.promo .h3 { font-size: 24px; line-height: 28px; max-width: 58%; }
.promo p { margin-top: 8px; font-size: 15px; line-height: 22px; max-width: 54%; }
.promo .link { margin-top: auto; font-size: 15px; }
.promo img { position: absolute; right: 16px; bottom: 16px; width: 40%; height: auto; max-height: 132px; object-fit: contain; object-position: right bottom; filter: drop-shadow(0 14px 16px rgba(22, 41, 84, 0.18)); transition: transform 0.5s var(--ease); }
.promo:hover img { transform: scale(1.04); }
.promo-winz { background: #eceff3; }
.promo-dark { background: #2a231a; color: #f3e9d6; }
.promo-dark p { color: #cdbf9f; }
.promo-dark .link:hover { color: #fff; }
.promo-dark img { filter: drop-shadow(0 14px 16px rgba(0, 0, 0, 0.4)); width: 38%; right: 20px; bottom: 18px; }

/* Строка условий под первым экраном */
.terms { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 28px; }
.terms li { padding: 4px 24px; border-left: 1px solid var(--line); }
.terms li:first-child { padding-left: 0; border-left: 0; }
.terms strong { display: block; font-weight: 500; }
.terms span { font-size: 14px; line-height: 20px; color: var(--ink-2); }

/* ---------- Секции ---------- */
.section { margin-top: 88px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.sec-head .link { white-space: nowrap; }
.band { margin-top: 88px; padding: 72px 0; background: var(--paper); }

/* ---------- Плитки задач ---------- */
.tasks { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.task {
  position: relative;
  overflow: hidden;
  height: 164px;
  padding: 20px;
  border-radius: var(--r-l);
  background: var(--tint, var(--paper));
}
.task b { display: block; font-size: 18px; line-height: 22px; font-weight: 500; max-width: 62%; }
.task span { display: block; margin-top: 6px; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.task img { position: absolute; right: 18px; bottom: 14px; height: 112px; width: auto; transition: transform 0.5s var(--ease); filter: drop-shadow(0 10px 12px rgba(22, 41, 84, 0.16)); }
.task img.box { height: auto; width: 40%; max-height: 104px; object-fit: contain; object-position: right bottom; right: 14px; bottom: 14px; }
.task:hover img { transform: scale(1.04); }

/* ---------- Карточка товара ---------- */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 24px; }
.card { display: flex; flex-direction: column; }
.card-media {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 0.94;
  overflow: hidden;
  border-radius: var(--r-l);
  background: var(--tint, var(--paper));
}
.card-media img { position: absolute; inset: 0; margin: auto; width: 76%; height: 80%; object-fit: contain; filter: drop-shadow(0 14px 16px rgba(22, 41, 84, 0.18)); transition: transform 0.5s var(--ease); }
.card-media.is-photo, .band .card-media.is-photo { background: #dde6f6; }
.card-media.is-photo img { width: 100%; height: 100%; object-fit: contain; filter: none; }
.card:hover .card-media img { transform: scale(1.05); }
.card-tag { position: absolute; left: 16px; top: 14px; font-size: 13px; line-height: 18px; font-weight: 500; }
.card-brand { margin-top: 16px; font-size: 13px; line-height: 18px; color: var(--ink-2); }
.card-name { margin-top: 2px; font-size: 18px; line-height: 24px; font-weight: 500; }
.card-name a:hover { color: var(--green-ink); }
.card-desc { margin-top: 4px; font-size: 14px; line-height: 20px; color: var(--ink-2); min-height: 40px; }
/* Фасовка или главное свойство прибора */
.card-meta { margin-top: auto; padding-top: 6px; font-size: 13px; line-height: 18px; font-weight: 500; color: var(--navy); }
/* Мета прижата к цене, поэтому в ряду стоит на одной высоте при любой длине описания */
.card .card-meta + .card-buy { margin-top: 0; }
.card-buy { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 14px; }
.price { font-size: 20px; line-height: 24px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price span { font-size: 14px; font-weight: 500; }
.band .card-media { background: var(--white); }

/* ---------- Бренды ---------- */
.brands { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: 204px; gap: 20px; }
.brand {
  position: relative;
  overflow: hidden;
  grid-column: span 3;
  border-radius: var(--r-l);
  padding: 24px;
  background: var(--tint, var(--paper));
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.brand .h3 { font-size: 24px; line-height: 28px; }
.brand p { margin-top: 6px; font-size: 14px; line-height: 20px; color: var(--ink-2); max-width: 60%; }
.brand .link { margin-top: auto; font-size: 15px; }
.brand > img.pic { position: absolute; right: 14px; bottom: 14px; width: 40%; height: auto; max-height: 150px; object-fit: contain; object-position: right bottom; filter: drop-shadow(0 12px 14px rgba(22, 41, 84, 0.18)); transition: transform 0.5s var(--ease); }
.brand:hover > img.pic { transform: scale(1.04); }
.brand .wordmark { height: 24px; width: auto; margin: 2px 0; }
.brand-wide { grid-column: span 6; grid-row: span 2; padding: 36px; background: #dcf0f2; }
.brand-wide .h3 { font-size: 36px; line-height: 40px; letter-spacing: -0.015em; }
.brand-wide p { font-size: 16px; line-height: 24px; max-width: 360px; color: var(--ink); margin-top: 10px; }
.brand-wide .link { margin-top: 18px; }
.shelf { position: absolute; left: 36px; right: 36px; bottom: 28px; display: flex; justify-content: space-between; }
.shelf img { height: 212px; width: auto; margin-right: -8px; filter: drop-shadow(0 12px 14px rgba(22, 41, 84, 0.18)); }
.brand-dark { background: #2a231a; color: #f3e9d6; }
.brand-dark p { color: #cdbf9f; }
.brand-dark .link:hover { color: #fff; }
.brand-dark > img.pic { filter: drop-shadow(0 12px 14px rgba(0, 0, 0, 0.4)); width: 40%; right: 10px; bottom: 10px; }
.brand-photo > img.pic { width: 36%; }
.brand-soon { grid-column: span 12; grid-row: auto; flex-direction: row; align-items: center; gap: 24px; padding: 22px 28px; background: var(--paper); }
.brand-soon .h3 { font-size: 20px; line-height: 26px; }
.brand-soon p { margin: 0; max-width: none; font-size: 15px; }
.brands-soon-row { margin-top: 20px; }

/* ---------- Медтехника ---------- */
.med { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); gap: 48px; align-items: start; }
.med-copy .lead { margin-top: 16px; font-size: 16px; line-height: 24px; }
.med-lines { margin-top: 28px; border-top: 1px solid var(--line); }
.med-lines li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.med-lines b { display: block; font-size: 18px; line-height: 24px; font-weight: 500; }
.med-lines span { display: block; margin-top: 2px; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.med-lines .link { display: inline-block; margin-top: 8px; font-size: 15px; }

/* ---------- Товар в фокусе ---------- */
.focus { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.focus-media { position: relative; display: grid; place-items: center; height: 480px; border-radius: var(--r-l); background: #dcf0f2; overflow: hidden; }
.focus-media img { height: 400px; width: auto; filter: drop-shadow(0 24px 24px rgba(22, 41, 84, 0.22)); }
.focus-copy .lead { margin-top: 14px; }
.spec { margin-top: 28px; border-top: 1px solid var(--line); }
.spec div { display: grid; grid-template-columns: 180px 1fr; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.spec dt { color: var(--ink-2); }
.spec dd { font-weight: 500; }
.focus-buy { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 28px; }
.focus-buy .price { font-size: 28px; line-height: 32px; }
.focus-buy .price span { font-size: 16px; }

/* ---------- О компании ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.about-text { font-size: 22px; line-height: 32px; margin-top: 20px; text-wrap: pretty; }
.about .link { display: inline-block; margin-top: 24px; }
.facts { border-top: 1px solid var(--line); }
.facts div { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--ink-2); }
.facts dd { font-size: 22px; line-height: 28px; font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; }

/* ---------- Как купить ---------- */
.how { display: grid; grid-template-columns: repeat(4, 1fr); }
.how li { padding: 4px 28px 4px 28px; border-left: 1px solid var(--line); display: flex; flex-direction: column; align-items: flex-start; }
.how li:first-child { padding-left: 0; border-left: 0; }
.how p { margin-top: 8px; font-size: 15px; line-height: 22px; color: var(--ink-2); }
.how .link { margin-top: 14px; font-size: 15px; }

/* ---------- Партнёрам ---------- */
.partners { position: relative; overflow: hidden; border-radius: var(--r-l); background: var(--navy); color: var(--white); padding: 56px; }
.partners-copy { position: relative; z-index: 1; max-width: 560px; }
.partners p { margin-top: 14px; font-size: 18px; line-height: 28px; color: #c9d2e6; }
.partners .btn { margin-top: 28px; }
.partners-pattern { position: absolute; right: 0; top: 0; bottom: 0; width: 44%; }
.partners-pattern i { position: absolute; top: 0; bottom: 0; width: 150px; background: #1f3670; clip-path: polygon(46% 0, 100% 0, 54% 100%, 0 100%); }
.partners-pattern i:nth-child(1) { right: 330px; }
.partners-pattern i:nth-child(2) { right: 248px; background: #2a4488; }
.partners-pattern i:nth-child(3) { right: 166px; background: var(--green); }
.partners-pattern i:nth-child(4) { right: 84px; }
.partners-pattern i:nth-child(5) { right: 2px; background: #2a4488; }

/* ---------- Подвал ---------- */
.footer { margin-top: 88px; padding: 56px 0 32px; background: var(--paper); font-size: 15px; line-height: 22px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer .logo img { height: 28px; }
.footer-about { margin-top: 16px; color: var(--ink-2); max-width: 300px; }
.footer h3 { font-size: 15px; line-height: 22px; font-weight: 700; margin-bottom: 12px; }
.footer li { margin-top: 8px; }
.footer li a:hover { color: var(--green-ink); }
.footer-phone { display: block; margin-top: 20px; font-size: 22px; line-height: 28px; font-weight: 500; }
.footer-legal { display: flex; justify-content: space-between; gap: 32px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; line-height: 18px; color: var(--ink-2); }
.footer-legal p { max-width: 720px; }

/* ---------- Планшет ---------- */
@media (max-width: 1100px) {
  .tasks { grid-template-columns: repeat(4, 1fr); }
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .brand { grid-column: span 6; }
  .brand-wide { grid-column: span 12; grid-row: span 2; }
  .med, .focus, .about { grid-template-columns: 1fr; gap: 32px; }
  .header-actions .label { display: none; }
}

/* ---------- Телефон ---------- */
@media (max-width: 720px) {
  :root { --wrap: calc(100% - 32px); }
  .topbar ul.top-links { display: none; }
  .header .wrap { flex-wrap: wrap; height: auto; padding: 12px 0; gap: 12px 16px; }
  .logo img { height: 26px; }
  .header .btn-cat { order: 3; height: 44px; padding: 0 14px; }
  .search { order: 4; flex: 1 1 0; }
  .search input { height: 44px; }
  .search button { height: 44px; }
  .header-actions { margin-left: auto; gap: 18px; }
  .catnav ul { gap: 22px; }
  .hero { grid-template-columns: 1fr; gap: 12px; margin-top: 16px; }
  .hero-main { min-height: 0; padding: 28px 20px 250px; }
  .hero-plate { right: -10px; top: auto; bottom: 0; height: 240px; width: 88%; }
  .hero-shot { top: auto; height: 240px; width: 100%; }
  .hero-shot img { bottom: 18px; }
  /* Флаконы раздвинуты, чтобы первый не закрывал название второго */
  .hero-shot .b1 { height: 90%; left: 20%; }
  .hero-shot .b2 { height: 80%; left: 51%; }
  .hero-cta { gap: 14px 20px; margin-top: 24px; }
  .hero-copy { max-width: none; }
  .hero-side { grid-template-rows: auto; gap: 12px; }
  .promo { min-height: 180px; padding: 20px; }
  .promo .h3 { font-size: 20px; line-height: 24px; }
  .promo img { width: 36%; }
  .terms { grid-template-columns: 1fr 1fr; gap: 16px 0; margin-top: 24px; }
  .terms li { padding: 0 12px 0 16px; }
  .terms li:nth-child(odd) { padding-left: 0; border-left: 0; }
  .section { margin-top: 56px; }
  .band { margin-top: 56px; padding: 48px 0; }
  .sec-head { margin-bottom: 20px; }
  .tasks { grid-template-columns: 1fr 1fr; gap: 12px; }
  .task { height: 132px; padding: 16px; }
  .task b { font-size: 16px; line-height: 20px; max-width: 70%; }
  .task img { height: 84px; bottom: 10px; right: 10px; }
  .task img.box { width: 34%; max-height: 72px; right: 8px; bottom: 10px; }
  .grid-4, .grid-3 { grid-template-columns: 1fr 1fr; gap: 24px 12px; }
  .card-name { font-size: 16px; line-height: 22px; }
  .card-buy { flex-direction: column; align-items: stretch; gap: 10px; }
  .card-buy .btn { width: 100%; }
  .price { font-size: 18px; }
  .brands { grid-auto-rows: auto; gap: 12px; }
  .brand, .brand-wide { grid-column: span 12; min-height: 170px; padding: 20px; }
  .brand > img.pic { max-height: 130px; }
  .brand-wide { min-height: 400px; }
  .brand-wide .h3 { font-size: 28px; line-height: 32px; }
  .shelf { left: 16px; right: 16px; bottom: 20px; }
  .shelf img { width: 20%; height: auto; margin-right: 0; }
  .brand-soon { flex-direction: column; align-items: flex-start; gap: 6px; min-height: 0; }
  .focus-media { height: 340px; }
  .focus-media img { height: 280px; }
  .spec div { grid-template-columns: 130px 1fr; }
  .about-text { font-size: 18px; line-height: 28px; }
  .how { grid-template-columns: 1fr; }
  .how li { padding: 20px 0; border-left: 0; border-top: 1px solid var(--line); }
  .how li:first-child { border-top: 0; padding-top: 0; }
  .partners { padding: 32px 20px 120px; }
  .partners-pattern { top: auto; height: 96px; width: 100%; }
  .partners-pattern i { width: 96px; }
  .footer { margin-top: 56px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: span 2; }
  /* Третья колонка ссылок занимает весь ряд, её пункты встают в две колонки */
  .footer-grid > :last-child { grid-column: span 2; }
  .footer-grid > :last-child ul { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; }
  .footer-legal { flex-direction: column; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---------- Доводка: липкая шапка, меню каталога, избранное, переключатель слайдов ---------- */
.icon-s { width: 16px; height: 16px; }
.city { display: inline-flex; align-items: center; gap: 4px; color: var(--navy); font-weight: 500; }
.head { position: sticky; top: 0; z-index: 20; background: var(--white); }
.btn-cat[aria-expanded="true"] { background: var(--navy-d); }
.mega { position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px -24px rgba(22, 41, 84, 0.25); padding: 32px 0 40px; }
.mega[hidden] { display: none; }
.mega-grid { display: grid; grid-template-columns: 1fr 1fr 1fr 1.3fr; gap: 40px; }
.mega h3 { font-size: 15px; line-height: 22px; font-weight: 700; margin-bottom: 12px; }
.mega li { margin-top: 10px; }
.mega li a:hover { color: var(--green-ink); }
.mega-promo { display: flex; align-items: center; gap: 20px; padding: 20px 24px; border-radius: var(--r-l); background: #dcf0f2; }
.mega-promo img { height: 150px; width: auto; }
.mega-promo span { font-size: 14px; line-height: 20px; color: var(--ink-2); }
.mega-promo b { display: block; font-size: 18px; line-height: 24px; font-weight: 500; color: var(--ink); margin-bottom: 4px; }

.card-pic { position: absolute; inset: 0; }
.fav { position: absolute; right: 12px; top: 12px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--r-s); background: rgba(255, 255, 255, 0.86); color: var(--navy); transition: background-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.15s var(--ease); }
.fav:hover { background: var(--white); }
.fav:active { transform: scale(0.94); }
.fav .icon { width: 20px; height: 20px; }
.fav.is-on { color: #e0344b; }
.fav.is-on .icon { fill: currentColor; }

.pager { display: flex; gap: 6px; margin-top: 36px; }
.pager i { display: block; width: 36px; height: 3px; border-radius: 2px; background: rgba(22, 41, 84, 0.18); }
.pager i.is-active { background: var(--navy); }

.footer-about { margin-top: 2px; font-size: 14px; }
.footer-phone { margin-top: 24px; }
.footer-social { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 16px; }
.footer-social li { margin-top: 0; }
.footer-pay { margin-top: 40px; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.footer-legal { margin-top: 16px; }

.band-mint { background: var(--mint); }
.focus-media.is-photo { background: #e9e2d3 url(../img/powder.webp) center / cover no-repeat; }

@media (max-width: 720px) {
  /* В блоке техники на телефоне две карточки, без одиночной в третьем ряду */
  .med .grid-3 .card:nth-child(3) { display: none; }
  .head { position: static; }
  .mega { position: static; box-shadow: none; padding: 20px 0 24px; }
  .mega-grid { grid-template-columns: 1fr 1fr; gap: 24px 16px; }
  .mega-promo { grid-column: span 2; }
  .pager { margin-top: 24px; }
  .header-actions a[aria-label="Избранное"] { display: none; }
  /* Служебная строка: телефон слева, языки справа */
  .topbar ul:last-child { width: 100%; justify-content: space-between; }
  /* Зоны нажатия в шапке шире самих значков, раскладка не меняется */
  .header-actions a, .lang a { position: relative; }
  .header-actions a::after { content: ""; position: absolute; inset: -11px; }
  .lang a::after { content: ""; position: absolute; inset: -13px -5px; }
}

/* Узкие карточки (планшет и телефон): сердечко меньше и ближе к углу,
   приборы в коробках ниже и компактнее, чтобы кнопка не лежала на товаре */
@media (max-width: 1100px) {
  .fav { right: 6px; top: 6px; width: 32px; height: 32px; }
  .fav .icon { width: 18px; height: 18px; }
  .fav::after { content: ""; position: absolute; inset: -6px; }
  .card-media.is-box img { inset: 24px 0 0; width: 68%; height: 66%; }
}
