html {
  scrollbar-gutter: stable;
}

.catalog-hero {
  padding: 34px 9vw 22px;
  background: #f4f6f7;
}

.catalog-hero h1 {
  margin: 0;
  font-size: clamp(28px, 3.6vw, 46px);
  line-height: 1.15;
  letter-spacing: -.025em;
}

.catalog-tools {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
}

.catalog-tools input,
.catalog-mobile-filter select {
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid #cadbe7;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.catalog-tools input {
  width: min(100%, 440px);
}

.catalog-tools span {
  flex: none;
  color: #546b7c;
  font-size: 12px;
  white-space: nowrap;
}

.catalog-search-hint {
  margin: 6px 0 0;
  color: #546b7c;
  font-size: 12px;
}

.catalog-mobile-filter {
  display: none;
}

.catalog-active {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.catalog-active[hidden] {
  display: none;
}

.catalog-active button,
.catalog-empty-action {
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid #cadbe7;
  border-radius: 16px;
  background: #fff;
  color: #164465;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.catalog-active button:hover,
.catalog-empty-action:hover {
  background: #edf5fb;
}

.catalog-body {
  display: grid;
  grid-template-columns: 174px minmax(0, 1fr);
  align-items: start;
  gap: 28px;
  padding: 28px 9vw 85px;
  scroll-margin-top: 78px;
}

.filters {
  position: sticky;
  top: 100px;
  display: grid;
  gap: 5px;
  max-height: calc(100dvh - 116px);
  overflow-y: auto;
}

.filters button {
  padding: 10px;
  border-radius: 4px;
  color: #515d66;
  font-size: 13px;
  text-align: left;
}

.filters:not(:has([aria-current="location"])) button.active,
.filters button[aria-current="location"],
.filters button:hover {
  background: #eaf2f7;
  color: #1262a3;
}

.catalog-results {
  display: grid;
  gap: 34px;
}

.catalog-group-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px 12px;
  margin-bottom: 12px;
}

.catalog-group-heading h2 {
  margin: 0;
  font-size: clamp(17px, 2vw, 22px);
}

.catalog-group-count {
  color: #546b7c;
  font-size: 12px;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.product {
  min-width: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #f5f6f7;
}

.product-copy {
  display: grid;
  gap: 7px;
  padding: 16px;
}

.product small {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product small {
  color: var(--blue);
  font-size: 11px;
  line-height: 1.5;
}

.product h3 {
  display: -webkit-box;
  height: 2.64em;
  margin: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  font-size: 17px;
  line-height: 1.32;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-preview {
  display: grid;
  gap: 2px;
  min-width: 0;
  margin: 0;
  color: #345568;
  font-size: 12px;
  line-height: 1.4;
}

.product-preview-label {
  color: var(--muted);
  font-size: 11px;
}

.product-preview-value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-wrap: pretty;
}

.product-summary {
  display: grid;
  align-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 48px;
}

.product-summary:has(.product-color-picker:not([hidden])) .product-preview:not([data-dimension]) {
  display: none;
}

.product-summary .product-color-picker:not([hidden]) {
  max-width: 100%;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.product-color-picker:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px;
}

.product-swatch {
  display: grid;
  flex: none;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
}

.product-swatch::before {
  width: 22px;
  height: 22px;
  border: 1px solid #18263538;
  border-radius: 50%;
  background: var(--swatch);
  content: "";
}

.product-swatch[aria-pressed="true"] {
  border-color: var(--blue);
}

.product-swatch:hover {
  background: #e9eff4;
}

.product-swatch:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}

.product-color-label {
  margin-inline-start: 5px;
  color: #345568;
  font-size: 12px;
  white-space: nowrap;
}

.product-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin-top: 3px;
}

.product-actions :is(button, a) {
  display: grid;
  place-items: center;
  min-height: 40px;
  padding: 3px 0;
  border-radius: 7px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
}

.product-actions button {
  border: 1px solid #d4e3ee;
  background: #fff;
}

.product-actions :is(button, a):hover {
  background: #e8f1f8;
}

.catalog-empty {
  color: #546b7c;
}

@media (max-width: 800px) {
  .catalog-hero { padding: 23px 6vw 15px; }
  .catalog-tools input { flex: 1; font-size: 16px; }
  .catalog-mobile-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    color: #345568;
    font-size: 13px;
  }

  .catalog-mobile-filter select {
    max-width: 100%;
    padding: 6px 10px;
  }

  .catalog-body { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 15px 6vw 60px; }
  .filters { display: none; }
  .catalog-results { gap: 24px; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-copy { padding: 11px; }
  .product h3 { font-size: 14px; }
}


.catalog-lines {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.catalog-lines button {
  padding: 7px 13px;
  border: 1px solid #cadbe7;
  border-radius: 24px;
  background: #fff;
  color: #164465;
  font-size: 14px;
}

.catalog-lines button:hover {
  border-color: var(--blue);
}

.catalog-lines button.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.product-media {
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  aspect-ratio: 4 / 3;
  margin: 0;
  padding: clamp(10px, 1.6vw, 24px);
  overflow: hidden;
  background: #f1f3f4;
}

.product-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.product .product-media img {
  mask: var(--product-photo-mask, none) center / contain no-repeat;
}

.product-media img[data-photo-frame="center-band"] {
  height: auto;
  aspect-ratio: 800 / 410;
  object-fit: cover;
  object-position: center 54.6%;
}

.product-material {
  margin: 0;
  color: #516878;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.product-material[hidden],
.product-media img[hidden] {
  display: none;
}

.product-specs {
  display: grid;
  grid-template-columns: fit-content(32%) minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0;
  color: #164465;
  font-size: 14px;
  line-height: 1.6;
}

.product-specs dt {
  color: var(--muted);
}

.product-specs dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.product-specs .product-dimension {
  white-space: pre-line;
  font-variant-numeric: tabular-nums;
}

.product-reports {
  margin-top: 18px;
  color: #164465;
  font-size: 12px;
}

.product-reports summary {
  cursor: pointer;
}

.product-reports ul {
  display: grid;
  gap: 6px;
  margin: 9px 0 0;
  padding: 0;
  list-style: none;
}

.product-reports li {
  display: flex;
  align-items: center;
  gap: 9px;
}

.product-reports li span {
  min-width: 32px;
}

.product-reports a {
  color: var(--blue);
  text-decoration: underline;
}

.product-reports a:hover {
  text-decoration: underline;
}


html:has(.catalog-dialog[open]) {
  overflow: hidden;
}

.catalog-dialog {
  width: min(520px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  padding: 0;
  border: 1px solid #e2eaf0;
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 24px 70px #11263638;
}

.catalog-dialog::backdrop {
  background: #11263670;
}

.product-detail {
  --detail-padding: clamp(14px, 3vw, 26px);
  width: min(760px, calc(100% - 28px));
  height: min(560px, calc(100dvh - 28px));
  overflow: hidden;
}

.catalog-dialog[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.product-detail-heading,
.product-detail-footer {
  padding: 14px var(--detail-padding);
}

.product-detail-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  border-bottom: 1px solid #e2eaf0;
}

.product-detail-category {
  margin: 0 0 5px;
  color: var(--blue);
  font-size: 12px;
}

.product-detail-heading h2 {
  margin: 0;
  font-size: clamp(19px, 3vw, 26px);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.product-detail-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-content: start;
  gap: 20px;
  padding: var(--detail-padding);
  overflow: auto;
  overscroll-behavior: contain;
}

.product-detail-body .product-media {
  border-radius: 10px;
}

.product-detail-info h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.product-detail-info .product-color-picker {
  margin-bottom: 16px;
}

.product-detail-info .product-color-label {
  font-size: 13px;
}

.product-detail-info .product-color-label::before {
  content: "颜色 · ";
}

html[lang="en"] .product-detail-info .product-color-label::before {
  content: "Color · ";
}

.product-detail-variants:not([hidden]) {
  display: grid;
  gap: 5px;
  margin-bottom: 16px;
  color: #344b5d;
  font-size: 13px;
}

.product-detail-variants select {
  width: 100%;
  min-width: 0;
  padding: 8px;
  border: 1px solid #cadbe7;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.product-detail-footer {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid #e2eaf0;
}

@media (max-width: 580px) {
  .product-detail-body {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: max-content;
    gap: 14px;
  }

  .product-detail-variants select {
    font-size: 16px;
  }
}

.inquiry-content {
  padding: clamp(18px, 4vw, 30px);
}

.inquiry-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.inquiry-heading h2 {
  margin: 8px 0 0;
  font-size: 26px;
}

:is(.inquiry-close, .product-detail-close) {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #edf2f5;
  color: #164465;
  font-size: 24px;
  line-height: 1;
}

:is(.inquiry-close, .product-detail-close):hover {
  background: #dce9f3;
}

.inquiry-form {
  display: grid;
  gap: 12px;
}

.inquiry-form :is(input, textarea) {
  width: 100%;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #d8e2ea;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}

.inquiry-form textarea {
  resize: vertical;
}

.inquiry-note,
.inquiry-status {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.inquiry-status {
  padding: 8px 10px;
  border-radius: 6px;
  background: #edf5fb;
  color: #164465;
}

.inquiry-form .primary {
  justify-self: start;
}

@media (max-width: 440px) {
  .inquiry-form :is(input, textarea) {
    font-size: 16px;
  }
}

.product-photo-gallery {
  margin-top: 18px;
  color: var(--blue);
  font-size: 13px;
}

.product-photo-gallery summary {
  cursor: pointer;
}

.product-photo-gallery ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
  gap: 8px;
  padding: 0;
  list-style: none;
}

.product-photo-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #f1f3f4;
  border-radius: 6px;
}

/* Keep the catalog controls and results aligned on wide screens. */
.catalog-hero,
.catalog-body {
  --catalog-gutter: max(5vw, calc((100% - 1280px) / 2));
  padding-inline: var(--catalog-gutter);
}

.catalog-hero {
  border-bottom: 1px solid #e0e8ee;
  background: #f1f6f9;
}

.catalog-tools input {
  min-height: 44px;
  padding-inline-start: 38px;
  background: #fff left 12px center / 16px no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23546b7c' stroke-width='2'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m16 16 4 4'/%3E%3C/svg%3E");
}

.catalog-body {
  grid-template-columns: 190px minmax(0, 1fr);
}

.filters {
  padding: 7px;
  border: 1px solid #e0e8ee;
  border-radius: 13px;
  background: #f8fafb;
}

.filters button {
  border-radius: 7px;
}

.catalog-group-heading {
  padding-bottom: 9px;
  border-bottom: 1px solid #e5ebef;
}

.product {
  display: flex;
  flex-direction: column;
  border: 1px solid #e0e8ee;
  border-radius: 14px;
  background: #fff;
}

.product:focus-within,
.product:hover {
  border-color: #9ebdd3;
}

.product-copy {
  flex: 1;
  grid-template-rows: auto auto 1fr auto;
}

.product-detail-info {
  min-width: 0;
}

html[lang="en"] .product h3 {
  display: block;
  height: auto;
  min-height: 2.64em;
}

html[lang="en"] .product small {
  white-space: normal;
}

.product-preview-value {
  overflow-wrap: anywhere;
}

@media (max-width: 950px) and (min-width: 801px) {
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .catalog-hero,
  .catalog-body {
    --catalog-gutter: max(12px, 4vw);
  }

  .catalog-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .catalog-lines {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }

  .catalog-lines button {
    min-height: 42px;
    padding-inline: 3px;
    font-size: 13px;
  }

  .catalog-mobile-filter select {
    flex: 1;
    min-height: 42px;
    font-size: 16px;
  }

  .product-actions :is(button, a) {
    min-height: 44px;
  }
}

.product-videos details {
  margin: 12px 0;
}
.product-videos summary {
  color: var(--blue);
  cursor: pointer;
}
.product-videos video {
  display: block;
  width: 100%;
  max-height: 320px;
  margin-top: 8px;
  background: #112b40;
  border-radius: 8px;
}

.product-videos input[type="range"] {
  display: block;
  width: 100%;
  height: 32px;
  margin: 4px 0 0;
  accent-color: var(--blue);
}

.product-videos [role="status"]:empty {
  display: none;
}

@media (max-width: 480px) {
  html[lang="en"] .catalog-lines {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.catalog-back-to-top {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 4;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #cddde8;
  border-radius: 24px;
  background: #fff;
  color: var(--blue);
  box-shadow: 0 4px 16px #122e4620;
  font-size: 13px;
  font-weight: 700;
}

.catalog-back-to-top:hover {
  background: #eaf3f8;
}

.catalog-back-to-top span {
  margin-inline-end: 3px;
  font-size: 18px;
}

.catalog-hero:has(.catalog-series-banner:not([hidden])) {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
}

.catalog-series-banner:not([hidden]) {
  display: flex;
  align-items: center;
  min-height: 82px;
  padding: 15px 20px;
  border-inline-start: 3px solid #6296bd;
  border-radius: 8px;
  background: #e5eff7;
  color: #174667;
  font-size: clamp(16px, 1.45vw, 22px);
  font-weight: 700;
  line-height: 1.4;
}

@media (max-width: 1050px) {
  .catalog-hero:has(.catalog-series-banner:not([hidden])) {
    grid-template-columns: minmax(0, 1fr);
  }

  .catalog-series-banner:not([hidden]) {
    min-height: 0;
    padding: 12px 15px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .catalog-series-banner:not([hidden]),
  .catalog-dialog[open] {
    animation: catalog-enter 240ms ease-out both;
  }

  .catalog-lines button,
  .catalog-back-to-top {
    transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
  }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .product {
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  }

  .product:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px #102c4012;
  }
}

@keyframes catalog-enter {
  from {
    opacity: 0;
    translate: 0 7px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}


@media (prefers-reduced-motion: no-preference) {
  :is(.product-videos, .product-detail) details[open] > summary ~ :not([hidden]) {
    animation: catalog-enter 200ms ease-out both;
  }

  .catalog-dialog[open]::backdrop {
    animation: catalog-backdrop 200ms ease-out both;
  }
}

@keyframes catalog-backdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}
