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

body {
  max-width: 100%;
  overflow-x: hidden;
}

img {
  max-width: 100%;
}

/* Popup-режиму СДЭК не нужен отдельный высокий блок под формой. */
#cdek-map {
  height: 0;
}

@media (max-width: 480px) {
  header {
    height: 64px;
    padding: 0 18px;
    gap: 14px;
  }

  header > a:last-child {
    font-size: 14px;
    white-space: nowrap;
  }

  .brand {
    font-size: 21px;
  }

  .hero {
    min-height: auto;
    padding: 28px 18px 56px;
    gap: 32px;
  }

  .pill {
    max-width: 100%;
    padding: 7px 11px;
    font-size: 11px;
    letter-spacing: .055em;
  }

  h1 {
    margin: 20px 0;
    font-size: clamp(42px, 14vw, 54px);
    line-height: .95;
    letter-spacing: -.04em;
  }

  .lead {
    font-size: 18px;
    line-height: 1.45;
  }

  .offer-note {
    font-size: 12px;
  }

  .button {
    max-width: 100%;
    padding: 15px 18px;
    text-align: center;
    white-space: normal;
  }

  .facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 34px;
  }

  .facts span {
    min-width: 0;
    font-size: 11px;
  }

  .facts b {
    font-size: 17px;
  }

  .hero-media {
    border-radius: 22px;
  }

  .hero-media img {
    height: auto;
    aspect-ratio: 4 / 5;
  }

  .hero-media figcaption {
    right: 12px;
    bottom: 12px;
    left: 12px;
    font-size: 11px;
    text-align: center;
  }

  .why > div,
  .why > div + div {
    padding: 42px 18px;
  }

  .why h2,
  .order h2 {
    font-size: 34px;
  }

  .catalog {
    padding: 52px 18px;
  }

  .catalog-head h2 {
    font-size: 38px;
    line-height: 1.04;
  }

  .catalog-grid {
    gap: 16px;
  }

  .catalog-grid figure,
  .catalog-grid .expiry {
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 20px;
  }

  .catalog-grid figcaption {
    right: 10px;
    bottom: 10px;
    left: 10px;
    padding: 12px 13px;
  }

  .catalog-grid figcaption b {
    font-size: 14px;
  }

  .catalog-grid figcaption span {
    font-size: 11px;
    line-height: 1.35;
  }

  .expiry-marker {
    top: 25%;
  }

  .expiry-marker i {
    max-width: 80%;
    white-space: normal;
    line-height: 1.2;
  }

  .order {
    padding: 54px 18px;
    gap: 28px;
  }

  .order-copy ul {
    padding-left: 22px;
  }

  form {
    min-width: 0;
    padding: 20px 16px;
    border-radius: 20px;
  }

  input,
  select {
    min-height: 52px;
    padding: 13px 12px;
    font-size: 16px;
  }

  .summary > div {
    gap: 12px;
  }

  .consent {
    align-items: flex-start;
    line-height: 1.4;
  }

  .success h3 {
    font-size: 30px;
  }

  .success-track strong {
    overflow-wrap: anywhere;
    font-size: 23px;
  }

  .success > .button {
    line-height: 1.25;
  }

  .success dl > div {
    flex-direction: column;
    gap: 4px;
  }

  .success dd {
    text-align: left;
    overflow-wrap: anywhere;
  }

  footer {
    padding: 24px 18px;
    gap: 12px;
  }
}

@media (max-width: 350px) {
  header > a:last-child {
    font-size: 12px;
  }

  .brand {
    font-size: 19px;
  }

  h1 {
    font-size: 41px;
  }

  .facts {
    grid-template-columns: 1fr 1fr;
  }

  .facts span:last-child {
    grid-column: 1 / -1;
  }

  .why h2,
  .order h2 {
    font-size: 31px;
  }

  form {
    padding: 18px 14px;
  }
}
