/* Small overrides on top of Pico.css */

.product-grid,
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.product-card,
.category-card {
  margin: 0;
}

.product-card a,
.category-card a {
  text-decoration: none;
  color: inherit;
}

.product-card img,
.category-card img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
  border-radius: var(--pico-border-radius);
  background: var(--pico-card-background-color);
}

.product-card h3,
.category-card h3 {
  margin: 0.5rem 0 0.25rem;
  font-size: 1.1rem;
}

.hero {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: var(--pico-border-radius);
  margin-bottom: 1rem;
}

/* Product gallery */
.gallery #gallery-main {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  background: var(--pico-card-background-color);
  border-radius: var(--pico-border-radius);
  display: block;
}

.thumbnails {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.thumb {
  width: 90px;
  height: 68px;
  object-fit: cover;
  cursor: pointer;
  border-radius: var(--pico-border-radius);
  border: 2px solid transparent;
  flex: 0 0 auto;
}

.thumb:hover,
.thumb.is-active {
  border-color: var(--pico-primary);
}

/* Videos */
.videos video {
  width: 100%;
  margin-top: 1rem;
  border-radius: var(--pico-border-radius);
  background: #000;
}

/* Filters on the all-products page */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin: 1rem 0 1.5rem;
  padding: 1rem;
  background: var(--pico-card-background-color);
  border-radius: var(--pico-border-radius);
}

.filters input[type="search"] {
  flex: 1 1 240px;
  margin: 0;
}

.filters fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.filters fieldset legend {
  font-weight: bold;
  padding: 0;
  margin-right: 0.5rem;
}

.filters label {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  cursor: pointer;
}

.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--pico-muted-color);
}

/* Prose adjustments inside descriptions */
.prose {
  margin: 1.5rem 0;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--pico-border-radius);
}
