.grid-categories {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  list-style: none;
  padding: 0;
}

.category {
  display: block;
  background: var(--stryx-panel);
  border: 1px solid var(--stryx-line);
  height: 350px;
  position: relative;
  overflow: hidden;
}

.category img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) brightness(0.55);
  transition: transform 0.3s;
}

.category:hover img {
  transform: scale(1.04);
}

.category span {
  position: absolute;
  bottom: 1.3rem;
  left: 1.3rem;
  right: 1.3rem;
}

.category small {
  color: #f3d430;
  letter-spacing: 0.14em;
  font-size: 0.65rem;
}

.category strong {
  display: block;
  font-size: 1.5rem;
  text-transform: uppercase;
}

.category i {
  font-style: normal;
  font-size: 0.78rem;
}

.products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  list-style: none;
  padding: 0;
}

.product {
  background: var(--stryx-panel);
  border: 1px solid #333;
  padding: 1.2rem;
  display: grid;
  gap: 0.8rem;
}

.product img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.product h2 {
  font-size: 1.25rem;
}

.product p {
  margin: 0;
}

.product .price {
  color: #f3d430;
  font-weight: 700;
  font-size: 1.2rem;
}

.product form {
  grid-template-columns: 1fr 1fr;
  align-items: end;
}

.product form button {
  grid-column: 1/-1;
}

@media (max-width: 850px) {
  .grid-categories {
    grid-template-columns: 1fr 1fr;
  }

  .products {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 500px) {
  .grid-categories,
  .products {
    grid-template-columns: 1fr;
  }

  .category {
    height: 280px;
  }
}

.category {
  border-color: #4b4939;
}

.product form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

.product form > input[type="hidden"] {
  display: none;
}

.product form > label {
  font-size: 0.85rem;
}

.product form > button {
  grid-column: 1/-1;
}

.product-detail-list {
  grid-template-columns: minmax(0, 650px);
  margin-top: 2rem;
}

.product-detail-list .product img {
  height: 420px;
  object-fit: contain;
}

.size-guidance {
  max-width: 700px;
  border: 1px solid #444;
  padding: 1.3rem;
  margin-top: 2rem;
}

.size-guidance p {
  margin-top: 1rem;
}

@media (max-width: 500px) {
  .product-detail-list .product img {
    height: 280px;
  }

  .product .product h2 {
    font-size: 1.1rem;
  }
}

.category {
  color: #f6f4ee;
  --stryx-muted: #e2ded4;
}

.photo-category {
  height: auto;
  aspect-ratio: 4 / 5;
  color-scheme: dark;
  background: #242424;
}

.photo-category img {
  filter: none;
}

.photo-category::after {
  content: "";
  position: absolute;
  inset: 38% 0 0;
  background: linear-gradient(transparent, #0b0b0bf5);
  pointer-events: none;
}

.photo-category span {
  z-index: 1;
}

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin-block: 1.5rem;
}

.photo-gallery a {
  display: block;
  border: 1px solid var(--stryx-line);
  background: var(--stryx-panel);
}

.photo-gallery img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
}

.gallery-preview {
  position: fixed;
  inset: 0;
  width: min(92vw, 56rem);
  max-height: 94vh;
  margin: auto;
  padding: 1rem;
  border: 1px solid var(--stryx-line);
  background: var(--stryx-panel);
  color: var(--stryx-text);
  text-align: center;
}

.gallery-preview::backdrop {
  background: #080808d9;
}

.gallery-preview button {
  display: block;
  margin-inline-start: auto;
  padding: 0.25rem 0.8rem;
}

.gallery-preview figure {
  margin: 0;
}

.gallery-preview img {
  margin: 0.5rem auto;
  max-height: 72vh;
  width: auto;
  max-width: 100%;
}

.product,
.photo-gallery .product {
  background: var(--stryx-panel);
  color: var(--stryx-text);
  border-color: var(--stryx-line);
}

.product input,
.product select {
  background: var(--stryx-raised);
  color: var(--stryx-text);
  border-color: var(--stryx-field-line);
  min-width: 0;
}

[data-theme="light"] .product .price {
  color: #68540b;
}

.photo-gallery .product {
  height: 100%;
  padding: 0.8rem;
  align-content: start;
}

.photo-gallery .product h2 a {
  display: inline;
  background: transparent;
  border: 0;
}

.photo-gallery .product img {
  height: auto;
  object-fit: contain;
}

.photo-gallery .product form input[type="number"],
.photo-gallery .product form select {
  width: 100%;
  padding-inline: 0.45rem;
}

.photo-gallery .product form button {
  padding-inline: 0.5rem;
}

.collection-banners a {
  display: grid;
  gap: 0.65rem;
  padding: 0.6rem;
  background: var(--stryx-panel);
  border: 1px solid var(--stryx-line);
}

.collection-banners img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #111;
}

.collection-banners strong {
  padding-inline: 0.25rem;
}

.themed-photo {
  background: var(--stryx-raised);
  border-color: var(--stryx-line);
}
