.shop-page {
  padding-block: clamp(24px, 4vw, 58px) clamp(44px, 7vw, 96px);
}

.shop-intro {
  margin-bottom: clamp(22px, 3.3vw, 46px);
  padding: clamp(22px, 4vw, 56px);
  border: 1px solid var(--sb-border);
  border-radius: clamp(16px, 2vw, 24px) clamp(30px, 4.4vw, 58px);
  background:
    radial-gradient(ellipse at 95% 0%, #e1e7d2b3, transparent 60%),
    linear-gradient(118deg, var(--sb-panel), #f6eddb);
}

.shop-kicker {
  margin-bottom: 9px;
  color: var(--rust);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.shop-intro h1 {
  max-width: 17ch;
  font-size: clamp(2.15rem, 6vw, 4.65rem);
  line-height: 1.04;
  text-wrap: balance;
}

.shop-summary {
  max-width: 56ch;
  margin-top: 14px;
  color: var(--muted);
  font-size: clamp(.98rem, 1.8vw, 1.11rem);
  line-height: 1.65;
}

.shop-index {
  margin-top: clamp(16px, 2.1vw, 28px);
}

.shop-index ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.shop-index li {
  min-width: 0;
}

.shop-index a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 7px 14px;
  border: 1px solid #c6ccb5;
  border-radius: 8px 15px 8px 15px;
  background-color: var(--paper);
  color: var(--sb-forest-dark);
  font-size: .8rem;
  font-weight: 800;
  line-height: 1.4;
  text-decoration: none;
}

.shop-index a:hover {
  border-color: var(--sb-forest);
  background-color: var(--sage);
  text-decoration: underline;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.9vw, 36px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.shop-card {
  display: flex;
  min-width: 0;
  scroll-margin-block-start: 10px;
  flex-direction: column;
  padding: clamp(8px, 1.2vw, 14px);
  border: 1px solid var(--sb-border);
  border-radius: 14px 30px 14px 30px;
  background-color: var(--sb-panel);
  box-shadow: var(--sb-soft-shadow);
}

.shop-card:target {
  border-color: var(--sb-forest);
  box-shadow: 0 0 0 2px var(--sage), var(--sb-soft-shadow);
}

.shop-photo {
  position: relative;
  display: block;
  border: 1px solid #ab92725c;
  border-radius: 8px 19px 8px 19px;
  background-color: #f0e4d5;
  color: var(--sb-forest-dark);
}

.shop-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  border-radius: inherit;
  object-fit: contain;
}

.shop-photo-hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid #cfc6ab;
  border-radius: 7px 12px 7px 12px;
  background-color: var(--paper);
  box-shadow: 0 2px 8px #2f261f30;
  font-size: .75rem;
  font-weight: 800;
  line-height: 1.2;
}

.shop-photo:hover .shop-photo-hint,
.shop-photo:focus-visible .shop-photo-hint {
  text-decoration: underline;
}

.shop-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(16px, 2.2vw, 28px) clamp(8px, 1.05vw, 15px) 10px;
}

.shop-card h2 {
  font-size: clamp(1.43rem, 2.5vw, 2.05rem);
  text-wrap: pretty;
}

.shop-description,
.shop-fulfillment {
  margin-top: 8px;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.shop-product-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.shop-product-photos a {
  display: block;
  width: 52px;
  height: 52px;
  padding: 2px;
  border: 1px solid var(--sb-border);
  border-radius: 7px 11px 7px 11px;
  background-color: var(--paper);
}

.shop-product-photos img {
  width: 100%;
  height: 100%;
  border-radius: 4px 8px 4px 8px;
  object-fit: cover;
}

.shop-photo:hover,
.shop-product-photos a:hover {
  border-color: var(--sb-forest);
}

.shop-price {
  margin-top: auto;
  padding-top: 16px;
  font-size: 1.15rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.shop-status {
  width: 100%;
  margin: auto 0 0;
  padding-top: 18px;
  color: var(--sb-forest-dark);
  font-size: .84rem;
  font-weight: 800;
}

.shop-action,
a.shop-related,
.shop-related a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

.shop-action {
  width: 100%;
  margin-top: 12px;
  padding-inline: clamp(12px, 2vw, 23px);
}

.shop-related {
  margin: clamp(22px, 4vw, 52px) 0 0;
}

.shop-inquiry {
  margin-top: clamp(36px, 6vw, 76px);
}

.shop-fulfillment-options {
  display: grid;
  min-inline-size: 0;
  gap: 7px;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
}

.shop-fulfillment-options legend {
  margin-bottom: 7px;
  padding: 0;
  color: var(--sb-forest-dark);
  font-size: .9rem;
  font-weight: 800;
}

.shop-fulfillment-option {
  display: flex;
  min-block-size: 44px;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--sb-border);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  font-size: .85rem;
  line-height: 1.4;
  cursor: pointer;
}

.shop-fulfillment-option:hover,
.shop-fulfillment-option:has(input:checked) {
  border-color: var(--sb-forest);
}

.shop-fulfillment-option:has(input:checked) {
  background: var(--sage);
}

.shop-fulfillment-option input[type="radio"] {
  inline-size: 1rem;
  block-size: 1rem;
  flex: none;
  margin: 0;
  padding: 0;
  accent-color: var(--sb-forest);
}

.shop-fulfillment-option strong {
  color: var(--sb-forest-dark);
  white-space: nowrap;
}

.shop-selected-piece {
  margin: 0 0 1rem;
  padding: 8px 12px;
  border-inline-start: 3px solid #798963;
  border-radius: 0 11px 11px 0;
  background: var(--sage);
  color: var(--sb-forest-dark);
  font-size: .82rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.shop-selected-piece:empty {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
}

.shop-viewer {
  width: min(680px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  padding: clamp(12px, 2.6vw, 28px);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--sb-border);
  border-radius: 14px 28px 14px 28px;
  background-color: var(--sb-panel);
  box-shadow: 0 20px 70px #1c261f55;
  color: var(--ink);
}

.shop-viewer::backdrop {
  background: #252f24db;
}

.shop-view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.shop-view-header h2 {
  min-width: 0;
  font-size: clamp(1.42rem, 3.2vw, 2.05rem);
  overflow-wrap: anywhere;
}

.shop-view-header form {
  flex-shrink: 0;
}

.shop-view-frame {
  display: grid;
  place-items: center;
  margin: 0;
  padding: clamp(6px, 1.4vw, 16px);
  border-radius: 9px 18px 9px 18px;
  background-color: #eee8d8;
}

.shop-view-frame img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(57vh, 620px);
  max-height: min(57dvh, 620px);
  border-radius: 6px 12px 6px 12px;
  object-fit: contain;
}

.shop-view-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.shop-view-header button,
.shop-view-controls button {
  min-height: 44px;
  padding: 7px 12px;
  border: 1px solid #b9c3a5;
  border-radius: 8px 15px 8px 15px;
  background-color: var(--sage);
  color: var(--sb-forest-dark);
  font-size: .8rem;
  font-weight: 800;
  line-height: 1.3;
  cursor: pointer;
}

.shop-view-header button:hover,
.shop-view-controls button:hover {
  border-color: var(--sb-forest);
  background-color: #dde5d1;
}

.shop-view-count,
.shop-view-caption {
  margin: 0;
  color: var(--muted);
  font-size: .81rem;
  line-height: 1.45;
  text-align: center;
}

.shop-view-count {
  padding-inline: 4px;
  font-variant-numeric: tabular-nums;
}

.shop-view-caption {
  margin-top: 10px;
}

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

@media (max-width: 559.98px) {
  .shop-grid { grid-template-columns: minmax(0, 1fr); }
  .shop-card-body { padding-inline: 10px; }
  .shop-view-header { gap: 8px; }
}

@media print {
  .shop-photo-hint,
  .shop-viewer { display: none; }

  .shop-card {
    break-inside: avoid;
    background: white;
    box-shadow: none;
  }
}
