/* ============================================================================
   iCOMFORT — product CSS.
   Loaded AFTER apple-minimal.css. Only what is genuinely product-specific:
   header, hero, filter bar, listing card, pagination, detail sheet with the
   instalment table, lightbox and the about page. Every color / radius / shadow
   / duration comes from a token.
   ========================================================================= */

:root {
  --content-max: 1180px;

  /* Здоровье аккумулятора — пять ступеней от зелёного к янтарному. Единственное
     место, где сайт отходит от «один синий, один красный, остальное серое»:
     здесь цвет несёт данные, а не украшает. Поэтому он живёт в продуктовом слое,
     а не в дизайн-системе, и держится тихо — бледная заливка, насыщенность
     только в тексте, чтобы чип не спорил с ценой. Тон текста подобран так, что
     каждая ступень проходит AA (≈4.95) на своей заливке поверх белой карточки. */
  --bat-95:  #157736;   --bat-95-bg:  rgba(52, 199, 89, 0.16);    /* 100–95 % */
  --bat-90:  #3a741a;   --bat-90-bg:  rgba(124, 190, 42, 0.18);   /* 94–90 %  */
  --bat-85:  #5d6d18;   --bat-85-bg:  rgba(170, 190, 30, 0.22);   /* 89–85 %  */
  --bat-80:  #7f620e;   --bat-80-bg:  rgba(228, 176, 20, 0.22);   /* 84–80 %  */
  --bat-low: #995311;   --bat-low-bg: rgba(238, 140, 32, 0.18);   /* ниже 80 % */
}

body { min-height: 100%; height: auto; }

/* ----------------------------------------------------------------- ICONS -- */

/* The sprite is inline in the page; this keeps it out of the layout. */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon .fill { fill: currentColor; stroke: none; }

/* ---------------------------------------------------------------- HEADER -- */

.site-header { position: sticky; top: 0; gap: 16px; }
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
}
.brand-name { font-size: 14px; font-weight: 700; letter-spacing: -0.015em; }

/* The tile, its gradient and the glyph are baked into brand.svg, so the
   design-system primitive no longer needs to draw any of them. */
.brand-mark { display: block; background: none; border-radius: 0; }

.lang-switch button { min-width: 38px; font-variant-numeric: tabular-nums; }
.header-cta { gap: 6px; }
.header-about { white-space: nowrap; }

/* ------------------------------------------------------------------ HERO -- */

.hero {
  padding: 46px 26px 34px;
  border-bottom: 1px solid var(--border-soft);
  background:
    radial-gradient(120% 90% at 50% -20%, rgba(0, 113, 227, 0.07), transparent 60%),
    var(--bg);
}
.hero-inner { max-width: 660px; margin: 0 auto; text-align: center; }
.hero-title {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.08;
  text-wrap: balance;
}
.hero-sub {
  margin-top: 12px;
  font-size: var(--fs-prose);
  line-height: 1.55;
  color: var(--text-prose);
  text-wrap: balance;
}
.hero-facts {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 10px;
}
.hero-fact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 10px;
  border-radius: var(--radius-pill);
  background: var(--panel);
  border: 1px solid var(--border-soft);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  font-size: 12px;
  color: var(--text-prose);
  white-space: nowrap;
}
.hero-fact .icon { color: var(--accent); width: 15px; height: 15px; }

/* ------------------------------------------------------------ FILTER BAR -- */

.filter-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 20;
  border-bottom: 1px solid var(--border);
}
.filter-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 14px 26px 12px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.search-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.search-wrap { position: relative; display: flex; align-items: center; flex: 1; min-width: 0; }
.search-icon { position: absolute; left: 11px; color: var(--text-2); pointer-events: none; }
.search-input {
  width: 100%;
  padding: 9px 34px 9px 34px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  background: var(--panel);
}
.search-input::-webkit-search-cancel-button { display: none; }
.search-clear { position: absolute; right: 8px; opacity: 1; width: 22px; height: 22px; }
.search-clear .icon { width: 13px; height: 13px; }

/* ---------------------------------------------------------- SEARCH HINTS -- */

/* Подсказки перекрывают список — поэтому поповер, а не выпадение вниз потоком:
   иначе каждая нажатая буква дёргала бы карточки. */
.search-suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 40;
  padding: 5px;
  border-radius: var(--radius-lg);
  background: var(--glass-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  max-height: min(52vh, 340px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.search-suggest[hidden] { display: none; }

.sug-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: none;
  border: none;
  text-align: left;
  font-size: 13.5px;
  color: var(--text);
  transition: background var(--t-fast) var(--ease);
}
.sug-row:hover, .sug-row.active { background: var(--wash-1); }
.sug-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sug-count { flex: 0 0 auto; font-size: 11.5px; color: var(--text-2); }

/* Разбор запроса: что поиск понял. Чип снимается крестиком. */
.search-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.search-chips[hidden] { display: none; }

.s-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  border: none;
  transition: background var(--t-fast) var(--ease);
}
.s-chip:hover { background: var(--accent-soft-hover); }
.s-chip .icon { width: 11px; height: 11px; stroke-width: 2; opacity: 0.75; }
.s-chip.unknown { color: var(--text-2); background: var(--wash-1); }
.s-chip.unknown:hover { background: var(--wash-2); }

.filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  flex: 0 0 auto;
  white-space: nowrap;
}
.filter-toggle .icon { width: 14px; height: 14px; color: var(--text-2); }
.filter-toggle:hover .icon { color: var(--text); }
.filter-bar.collapsed .filter-panel { display: none; }

.active-count {
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
  display: grid;
  place-items: center;
  font-variant-numeric: tabular-nums;
}
.active-count[hidden] { display: none; }

.filter-panel { display: flex; flex-direction: column; gap: 11px; min-width: 0; }
.filter-row { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; min-width: 0; }
.filter-sep { width: 1px; height: 16px; background: var(--border); flex: 0 0 auto; }

/* The series row can outgrow a phone — let it scroll sideways instead of
   pushing every other control down a line. */
.scroll-row {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
.scroll-row::-webkit-scrollbar { display: none; }

.filter-row-2 { gap: 8px 18px; }
.filter-field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.filter-field > label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
  display: flex;
  gap: 6px;
  align-items: baseline;
}
.filter-field .select { min-width: 118px; }
.price-field { flex: 1 1 180px; max-width: 230px; }

.range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;
  background: none;
  cursor: pointer;
}
.range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--wash-3);
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 15px; height: 15px;
  margin-top: -5.5px;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: transform var(--t-fast) var(--ease);
}
.range:active::-webkit-slider-thumb { transform: scale(0.94); }
.range::-moz-range-track { height: 4px; border-radius: var(--radius-pill); background: var(--wash-3); }
.range::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--panel); border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

.toggle-new { align-self: end; padding-bottom: 5px; white-space: nowrap; }
.filter-row-2 .mini-btn { align-self: end; margin-bottom: 4px; }

/* -------------------------------------------------------------- RESULTS -- */

.results { max-width: var(--content-max); margin: 0 auto; padding: 26px 26px 60px; }
.results-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}
.results-range { font-variant-numeric: tabular-nums; white-space: nowrap; }
.listing-grid { grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 22px; }

/* ---------------------------------------------------------- LISTING CARD -- */

.listing { display: flex; flex-direction: column; text-align: left; width: 100%; }
/* The cover is a column-flex item, so its automatic minimum size would let a
   tall thumbnail out-vote aspect-ratio — min-height:0 keeps every tile equal. */
.listing .card-cover {
  position: relative;
  min-height: 0;
  background: var(--placeholder);
  overflow: hidden;
}
.listing .card-cover img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}
.badges {
  position: absolute;
  top: 9px;
  left: 9px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-width: calc(100% - 18px);
}
.badge {
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  background: var(--glass-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-soft);
  color: var(--text);
}
.badge.accent { background: var(--accent); color: #fff; border-color: transparent; }

.branch-pill {
  position: absolute;
  left: 9px;
  bottom: 9px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px 3px 6px;
  border-radius: var(--radius-pill);
  font-size: 10.5px;
  font-weight: 500;
  color: #fff;
  background: rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.branch-pill .icon { width: 11px; height: 11px; stroke-width: 1.8; }

.listing .card-body {
  padding: 13px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
}
.listing-title { font-size: 14.5px; font-weight: 700; letter-spacing: -0.018em; min-width: 0; }
.listing-specs { display: flex; flex-wrap: wrap; gap: 4px 5px; min-width: 0; }
.spec-chip {
  padding: 2.5px 7px;
  border-radius: var(--radius-xs);
  font-size: 11px;
  color: var(--text-prose);
  background: var(--wash-1);
  white-space: nowrap;
}

/* Состояние аккумулятора видно, не вчитываясь в проценты. Само число остаётся
   в чипе, так что цвет ничего не заменяет — он только ускоряет просмотр списка,
   и при дальтонизме или на ч/б экране не теряется ничего. Ступень задаёт
   batteryTone() в app.js, класс назван по нижней границе диапазона. */
.spec-chip.bat-95  { color: var(--bat-95);  background: var(--bat-95-bg);  }
.spec-chip.bat-90  { color: var(--bat-90);  background: var(--bat-90-bg);  }
.spec-chip.bat-85  { color: var(--bat-85);  background: var(--bat-85-bg);  }
.spec-chip.bat-80  { color: var(--bat-80);  background: var(--bat-80-bg);  }
.spec-chip.bat-low { color: var(--bat-low); background: var(--bat-low-bg); }
.listing-foot {
  margin-top: auto;
  padding-top: 4px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.price { font-size: 18px; font-weight: 700; letter-spacing: -0.022em; font-variant-numeric: tabular-nums; }
.monthly-note { font-size: 11.5px; color: var(--text-2); white-space: nowrap; }

/* ----------------------------------------------------------- PAGINATION -- */

.pager {
  margin-top: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.pg-pages { display: flex; align-items: center; gap: 4px; }
.pg-num {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-prose);
  background: none;
  border: 1px solid transparent;
  font-variant-numeric: tabular-nums;
  transition: background var(--t) var(--ease), color var(--t) var(--ease);
}
.pg-num:hover { background: var(--wash-1); }
.pg-num.active { background: var(--text); color: #fff; }
.pg-num:active { transform: scale(0.97); }
.pg-gap { color: var(--text-2); padding: 0 2px; font-size: 13px; }

.pg-arrow { width: 34px; height: 34px; background: var(--panel); border: 1px solid var(--border); }
.pg-arrow:disabled { opacity: 0.35; pointer-events: none; }
.pg-arrow .icon { width: 15px; height: 15px; }

/* Phones swap the number strip for the OS page picker — a thumb-sized target
   that cannot be mis-tapped, and it names the total ("3 / 44") out loud. */
.pg-jump { display: none; }
.pg-jump .select { min-width: 104px; text-align: center; font-variant-numeric: tabular-nums; }

/* -------------------------------------------------------------- SKELETON -- */

/* Плитки первой загрузки: каталог приходит одним файлом на 2,9 МБ, и до его
   прихода область результатов иначе выглядела бы просто пустой. Размеры те же,
   что у настоящей карточки, поэтому подмена не двигает вёрстку. Пульс мягкий,
   без бегущего блика — он спорил бы со сдержанностью остального интерфейса. */
.card.skeleton {
  pointer-events: none;
  animation: skeleton-pulse 1.4s var(--ease) infinite;
}
.sk-cover { aspect-ratio: 4 / 3; background: var(--placeholder); }
.sk-body { padding: 15px 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.sk-line { height: 11px; border-radius: var(--radius-xs); background: var(--placeholder); }
.sk-line.short { width: 45%; }
.sk-title {
  display: inline-block;
  width: 168px;
  height: 19px;
  animation: skeleton-pulse 1.4s var(--ease) infinite;
}

@keyframes skeleton-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

/* ---------------------------------------------------------- EMPTY STATE -- */

#empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 70px 20px;
  text-align: center;
}
.empty-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text-2);
  border: 1.5px dashed var(--wash-3);
}
.empty-icon .icon { width: 21px; height: 21px; }
#empty p { font-size: var(--fs-prose); color: var(--text-2); }

/* --------------------------------------------------------------- DETAIL -- */

.overlay { align-items: center; justify-content: center; padding: 20px; }

.detail-card {
  width: 720px;
  max-width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
.detail-card .modal-title { flex: 1; min-width: 0; font-size: 15px; }
.detail-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 22px 20px;
  min-height: 0;
}

.gallery { margin-bottom: 18px; }
.gallery-main {
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 380px;
  min-height: 0;
  object-fit: cover;
  border-radius: var(--radius-lg);
  background: var(--placeholder);
  border: 1px solid var(--border-soft);
  cursor: zoom-in;
  display: block;
}

.detail-summary {
  font-size: var(--fs-prose);
  line-height: 1.6;
  color: var(--text-prose);
  margin-bottom: 20px;
}
.detail-h {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.detail-h .icon { color: var(--accent); width: 15px; height: 15px; }
.detail-meta { font-size: 11.5px; color: var(--text-2); margin-top: 8px; }

/* ---------------------------------------------------------- INSTALMENTS -- */

.install {
  margin-bottom: 22px;
  padding: 14px 15px 13px;
  border-radius: var(--radius-lg);
  background: var(--accent-soft);
}
.install-down {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(0, 113, 227, 0.16);
  font-size: 13px;
  color: var(--text-prose);
}
.install-down b { font-size: 15px; letter-spacing: -0.015em; }
.install-table { display: flex; flex-direction: column; }
.install-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px 16px;
  align-items: baseline;
  padding: 7px 0;
  font-size: 13px;
  border-bottom: 1px solid rgba(0, 113, 227, 0.1);
}
.install-row:last-child { border-bottom: none; }
.install-row.head { font-size: 11px; color: var(--text-2); border-bottom-color: rgba(0, 113, 227, 0.16); }
.install-row > span:nth-child(2),
.install-row > span:nth-child(3) { text-align: right; min-width: 74px; }
.install-monthly { font-weight: 600; }
.install-monthly .per { font-weight: 400; color: var(--text-2); }
.install-total { color: var(--text-prose); }

.spec-table { border-top: 1px solid var(--border-soft); }
.spec-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 20px;
  flex-wrap: wrap;
  padding: 9px 2px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13px;
}
.spec-row dt { color: var(--text-2); flex: 0 0 auto; }
.spec-row dd { font-weight: 500; text-align: right; min-width: 0; }

.detail-foot { padding: 12px 22px; align-items: center; gap: 8px; flex-wrap: wrap; }
.detail-foot .pill-btn { gap: 6px; }
.detail-price { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.detail-price > span:first-child { font-size: 22px; font-weight: 700; letter-spacing: -0.022em; }

/* ------------------------------------------------------------- LIGHTBOX -- */

.lightbox {
  z-index: 200;                       /* above the detail modal (150) */
  background: var(--scrim);
  backdrop-filter: var(--scrim-blur);
  -webkit-backdrop-filter: var(--scrim-blur);
}
.lightbox::before { content: none; }
.lightbox img {
  max-width: min(1000px, 92vw);
  max-height: 88vh;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-big);
  display: block;
}
.lb-close { position: fixed; top: 18px; right: 18px; width: 32px; height: 32px; }

/* ------------------------------------------------------------ ABOUT PAGE -- */

.about { max-width: 780px; margin: 0 auto; padding: 44px 26px 60px; }
.about-lead {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-prose);
  text-wrap: balance;
  text-align: center;
  margin: 0 auto 34px;
  max-width: 620px;
}
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
  gap: 14px;
  margin-bottom: 36px;
}
.about-card {
  padding: 18px 18px 17px;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow);
}
.about-card .icon-tile {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 11px;
}
.about-card .icon-tile .icon { width: 17px; height: 17px; }
.about-card h3 { font-size: 14px; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 5px; }
.about-card p { font-size: 12.5px; line-height: 1.55; color: var(--text-2); }

.about-block {
  padding: 22px 22px 20px;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--border-soft);
  margin-bottom: 22px;
}
.about-block h2 { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 14px; }
.about-steps { display: flex; flex-direction: column; gap: 12px; }
.about-step { display: flex; gap: 11px; align-items: flex-start; }
.step-num {
  flex: 0 0 auto;
  width: 21px; height: 21px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}
.about-step p { font-size: 13.5px; line-height: 1.55; color: var(--text-prose); }

.contact-list { display: flex; flex-direction: column; gap: 8px; }
.contact-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border-radius: var(--radius);
  background: var(--bg);
  text-decoration: none;
  transition: background var(--t) var(--ease);
}
.contact-row:hover { background: var(--wash-1); }
.contact-row .icon { color: var(--accent); width: 17px; height: 17px; }
.contact-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.contact-text small { font-size: 11px; color: var(--text-2); }
.contact-text b { font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em; }

.about-back { display: inline-flex; align-items: center; gap: 6px; }
.about-back .icon { width: 14px; height: 14px; }

/* ----------------------------------------------------- NEW iPHONE PAGE -- */

/* Прайс на новые аппараты — четыре строчки, которые меняются каждый день.
   Поэтому здесь нет ни поиска, ни фильтров: одна карточка на модель, внутри
   переключатель объёма и три цвета с ценами. Всё видно сразу, без кликов. */

.new-list {
  max-width: 980px;
  margin: 0 auto;
  padding: 40px 26px 8px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.new-card {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 4px 26px;
  align-items: center;
  padding: 22px 30px 22px 8px;
  border-radius: var(--radius-xl);
  background: var(--panel);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow);
}

/* Продуктовые рендеры из site/iPhones показывают обе стороны сразу — заднюю
   спереди, экран позади. Три цвета лежат стопкой и меняются прозрачностью,
   поэтому смена цвета не двигает вёрстку ни на пиксель. */
.phone-stage {
  position: relative;
  display: grid;
  place-items: center;
  background:
    radial-gradient(56% 44% at 50% 50%, rgba(0, 113, 227, 0.06), transparent 70%);
}
.phone-shot {
  grid-area: 1 / 1;
  width: 100%;
  max-width: 330px;
  height: auto;
  opacity: 0;
  transition: opacity var(--t-med) var(--ease);
  user-select: none;
}
.phone-shot.is-on { opacity: 1; }

.new-title { font-size: 22px; font-weight: 700; letter-spacing: -0.022em; }
.new-meta { margin-top: 3px; font-size: 12.5px; color: var(--text-2); }
.storage-switch { margin-top: 16px; }
.storage-switch button { min-width: 76px; }

.pick-hint {
  margin: 18px 0 7px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--text-2);
}

.color-rows { display: flex; flex-direction: column; gap: 3px; }

/* Цена стоит у каждого цвета сразу: в прайсе канала они идут рядом, и разница
   между цветами — как раз то, ради чего этот список читают. */
.color-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px 9px 10px;
  border-radius: var(--radius);
  background: none;
  border: 1px solid transparent;
  text-align: left;
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease);
}
.color-row:hover { background: var(--wash-1); }
.color-row.active { background: var(--accent-soft); border-color: rgba(0, 113, 227, 0.22); }

.swatch {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.14);
  box-shadow: inset 0 -2px 3px rgba(0, 0, 0, 0.16);
}
.color-name { font-size: 13.5px; color: var(--text); min-width: 0; }
.color-row.active .color-name { font-weight: 600; }
.color-price { margin-left: auto; font-size: 15px; font-weight: 700; letter-spacing: -0.018em; }

/* Единственное растровое исключение среди иконок: огонёк из прайса канала.
   Свой SVG вместо системного эмодзи — чтобы значок выглядел одинаково и на
   Android, и на Windows, а не только на технике Apple. */
.fire { flex: 0 0 auto; display: block; }

.price-date { font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------- ORDER -- */

.new-order {
  max-width: 980px;
  margin: 0 auto;
  padding: 22px 26px 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.order-card {
  width: 100%;
  padding: 24px 26px 22px;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--border-soft);
  text-align: center;
}
.order-card h2 { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.order-card p {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-prose);
  text-wrap: balance;
  max-width: 480px;
  margin: 0 auto 18px;
}
.order-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.order-actions .pill-btn { padding: 9px 18px; font-size: 13.5px; }

/* --------------------------------------------------------------- FOOTER -- */

.site-footer { border-top: 1px solid var(--border); background: var(--panel); }
.footer-inner {
  max-width: 560px;
  margin: 0 auto;
  padding: 40px 26px 46px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.footer-slogan {
  margin-top: -6px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text-prose);
}
.footer-note { font-size: 12.5px; line-height: 1.6; color: var(--text-2); text-wrap: balance; }
.footer-links { display: flex; justify-content: center; gap: 2px 4px; flex-wrap: wrap; }

/* --------------------------------------------------------------- MOTION -- */

/* Появление страницы — примитив .enter из apple-minimal.css. Порядок задан
   атрибутом style="--i:N" прямо в разметке: последовательность читается сверху
   вниз ровно так, как играет. Шапка не участвует — она рамка, а не содержимое;
   строка фильтров участвует только прозрачностью, потому что sticky-элемент со
   сдвигом уехал бы от того места, к которому приклеен. */

/* Появление играет только у карточек, которых в выдаче не было: те, что остались
   после смены запроса, — это те же самые узлы, они не перерисовываются.
   Лесенку (--i) app.js расставляет только на первой отрисовке: на каждую букву в
   поиске она растянула бы появление сетки на секунду и читалась бы как тормоза. */
.listing-grid {
  --stagger: 35ms;        /* плотнее шага страницы: карточек много */
  --i: 0;                 /* если @property не поддержан — индекс не течёт внутрь */
}
.listing-grid > .card.is-new {
  --enter-y: 10px;
  animation: enter-up 0.28s var(--ease-reveal) both;
  animation-delay: calc(var(--i) * var(--stagger));
}

/* Обнуление длительностей живёт в apple-minimal.css — второй копии тут не место,
   она бы разошлась с первой. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* --------------------------------------------------------------- MOBILE -- */

@media (max-width: 760px) {
  .site-header { padding: 0 14px; gap: 10px; }
  .header-cta span { display: none; }
  .header-cta { padding: 0 12px; }
  .hero { padding: 30px 18px 24px; }
  .hero-title { font-size: 29px; }
  .hero-sub { font-size: 13.5px; }
  .hero-facts { gap: 6px; }
  .hero-fact { font-size: 11.5px; padding: 5px 10px 5px 9px; }
  .filter-inner { padding: 12px 14px 10px; }
  .sug-row { padding: 11px 10px; font-size: 14px; }   /* строки под палец */
  .search-suggest { max-height: 46vh; }
  .s-chip { font-size: 12.5px; padding: 5px 9px 5px 11px; }
  .filter-row-2 { gap: 8px 12px; }
  .filter-field { flex: 1 1 132px; }
  .filter-field .select { min-width: 0; width: 100%; }
  .price-field { flex-basis: 100%; max-width: none; }
  .results { padding: 20px 14px 44px; }
  .results-head { margin-bottom: 14px; }
  .listing-grid { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 14px; }
  .listing .card-body { padding: 11px 11px 12px; gap: 7px; }
  .listing-title { font-size: 13px; }
  .price { font-size: 16px; }
  .listing-foot { flex-direction: column; align-items: flex-start; gap: 2px; }

  .pager { margin-top: 26px; gap: 10px; }
  .pg-pages { display: none; }
  .pg-jump { display: block; }
  .pg-arrow { width: 40px; height: 40px; }

  .overlay { padding: 0; }
  .detail-card { width: 100%; max-height: 100vh; height: 100%; border-radius: 0; }
  .detail-body { padding: 0 16px 16px; }
  .detail-foot { padding: 10px 16px; }
  .detail-foot .pill-btn { flex: 1 1 auto; justify-content: center; }
  .install-row > span:nth-child(2), .install-row > span:nth-child(3) { min-width: 62px; }

  .about { padding: 30px 16px 44px; }
  .about-lead { font-size: 14.5px; margin-bottom: 26px; }
  .about-grid { grid-template-columns: 1fr; gap: 12px; }
  .about-block { padding: 18px 16px 16px; }
  .footer-inner { padding: 32px 14px 38px; gap: 12px; }

  /* Телефон: иллюстрация встаёт над ценами и сжимается — на узком экране важнее
     увидеть весь список цветов сразу, чем крупный аппарат. */
  .new-list { padding: 26px 14px 4px; gap: 14px; }
  .new-card { grid-template-columns: 1fr; padding: 18px 16px 20px; gap: 0; }
  .phone-stage { padding: 0 0 2px; }
  .phone-shot { max-width: 260px; }
  .new-title { font-size: 19px; }
  .storage-switch { margin-top: 13px; }
  .pick-hint { margin: 15px 0 6px; }
  .new-order { padding: 16px 14px 44px; }
  .order-card { padding: 20px 16px 18px; }
  .order-actions .pill-btn { flex: 1 1 auto; justify-content: center; }
}

/* Ссылок в шапке стало две («Новые» и «О магазине»), и вдвоём они подъезжают
   к логотипу вплотную: на 460px между ними и словом iComfort остаётся 26px, и
   надпись читается как одна фраза «iComfort Новые». Поэтому обе уходят раньше,
   чем становится тесно, — в подвале они есть на каждой странице. */
@media (max-width: 499px) {
  .header-about { display: none; }
}

/* Совсем узкие телефоны: плитки каталога ужимаются ещё на шаг. */
@media (max-width: 399px) {
  .listing-grid { grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 12px; }
}
