.category-grid { align-items: start; }

.category-panel { position: relative; min-width: 0; }

.category-panel summary {
  display: block;
  list-style: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.category-panel summary::-webkit-details-marker { display: none; }
.category-panel summary:focus-visible { outline: 2px solid #171717; outline-offset: 4px; }

.category-title {
  display: block;
  padding-right: 28px;
  font-size: clamp(32px, 4.5vw, 62px);
}

.category-description {
  display: block;
  margin-top: 8px;
  width: min(100%, 22ch);
  font-size: clamp(13px, 1.25vw, 17px);
  font-weight: 660;
}

.category-marker {
  position: absolute;
  top: clamp(20px, 2.8vw, 40px);
  right: clamp(18px, 2.4vw, 34px);
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
}

.category-marker::before,
.category-marker::after {
  content: "";
  grid-area: 1 / 1;
  background: currentColor;
  border-radius: 1px;
}

.category-marker::before { width: 16px; height: 2px; }
.category-marker::after { width: 2px; height: 16px; }
.category-panel[open] .category-marker::after { opacity: 0; }

.category-panel[open] .category-description,
.category-panel[open] summary > img { visibility: hidden; }

.category-examples {
  --peek-size: clamp(115px, 13vw, 204px);
  position: absolute;
  inset: clamp(76px, 8.6vw, 129px) clamp(10px, 1.15vw, 19px) clamp(18px, 4.5vw, 64px);
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: clamp(4px, .7vw, 12px);
  list-style: none;
  color: #171717;
  pointer-events: none;
}

.food-panel .category-examples { color: #fffaf3; }

.category-examples li {
  min-width: 0;
  display: grid;
  grid-template-rows: var(--peek-size) minmax(2.4em, auto);
  align-items: end;
  justify-items: center;
  gap: 7px;
  font-size: clamp(12px, 1.12vw, 16px);
  font-weight: 760;
  text-align: center;
  line-height: 1.15;
}

.category-examples img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 10px 8px #45201635);
}

.category-examples span { align-self: start; }

.category-panel[open] .category-examples li {
  --origin-shift: 0px;
  --origin-angle: 0deg;
  animation: product-peek .46s cubic-bezier(.15,.7,.25,1) both;
}

.category-panel[open] .category-examples li:first-child {
  --origin-shift: 30px;
  --origin-angle: 8deg;
}
.category-panel[open] .category-examples li:nth-child(2) { animation-delay: 45ms; }
.category-panel[open] .category-examples li:nth-child(3) {
  --origin-shift: -30px;
  --origin-angle: -8deg;
  animation-delay: 90ms;
}

@keyframes product-peek {
  from { opacity: 0; transform: translate(var(--origin-shift), 16px) rotate(var(--origin-angle)) scale(.9); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 680px) {
  .category-description { width: 16ch; }
  .category-examples { --peek-size: 109px; inset: 72px 11px 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .category-panel[open] .category-examples li { animation: none; }
}
