@view-transition {
  navigation: auto;
}

body {
  font-family: system-ui, sans-serif;
  padding: 2rem;
  background: #0f3460;
  color: #eee;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 700px;
  padding: 2rem;
  font-family: system-ui, sans-serif;
}

.card {
  /* NO view-transition-name here - on purpose */
  background: #1a1a2e;
  border-radius: 8px;
  overflow: hidden;
  color: #eee;
  text-decoration: none;
}

.card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.card span {
  display: block;
  padding: 0.5rem;
  font-size: 0.9rem;
}

.product-hero {
  /* Again - NO view-transition-name in CSS */
  max-width: 600px;
  background: #1a1a2e;
  border-radius: 8px;
  overflow: hidden;
}

.product-hero img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.product-hero h2,
.product-hero p {
  padding: 0 1rem;
}

a {
  color: #e94560;
}

::view-transition-old(*.card),
::view-transition-new(*.card) {
  object-fit: cover;
}

::view-transition-group(*.card) {
  animation-duration: 0.35s;
}