:root {
  --bg: #f5f5f3;
  --paper: #ffffff;
  --ink: #202124;
  --muted: #6f747a;
  --line: #e7e7e4;
  --red: #ed1c24;
  --orange: #f47b20;
  --green: #31a24c;
  --shadow: 0 12px 30px rgba(26, 31, 36, .08);
  --max: 1328px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, "Helvetica Neue", sans-serif;
  overflow-x: hidden;
}

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

.icon {
  width: 24px;
  height: 24px;
  display: block;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.container {
  width: min(var(--max), calc(100% - 80px));
  margin: 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  height: 50px;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.topbar__inner,
.topbar__left {
  display: flex;
  align-items: center;
}

.topbar__inner {
  height: 100%;
  justify-content: space-between;
}

.topbar__left {
  gap: 44px;
  color: #4c5054;
}

.topbar__left span,
.topbar__phone {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.topbar .icon {
  width: 17px;
  height: 17px;
  color: var(--red);
}

.topbar__phone {
  color: #1f2328;
  font-weight: 600;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.header__inner {
  height: 104px;
  display: flex;
  align-items: center;
  gap: 42px;
}

.logo {
  min-width: 300px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.logo img {
  width: 135px;
  height: 78px;
  object-fit: contain;
}

.logo strong {
  display: block;
  font-size: 34px;
  line-height: 1;
}

.logo small {
  display: block;
  margin-top: 5px;
  color: #777;
  font-size: 15px;
}

.nav {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 30px;
  font-size: 15px;
  color: #24272a;
}

.nav a,
.footer__col a {
  transition: color .18s ease;
}

.nav a:hover,
.footer__col a:hover {
  color: var(--red);
}

.header-actions {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 74px);
  border-left: 1px solid var(--line);
}

.header-action {
  position: relative;
  height: 78px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  border-right: 1px solid var(--line);
  color: #202124;
}

.header-action > .icon {
  width: 27px;
  height: 27px;
}

.header-action small {
  font-size: 12px;
}
.header-action:focus-visible,
.product-card > button:focus-visible,
.product-card div a:focus-visible,
.section-title a:focus-visible,
.category-card:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.cart-badge {
  position: absolute;
  top: 7px;
  right: 8px;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 12px;
}

.hero {
  background: #f8f8f7;
}

.hero__frame {
  position: relative;
  min-height: 590px;
  padding-top: 74px;
  background-image:
    linear-gradient(90deg, rgba(248, 248, 247, .98) 0%, rgba(248, 248, 247, .94) 35%, rgba(248, 248, 247, .12) 63%, rgba(248, 248, 247, 0) 100%),
    url("../assets/hero/main-hero.png");
  background-repeat: no-repeat;
  background-position: center, right top;
  background-size: cover, 70% auto;
}

.hero__frame::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(120, 125, 130, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 125, 130, .08) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(90deg, #000 0%, transparent 68%);
}

.hero__content {
  position: relative;
  z-index: 2;
  width: 720px;
}

.eyebrow {
  margin: 0 0 18px;
  color: #555b60;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

h1 {
  margin: 0;
  font-size: 62px;
  line-height: .98;
  letter-spacing: 0;
}

h1 span {
  color: #ef3b1f;
}

.hero__lead {
  width: 430px;
  margin: 28px 0 25px;
  color: #40464c;
  font-size: 18px;
  line-height: 1.35;
}

.hero__trust {
  display: flex;
  gap: 42px;
  margin-bottom: 30px;
  color: #4b5157;
  font-size: 14px;
}

.hero__trust > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero__trust .icon {
  width: 18px;
  height: 18px;
  color: var(--red);
}

.search-card {
  width: 610px;
  padding: 21px 20px 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--shadow);
}

.search-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
}

.search-tab {
  position: relative;
  height: 42px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: #5d636a;
  cursor: pointer;
}

.search-tab:last-child {
  border-right: 0;
}

.search-tab.is-active {
  color: #111;
  font-weight: 700;
}

.search-tab.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 28px;
  bottom: -1px;
  height: 3px;
  background: var(--red);
}

.search-row {
  display: grid;
  grid-template-columns: 1fr 130px;
  gap: 13px;
  margin-top: 18px;
}

.search-row input {
  min-width: 0;
  height: 48px;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 0 18px;
  color: #25292d;
  outline: none;
}

.search-row button {
  border: 0;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.search-note {
  margin: 15px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: #8a8d91;
  font-size: 12px;
}

.hero__benefits {
  position: absolute;
  right: 0;
  bottom: 18px;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, 139px);
  gap: 7px;
}

.hero__benefits article {
  height: 132px;
  padding: 20px 17px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 8px 22px rgba(25, 30, 35, .05);
}

.hero__benefits b {
  display: block;
  margin-bottom: 18px;
  color: var(--red);
  font-weight: 400;
}

.hero__benefits .icon {
  width: 32px;
  height: 32px;
}

.hero__benefits span {
  font-size: 14px;
  line-height: 1.25;
}

.section {
  padding-top: 30px;
}

.section-title {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  margin-bottom: 16px;
}

.section-title::after {
  content: "";
  height: 1px;
  background: #f05a46;
  opacity: .72;
}

.section-title h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1;
}

.section-title a {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #5f646a;
  font-size: 14px;
}

.section-title a .icon {
  width: 16px;
  height: 16px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.category-card,
.product-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: 0 6px 15px rgba(30, 35, 40, .035);
}

.category-card {
  position: relative;
  min-height: 222px;
  padding: 14px 14px 18px;
  overflow: hidden;
}

.category-card img {
  width: 100%;
  height: 136px;
  object-fit: contain;
  margin-bottom: 12px;
}

.category-card strong {
  display: block;
  font-size: 14px;
  line-height: 1.25;
}

.category-card > .icon {
  position: absolute;
  right: 18px;
  bottom: 14px;
  width: 24px;
  height: 24px;
  color: #9b9fa4;
}

.brand-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 11px;
}

.brand {
  min-width: 0;
  height: 64px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: #1d2024;
  font-size: 22px;
  font-weight: 900;
  line-height: .85;
  text-align: center;
}

.brand--red {
  color: #e41e2b;
}

.brand--blue {
  color: #1682c9;
  font-size: 30px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}

.product-card {
  position: relative;
  min-height: 244px;
  padding: 13px 13px 15px;
}

.product-card > button {
  position: absolute;
  top: 13px;
  right: 13px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #8c9197;
  cursor: pointer;
}

.product-card > button .icon {
  width: 21px;
  height: 21px;
}

.product-card img {
  width: 100%;
  height: 112px;
  object-fit: contain;
  margin-bottom: 9px;
}

.product-card h3 {
  min-height: 42px;
  margin: 0;
  font-size: 14px;
  line-height: 1.18;
  font-weight: 500;
}

.stock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 12px 0 8px;
  color: var(--green);
  font-size: 12px;
}

.stock::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
}

.stock--low {
  color: var(--orange);
}

.product-card div {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-card strong {
  font-size: 22px;
}

.product-card div a {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  transition: background-color .18s ease, transform .18s ease;
}

.product-card div a:hover,
.product-card div a.is-added {
  background: #d71920;
  transform: translateY(-1px);
}

.product-card div a .icon {
  width: 20px;
  height: 20px;
}

.promo {
  padding: 28px 0 22px;
}

.promo-card {
  display: block;
  overflow: hidden;
  border-radius: 13px;
  box-shadow: var(--shadow);
}

.promo-card img {
  width: 100%;
  height: 196px;
  object-fit: cover;
}

.service {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.service-grid article {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border-right: 1px solid var(--line);
}

.service-grid article:first-child {
  border-left: 1px solid var(--line);
}

.service-grid b {
  color: #202124;
  font-weight: 400;
}

.service-grid b .icon {
  width: 26px;
  height: 26px;
}

.service-grid span {
  color: #555b61;
  font-size: 13px;
  line-height: 1.2;
}

.footer {
  background: #f8f8f7;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.8fr repeat(4, 1fr);
  gap: 42px;
  padding: 28px 0;
}

.footer__brand img {
  width: 120px;
  height: 70px;
  object-fit: contain;
  margin-bottom: 10px;
}

.footer__brand strong,
.footer__brand span {
  display: block;
}

.footer__brand strong {
  font-size: 25px;
}

.footer__brand span {
  margin-top: 3px;
  color: #777;
  font-size: 13px;
}

.socials {
  display: flex;
  gap: 16px;
  margin-top: 25px;
}

.socials a {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fff;
  color: #1989d8;
  font-weight: 700;
  font-size: 12px;
}

.footer__col h3 {
  margin: 0 0 12px;
  font-size: 15px;
}

.footer__col a,
.footer__col p {
  display: block;
  margin: 8px 0;
  color: #61666c;
  font-size: 13px;
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding: 15px 0 20px;
  border-top: 1px solid var(--line);
  color: #777b80;
  font-size: 12px;
}

@media (max-width: 1180px) {
  .container {
    width: calc(100% - 48px);
    max-width: var(--max);
  }

  .header__inner {
    gap: 24px;
  }

  .logo {
    min-width: 230px;
  }

  .logo img {
    width: 104px;
  }

  .logo strong {
    font-size: 27px;
  }

  .nav {
    display: none;
  }

  .hero__frame {
    min-height: 0;
    padding-bottom: 26px;
    background-size: cover, 84% auto;
    background-position: center, right 40px;
  }

  .hero__content {
    width: 620px;
  }

  h1 {
    font-size: 56px;
  }

  .hero__benefits {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    margin-top: 16px;
  }

  .category-grid,
  .brand-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .service-grid,
  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .container {
    width: calc(100% - 28px);
    max-width: var(--max);
  }

  .topbar {
    height: auto;
  }

  .topbar__inner,
  .topbar__left {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .topbar__inner {
    padding: 10px 0;
  }

  .header__inner {
    position: relative;
    height: 82px;
    gap: 14px;
  }

  .logo {
    min-width: 0;
    flex: 1;
    gap: 10px;
    overflow: hidden;
  }

  .logo img {
    width: 78px;
    height: 50px;
  }

  .logo strong {
    font-size: 22px;
    white-space: nowrap;
  }

  .logo small,
  .header-action small,
  .header-action:not(.header-action--cart) {
    display: none;
  }

  .header-actions {
    position: absolute;
    top: 50%;
    right: 0;
    flex: 0 0 54px;
    width: 54px;
    display: block;
    grid-template-columns: 54px;
    border-left: 0;
    transform: translateY(-50%);
    z-index: 3;
  }

  .header-action {
    width: 54px;
    height: 54px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
  }

  .header-actions .header-action--cart {
    display: grid !important;
  }

  .hero__frame {
    min-height: 0;
    padding-top: 36px;
    padding-bottom: 24px;
    background-image:
      linear-gradient(180deg, rgba(248, 248, 247, .98) 0%, rgba(248, 248, 247, .98) 52%, rgba(248, 248, 247, .34) 100%),
      url("../assets/hero/main-hero.png");
    background-size: cover, 1120px auto;
    background-position: center, 58% bottom;
  }

  .hero__content {
    width: 100%;
  }

  h1 {
    font-size: 38px;
    line-height: 1.04;
  }

  .hero__lead {
    width: auto;
    font-size: 16px;
  }

  .hero__trust {
    flex-direction: column;
    gap: 10px;
  }

  .search-card {
    width: 100%;
    padding-bottom: 14px;
  }

  .search-tabs,
  .search-row {
    grid-template-columns: 1fr;
  }

  .search-tab {
    border-right: 0;
  }

  .search-row button {
    height: 48px;
  }

  .hero__benefits {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
    margin-top: 12px;
  }

  .hero__benefits article {
    height: 104px;
  }

  .section-title {
    grid-template-columns: 1fr auto;
  }

  .section-title a {
    max-width: 128px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .section-title::after {
    display: none;
  }

  .section-title h2 {
    font-size: 23px;
  }

  .category-grid,
  .brand-grid,
  .product-grid,
  .service-grid,
  .footer__grid {
    grid-template-columns: 1fr;
  }

  .category-card {
    min-height: 180px;
  }

  .category-card img {
    height: 120px;
  }

  .promo-card img {
    height: 118px;
  }

  .service-grid article,
  .service-grid article:first-child {
    border-left: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .footer__bottom {
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 520px) {
  .container {
    width: calc(100% - 28px);
    max-width: 362px;
  }

  .header__inner {
    padding-right: 62px;
  }

  h1 {
    font-size: 30px;
  }

  .hero__lead {
    font-size: 15px;
  }

  .search-note {
    line-height: 1.35;
  }

  .section-title {
    grid-template-columns: 1fr;
  }

  .section-title a {
    display: none;
  }
}
