/* FONTS */

@font-face {
  font-family: "Open Sans";
  src: url("fonts/OpenSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Open Sans";
  src: url("fonts/OpenSans-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: "Open Sans";
  src: url("fonts/OpenSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}

/* STYLES */

:root {
  /* COLORS */
  --primary: #ffc732;
  --secondary: #861088;
  --dark: #333;
  --light: #dde5e7;
  --danger: #ff0042;
  --success: #00a54f;

  /* FONTS */
  --openSans: "Open Sans", sans-serif;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 102px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  margin: 0;
  padding-top: 102px;
  font-family: var(--openSans);
  background-color: var(--light);
}

@media (max-width: 768px) {
  html {
    scroll-padding-top: 83px;
  }

  body {
    padding-top: 83px;
  }
}

a {
  text-decoration: none;
  cursor: pointer;
  transition: color 0.3s ease;
}

body.no-scroll {
  overflow: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* TEXT CLASSES */

.font--medium {
  font-weight: 500;
}

.font--bold {
  font-weight: 700;
}

.text--primary {
  color: var(--primary);
}

.text--secondary {
  color: var(--secondary);
}

.text--dark {
  color: var(--dark);
}

.text--light {
  color: var(--light);
}

.text--danger {
  color: var(--danger);
}

.text--underline {
  text-decoration: underline;
}

.text--center {
  text-align: center;
}

.text--xl {
  font-size: 32px;
}

.text--lg {
  font-size: 20px;
}

/* BACKGROUND */

.bg--white {
  background-color: #f1fcff;
}

.bg--light {
  background-color: var(--light);
}

/* MARGIN */

.m-0 {
  margin: 0;
}

.m-0-auto {
  margin: 0 auto;
}

.mx-10 {
  margin: 0 10px;
}

.mb-10 {
  margin-bottom: 10px;
}

.mb-20 {
  margin-bottom: 20px;
}

.mt-20 {
  margin-top: 20px;
}

/* PADDING */

.p-20 {
  padding: 20px;
}

/* BUTTON */

.btn {
  display: inline-block;
  font-family: var(--openSans);
  font-size: 18px;
  font-weight: 700;
  line-height: normal;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background-color: var(--primary);
  color: var(--dark);
}

.btn--primary:hover {
  background-color: #f09125;
}

.btn--danger {
  background-color: var(--danger);
  color: var(--light);
}

.btn--danger:hover {
  background-color: #ac0d37;
}

.btn--secondary {
  background-color: var(--secondary);
  color: var(--light);
}

.btn--secondary:hover {
  background-color: #4d064e;
}

@media (max-width: 520px) {
  .btn {
    font-size: 15px;
  }
}

/* FLEX */

.flex {
  display: flex;
}

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

.align-center {
  align-items: center;
}

/* HEADER */

.header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  background-color: var(--light);
  padding: 10px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.09);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.header__inner {
  align-items: center;
  justify-content: space-between;
}

.header__actions {
  display: flex;
  align-items: center;
}

.logo {
  width: 200px;
  height: auto;
}

.header__contact-link {
  color: var(--dark);
  text-decoration: none;
  margin-right: 20px;
  font-size: 18px;
  transition: color 0.3s ease;
}

.header__contact-link:hover {
  color: var(--secondary);
}

.burger-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  margin-left: 15px;
  position: relative;
  z-index: 1010;
  width: 45px;
  height: 45px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  box-sizing: border-box;
}

.burger-btn span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--dark);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.burger-btn.is-active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.burger-btn.is-active span:nth-child(2) {
  opacity: 0;
}

.burger-btn.is-active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: 100%;
  background-color: var(--light);
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
  transition: right 0.3s ease-in-out;
  z-index: 1005;
  display: flex;
  flex-direction: column;
}

.mobile-menu.is-open {
  right: 0;
}

.mobile-menu__header {
  padding: 15px;
  display: flex;
  justify-content: flex-end;
}

.mobile-menu__nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-menu__nav li a {
  display: block;
  padding: 15px;
  text-decoration: none;
  color: var(--dark);
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.3s ease;
}

.mobile-menu__nav li:last-child a {
  border-bottom: none;
}

.mobile-menu__nav li a:hover {
  background-color: var(--light-grey);
}

body.no-scroll {
  overflow: hidden;
}

@media (max-width: 768px) {
  .header__contact-link {
    display: none;
  }

  .burger-btn {
    display: flex;
  }

  .logo {
    width: 150px;
    height: auto;
    margin-right: 10px;
  }
}

@media (max-width: 520px) {
  .logo {
    width: 120px;
  }

  .header__actions .btn {
    padding: 8px 15px;
    font-size: 14px;
  }
}

/* NAVIGATION */

.main-nav {
  background-color: var(--primary);
}

.main-nav__list {
  list-style: none;
  gap: 35px;
  padding: 12px 0;
}

.main-nav__link {
  color: var(--dark);
  padding: 8px 12px;
  transition: color 0.3s ease;
  font-size: 18px;
}

.main-nav__link:hover {
  color: var(--secondary);
}

@media (max-width: 520px) {
  .main-nav__list {
    gap: 20px;
  }
}

/* FOOTER */

.footer {
  background-color: var(--light);
  padding-top: 40px;
  padding-bottom: 20px;
  font-family: var(--openSans);
  border-top: 1px solid rgba(0, 0, 0, 0.09);
}

.footer__top {
  margin-bottom: 30px;
}

.footer__contacts p {
  font-size: 14px;
}

.footer__bottom {
  border-top: 1px solid var(--primary);
  padding-top: 15px;
  font-size: 14px;
}

.footer__link {
  margin: 0 10px;
  transition: color 0.3s ease;
}

.footer__link:hover {
  color: var(--secondary);
}

.footer__logo {
  margin-bottom: 15px;
}

/* THANKS PAGE */

.thanks-page {
  min-height: 100vh;
  /* align-items: center; */
  text-align: center;
}

.thanks-content {
  max-width: 500px;
  padding: 40px 20px;
}

/* PRIVACY POLICY, TERMS AND CONDITIONS */

.system-page {
  padding: 20px;
}

.list {
  margin-left: 20px;
  padding-left: 10px;
  list-style: disc;
}

/* CAROUSEL */

.carousel-container {
  position: relative;
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
  height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--dark);
}

.carousel-wrapper {
  display: flex;
  transition: transform 0.8s ease-in-out;
  height: 100%;
  width: 100%;
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.carousel-slide .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
}

.carousel-slide-games {
  background-image: url("images/carousel-1.webp");
}

.carousel-slide-accessories {
  background-image: url("images/carousel-2.webp");
}

.carousel-slide-consoles {
  background-image: url("images/carousel-3.webp");
}

.slide-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #fff;
  padding: 0 50px;
  max-width: 800px;
}

.slide-content h1 {
  font-size: 3em;
  margin-bottom: 15px;
  line-height: 1.2;
}

.slide-content p {
  font-size: 1.2em;
  margin-bottom: 25px;
  line-height: 1.5;
}

.carousel-button {
  color: var(--dark);
  padding: 15px 30px;
  border: none;
  border-radius: 5px;
  font-size: 1.1em;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  text-transform: uppercase;
  font-weight: bold;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  padding: 15px 20px;
  font-size: 2em;
  cursor: pointer;
  z-index: 10;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.carousel-arrow:hover {
  background-color: rgba(0, 0, 0, 0.89);
}

.left-arrow {
  left: 20px;
}

.right-arrow {
  right: 20px;
}

@media (max-width: 768px) {
  .slide-content h1 {
    font-size: 2.5em;
  }
  .slide-content p {
    font-size: 1em;
  }
  .carousel-arrow {
    padding: 10px 15px;
    font-size: 1.5em;
    width: 50px;
    height: 50px;
  }
  .left-arrow {
    left: 10px;
  }
  .right-arrow {
    right: 10px;
  }
}

@media (max-width: 480px) {
  .carousel-container {
    height: 60vh;
  }
  .slide-content h1 {
    font-size: 2em;
  }
  .slide-content p {
    font-size: 0.9em;
  }
  .carousel-button {
    padding: 12px 25px;
    font-size: 1em;
  }
  .carousel-arrow {
    width: 40px;
    height: 40px;
    font-size: 1.2em;
  }
}

/* CARDS */

.card-section {
  padding: 40px 0;
}

.card-section__title {
  text-align: center;
  margin-bottom: 40px;
  font-size: 36px;
  color: var(--dark);
  font-weight: 700;
}

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

.product-card {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  position: relative;
  text-align: center;
  background-color: white;
}

.product-card__image-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 100%;
  overflow: hidden;
}

.product-card__image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
}

.product-card__badge {
  position: absolute;
  top: 0;
  right: 0;
  background-color: var(--success);
  color: var(--light);
  padding: 8px 12px;
  border-bottom-left-radius: 8px;
  font-size: 14px;
  font-weight: 700;
}

.product-card__badge--preorder {
  background-color: var(--primary);
  color: var(--dark);
}

.product-card__content {
  padding: 15px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

.product-card__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 10px;
  flex-grow: 1;
  display: -webkit-box;
  line-clamp: 3;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-card__price {
  font-size: 22px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 15px;
}

.product-card .btn {
  width: 100%;
  padding: 12px 0;
  font-size: 16px;
}

@media (max-width: 992px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
  .product-card__title {
    font-size: 16px;
  }
  .product-card__price {
    font-size: 20px;
  }
  .product-card .btn {
    font-size: 15px;
  }
}

/* BANNER SECTION */

.banner-section {
  margin-top: 40px;
  margin-bottom: 40px;
  overflow: hidden;
}

.banner-wrapper {
  position: relative;
  width: 100%;
  height: 300px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.banner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--light);
  padding: 20px;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  cursor: pointer;
}

.banner.active {
  opacity: 1;
}

.banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
}

.banner-games {
  background-image: url("images/banner-1.webp");
}

.banner-accessories {
  background-image: url("images/banner-2.webp");
}

.banner-consoles {
  background-image: url("images/banner-3.webp");
}

.banner-content {
  position: relative;
  z-index: 1;
  max-width: 80%;
}

.banner-content h2 {
  font-size: 2.5em;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.banner-content p {
  font-size: 1.2em;
  margin-bottom: 20px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

@media (max-width: 768px) {
  .banner-wrapper {
    height: 250px;
  }
  .banner-content h2 {
    font-size: 2em;
  }
  .banner-content p {
    font-size: 1em;
  }
}

@media (max-width: 520px) {
  .banner-wrapper {
    height: 200px;
  }
  .banner-content h2 {
    font-size: 1.5em;
  }
  .banner-content p {
    font-size: 0.9em;
  }
  .banner-content .btn {
    font-size: 14px;
    padding: 8px 12px;
  }
}

/* NEWS SECTION */

.news-section {
  padding: 40px 0;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.news-card {
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.news-card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.news-card-content h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 20px;
  color: var(--dark);
}

.news-card-content p {
  font-size: 16px;
  color: #666;
  margin-bottom: 20px;
  flex-grow: 1;
}

.news-card-content .btn {
  margin-top: auto;
  width: fit-content;
}

/* MODAL STYLES */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background-color: white;
  padding: 30px;
  border-radius: 8px;
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--dark);
  transition: color 0.3s ease;
}

.modal-close-btn:hover {
  color: var(--danger);
}

.modal-content h2 {
  margin-top: 0;
  margin-bottom: 15px;
  color: var(--dark);
  font-size: 28px;
}

.modal-content img {
  max-width: 100%;
  height: auto;
  margin-bottom: 20px;
  border-radius: 4px;
}

.modal-content p {
  margin-bottom: 15px;
  line-height: 1.6;
  color: #333;
  font-size: 17px;
}

@media (max-width: 1024px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .news-grid {
    grid-template-columns: 1fr;
  }
  .news-section {
    padding: 20px 0;
  }
}

.modalImage-wrap {
  width: 500px;
  height: auto;
  margin: 0 auto;
}

.modalImage-wrap img {
  width: 100%;
  height: 100%;
}

@media (max-width: 768px) {
  .modalImage-wrap {
    width: 200px;
    height: auto;
  }
}

/* REWIEWS PAGE */

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.review-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.review-card__photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 15px;
}

@media (max-width: 520px) {
  .reviews-grid {
    grid-template-columns: 1fr;
  }
}

/* PRODUCTS NAVIGATION */

.product-navigation-section {
  padding-top: 30px;
  padding-bottom: 30px;
  background-color: white;
}

.breadcrumbs {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 10px;
}

.breadcrumbs a {
  color: #666;
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumbs a:hover {
  color: var(--primary);
}

.breadcrumbs span {
  margin: 0 5px;
  color: #666;
}

.page-title {
  font-size: 2.5em;
  font-weight: 700;
  margin-bottom: 25px;
  color: var(--dark);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.btn--outlined-primary {
  background-color: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 8px 15px;
  font-size: 16px;
  border-radius: 5px;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.btn--outlined-primary:hover {
  background-color: var(--primary);
  color: var(--dark);
  transform: translateY(-1px);
}

.btn--outlined-primary:active {
  transform: translateY(0);
}

@media (max-width: 520px) {
  .product-navigation-section {
    padding-top: 20px;
    padding-bottom: 20px;
  }
  .breadcrumbs {
    font-size: 0.8em;
  }
  .page-title {
    font-size: 2em;
    margin-bottom: 15px;
  }
  .filter-buttons {
    gap: 8px;
  }
  .btn--outlined-primary {
    padding: 6px 12px;
    font-size: 14px;
  }
}

/* HERO SECTION */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  padding: 40px;
  color: var(--light);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.hero--contacts {
  background: url("images/contacts-hero.webp") center/cover no-repeat;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 0;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero__title {
  line-height: 1.2;
}

.hero__subtitle {
  line-height: 1.4;
}

@media (max-width: 768px) {
  .hero {
    min-height: 45vh;
    padding: 30px 0;
  }
}

@media (max-width: 520px) {
  .hero__title {
    font-size: 26px;
  }

  .hero__subtitle {
    font-size: 16px;
  }
}

/* CONTACTS SECTION */
.contacts-section {
  padding: 60px 0;
}

.contacts-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  padding: 20px;
  border-radius: 8px;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.map-wrapper iframe {
  width: 100%;
  height: 450px;
  border: 0;
}

@media (max-width: 768px) {
  .contacts-cards {
    grid-template-columns: 1fr;
  }
}

.contact-card h3 {
  margin-bottom: 10px;
}

/* FORM SECTION */
.contact-form-section {
  padding: 60px 0;
  background-color: white;
}

.contact-form-section__header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 40px;
}

.contact-form__form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px 32px;
  max-width: 800px;
  margin: 0 auto;
}

.contact-form__field {
  display: flex;
  flex-direction: column;
}

.contact-form__field--full {
  grid-column: 1 / -1;
}

.contact-form__label {
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--dark);
}

.contact-form__input,
.contact-form__textarea {
  padding: 10px 14px;
  border: 2px solid var(--dark);
  border-radius: 6px;
  font-family: var(--roboto);
  font-size: 16px;
  resize: vertical;
  transition: border-color 0.3s ease;
}

.contact-form__input:focus,
.contact-form__textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.contact-form__textarea {
  min-height: 160px;
}

.contact-form__checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-form__checkbox {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.contact-form__submit-btn {
  grid-column: 1 / -1;
  justify-self: start;
  padding: 12px 32px;
  border: none;
}

@media (max-width: 768px) {
  .contact-form-section {
    padding: 40px 0;
  }
  .contact-form__form {
    gap: 20px;
  }
  .contact-form__submit-btn {
    justify-self: center;
  }
}

@media (max-width: 480px) {
  .contact-form__checkbox-group {
    align-items: center;
  }
}
