@use "../variables" as *;

.highlightsContainer {
  width: $containerWidth;
  margin: 0 auto;
  padding: 0;

  .products {
    gap: 1rem;

    .product {
      background-color: $hgProductBg;
      border-radius: 8px;
      padding: 1rem;
      text-align: center;
      display: flex;
      flex-direction: column;
      align-items: center;
      transition: transform 0.3s ease, box-shadow 0.3s ease;

      &:hover {
        transform: scale(1.05);
        box-shadow: 0 8px 16px $hgProductHoverShadow;
      }

      img {
        width: 100%;
        border-radius: 8px;
        transition: transform 0.3s ease;
      }

      .productTitle {
        margin: 0.5rem 0;
        font-size: 1rem;
        font-weight: bold;
      }

      .price {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;

        .oldPrice {
          text-decoration: line-through;
          color: $hgOldPriceColor;
        }

        .currentPrice {
          font-size: 1.2rem;
          font-weight: bold;
          color: $hgCurrentPriceColor;
        }
      }
    }

    .adBanner {
      grid-column: span 2;
      position: relative;
      border-radius: 8px;
      overflow: hidden;
      display: flex;
      align-items: center;
      transition: transform 0.3s ease, opacity 0.3s ease;

      &:hover {
        transform: scale(1.05) rotate(-3deg);
        opacity: 0.9;
      }

      img {
        width: 100%;
        height: 100%;
        object-fit: cover;
      }

      .adContent {
        position: absolute;
        left: 1rem;
        color: $hgAdContentColor;
        z-index: 2;

        h3 {
          font-size: 1.5rem;
          margin: 0;
        }

        p {
          margin: 0.5rem 0;
          font-size: 1.1rem;
        }

        .adButton {
          display: inline-block;
          margin-top: 0.5rem;
          padding: 0.5rem 1rem;
          background-color: $hgAdButtonBg;
          color: $hgAdButtonColor;
          border-radius: 4px;
          font-weight: bold;
          text-decoration: none;

          &:hover {
            background-color: $hgAdButtonHoverBg;
          }
        }
      }
    }
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .products {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    justify-content: center;
  }

  .adBanner {
    grid-column: span 2;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
  }
}
