* {
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: "Montserrat", Arial, sans-serif;
  vertical-align: baseline;
  box-sizing: border-box;
}

:root {
  --gray-back: rgb(243, 243, 243);
}

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

.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 1530px;
  margin: 0 auto;
  /* padding: 0 15px; */
  flex: 1;
}

.page-wrapper .container {
  margin-bottom: 60px;
}

.h1 {
  margin-top: 24px;
  margin-left: 70px;
  margin-bottom: 22px;
}

/* BEST SELLS */

.container .best-container a {
  color: black;
}

.best-container {
  display: flex;
  max-width: 1395px;
  width: 100%;
  margin: 0 auto;
  gap: 15px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  cursor: grab;
  user-select: none;
  -webkit-overflow-scrolling: touch; /* для плавного скролла на iOS */
  -ms-overflow-style: none; /* IE и Edge */
  scrollbar-width: none; /* Firefox */
}

.best-container:active {
  cursor: grabbing;
}

.best-container::-webkit-scrollbar {
  display: none; /* скрываем стандартный скроллбар */
}

.game {
  text-align: center;
  flex: 0 0 auto;
}

.game p {
  font-size: 1.2em;
  font-weight: 500;
}

.game-img {
  width: 236px;
  height: 295px;
  border-radius: 10px;
}

/* Стили для шапки */
header {
  background-color: #000000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 15px 0;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  flex-wrap: wrap;
  gap: 15px;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo-section img {
  width: 43px;
}

.logo {
  width: 40px;
  height: 40px;
  background-color: #4e73df;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
}

.site-name {
  font-size: 20px;
  font-weight: 600;
  color: #ffffff;
}

.nav-section {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-grow: 1;
  justify-content: center;
}

.catalog-btn {
  background-color: #4e73df;
  color: white;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 500;
  transition: background-color 0.3s;
  white-space: nowrap;
}

.catalog-btn:hover {
  background-color: #3a5bbf;
}

.search-form {
  display: flex;
  align-items: center;
  background-color: #f8f9fa;
  border-radius: 6px;
  padding: 5px 10px;
  width: 100%;
  max-width: 600px;
  margin: 0 10px;
}

.search-input {
  border: none;
  background: transparent;
  padding: 8px;
  width: 100%;
  outline: none;
}

.search-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #6c757d;
}

.user-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #6c757d;
  font-size: 12px;
  gap: 3px;
}

.action-icon {
  font-size: 20px;
}

.popular-container {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 1504px;
  margin: 0 auto;
  flex-wrap: wrap;
  overflow: hidden;
}

.slider-wrapper {
  width: 100%;
  overflow: hidden;
}

.slider-track {
  display: flex;
  transition: transform 0.5s ease;
}

.slide {
  display: flex;
  flex: 0 0 100%;
}

.popular-game {
  background-color: black;
  color: white;
  border-top-right-radius: 35px;
  border-bottom-right-radius: 35px;
  position: relative;
  max-width: 462px;
  max-height: 468px;
  margin-right: 13px;
  width: 100%;
}

.popular-head {
  margin: 15px;
  margin-bottom: 10px;
  font-size: clamp(1.2em, 4vw, 1.9em);
}

.popular-desc {
  margin-left: 15px;
  font-weight: 500;
  margin-right: 15px;
  font-size: clamp(1em, 3vw, 1.5em);
}

.popular {
  position: relative; /* Это создаёт контекст позиционирования для дочерних элементов */
  display: inline-block; /* Чтобы контейнер подстраивался под размер изображения */
  /* opacity: 0; */
  /* min-width: 100%; */
}

.popular-img {
  margin-left: 13px;
  border-top-left-radius: 35px;
  border-bottom-left-radius: 35px;
  max-width: 933px;
  max-height: 468px;
  /* height: 100%; */
  /* width: 100%; */
  object-fit: contain;
}

.button-container {
  display: flex;
  background-color: #000000a8;
  max-width: 933px;
  width: 100%;
  position: absolute; /* Позиционируем абсолютно относительно .popular */
  bottom: 0;
  height: 100px;
  margin-left: 13px;
  border-bottom-left-radius: 35px;
}

.popular-btn-position {
  display: flex;
  height: 100%;
  margin: 0 auto;
  align-items: center;
  max-width: 850px;
  width: 100%;
}

.popular-btn-position a {
  display: block;
  text-align: center;
  min-width: 120px;
  max-width: 140px;
}

.popular-btn-position p {
  color: rgb(0, 236, 0);
  display: block;
  text-align: right;
  width: 100%;
  font-size: 1.2em;
  font-weight: 500;
}

.popular-btn {
  background-color: #4e73df;
  color: white;
  font-size: 1.2em;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 500;
  transition: background-color 0.3s;
  white-space: nowrap;
  height: fit-content;
}

.leader-sell {
  display: table;
  background-color: #3d4042;
  width: 100%; /* Делаем ширину адаптивной */
  max-width: 220px; /* Но не больше 220px */
  height: 50px;
  margin: 15px;
  font-size: clamp(1em, 3vw, 1.6em); /* Адаптивный размер шрифта */
  border-radius: 7px;
  font-weight: 400;
}

.leader-sell p {
  display: table-cell;
  text-align: center;
  vertical-align: middle;
}

.arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  cursor: pointer;
}

.on-center {
  text-align: center;
  margin-top: 40px;
}

/* FOOTER START */
.footer-container {
  background-color: black;
  padding: 10px;
  bottom: 0;
  width: 100%;
  margin: 0 auto;
  padding-bottom: 40px;
}

.footer {
  color: white;
  display: flex;
  max-width: 1300px;
  width: 100%;
  margin: 0 auto;
  margin-top: 15px;
  gap: 17%;
  flex-wrap: wrap;
}

.footer ul li {
  margin-top: 5px;
}

.footer a {
  margin-left: 10px;
  color: white;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 15px;
}

.footer-logo img {
  width: 50px;
}

.footer-logo p {
  font-size: 1.2em;
  font-weight: 700;
}

.ul-flex {
  margin-top: 4px;

  display: flex;
}
/* FOOTER END */

/* FAVOURITES START */
.favourites-container {
  display: grid;
  gap: 25px;
  margin-left: 60px;
  margin-right: 60px;
  max-width: 1019px;
  width: 100%;
  grid-template-columns: repeat(4, 1fr);
}

.fav-game {
  max-width: 236px;
}

.fav-game a {
  color: black;
}

/* FAV END */
.cart-page-container {
  display: flex;
  gap: 15%;
}

.order-container {
  display: flex;
  flex-direction: column;
  background-color: var(--gray-back);
  padding: 20px;
  border-radius: 20px;
  height: 200px;
  min-width: 300px;
  max-width: 330px;
  width: 100%;
  align-items: center;
}

.order-container > * {
  margin-bottom: 50px;
}

.order-btn {
  color: white;
  padding: 15px;
  font-size: 1.2em;
  font-weight: 500;
  border-radius: 15px;
  background-color: #000000;
  text-align: center;
  max-width: 260px;
  min-width: 190px;
  width: 100%;
}

.cart-container {
  margin-left: 70px;
  width: 50%;
  max-width: 800px;
}

.cart-game {
  display: flex;
}

.cart-a {
  display: flex;
  gap: 15px;
}

.cart-activation {
  display: flex;
  gap: 10px;
}

.cart-activation p {
  font-weight: 500;
}

.cart-desc > * {
  margin-bottom: 9px;
}

.bold {
  font-weight: 700;
}

.cart-img {
  width: 200px;
  border-radius: 15px;
}

.delete-icon {
  cursor: pointer;
  margin-top: 5px;
  align-self: flex-start;
  justify-self: flex-end;
  margin-left: auto;
}

.cart-price {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.catalog-container {
  display: flex;
  gap: 50px;
  max-width: 1504px;
  width: 100%;
  margin: 0 auto;
  margin-left: 70px;
}

.catalog-container .favourites-container {
  margin-left: 0;
}

.filter-container {
  background-color: var(--gray-back);
  max-width: 300px;
  width: 100%;
  padding: 20px;
  border-radius: 15px;
  height: 330px;
}

.filter-container button {
  margin-top: 20px;
}

.h3 {
  font-size: 1.3em;
  /* margin-bottom: 10px; */
}

.platform-list {
  padding: 5px;
}

.platform-list li {
  padding-bottom: 5px;
}

.price-filter {
  display: flex;
  gap: 5px;
  max-width: 300px;
}

.price-filter input {
  width: 120px;
  margin: 5px;
  padding: 4px;
}

.filter-btn {
  background-color: black;
  color: white;
  border-radius: 15px;
  font-size: 1em;
  font-weight: 500;
  padding: 15px;
  text-align: center;
  width: 170px;
  display: block;
  margin: 0 auto;
}

.item-img {
  width: clamp(300px, 376px, 400px);
  border-radius: 15px;
}

.left-data {
  margin-top: 10px;
  margin-left: 4px;
  display: flex;
  gap: 20px;
}

.ul-left-data {
  font-size: 1.1em;
}

.ul-left-data li {
  margin-bottom: 3px;
}

.item-container {
  display: flex;
  margin-top: 40px;
  margin-left: 60px;
  gap: 40px;
}

.item-h1 {
  font-size: 2.7em;
}

.cart-btn {
  width: 130px;
  padding: 8px;
  margin: 0;
  font-size: 1.2em;
  border-radius: 10px;
}

.price-font {
  font-size: 1.4em;
  font-weight: 500;
}

.price-wrapper {
  margin-left: -1px;
  display: flex;
  gap: 15px;
  align-items: center;
  margin-top: 10px;
}

.activation-wrapper {
  display: flex;
  gap: 10px;
}

.item-h2 {
  font-size: 2em;
}

.right-item {
  max-width: 800px;
  width: 100%;
}

.right-item > * {
  margin-bottom: 10px;
}

.description-wrapper > * {
  margin-bottom: 10px;
}

.description-wrapper p {
  font-size: 1.2em;
}

.reqs-lists {
  margin-top: 5px;
  display: flex;
  gap: 25px;
  font-size: 1.2em;
}

.reqs-lists ul li {
  margin-bottom: 3px;
}
/* Адаптивные стили */
@media (max-width: 1200px) {
  .nav-section {
    order: 3;
    width: 100%;
    margin-top: 15px;
  }

  .search-form {
    max-width: 100%;
  }

  .footer {
    gap: 12%; /* Уменьшаем отступ между колонками */
  }

  .popular-container {
    flex-direction: column; /* Меняем направление на вертикальное */
    align-items: center;
  }

  .button-container {
    margin: 0;
  }

  .popular-game {
    max-width: 100%;
    margin-right: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
  }

  .popular-img {
    margin-left: 0;
    border-radius: 35px; /* Убираем скругление только с левой стороны */
  }

  .arrow {
    display: none; /* Скрываем стрелки на мобильных */
  }
}

@media (max-width: 992px) {
  .footer {
    gap: 8%; /* Еще меньше отступ */
    padding: 0 20px; /* Добавляем боковые отступы */
  }

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

@media (max-width: 768px) {
  .catalog-container {
    flex-direction: column;
    margin: 0;
    align-items: center;
  }
  .h1 {
    text-align: center;
    margin: 0;
    margin-bottom: 20px;
  }
  .favourites-container {
    grid-template-columns: repeat(1, 1fr);
    margin: auto;
    gap: 10px;
    place-items: center;
    align-items: center;
    align-self: center;
    justify-content: center;
    text-align: center;
  }
  .header-content {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .logo-section {
    justify-content: center;
  }

  .nav-section {
    order: 2;
    margin-top: 0;
    flex-direction: column;
    gap: 10px;
  }

  .search-form {
    margin: 0;
  }

  .user-actions {
    order: 1;
    justify-content: space-around;
    width: 100%;
    padding: 10px 0;
  }

  .catalog-btn {
    width: 100%;
    text-align: center;
  }

  .footer {
    flex-direction: column; /* Меняем направление на вертикальное */
    gap: 20px; /* Увеличиваем вертикальные отступы */
    margin-top: 10px;
    padding: 0 10px;
    padding-left: 30px;
  }

  .ul-flex {
    flex-wrap: wrap; /* Разрешаем перенос элементов в горизонтальном меню */
    gap: 10px; /* Добавляем отступы между элементами */
  }

  .popular-head {
    font-size: 1.5em;
  }

  .popular-desc {
    font-size: 1.1em;
  }

  .leader-sell {
    font-size: 1.1em;
    height: 40px;
  }

  .button-container {
    border-bottom-left-radius: 0px;
    padding: 10px;
  }
}

@media (max-width: 480px) {
  .site-name {
    font-size: 16px;
  }

  .action-btn span {
    display: none;
  }

  .action-icon {
    font-size: 24px;
  }

  .user-actions {
    gap: 10px;
  }

  .popular-head {
    font-size: 1.2em;
    margin: 10px;
  }

  .popular-desc {
    font-size: 0.9em;
    margin-left: 10px;
  }

  .leader-sell {
    font-size: 0.9em;
    height: 35px;
    margin: 10px;
  }
}
