.shop-page {
  background: var(--paper);
}

.shop-hero,
.shop-catalog,
.shop-safety-note {
  max-width: calc(1180px + (var(--page-pad) * 2));
  margin: 0 auto;
  padding-inline: var(--page-pad);
}

.shop-hero {
  display: grid;
  gap: 18px;
  padding-block: clamp(42px, 6vw, 74px) 34px;
}

.shop-hero h1 {
  max-width: 920px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.98;
}

.shop-hero-copy {
  max-width: 730px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.shop-search {
  display: grid;
  gap: 9px;
  max-width: 820px;
  margin-top: 8px;
}

.shop-search label,
.shop-category-block > p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.shop-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.shop-search input {
  min-width: 0;
  min-height: 54px;
  border: 1px solid #9eaaa2;
  border-radius: var(--radius);
  padding: 12px 15px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 4px 14px rgba(36, 49, 63, 0.07);
}

.shop-search button,
.shop-message button {
  min-height: 54px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 11px 22px;
  color: var(--ink);
  background: var(--yellow);
  font-weight: 850;
  cursor: pointer;
}

.shop-search button:hover,
.shop-message button:hover {
  background: var(--yellow-hover);
}

.shop-category-block {
  display: grid;
  gap: 9px;
  margin-top: 4px;
}

.shop-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.shop-categories button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 15px;
  color: var(--ink);
  background: var(--surface);
  font-weight: 750;
  cursor: pointer;
}

.shop-categories button[aria-pressed="true"] {
  border-color: var(--ink);
  color: #fff;
  background: var(--ink);
}

.shop-category-count {
  color: inherit;
  opacity: 0.76;
}

.shop-catalog {
  padding-block: 38px 64px;
}

.shop-results-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.shop-results-heading h2 {
  margin-top: 6px;
  font-size: clamp(30px, 4vw, 48px);
}

.shop-status {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  text-align: right;
}

.shop-disclosure {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 18px 0;
  border-left: 4px solid var(--yellow);
  padding: 12px 14px;
  background: var(--cream);
}

.shop-disclosure[hidden] {
  display: none;
}

.shop-disclosure p {
  margin: 0;
  font-size: 14px;
}

.shop-disclosure a {
  flex: 0 0 auto;
  color: var(--cobalt-dark);
  font-size: 14px;
  font-weight: 800;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  min-height: 360px;
}

.shop-card {
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--surface);
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(36, 49, 63, 0.07);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.shop-card:hover,
.shop-card:focus-visible {
  border-color: var(--cobalt);
  box-shadow: 0 14px 30px rgba(36, 49, 63, 0.13);
  transform: translateY(-2px);
}

.shop-card-media {
  display: grid;
  min-height: 240px;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--mist);
}

.shop-card-media img {
  width: 100%;
  height: 240px;
  object-fit: contain;
  background: #fff;
}

.shop-image-fallback {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border: 2px solid #b8c8c1;
  border-radius: 50%;
  color: var(--cobalt-dark);
  font-size: 14px;
  font-weight: 850;
  text-align: center;
}

.shop-card-body {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 17px;
}

.shop-card-kicker,
.shop-card-merchant,
.shop-card-action {
  margin: 0;
}

.shop-card-kicker {
  color: var(--cobalt-dark);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.shop-card h3 {
  font-size: 21px;
  line-height: 1.2;
}

.shop-card-merchant {
  color: var(--muted);
  font-size: 14px;
}

.shop-card-price {
  margin: 4px 0 0;
  font-size: 18px;
  font-weight: 850;
}

.shop-card-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  color: var(--cobalt-dark);
  font-size: 14px;
  font-weight: 850;
}

.shop-card-action small {
  color: var(--muted);
  font-weight: 650;
}

.shop-message {
  display: grid;
  max-width: 680px;
  gap: 8px;
  justify-items: start;
  margin: 24px auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  background: var(--surface);
  text-align: left;
}

.shop-message[hidden] {
  display: none;
}

.shop-message p {
  margin: 0 0 8px;
  color: var(--muted);
}

.shop-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 30px;
}

.shop-pagination[hidden] {
  display: none;
}

.shop-pagination button {
  min-height: 44px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 9px 15px;
  color: var(--ink);
  background: var(--surface);
  font-weight: 800;
  cursor: pointer;
}

.shop-pagination button:disabled {
  border-color: var(--line);
  color: var(--muted);
  cursor: not-allowed;
}

.shop-safety-note {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
  gap: 32px;
  align-items: end;
  margin-bottom: 70px;
  padding-block: 30px;
  border-block: 1px solid var(--line);
}

.shop-safety-note h2 {
  margin-top: 7px;
  font-size: clamp(29px, 4vw, 46px);
}

.shop-safety-note > p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 920px) {
  .shop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shop-safety-note {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .shop-page .site-header {
    align-items: center;
  }

  .shop-page .nav a:not(.nav-shop):not(.nav-cta) {
    display: none;
  }

  .shop-page .nav-shop {
    display: inline-flex;
  }

  .shop-hero {
    gap: 15px;
    padding-block: 28px 20px;
  }

  .shop-hero h1 {
    font-size: 42px;
  }

  .shop-search-row {
    grid-template-columns: 1fr;
  }

  .shop-search button {
    width: 100%;
  }

  .shop-categories {
    flex-wrap: nowrap;
    margin-inline: calc(var(--page-pad) * -1);
    padding-inline: var(--page-pad);
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .shop-categories button {
    flex: 0 0 auto;
  }

  .shop-results-heading,
  .shop-disclosure {
    align-items: start;
    flex-direction: column;
  }

  .shop-status {
    text-align: left;
  }

  .shop-grid {
    grid-template-columns: 1fr;
    min-height: 260px;
  }

  .shop-card-media,
  .shop-card-media img {
    min-height: 210px;
    height: 210px;
  }

  .shop-pagination {
    justify-content: space-between;
    gap: 10px;
  }

  .shop-pagination span {
    text-align: center;
  }
}
