:root {
  --home-popular-text: #292929;
  --home-popular-white: #ffffff;
  --home-popular-rose-1: #fe7250;
  --home-popular-rose-2: #feaa96;
  --home-popular-grey-1: #9ca3af;
  --home-popular-grey-2: #42464c;
}

.home-popular,
.home-popular * {
  box-sizing: border-box;
}

.home-popular {
  width: 100%;
  padding: 160px 0 0;
}

.home-popular__inner {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 80px;
  padding: 0 80px;
}

.home-popular__head {
  width: 100%;
}

.home-popular__title {
  margin: 0;
  font-family: 'Raleway', sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: 46px;
  line-height: 110%;
  text-align: center;
  color: var(--home-popular-text);
  font-feature-settings: 'pnum' on, 'lnum' on;
  font-variant-numeric: proportional-nums lining-nums;
}

.home-popular__cards {
  width: 100%;
  max-width: 1280px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.home-popular__card {
  width: 100%;
  min-height: 0;
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.home-popular__card:not(.home-popular__card--reverse) .home-popular__media {
  grid-column: 1;
  grid-row: 1;
}

.home-popular__card:not(.home-popular__card--reverse) .home-popular__text {
  grid-column: 2;
  grid-row: 1;
}

.home-popular__card--reverse .home-popular__text {
  grid-column: 1;
  grid-row: 1;
}

.home-popular__card--reverse .home-popular__media {
  grid-column: 2;
  grid-row: 1;
}

.home-popular__media,
.home-popular__text {
  width: 100%;
  aspect-ratio: 630 / 400;
  height: auto;
  min-width: 0;
}

.home-popular__media {
  width: 100%;
  position: relative;
  border-radius: 30px;
  background: var(--home-popular-white);
  overflow: hidden;
}

.home-popular__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.home-popular__text {
  position: relative;
  border: 0;
  border-radius: 30px;
  overflow: hidden;
  display: block;
  padding: 0;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  color: var(--home-popular-white);
  font-family: 'Raleway', sans-serif;
  font-feature-settings: 'pnum' on, 'lnum' on;
  font-variant-numeric: proportional-nums lining-nums;
  transition: filter 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.home-popular__text--rose-1 {
  background: var(--home-popular-rose-1);
}

.home-popular__text--rose-2 {
  background: var(--home-popular-rose-2);
}

.home-popular__text--grey-1 {
  background: var(--home-popular-grey-1);
}

.home-popular__text--grey-2 {
  background: var(--home-popular-grey-2);
}

.home-popular__count {
  position: absolute;
  left: -60px;
  top: -120px;
  font-family: 'Rambla', sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: 600px;
  line-height: 110%;
  color: rgba(255, 255, 255, 0.25);
  pointer-events: none;
  user-select: none;
  font-synthesis: none;
}

.home-popular__text--grey-2 .home-popular__count {
  opacity: 0.4;
}

.home-popular__name {
  position: absolute;
  left: 184px;
  right: 80px;
  bottom: 20px;
  margin: 0;
  font-family: 'Raleway', sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: 46px;
  line-height: 110%;
  color: var(--home-popular-white);
}

.home-popular__chevron {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  background: rgba(255, 255, 255, 0.25);
}

.home-popular__text--rose-1 .home-popular__chevron {
  background: #fe8e73;
}

.home-popular__text--rose-2 .home-popular__chevron {
  background: #ffc7b9;
}

.home-popular__text--grey-1 .home-popular__chevron {
  background: #d1d5db;
}

.home-popular__chevron::after {
  content: '';
  display: block;
  width: 24px;
  height: 24px;
  background-color: #ffffff;
  -webkit-mask-image: url('data:image/svg+xml,%3Csvg%20width%3D%2724%27%20height%3D%2724%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20xmlns%3D%27http://www.w3.org/2000/svg%27%3E%3Cpath%20d%3D%27M9%206l6%206-6%206%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27/%3E%3C/svg%3E');
  mask-image: url('data:image/svg+xml,%3Csvg%20width%3D%2724%27%20height%3D%2724%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20xmlns%3D%27http://www.w3.org/2000/svg%27%3E%3Cpath%20d%3D%27M9%206l6%206-6%206%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27/%3E%3C/svg%3E');
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: 24px 24px;
  mask-size: 24px 24px;
  transition: transform 0.24s ease, background-color 0.2s ease;
}

.home-popular__chevron--left::after {
  transform: scaleX(-1);
}

.home-popular__text:hover,
.home-popular__text:focus-visible {
  outline: none;
  filter: brightness(0.98);
}

.home-popular__text--rose-1:hover .home-popular__chevron::after,
.home-popular__text--rose-1:focus-visible .home-popular__chevron::after,
.home-popular__text--rose-2:hover .home-popular__chevron::after,
.home-popular__text--rose-2:focus-visible .home-popular__chevron::after {
  background-color: #42464c;
}

.home-popular__text--grey-1:hover .home-popular__chevron::after,
.home-popular__text--grey-1:focus-visible .home-popular__chevron::after,
.home-popular__text--grey-2:hover .home-popular__chevron::after,
.home-popular__text--grey-2:focus-visible .home-popular__chevron::after {
  background-color: #feaa96;
}

.home-popular__drawer {
  position: absolute;
  top: 0;
  width: calc((100% - 20px) / 2);
  aspect-ratio: 630 / 400;
  height: auto;
  border-radius: 30px;
  overflow: hidden;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
}

.home-popular__card:not(.home-popular__card--reverse) .home-popular__drawer {
  left: 0;
}

.home-popular__card--reverse .home-popular__drawer {
  right: 0;
}

.home-popular__drawer--rose-1 {
  background: var(--home-popular-rose-1);
}

.home-popular__drawer--rose-2 {
  background: var(--home-popular-rose-2);
}

.home-popular__drawer--grey-1 {
  background: var(--home-popular-grey-1);
}

.home-popular__drawer--grey-2 {
  background: var(--home-popular-grey-2);
}

.home-popular__card--open .home-popular__drawer {
  opacity: 1;
  pointer-events: auto;
}

.home-popular__card--open .home-popular__chevron--left::after {
  transform: none;
}

.home-popular__card--open .home-popular__chevron--right::after {
  transform: scaleX(-1);
}

.home-popular__drawer-inner {
  width: 100%;
  height: 100%;
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.home-popular__drawer-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 16px;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.home-popular__drawer--rose-1 .home-popular__drawer-close {
  background: #fe8e73;
}

.home-popular__drawer--rose-2 .home-popular__drawer-close {
  background: #ffc7b9;
}

.home-popular__drawer--grey-1 .home-popular__drawer-close {
  background: #d1d5db;
}

.home-popular__drawer-close .home-popular__chevron {
  position: static;
  background: transparent;
}

.home-popular__types {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.home-popular__types-item {
  margin: 0;
  padding: 0;
}

.home-popular__types-link {
  position: relative;
  display: inline-block;
  padding-left: 24px;
  font-family: 'Raleway', sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: 28px;
  line-height: 110%;
  color: #ffffff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.home-popular__types-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  transform: translateY(-50%);
}

.home-popular__types-link:hover,
.home-popular__types-link:focus-visible {
  text-decoration: none;
  outline: none;
}

.home-popular__drawer--rose-1 .home-popular__types-link:hover,
.home-popular__drawer--rose-1 .home-popular__types-link:focus-visible,
.home-popular__drawer--rose-2 .home-popular__types-link:hover,
.home-popular__drawer--rose-2 .home-popular__types-link:focus-visible {
  color: #42464c;
}

.home-popular__drawer--grey-1 .home-popular__types-link:hover,
.home-popular__drawer--grey-1 .home-popular__types-link:focus-visible,
.home-popular__drawer--grey-2 .home-popular__types-link:hover,
.home-popular__drawer--grey-2 .home-popular__types-link:focus-visible {
  color: #feaa96;
}

.home-popular__types-empty {
  font-family: 'Raleway', sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: 28px;
  line-height: 110%;
  color: rgba(255, 255, 255, 0.85);
}

@media (max-width: 1400px) {
  .home-popular__inner {
    padding: 0 24px;
  }
}

@media (max-width: 1100px) {
  .home-popular__name {
    left: 140px;
    right: 72px;
    font-size: 38px;
  }

  .home-popular__count {
    left: -40px;
    font-size: 500px;
  }
}

@media (max-width: 980px) {
  .home-popular {
    padding-top: 80px;
  }

  .home-popular__inner {
    gap: 48px;
  }

  .home-popular__title {
    font-size: 34px;
  }

  .home-popular__cards {
    gap: 24px;
  }

  .home-popular__card {
    grid-template-columns: 1fr;
    gap: 20px;
    min-height: auto;
  }

  .home-popular__card:not(.home-popular__card--reverse) .home-popular__media,
  .home-popular__card:not(.home-popular__card--reverse) .home-popular__text,
  .home-popular__card--reverse .home-popular__media,
  .home-popular__card--reverse .home-popular__text {
    grid-column: auto;
    grid-row: auto;
  }

  .home-popular__media,
  .home-popular__text {
    height: 340px;
  }

  .home-popular__drawer {
    display: none;
  }

  .home-popular__name {
    left: 120px;
    right: 72px;
    bottom: 20px;
    font-size: 34px;
  }

  .home-popular__count {
    left: -30px;
    top: -90px;
    font-size: 420px;
  }
}

@media (max-width: 640px) {
  .home-popular__inner {
    padding: 0 16px;
  }

  .home-popular__title {
    font-size: 28px;
  }

  .home-popular__media,
  .home-popular__text {
    height: 260px;
    border-radius: 24px;
  }

  .home-popular__chevron {
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }

  .home-popular__chevron::after {
    width: 20px;
    height: 20px;
    -webkit-mask-size: 20px 20px;
    mask-size: 20px 20px;
  }

  .home-popular__name {
    left: 32px;
    right: 56px;
    bottom: 18px;
    font-size: 26px;
    line-height: 110%;
  }

  .home-popular__count {
    left: -10px;
    top: -34px;
    font-size: 240px;
  }
}

@media (max-width: 767px) {
  .home-popular {
    padding: 40px 0 0;
  }

  .home-popular__inner {
    align-items: stretch;
    gap: 32px;
    padding: 0 16px;
  }

  .home-popular__head {
    display: block;
    width: 100%;
  }

  .home-popular__title {
    font-size: 22px;
    line-height: 130%;
    text-align: center;
    color: var(--home-popular-grey-2);
  }

  .home-popular__cards {
    gap: 8px;
    max-width: none;
  }

  .home-popular__card {
    display: block;
    width: 100%;
  }

  .home-popular__media {
    display: none;
  }

  .home-popular__text {
    width: 100%;
    height: 260px;
    aspect-ratio: auto;
    border-radius: 16px;
    transition: none;
  }

  .home-popular__text:hover,
  .home-popular__text:focus-visible,
  .home-popular__text:active {
    filter: none;
  }

  .home-popular__count {
    left: -30px;
    top: -90px;
    font-size: clamp(340px, 106.67vw, 420px);
    line-height: 110%;
  }

  .home-popular__name {
    left: 35.3%;
    right: 16px;
    bottom: 24px;
    font-size: 22px;
    line-height: 130%;
    text-align: right;
  }

  .home-popular__chevron {
    top: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
    border-radius: 16px;
  }

  .home-popular__chevron::after {
    width: 24px;
    height: 24px;
    -webkit-mask-size: 24px 24px;
    mask-size: 24px 24px;
  }

  .home-popular__text .home-popular__chevron::after {
    transform: rotate(90deg);
  }

  .home-popular__card--open .home-popular__text .home-popular__chevron::after,
  .home-popular__drawer-close .home-popular__chevron::after {
    transform: rotate(-90deg);
  }

  .home-popular__text--rose-1:hover .home-popular__chevron::after,
  .home-popular__text--rose-1:focus-visible .home-popular__chevron::after,
  .home-popular__text--rose-2:hover .home-popular__chevron::after,
  .home-popular__text--rose-2:focus-visible .home-popular__chevron::after,
  .home-popular__text--grey-1:hover .home-popular__chevron::after,
  .home-popular__text--grey-1:focus-visible .home-popular__chevron::after,
  .home-popular__text--grey-2:hover .home-popular__chevron::after,
  .home-popular__text--grey-2:focus-visible .home-popular__chevron::after {
    background-color: #ffffff;
  }

  .home-popular__drawer {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    display: block;
    width: 100%;
    height: auto;
    max-height: 0;
    aspect-ratio: auto;
    margin-top: 0;
    border-radius: 16px;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    cursor: pointer;
    transition:
      max-height 260ms ease,
      margin-top 260ms ease,
      opacity 180ms ease;
  }

  .home-popular__card--open .home-popular__drawer {
    max-height: 520px;
    margin-top: 8px;
    opacity: 1;
    pointer-events: auto;
  }

  .home-popular__drawer-close {
    display: flex;
    top: 16px;
    right: 16px;
  }

  .home-popular__drawer-close:focus,
  .home-popular__drawer-close:active {
    outline: none;
  }

  .home-popular__drawer-inner {
    min-height: 220px;
    height: auto;
    padding: 20px 29px 20px;
    justify-content: flex-start;
  }

  .home-popular__types {
    gap: 8px;
    padding-right: 44px;
  }

  .home-popular__types-link {
    padding-left: 14px;
    font-size: 14px;
    line-height: 130%;
    cursor: pointer;
  }

  .home-popular__types-link::before {
    width: 4px;
    height: 4px;
  }

  .home-popular__types-link:hover,
  .home-popular__types-link:focus-visible,
  .home-popular__types-link:active {
    color: #ffffff;
  }
}
