.products h2 { text-wrap: balance; }
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(.7rem, 2.4vw, 1.4rem);
  margin-top: 1.4rem;
}
.product-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: .75rem;
  padding: clamp(1rem, 3vw, 1.7rem);
  border: 1px solid var(--line);
  border-radius: .45rem;
  background: var(--paper);
  color: var(--muted);
}
.product-zoom {
  display: grid;
  justify-items: center;
  justify-self: center;
  width: min(100%, clamp(8.75rem, 20vw, 12rem));
  border-radius: .4rem;
  cursor: zoom-in;
  text-decoration: none;
}
.product-zoom::after {
  content: "+" / "";
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--accent, var(--gold));
  font-size: 1.15rem;
  line-height: 1;
}
.product-zoom:focus-visible { outline: none; }
.product-zoom:focus-visible::after {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
.product-photo {
  width: 100%;
  height: auto;
  transform: scale(var(--photo-zoom, 1))
    translate(var(--photo-x, 0%), var(--photo-y, 0%))
    scale(var(--photo-scale, 1));
  filter: drop-shadow(.16rem .28rem .22rem rgb(66 45 33 / .2))
    drop-shadow(.32rem .42rem .54rem rgb(66 45 33 / .12));
}
/* Rééquilibre la silhouette visible en tenant compte des marges transparentes. */
.product-photo-hydra-repair { --photo-y: .4%; --photo-scale: .76; }
.product-photo-dna-protect { --photo-y: -3%; --photo-scale: 1.08; }
.product-photo-sun-stick { --photo-x: -11.3%; --photo-y: -9.9%; --photo-scale: 1.2; }
.product-photo-ha-boost { --photo-y: -9.4%; --photo-scale: 1.13; }
.product-card h3 {
  margin: 0;
  color: var(--ink);
  font: 600 clamp(1.65rem, 2.55vw, 2.15rem)/1.12 var(--title, var(--display));
  overflow-wrap: anywhere;
}
.product-format {
  margin-top: .3rem;
  color: var(--accent, var(--gold));
  font-size: .875rem;
  font-weight: 700;
}
.product-relevance {
  display: flex;
  align-items: center;
  min-block-size: 3.25rem;
  padding: .55rem .7rem;
  border: 1px solid #e2d2bf;
  border-radius: .35rem;
  background: #f1e5d6;
  color: #8a4c38;
  font-weight: 600;
  line-height: 1.4;
}

.product-dialog {
  position: fixed;
  inset: 0;
  width: min(38rem, calc(100% - 1.5rem));
  max-width: none;
  max-height: calc(100% - 1.5rem);
  margin: auto;
  padding: clamp(1rem, 4vw, 2rem);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: .8rem;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1rem 3rem rgb(40 27 18 / .2);
}
.product-dialog::backdrop { background: rgb(40 27 18 / .55); }
.product-dialog h2 {
  margin: 0;
  padding-inline-end: 2.5rem;
  font: 600 clamp(1.8rem, 5vw, 2.65rem)/1.05 var(--title, var(--display));
}
.product-dialog-close {
  position: absolute;
  inset: .6rem .6rem auto auto;
  z-index: 1;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
}
.product-photo-stage { display: grid; justify-items: center; overflow: hidden; }
.product-photo-stage .product-photo {
  width: min(100%, 32rem, 70vh);
  width: min(100%, 32rem, 70dvh);
}

@media (hover: hover) and (pointer: fine) {
  .product-card:hover .product-photo { --photo-zoom: 1.16; }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .product-card .product-photo { transition: transform 180ms ease-out; }
}
@media (max-width: 42rem) {
  .product-grid { grid-template-columns: minmax(0, 1fr); }
}
@supports (grid-template-rows: subgrid) {
  @media (width > 42rem) {
    .product-card {
      grid-row: span 4;
      grid-template-rows: subgrid;
    }
  }
}
