body {
  background: url("BAK1.jpg") no-repeat center center fixed;
  background-size: cover;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to left, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 1));
  z-index: -1;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 40px 60px 20px;
  gap: 40px;
}

.hero-text {
  max-width: 58%;
  color: rgb(255, 119, 0);
}

.hero-text h1 {
  font-weight: 800;
  font-size: 60px;
  letter-spacing: 0.04em;
  word-spacing: 0.12em;
  margin: 0 0 16px;
  line-height: 1.15;
}

.hero-text h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.12em;
  word-spacing: 0.16em;
  color: #ffffff;
  margin: 0 0 28px;
}

.hero-text p {
  font-size: 18px;
  line-height: 1.85;
  letter-spacing: 0.02em;
  word-spacing: 0.08em;
  color: #ffffff;
  margin: 0 0 18px;
  max-width: 38em;
}

.products-title {
  text-align: right;
  font-size: 36px;
  color: #ffffff;
  font-weight: bold;
  margin-top: 40px;
  margin-bottom: 30px;
  position: absolute;
  right: 0;
  margin-right: 170px;
  scroll-margin-top: 110px;
}

.cards {
  position: relative;
  width: 300px;
  height: 300px;
  perspective: 1000px;
  margin-top: 110px;
  margin-right: 60px;
}

.card-wrapper {
  position: absolute;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: rotateCylinder 20s linear infinite;
}

.card-wrapper:hover {
  animation-play-state: paused;
}

.card {
  position: absolute;
  width: 180px;
  height: 200px;
  background-color: rgba(255, 255, 255, 0.8);
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  left: 60px;
  top: 40px;
  transform-origin: center center;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.cards.is-grid {
  width: min(420px, 100%);
  height: auto;
  perspective: none;
  display: grid;
  margin-top: 110px;
}

.cards.is-grid .card-wrapper {
  position: static;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  animation: none;
  transform: none;
  transform-style: flat;
}

.cards.is-grid .card {
  position: relative;
  left: auto;
  top: auto;
  width: 100%;
  height: 190px;
}

.card img {
  width: 100%;
  height: 70%;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
}

.card h3 {
  font-size: 16px;
  margin-top: 10px;
  color: #333;
}

@keyframes rotateCylinder {
  from {
    transform: rotateY(0deg);
  }
  to {
    transform: rotateY(360deg);
  }
}

@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    padding: 20px;
    gap: 40px;
  }

  .hero-text {
    max-width: 100%;
    text-align: center;
  }

  .hero-text h1 {
    font-size: 36px;
  }

  .hero-text h2 {
    font-size: 20px;
  }

  .hero-text p {
    font-size: 16px;
  }

  .products-title {
    position: static;
    text-align: center;
    margin: 30px auto 10px;
    font-size: 28px;
  }

  .cards {
    margin: 30px auto;
    width: 250px;
    height: 250px;
  }

  .cards.is-grid {
    width: min(420px, 100%);
    height: auto;
  }

  .card {
    width: 160px;
    height: 180px;
    left: 45px;
    top: 35px;
  }
}
