/* ==========================================================================
   Миша Чинит — сайт-буклет
   Стили рассчитаны на Safari 10 (iPad 4, iOS 10.3.4).

   Правила, которых придерживаемся при правках:
   • никакого CSS Grid — только flexbox, он работает без префиксов;
   • никаких gap / aspect-ratio / clamp() / :is() — Safari 10 их не знает;
   • отступы между карточками — через margin, а не gap;
   • квадрат фото — через padding-top: 100%;
   • position: sticky — с префиксом -webkit-;
   • никаких blur/backdrop-filter: на A6X они превращают прокрутку в слайд-шоу.
   ========================================================================== */

/* ------------------------------------------------------------------ сброс */
* {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

/* Атрибут hidden обязан побеждать. Без этого правила любое author-правило с
   display (.search { display:flex }) отменяет его, и скрытый блок остаётся на
   экране. Один раз это уже случилось: поиск висел на стартовом экране. */
[hidden] {
  display: none !important;
}

body {
  background: #1b1918;
  color: #fefefe;
  font-family: -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

body.is-locked {
  overflow: hidden;
}

img {
  border: 0;
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

input,
select {
  font: inherit;
  color: inherit;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
}

/* --------------------------------------------------------------- цветовые */
/* Палитра взята из логотипа. Значения продублированы явно в правилах ниже —
   CSS-переменные намеренно не используются, чтобы файл читался однозначно:
   фон #1b1918, поверхность #1E2020, поверхность-2 #262929, линия #333838,
   текст #FEFEFE, приглушённый #9AA0A0, акцент #009ee0, тёмный акцент #0E6285. */

/* ---------------------------------------------------------------- шапка */
.topbar {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 20;
  /* Панель шапки чуть светлее фона страницы, чтобы шапка читалась как шапка.
     Логотип теперь прозрачный, поэтому подгонять цвет под его подложку больше
     не нужно — знак ложится прямо на панель. */
  background: #1e2020;
  border-bottom: 1px solid #333838;
}

.topbar__inner {
  padding: 12px 20px 14px;
}

.brand {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: space-between;
  justify-content: space-between;
}

.brand__logo {
  /* Логотип прозрачный и вытянутый (304x131): «МИША ЧИНИТ» с синей полоской.
     Высота 60px даёт ширину около 140px — на экране iPad этого хватает,
     чтобы нижнее слово и полоска не сливались в полоску пикселей. */
  height: 60px;
  width: auto;
}

.brand__meta {
  text-align: right;
  font-size: 13px;
  color: #9aa0a0;
  line-height: 1.3;
}

.brand__meta b {
  display: block;
  color: #fefefe;
  font-size: 15px;
  font-weight: 600;
}

/* ======================================================= стартовый экран ===
   Два больших раздела на весь экран. Плитки рассчитаны на палец: огромная
   площадь нажатия, крупный текст, ничего мелкого.
   ======================================================================== */
.home {
  padding: 28px 20px 40px;
}

.home__lead {
  margin-bottom: 22px;
}

.home__title {
  font-size: 28px;
  line-height: 1.2;
  font-weight: 700;
  color: #fefefe;
}

.home__sub {
  margin-top: 6px;
  font-size: 16px;
  color: #9aa0a0;
}

/* Safari 10 не умеет gap во flexbox — отступы через margin на плитках */
.home__tiles {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  margin: 0 -8px;
}

.tile {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-align-items: flex-start;
  align-items: flex-start;
  -webkit-justify-content: flex-start;
  justify-content: flex-start;
  text-align: left;
  /* Три раздела — три колонки в один ряд. При 50% третья плитка уезжала
     на второй ряд и требовала прокрутки, чтобы её увидеть. */
  width: -webkit-calc(33.333% - 16px);
  width: calc(33.333% - 16px);
  /* Плитки занимают почти весь экран: планшет стоит в зале, и большие
     пустые поля под кнопками выглядят как незагрузившаяся страница. */
  min-height: -webkit-calc(100vh - 420px);
  min-height: calc(100vh - 420px);
  margin: 0 8px 16px;
  padding: 28px 24px 24px;
  background: #1e2020;
  border: 1px solid #333838;
  border-radius: 16px;
  cursor: pointer;
  -webkit-transition: border-color 0.15s ease, -webkit-transform 0.15s ease;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.tile:active {
  border-color: #009ee0;
  -webkit-transform: scale(0.985);
  transform: scale(0.985);
}

.tile__icon {
  display: block;
  margin-bottom: 22px;
  line-height: 0;
}

.tile__icon svg {
  width: 60px;
  height: 60px;
}

.tile__name {
  display: block;
  font-size: 30px;
  line-height: 1.15;
  font-weight: 700;
  color: #fefefe;
  margin-bottom: 10px;
}

.tile__desc {
  display: block;
  font-size: 16px;
  line-height: 1.4;
  color: #9aa0a0;
}

.tile__go {
  display: block;
  margin-top: auto;
  padding-top: 18px;
  font-size: 16px;
  font-weight: 600;
  color: #4cc4f2;
}

/* ============================================================ подэкраны === */
.screen {
  padding: 0 0 30px;
}

.back {
  display: inline-block;
  margin: 14px 20px 0;
  padding: 0 4px;
  height: 44px;
  line-height: 44px;
  font-size: 17px;
  color: #4cc4f2;
  background: none;
}

.screen__lead {
  padding: 4px 20px 20px;
}

.screen__title {
  font-size: 26px;
  line-height: 1.2;
  font-weight: 700;
  color: #fefefe;
}

.screen__sub {
  margin-top: 6px;
  font-size: 16px;
  color: #9aa0a0;
}

/* --------------------------------------------------------- выбор ремонта */
.repair {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  margin: 0 12px;
}

.repair__item {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  text-align: left;
  width: -webkit-calc(50% - 16px);
  width: calc(50% - 16px);
  min-height: 96px;
  margin: 0 8px 16px;
  padding: 16px 18px;
  background: #1e2020;
  border: 1px solid #333838;
  border-radius: 12px;
  cursor: pointer;
  -webkit-transition: border-color 0.15s ease;
  transition: border-color 0.15s ease;
}

.repair__item:active,
.repair__item.is-active {
  border-color: #009ee0;
}

.repair__item.is-active {
  background: #1a2a33;
}

.repair__name {
  display: block;
  font-size: 19px;
  font-weight: 600;
  color: #fefefe;
  margin-bottom: 4px;
}

.repair__note {
  display: block;
  font-size: 13px;
  line-height: 1.35;
  color: #9aa0a0;
}

.repair__hint {
  margin: 6px 20px 0;
  padding: 16px 18px;
  background: #1e2020;
  border: 1px solid #333838;
  border-radius: 12px;
}

.repair__hint-title {
  font-size: 17px;
  font-weight: 600;
  color: #fefefe;
  margin-bottom: 6px;
}

.repair__hint-text {
  font-size: 15px;
  line-height: 1.45;
  color: #9aa0a0;
}

/* ------------------------------------------------- второй шаг ремонта
   Подкатегории выбранного типа (у телефона: Android, iPhone, кнопочные).
   Это не всплывающее окно, а такой же раздел, как список устройств, поэтому
   используется та же сетка .repair и те же плитки .repair__item. */

/* -------------------------------------------------- третий шаг: услуги
   Список услуг подкатегории. Похож на карточки товаров, но без фото:
   название, описание, срок и гарантия слева, цена справа. */
.services {
  margin: 0 20px;
}

.service {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: flex-start;
  align-items: flex-start;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  padding: 16px 18px;
  margin-bottom: 10px;
  background: #1e2020;
  border: 1px solid #333838;
  border-radius: 12px;
}

.service__main {
  -webkit-flex: 1 1 auto;
  flex: 1 1 auto;
  min-width: 0;
  padding-right: 14px;
}

.service__name {
  font-size: 18px;
  font-weight: 600;
  color: #fefefe;
  line-height: 1.3;
  margin-bottom: 4px;
}

.service__desc {
  font-size: 14px;
  line-height: 1.4;
  color: #9aa0a0;
  margin-bottom: 6px;
  white-space: pre-line;
}

.service__meta {
  font-size: 13px;
  color: #767c7c;
}

.service__price {
  -webkit-flex: 0 0 auto;
  flex: 0 0 auto;
  font-size: 18px;
  font-weight: 700;
  color: #fefefe;
  white-space: nowrap;
  padding-top: 2px;
}

/* ------------------------------------------------------------ игры
   Карточка игры и сцена с iframe. Сама игра — отдельный HTML5-билд,
   поэтому она живёт в iframe: так её CSS и скрипты не пересекаются с сайтом. */
.games {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  margin: 0 12px;
}

.game-card {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  width: -webkit-calc(50% - 16px);
  width: calc(50% - 16px);
  margin: 0 8px 16px;
  padding: 0;
  text-align: left;
  background: #1e2020;
  border: 1px solid #333838;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
}

.game-card:active {
  border-color: #009ee0;
}

/* Обложка без картинки: градиент и название поверх */
.game-card__cover {
  position: relative;
  display: block;
  width: 100%;
  padding-top: 52%;
  background: #101a20;
  overflow: hidden;
}

.game-card__title-over {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fefefe;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.game-card__name {
  display: block;
  padding: 12px 16px 0;
  font-size: 20px;
  font-weight: 600;
  color: #fefefe;
}

.game-card__desc {
  display: block;
  padding: 4px 16px 0;
  font-size: 14px;
  line-height: 1.4;
  color: #9aa0a0;
}

.game-card__go {
  display: block;
  padding: 10px 16px 16px;
  font-size: 15px;
  font-weight: 600;
  color: #4cc4f2;
}

/* сцена с игрой */
.game-stage {
  margin: 0 12px;
}

.game-stage__bar {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  margin-bottom: 8px;
}

.back--inline {
  margin: 0 12px 0 0;
}

.game-stage__title {
  font-size: 18px;
  font-weight: 600;
  color: #fefefe;
}

/* iframe вписан в экран: игра рисует canvas 960x320, соотношение 3:1 */
.game-stage__frame {
  position: relative;
  width: 100%;
  padding-top: 56%;
  background: #000000;
  border: 1px solid #333838;
  border-radius: 12px;
  overflow: hidden;
}

.game-stage__frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* поиск */
.search {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  margin-top: 12px;
  background: #262929;
  border: 1px solid #333838;
  border-radius: 10px;
  padding: 0 12px;
  height: 46px;
}

.search__icon {
  width: 18px;
  height: 18px;
  margin-right: 10px;
  -webkit-flex: 0 0 auto;
  flex: 0 0 auto;
  opacity: 0.6;
}

.search__input {
  -webkit-flex: 1 1 auto;
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  background: transparent;
  border: 0;
  outline: none;
  font-size: 17px;
  color: #fefefe;
}

.search__input::-webkit-input-placeholder {
  color: #6e7575;
}

.search__clear {
  -webkit-flex: 0 0 auto;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  line-height: 28px;
  text-align: center;
  font-size: 20px;
  color: #9aa0a0;
  display: none;
}

.search__clear.is-on {
  display: block;
}

/* ------------------------------------------------------------ категории */
.cats {
  background: #1b1918;
  border-bottom: 1px solid #242727;
}

.cats__scroll {
  display: -webkit-flex;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 12px 20px 0;
  white-space: nowrap;
}

.cats__scroll::-webkit-scrollbar {
  display: none;
}

.chip {
  -webkit-flex: 0 0 auto;
  flex: 0 0 auto;
  margin: 0 8px 12px 0;
  padding: 0 18px;
  height: 46px;
  line-height: 44px;
  border: 1px solid #333838;
  border-radius: 20px;
  font-size: 15px;
  color: #c8cccc;
  background: #1a1c1c;
  white-space: nowrap;
}

.chip.is-active {
  background: #009ee0;
  border-color: #009ee0;
  color: #08151b;
  font-weight: 600;
}

/* --------------------------------------------------------------- фильтры */
.filters {
  padding: 4px 20px 0;
}

.filters__row {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  margin: 0 -6px;
}

.filters__group {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  margin: 0 6px 10px;
}

.filters__label {
  font-size: 13px;
  color: #9aa0a0;
  margin-right: 8px;
}

.seg {
  display: -webkit-flex;
  display: flex;
  border: 1px solid #333838;
  border-radius: 8px;
  overflow: hidden;
}

.seg__btn {
  padding: 0 14px;
  height: 44px;
  font-size: 14px;
  color: #c8cccc;
  border-right: 1px solid #333838;
  background: #1a1c1c;
}

.seg__btn:last-child {
  border-right: 0;
}

.seg__btn.is-active {
  background: #262929;
  color: #fefefe;
  font-weight: 600;
  box-shadow: inset 0 -2px 0 #009ee0;
}

.select {
  height: 44px;
  padding: 0 30px 0 12px;
  background-color: #1a1c1c;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%239aa0a0'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  border: 1px solid #333838;
  border-radius: 8px;
  font-size: 14px;
  color: #fefefe;
  max-width: 190px;
}

.toggle {
  display: block;
  height: 44px;
  line-height: 42px;
  white-space: nowrap;
  padding: 0 12px;
  border: 1px solid #333838;
  border-radius: 8px;
  background: #1a1c1c;
  font-size: 14px;
  color: #c8cccc;
}

.toggle__box {
  display: inline-block;
  vertical-align: middle;
  width: 18px;
  height: 18px;
  border: 1px solid #4d5454;
  border-radius: 4px;
  margin-right: 8px;
  background: #1b1918;
  position: relative;
}

.toggle.is-on {
  border-color: #009ee0;
  color: #fefefe;
}

.toggle.is-on .toggle__box {
  background: #009ee0;
  border-color: #009ee0;
}

.toggle.is-on .toggle__box:after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid #08151b;
  border-width: 0 2px 2px 0;
  -webkit-transform: rotate(45deg);
  transform: rotate(45deg);
}

.linkbtn {
  height: 44px;
  padding: 0 14px;
  font-size: 14px;
  color: #9aa0a0;
  text-decoration: underline;
}

/* ------------------------------------------------------------- счётчик */
.resultbar {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: baseline;
  align-items: baseline;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  padding: 6px 20px 14px;
}

.resultbar__count {
  font-size: 14px;
  color: #9aa0a0;
}

/* ---------------------------------------------------------------- сетка */
.grid-wrap {
  padding: 0 10px 10px;
}

.grid {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  margin: 0 -10px;
}

.card {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  width: -webkit-calc(50% - 20px);
  width: calc(50% - 20px);
  margin: 0 10px 20px;
  background: #1e2020;
  border: 1px solid #333838;
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  -webkit-transition: border-color 0.15s ease, -webkit-transform 0.15s ease;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.card:active {
  border-color: #009ee0;
  -webkit-transform: scale(0.985);
  transform: scale(0.985);
}

.card__shot {
  position: relative;
  width: 100%;
  padding-top: 100%;
  background: #262929;
  overflow: hidden;
}

.card__img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  object-fit: cover;
}

.card__body {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-flex: 1 1 auto;
  flex: 1 1 auto;
  padding: 12px 14px 14px;
}

.card__brand {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9aa0a0;
  margin-bottom: 4px;
}

.card__name {
  font-size: 16px;
  line-height: 1.3;
  font-weight: 500;
  color: #fefefe;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 42px;
}

.card__foot {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: flex-end;
  align-items: flex-end;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  margin-top: 10px;
}

/* бейджи держим в один столбец справа: в узкой карточке они иначе ломаются */
.card__badges {
  text-align: right;
  -webkit-flex: 0 0 auto;
  flex: 0 0 auto;
  margin-left: 8px;
}

.card__badges .badge {
  display: block;
  margin-top: 4px;
}

.card__price {
  font-size: 20px;
  font-weight: 700;
  color: #fefefe;
  line-height: 1.1;
}

.card__price small {
  font-size: 12px;
  font-weight: 400;
  color: #9aa0a0;
  display: block;
  margin-bottom: 2px;
}

.card__old {
  font-size: 13px;
  color: #9aa0a0;
  text-decoration: line-through;
  margin-top: 2px;
}

.badge {
  display: inline-block;
  padding: 0 8px;
  height: 20px;
  line-height: 20px;
  border-radius: 10px;
  font-size: 11px;
  letter-spacing: 0.02em;
  background: #262929;
  color: #9aa0a0;
}

.badge--in {
  background: rgba(0, 160, 227, 0.14);
  color: #4cc4f2;
}

.badge--out {
  background: #262929;
  color: #9aa0a0;
}

.badge--sale {
  background: rgba(255, 90, 90, 0.14);
  color: #ff8a8a;
}

/* «показать ещё» */
.more {
  padding: 0 20px 30px;
  text-align: center;
}

.more__btn {
  display: inline-block;
  height: 48px;
  line-height: 46px;
  padding: 0 28px;
  border: 1px solid #4d5454;
  border-radius: 24px;
  font-size: 16px;
  color: #fefefe;
  background: #1e2020;
}

.more__btn:active {
  border-color: #009ee0;
}

.empty {
  padding: 60px 20px;
  text-align: center;
  color: #9aa0a0;
}

.empty__title {
  font-size: 20px;
  color: #fefefe;
  margin-bottom: 6px;
}

/* ------------------------------------------------------------ подвал */
.footer {
  border-top: 1px solid #333838;
  background: #1a1c1c;
  padding: 26px 20px 34px;
}

.footer__row {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  -webkit-align-items: flex-start;
  align-items: flex-start;
  margin: 0 -14px;
}

.footer__col {
  -webkit-flex: 1 1 200px;
  flex: 1 1 200px;
  margin: 0 14px 18px;
  min-width: 180px;
}

.footer__title {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9aa0a0;
  margin-bottom: 8px;
}

.footer__line {
  font-size: 15px;
  color: #fefefe;
  margin-bottom: 4px;
  /* Владелец пишет адрес в несколько строк (улица, строение, этаж) и жмёт
     Enter. HTML схлопывает переводы строк в пробел, поэтому переносы
     включаем явно: pre-line сохраняет \n, но обычные пробелы не трогает. */
  white-space: pre-line;
}

.footer__line--muted {
  color: #9aa0a0;
  font-size: 14px;
}

.qr {
  /* 124 = 108 содержимого + по 8 отступа с каждой стороны, чтобы картинка
     оставалась квадратной: растянутый QR не читается сканером. */
  width: 124px;
  height: 124px;
  background: #ffffff;
  border: 1px dashed #4d5454;
  border-radius: 8px;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  text-align: center;
  font-size: 11px;
  color: #767c7c;
  padding: 8px;
  line-height: 1.3;
}

.qr img {
  display: block;
  width: 100%;
  height: auto;
}

.footer__note {
  border-top: 1px solid #262929;
  margin-top: 8px;
  padding-top: 14px;
  font-size: 12px;
  color: #9aa0a0;
}

/* ------------------------------------------------------ карточка товара */
.sheet {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: rgba(8, 10, 10, 0.72);
  display: none;
}

.sheet.is-open {
  display: block;
}

.sheet__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 620px;
  background: #1a1c1c;
  border-left: 1px solid #333838;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  -webkit-transform: translateX(24px);
  transform: translateX(24px);
  opacity: 0;
  -webkit-transition: opacity 0.18s ease, -webkit-transform 0.18s ease;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.sheet.is-shown .sheet__panel {
  -webkit-transform: translateX(0);
  transform: translateX(0);
  opacity: 1;
}

.sheet__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border-radius: 22px;
  background: rgba(18, 20, 20, 0.85);
  border: 1px solid #333838;
  color: #fefefe;
  font-size: 22px;
  line-height: 42px;
  text-align: center;
  z-index: 2;
}

.sheet__shot {
  position: relative;
  width: 100%;
  padding-top: 100%;
  background: #262929;
}

.sheet__shot img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  object-fit: cover;
}

.sheet__shot--mono {
  padding-top: 46%;
}

/* ------------------------------------------------------------------ галерея
   Лента фото со стрелками. Квадрат задаётся padding-top на вьюпорте, лента
   внутри сдвигается через transform — единственный способ, который старый
   WebKit на A6X анимирует без рывков. */
.gallery {
  position: relative;
  background: #262929;
}

.gallery__viewport {
  position: relative;
  width: 100%;
  padding-top: 100%;
  overflow: hidden;
}

.gallery__track {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  display: -webkit-flex;
  display: flex;
  -webkit-transition: -webkit-transform 0.22s ease;
  transition: transform 0.22s ease;
}

.gallery__slide {
  position: relative;
  -webkit-flex: 0 0 100%;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.gallery__slide img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery__nav {
  position: absolute;
  top: 50%;
  margin-top: -24px;
  width: 48px;
  height: 48px;
  border-radius: 24px;
  background: rgba(18, 20, 20, 0.72);
  border: 1px solid #4d5454;
  color: #fefefe;
  font-size: 26px;
  line-height: 44px;
  text-align: center;
  z-index: 3;
}

.gallery__nav:active {
  border-color: #009ee0;
}

.gallery__nav--prev {
  left: 10px;
}

.gallery__nav--next {
  right: 10px;
}

.gallery__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  text-align: center;
  z-index: 3;
  line-height: 0;
}

.gallery__dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: 0 4px;
  border-radius: 5px;
  background: rgba(254, 254, 254, 0.38);
  border: 0;
  padding: 0;
}

.gallery__dot.is-active {
  background: #009ee0;
}

.gallery__count {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(18, 20, 20, 0.78);
  color: #fefefe;
  font-size: 13px;
  line-height: 1.5;
}

.sheet__body {
  padding: 22px 24px 40px;
}

.sheet__brand {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9aa0a0;
  margin-bottom: 6px;
}

.sheet__name {
  font-size: 26px;
  line-height: 1.22;
  font-weight: 600;
  margin: 0 0 14px;
  color: #fefefe;
}

.sheet__price {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: baseline;
  align-items: baseline;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.sheet__price b {
  font-size: 32px;
  font-weight: 700;
  color: #fefefe;
  margin-right: 10px;
}

.sheet__old {
  font-size: 17px;
  color: #6e7575;
  text-decoration: line-through;
}

.sheet__badges {
  margin: 12px 0 18px;
}

.sheet__badges .badge {
  margin-right: 8px;
}

.sheet__desc {
  font-size: 16px;
  line-height: 1.55;
  color: #d5d9d9;
  margin: 0 0 20px;
  /* описание товара тоже может быть в несколько строк — сохраняем переносы */
  white-space: pre-line;
}

.spec {
  border-top: 1px solid #262929;
  padding-top: 14px;
  margin-bottom: 20px;
}

.spec__row {
  display: -webkit-flex;
  display: flex;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  padding: 7px 0;
  font-size: 15px;
  border-bottom: 1px solid #222525;
}

.spec__key {
  color: #9aa0a0;
}

.spec__val {
  color: #fefefe;
  text-align: right;
}

.sheet__hint {
  background: #1e2020;
  border: 1px solid #333838;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 14px;
  color: #9aa0a0;
  line-height: 1.45;
}

.sheet__hint b {
  color: #fefefe;
  font-weight: 600;
}

/* ------------------------------------------------- предупреждение о JS */
.nojs {
  padding: 40px 20px;
  text-align: center;
  color: #9aa0a0;
}

/* ------------------------------------------------------ альбомная ориентация */
@media (orientation: landscape) {
  .card {
    width: -webkit-calc(33.333% - 20px);
    width: calc(33.333% - 20px);
  }

  .brand__logo {
    height: 40px;
  }

  .sheet__panel {
    max-width: 560px;
  }

  .sheet__shot {
    padding-top: 62%;
  }

  /* в альбоме экран ниже: плитки не должны упираться в подвал,
     но и не быть крошечными — считаем от реальной высоты окна */
  .home {
    padding-top: 20px;
  }

  .tile {
    min-height: -webkit-calc(100vh - 300px);
    min-height: calc(100vh - 300px);
    padding: 20px 22px 18px;
  }

  .tile__icon {
    margin-bottom: 12px;
  }

  .tile__icon svg {
    width: 44px;
    height: 44px;
  }

  .tile__name {
    font-size: 25px;
    margin-bottom: 8px;
  }

  .tile__desc {
    font-size: 15px;
  }

  .tile__go {
    padding-top: 10px;
  }

  .repair__item {
    width: -webkit-calc(33.333% - 16px);
    width: calc(33.333% - 16px);
    min-height: 88px;
  }
}

/* ------------------------------------------------------ крупный экран */
@media (min-width: 1024px) {
  .topbar__inner,
  .cats__scroll,
  .filters,
  .resultbar {
    padding-left: 32px;
    padding-right: 32px;
  }

  .grid-wrap {
    padding: 0 22px 10px;
  }

  .footer {
    padding-left: 32px;
    padding-right: 32px;
  }

  .home {
    padding-left: 32px;
    padding-right: 32px;
  }

  .screen__lead,
  .repair__hint {
    padding-left: 32px;
    padding-right: 32px;
  }

  .repair {
    margin: 0 24px;
  }

  .back {
    margin-left: 32px;
  }
}
