:root {
  --page: #ffffff;
  --ink: #111111;
  --tile: 326px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.018) 1px, transparent 1px) 0 0 / 46px 46px,
    var(--page);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.back-button {
  position: fixed;
  z-index: 5;
  top: 19px;
  left: 18px;
  display: block;
  width: 70px;
  height: 30px;
  outline-offset: 7px;
}

.back-button img {
  position: absolute;
  inset: 0;
  display: block;
  width: 70px;
  height: auto;
  transition: opacity 140ms ease;
}

.back-hover {
  opacity: 0;
}

.back-button:hover .back-hover,
.back-button:focus-visible .back-hover {
  opacity: 1;
}

.back-button:hover .back-default,
.back-button:focus-visible .back-default {
  opacity: 0;
}

.products {
  width: min(100%, 1250px);
  margin: 0 auto;
  padding: 100px 16px 64px;
}

.store {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: stretch;
}

.product-row {
  display: flex;
  justify-content: center;
  gap: 32px;
  width: 100%;
}

.shop-item {
  position: relative;
  display: flex;
  width: var(--tile);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.item-thumbnail {
  position: relative;
  width: 100%;
}

.item-thumbnail img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
}

.item-default-image,
.item-hover-image {
  border: 0;
}

.item-hover-image {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 120ms ease;
}

.shop-item:hover .item-hover-image,
.shop-item:focus-within .item-hover-image {
  opacity: 1;
}

.item-link {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  cursor: default;
  outline-offset: 6px;
}

.sold-out-image {
  display: block;
  width: 60px;
  max-width: 22%;
  height: auto;
  margin-top: 40px;
  margin-bottom: 40px;
}

.item-meta {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 760px) {
  .products {
    padding-top: 86px;
  }

  .product-row {
    flex-wrap: wrap;
    gap: 15px;
  }

  .shop-item {
    width: min(100%, var(--tile));
  }
}

@media (max-width: 479px) {
  :root {
    --tile: 100%;
  }

  .products {
    padding-inline: 0;
  }

  .back-button,
  .back-button img {
    width: 64px;
  }
}
