.product-grid {
  width: min(1320px, calc(100vw - 96px));
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: none;
  gap: 16px;
  border: 0;
}

.product-grid > .product-card,
.product-card,
.product-card-tall,
.product-card-compact {
  grid-column: auto;
  grid-row: auto;
  width: 100%;
  height: 400px;
  min-height: 400px;
  padding: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 184px auto 1fr;
  align-content: start;
  align-items: start;
  column-gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, .5);
}

.product-card > span,
.product-card-compact > span {
  top: 16px;
  left: 16px;
  font-size: 20px;
}

.product-card img,
.product-card-tall img,
.product-card-compact img {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  height: 184px;
  max-height: 184px;
  margin: 0;
  padding: 10px;
  object-fit: contain;
  object-position: center;
  background: rgba(255, 255, 255, .66);
}

.product-card h3,
.product-card-compact h3 {
  grid-column: 1;
  grid-row: 2;
  min-height: 54px;
  margin: 16px 0 0;
  font-size: clamp(22px, 1.75vw, 27px);
  line-height: 1.02;
}

.product-card p,
.product-card-compact p {
  grid-column: 1;
  grid-row: 3;
  margin: 10px 0 0;
  font-size: 10px;
  line-height: 1.65;
}

.product-card:hover {
  transform: none;
}

.product-card:hover img {
  transform: none;
}

html.dg-motion-always .product-grid .product-card.dg-reveal-item,
html.dg-motion-always .product-grid .product-card.dg-reveal-item.dg-reveal-visible {
  opacity: 1 !important;
  transform: none !important;
  will-change: auto;
}

@media (max-width: 1080px) {
  .product-grid {
    width: min(900px, calc(100vw - 56px));
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .product-grid > .product-card,
  .product-card,
  .product-card-tall,
  .product-card-compact {
    height: 390px;
    min-height: 390px;
    grid-template-rows: 180px auto 1fr;
  }

  .product-card img,
  .product-card-tall img,
  .product-card-compact img {
    height: 180px;
    max-height: 180px;
  }
}

@media (max-width: 560px) {
  .product-grid {
    width: min(460px, calc(100vw - 28px));
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .product-grid > .product-card,
  .product-card,
  .product-card-tall,
  .product-card-compact {
    height: auto;
    min-height: 390px;
    padding: 18px;
    grid-template-rows: 200px auto 1fr;
  }

  .product-card img,
  .product-card-tall img,
  .product-card-compact img {
    height: 200px;
    max-height: 200px;
  }

  .product-card h3,
  .product-card-compact h3 {
    min-height: 0;
    margin-top: 17px;
    font-size: 27px;
  }

  .product-card p,
  .product-card-compact p {
    font-size: 11px;
  }
}

/* Mobile product catalogue: one focused card per swipe, with the next card
   intentionally peeking into view so the horizontal interaction is obvious. */
.products-intro-mobile { display: none; }

@media (max-width: 560px) {
  .products-intro-desktop { display: none; }
  .products-intro-mobile { display: block; }

  body.page-bandan .products .product-grid {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 18px 18px;
    display: flex;
    flex-flow: row nowrap;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    border: 0;
    scroll-snap-type: x mandatory;
    scroll-snap-stop: always;
    scroll-padding-inline: 18px;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  body.page-bandan .products .product-grid::-webkit-scrollbar {
    display: none;
  }

  body.page-bandan .products .product-card,
  body.page-bandan .products .product-card-tall,
  body.page-bandan .products .product-card-compact {
    flex: 0 0 min(322px, calc(100vw - 68px));
    width: auto;
    height: 390px;
    min-height: 390px;
    padding: 18px;
    display: grid;
    grid-column: auto;
    grid-row: auto;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 190px auto 1fr;
    align-content: start;
    align-items: start;
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }

  body.page-bandan .products .product-card:nth-child(n + 7) {
    display: none;
  }

  body.page-bandan .products .product-card > span,
  body.page-bandan .products .product-card-compact > span {
    top: 14px;
    left: 14px;
    font-size: 18px;
  }

  body.page-bandan .products .product-card img,
  body.page-bandan .products .product-card-tall img,
  body.page-bandan .products .product-card-compact img {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    height: 190px;
    max-height: 190px;
    margin: 0;
    padding: 10px;
    object-fit: contain;
    object-position: center;
  }

  body.page-bandan .products .product-card h3,
  body.page-bandan .products .product-card-compact h3 {
    grid-column: 1;
    grid-row: 2;
    min-height: 0;
    margin: 16px 0 0;
    font-size: 24px;
    line-height: 1.12;
  }

  body.page-bandan .products .product-card p,
  body.page-bandan .products .product-card-compact p {
    grid-column: 1;
    grid-row: 3;
    margin: 12px 0 0;
    font-size: 10px;
    line-height: 1.72;
  }
}
