.products-page-main {
  min-height: 100svh;
  padding: 96px 24px 120px;
}

.products-page-heading {
  width: var(--content-width);
  margin: 0 auto 62px;
  text-align: center;
}

.products-page-heading p {
  margin: 0;
  color: var(--sand);
  font-family: "Noto Serif JP", "Yu Mincho", serif;
  font-size: 60px;
  font-weight: 300;
  letter-spacing: 0.14em;
  line-height: 1.2;
}

.products-page-heading h1 {
  margin: 18px 0 20px;
  font-family: "Noto Serif JP", "Yu Mincho", serif;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.26em;
}

.products-page-heading span {
  font-size: 15px;
  letter-spacing: 0.08em;
}

.product-filters {
  display: flex;
  width: var(--content-width);
  margin: -22px auto 48px;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.product-filters label {
  display: block;
  cursor: pointer;
}

.product-filters input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.product-filters span {
  display: grid;
  min-width: 128px;
  min-height: 44px;
  padding: 8px 18px;
  border: 1px solid var(--sand);
  place-items: center;
  background: rgba(255, 255, 255, 0.62);
  font-family: "Noto Serif JP", "Yu Mincho", serif;
  font-size: 14px;
  letter-spacing: 0.1em;
  transition: color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.product-filters input:checked + span {
  color: #fff;
  background: var(--ink);
  box-shadow: 0 7px 18px rgba(53, 53, 53, 0.12);
}

.product-filters input:focus-visible + span {
  outline: 2px solid var(--gold-deep, #b08a3c);
  outline-offset: 2px;
}

.products-page-grid {
  display: grid;
  width: var(--content-width);
  margin: 0 auto;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 52px 18px;
}

.order-gallery-item {
  opacity: 0;
  translate: 0 18px;
  animation: productPageReveal 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--gallery-delay, 0s);
}

.order-gallery-card {
  position: relative;
  display: grid;
  width: 100%;
  margin: 0;
  overflow: hidden;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  aspect-ratio: 1 / 1.34;
  border-radius: 5px;
  background: #c8baa9;
  box-shadow: 0 12px 28px rgba(53, 53, 53, 0.07);
}

.order-gallery-pair-image {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
}

.order-gallery-pair-image + .order-gallery-pair-image {
  border-left: 1px solid rgba(255, 255, 255, 0.62);
}

.order-gallery-pair-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.6s ease, opacity 0.6s ease, transform 0.6s ease;
}

.order-gallery-card:hover .order-gallery-pair-image img {
  transform: scale(1.035);
}

.order-gallery-pair-image span {
  position: absolute;
  left: 8px;
  bottom: 8px;
  display: grid;
  min-width: 62px;
  min-height: 24px;
  padding: 3px 8px;
  place-items: center;
  color: #fff;
  background: rgba(53, 53, 53, 0.64);
  font-family: "Noto Serif JP", "Yu Mincho", serif;
  font-size: 11px;
  letter-spacing: 0.14em;
  line-height: 1;
}

.products-load-more {
  display: block;
  width: min(330px, 90%);
  min-height: 60px;
  margin: 64px auto 0;
  border: 1px solid var(--sand);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  font-family: "Noto Serif JP", "Yu Mincho", serif;
  font-size: 16px;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: color 0.35s ease, background 0.35s ease, box-shadow 0.35s ease;
}

.products-load-more:hover,
.products-load-more:focus-visible {
  color: #fff;
  background: var(--ink);
  box-shadow: 0 12px 26px rgba(53, 53, 53, 0.13);
}

.products-load-more[hidden] {
  display: none;
}

.product-error {
  grid-column: 1 / -1;
  text-align: center;
}

@keyframes productPageReveal {
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@media (max-width: 1024px) {
  .products-page-grid {
    width: 82vw;
  }
}

@media (max-width: 700px) {
  .products-page-main {
    padding: 82px 18px 86px;
  }

  .products-page-heading {
    width: 100%;
    margin-bottom: 42px;
  }

  .products-page-heading p {
    font-size: 42px;
    letter-spacing: 0.08em;
  }

  .products-page-heading h1 {
    font-size: 18px;
  }

  .products-page-heading span {
    font-size: 13px;
    line-height: 1.8;
  }

  .product-filters {
    display: grid;
    width: 100%;
    margin: -12px auto 34px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .product-filters span {
    min-width: 0;
    min-height: 42px;
    padding: 7px 10px;
    font-size: 13px;
  }

  .products-page-grid {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 38px 12px;
  }

  .order-gallery-card {
    aspect-ratio: 1 / 1.42;
  }

  .order-gallery-pair-image span {
    min-width: 52px;
    min-height: 22px;
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .order-gallery-item {
    opacity: 1;
    translate: none;
    animation: none;
  }
}
