.product-thumb {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.image-placeholder {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 1px dashed #d8d2ca;
  border-radius: 10px;
  color: var(--muted);
  font-size: 11px;
}

.product-name-link {
  font-weight: 700;
  text-decoration: none;
}

.product-name-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.pagination-summary {
  color: var(--muted);
  margin-right: 8px;
}

.page-number {
  display: grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid #d8d2ca;
  border-radius: 9px;
  background: #fff;
  text-decoration: none;
}

.page-number.current {
  background: var(--nav);
  border-color: var(--nav);
  color: #fff;
  font-weight: 800;
}

.page-gap {
  color: var(--muted);
  padding: 0 4px;
}

.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
}

.image-gallery a {
  display: grid;
  gap: 8px;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: #faf9f7;
}

.image-gallery img {
  width: 100%;
  height: 160px;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
}

.image-gallery span {
  font-size: 11px;
  color: var(--muted);
}

.api-field-list {
  display: grid;
}

.api-field-list article {
  display: grid;
  grid-template-columns: minmax(150px, 220px) 1fr;
  gap: 18px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.api-field-list article:first-child {
  border-top: 0;
}

.api-field-list pre {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #4e4942;
}

.product-detail-layout {
  display: grid;
  grid-template-columns: minmax(210px, 260px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.product-section-nav {
  position: sticky;
  top: 18px;
  display: grid;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.product-section-nav > strong { padding: 8px 10px 12px; }
.product-section-nav a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--muted); font-size: 13px; }
.product-section-nav a:hover { background: #f4f1ec; color: var(--text); }
.section-dot { width: 8px; height: 8px; border-radius: 50%; background: #b9b4ad; flex: 0 0 auto; }
.section-dot.available { background: #2c7a5b; }
.section-dot.limited { background: #b67a25; }
.section-dot.unavailable { background: #9b5d5d; }
.product-sections { min-width: 0; display: grid; gap: 18px; }
.product-section { scroll-margin-top: 18px; }
.section-status { padding: 6px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; background: #ece9e4; color: #625c54; }
.section-status.available { background: #e4f3ec; color: #216247; }
.section-status.limited { background: #fff0d8; color: #8b5d18; }
.section-status.unavailable { background: #f7e5e5; color: #824747; }
.section-note { margin: 0 0 16px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.detail-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.detail-field-grid article { display: grid; align-content: start; gap: 5px; min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #faf9f7; }
.detail-field-grid article.wide { grid-column: 1 / -1; }
.detail-field-grid span { color: var(--muted); font-size: 12px; }
.detail-field-grid strong { overflow-wrap: anywhere; }
.detail-field-grid small { color: #918a81; font: 10px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.detail-field-grid pre { margin: 0; max-height: 360px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color: #4e4942; }

@media (max-width: 1100px) {
  .product-detail-layout { grid-template-columns: 1fr; }
  .product-section-nav { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-section-nav > strong { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .api-field-list article {
    grid-template-columns: 1fr;
    gap: 7px;
  }
  .product-section-nav { grid-template-columns: 1fr; }
  .product-section-nav > strong { grid-column: auto; }
  .detail-field-grid { grid-template-columns: 1fr; }
  .detail-field-grid article.wide { grid-column: auto; }
}
