/* Product grid; page shell (gutters, title) comes from main.css after site.css */

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(10px, 1.5vw, 20px);
  width: 100%;
  background: var(--color-bg);
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
}

.inventory-grid__item {
  display: contents;
}

.inventory-cell {
  position: relative;
  aspect-ratio: 1;
  display: block;
  background: var(--inventory-cell-bg);
  -webkit-tap-highlight-color: transparent;
  outline: none;
  text-decoration: none;
  color: inherit;
}

.inventory-cell__media {
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
}

.inventory-cell__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.inventory-cell__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35em;
  padding: 12px;
  text-align: center;
  background: var(--inventory-overlay-bg);
  color: var(--inventory-overlay-text);
  opacity: 0;
  pointer-events: none;
}

.inventory-cell:hover .inventory-cell__overlay,
.inventory-cell:focus-visible .inventory-cell__overlay {
  opacity: 1;
}

.inventory-cell__overlay .inventory-cell__price {
  opacity: 1;
}

.inventory-cell:focus-visible {
  z-index: 1;
}

.inventory-cell__name {
  font-weight: 600;
  font-size: clamp(0.95rem, 2.2vw, 1.1rem);
  line-height: 1.3;
}

.inventory-cell__price {
  font-weight: 300;
  font-size: clamp(0.75rem, 1.65vw, 0.9rem);
  opacity: 0.95;
}

/* Narrow viewports: 2 columns */
@media (max-width: 700px) {
  .inventory-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
