.collection-wrap {
  width: min(100% - 48px, 1152px);
  margin-inline: auto;
}

.catalog, .product-overview { padding-block: 64px; }
.catalog h2, .product-summary h1, .detail-heading h2 {
  font: 700 clamp(3.5rem, 6vw, 5.5rem)/.8 Dongle, sans-serif;
  letter-spacing: -.015em;
}

.section-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-block: 22px 42px;
}
.section-links a, .featured-link, .catalog-link {
  border: 2px solid #1e2025;
  border-radius: 12px;
  padding: 7px 14px;
  font-weight: 700;
  background: #f8d438;
  color: #1e2025;
}
.section-links a:hover, .catalog-link:hover, .featured-link:hover { background: #2eaeed; }
.product-group + .product-group { margin-top: 42px; }
.product-group h3 {
  border-bottom: 2px solid #1e2025;
  margin-bottom: 17px;
  padding-bottom: 6px;
  font: 700 2.75rem/.85 Dongle, sans-serif;
}
.catalog-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; }
.catalog-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 2px solid #1e2025;
  border-radius: 20px;
  background: #fff;
  box-shadow: 3px 3px 0 #1e2025;
}
.catalog-photo {
  display: grid;
  place-items: center;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: #dff4fd;
  border-bottom: 2px solid #1e2025;
}
.catalog-photo img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.catalog-image-status { padding: 12px; color: #3e4850; text-align: center; }
.catalog-card-content { padding: 12px 14px 15px; }
.catalog-card h4 { font: 700 2rem/.86 Dongle, sans-serif; }
.catalog-card p { color: #3e4850; margin-top: 5px; font-size: .9rem; }
.catalog-link { display: inline-block; margin-top: 9px; font-size: .9rem; }

.product-overview { padding-top: 28px; }
.product-layout {
  display: grid;
  grid-template-columns: minmax(0,1.18fr) minmax(0,1fr);
  align-items: start;
  gap: clamp(24px, 4vw, 58px);
  margin-top: 15px;
}
.back-link { font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.product-gallery { display: grid; grid-template-columns: 66px minmax(0, 1fr); gap: 12px; }
.gallery-thumbs { display: flex; flex-direction: column; gap: 9px; }
.gallery-thumb {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 2px solid #1e2025;
  border-radius: 10px;
  padding: 3px;
  background: #fff;
  cursor: pointer;
}
.gallery-thumb[aria-pressed="true"] {
  border-color: #004a6b;
  box-shadow: 0 0 0 2px #2eaeed;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: contain; border-radius: 6px; }
.gallery-figure {
  overflow: hidden;
  border: 2px solid #1e2025;
  border-radius: 22px;
  background: #fff;
  box-shadow: 4px 4px 0 #1e2025;
}
.gallery-main { aspect-ratio: 1; padding: 12px; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-figure figcaption { padding: 9px 14px; border-top: 2px solid #1e2025; font-size: .9rem; }
.product-intro { margin: 12px 0 20px; font-size: 1.08rem; }
.variants { min-width: 0; border: 0; padding: 0; }
.variants legend { padding: 0; font-weight: 700; font-size: 1.2rem; }
.variant-selection { margin-block: 4px 11px; font-weight: 700; color: #005d80; }
.variant-group + .variant-group { margin-top: 13px; }
.variant-group h3 { font-weight: 700; margin-bottom: 6px; }
.variant-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.variant { position: relative; display: flex; cursor: pointer; min-width: 0; }
.variant input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.variant > span {
  width: 100%;
  display: grid;
  place-items: center;
  align-content: start;
  gap: 4px;
  padding: 4px;
  background: white;
  border: 1.5px solid #8c9399;
  border-radius: 10px;
  text-align: center;
  font-size: .76rem;
  font-weight: 600;
  line-height: 1.08;
}
.variant img { width: 100%; height: 37px; object-fit: contain; background: #fff; border-radius: 4px; }
.variant input:checked + span { border-color: #1e2025; box-shadow: 0 0 0 1px #1e2025; background: #f8d438; }
.variant input:focus-visible + span, .gallery-thumb:focus-visible, .section-links a:focus-visible {
  outline: 3px solid #005d80;
  outline-offset: 2px;
}
.featured-link { display: inline-flex; gap: 10px; margin-top: 19px; }
.detail-heading { padding-block: 25px 18px; }
#details { border-top: 2px solid #1e2025; }

@media (max-width: 1000px) {
  .catalog-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .collection-wrap { width: calc(100% - 32px); }
  .catalog { padding-block: 44px; }
  .product-layout { grid-template-columns: minmax(0,1fr); gap: 30px; }
  .product-gallery { grid-template-columns: minmax(0,1fr); }
  .gallery-thumbs { grid-row: 2; flex-direction: row; }
  .gallery-thumb { width: 54px; }
  .gallery-main { aspect-ratio: 4/3; }
}
@media (max-width: 540px) {
  .catalog-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .catalog-card h4 { font-size: 1.7rem; }
  .catalog-card-content { padding: 9px 10px 12px; }
  .product-summary h1 { font-size: 3.65rem; }
}
