/* =========================================================
   GLOBAL RESPONSIVE
   Mobile first
========================================================= */

/* =========================================================
   BASE / MOBILE
   < 768px
========================================================= */

:root {
  --container-padding: 18px;
  --header-height: 64px;

  --space-4xl: 72px;
  --space-5xl: 96px;
}

body {
  font-size: 15px;
}

h1 {
  font-size: clamp(3rem, 15vw, 5rem);
}

h2 {
  font-size: clamp(2.2rem, 11vw, 4rem);
}

.section {
  padding-block: var(--space-4xl);
}

.section-large {
  padding-block: var(--space-5xl);
}

.section-header {
  align-items: flex-start;
  flex-direction: column;

  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.section-title {
  font-size: clamp(2rem, 10vw, 3.4rem);
}

/* Product Grid */

.product-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 12px;
}

.product-card-title {
  font-size: 0.84rem;
}

.product-card-category {
  font-size: 0.7rem;
}

.product-card-price {
  gap: 6px;
  font-size: 0.78rem;
}

/* Buttons */

.button {
  min-height: 44px;
  padding: 11px 18px;
}

/* Touch devices */

@media (hover: none) {
  .product-card:hover .product-image-cover {
    opacity: 1;
  }

  .product-card:hover .product-image-hover {
    opacity: 0;
  }

  .product-card:hover .product-card-media img {
    transform: none;
  }

  .media-hover:hover img {
    transform: none;
  }

  .button:hover {
    transform: none;
  }

  .link:hover {
    color: inherit;
  }

  .link:hover::after {
    transform: scaleX(0);
  }
}

/* Disable parallax on mobile */

[data-parallax] {
  transform: none;
  will-change: auto;
}

/* =========================================================
   SMALL MOBILE
   <= 380px
========================================================= */

@media (max-width: 380px) {
  :root {
    --container-padding: 14px;
  }

  .product-grid {
    gap: 28px 10px;
  }

  .product-card-title {
    font-size: 0.8rem;
  }

  .product-card-price {
    font-size: 0.74rem;
  }

  .badge {
    padding: 4px 7px;
    font-size: 0.6rem;
  }
}

/* =========================================================
   TABLET
   >= 768px
========================================================= */

@media (min-width: 768px) {
  :root {
    --container-padding: 28px;
    --header-height: 68px;

    --space-4xl: 88px;
    --space-5xl: 112px;
  }

  body {
    font-size: 16px;
  }

  .section-header {
    align-items: flex-end;
    flex-direction: row;

    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
  }

  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px 18px;
  }

  .product-card-title {
    font-size: 0.88rem;
  }

  .product-card-category {
    font-size: 0.74rem;
  }

  .product-card-price {
    font-size: 0.82rem;
  }

  [data-parallax] {
    transform: translate3d(
      0,
      var(--parallax-y, 0),
      0
    );

    will-change: transform;
  }
}

/* =========================================================
   LAPTOP
   >= 1024px
========================================================= */

@media (min-width: 1024px) {
  :root {
    --container-padding: 32px;
    --header-height: 72px;

    --space-4xl: 96px;
    --space-5xl: 128px;
  }

  .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 48px 20px;
  }

  .product-card-title {
    font-size: 0.9rem;
  }

  .product-card-price {
    font-size: 0.84rem;
  }
}

/* =========================================================
   DESKTOP
   >= 1280px
========================================================= */

@media (min-width: 1280px) {
  :root {
    --container-padding: 36px;
  }

  .product-grid {
    gap: 52px 24px;
  }
}

/* =========================================================
   LARGE DESKTOP
   >= 1440px
========================================================= */

@media (min-width: 1440px) {
  :root {
    --container-padding: 40px;
  }

  .product-grid {
    gap: 56px 26px;
  }
}

/* =========================================================
   ULTRAWIDE
   >= 1700px
========================================================= */

@media (min-width: 1700px) {
  :root {
    --container-width: 1680px;
    --container-padding: 48px;
  }

  .product-grid {
    gap: 64px 30px;
  }
}

/* =========================================================
   LANDSCAPE MOBILE
========================================================= */

@media (
  max-width: 900px
) and (
  orientation: landscape
) {
  :root {
    --header-height: 60px;
  }

  .section {
    padding-block: 64px;
  }

  .section-large {
    padding-block: 80px;
  }
}

/* =========================================================
   POINTER / DESKTOP INTERACTION
========================================================= */

@media (hover: hover) and (pointer: fine) {
  .product-card:hover .product-image-cover {
    opacity: 0;
  }

  .product-card:hover .product-image-hover {
    opacity: 1;
  }

  .product-card:hover .product-card-media img {
    transform: scale(1.018);
  }
}

/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
  [data-parallax] {
    transform: none !important;
    will-change: auto !important;
  }

  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .product-card-media img,
  .media img,
  .button,
  .link {
    transition: none !important;
  }
}