.product-detail {
  --detail-accent: #087e74;
  max-width: 1200px;
  padding-block: 112px 72px;
}
.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #40585c;
  font-size: 14px;
  font-weight: 700;
  margin-block-end: 23px;
}
.detail-back:hover, .detail-guides a:hover { text-decoration: underline; }
.detail-direction { display: inline-block; }
[dir="rtl"] .detail-direction, [dir="rtl"] .qc-strip-tools button span { transform: scaleX(-1); }
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(28px, 5.4vw, 76px);
}
.detail-figure { margin: 0; }
.detail-image {
  display: grid;
  place-items: center;
  overflow: hidden;
  aspect-ratio: 1.12;
  max-block-size: 510px;
  background: #f5f7f7;
  border-radius: 12px;
  cursor: zoom-in;
}
.detail-image img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  transition: transform .2s ease-out;
}
@media (hover: hover) {
  .detail-image:hover img { transform: scale(1.1); }
}
.detail-figure figcaption {
  margin-block-start: 10px;
  text-align: center;
  color: #52696e;
  font-size: 13px;
}
.detail-info { min-width: 0; padding-block-start: 6px; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.detail-tags span {
  background: #f0f3f3;
  color: #40585c;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
}
.detail-info h1 {
  font-size: clamp(29px, 3.5vw, 48px);
  line-height: 1.07;
  overflow-wrap: anywhere;
  margin-block: 13px 18px;
}
.detail-price { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 13px; }
.detail-price span { font-size: 13px; font-weight: 700; color: #40585c; }
.detail-price strong { order: -1; font-size: clamp(28px, 3vw, 42px); color: var(--detail-accent); line-height: 1.05; }
.detail-note { margin: 6px 0 0; color: #52696e; font-size: 13px; line-height: 1.5; }
.detail-qc-link {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-block: 19px;
  font-size: 13px;
  color: #52696e;
}
.detail-qc-link a, .qc-strip-tools button {
  padding: 8px 12px;
  border: 1px solid #ccd8da;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}
.detail-qc-link a:hover, .qc-strip-tools button:hover { background: #f0f3f3; }
.detail-sizes { margin-block: 0 18px; }
.detail-sizes h2 { margin-block-end: 7px; font: inherit; font-size: 13px; font-weight: 700; }
.detail-sizes ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 0;
  margin: 0;
}
.detail-sizes li {
  border: 1px solid #d8e1e2;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  white-space: nowrap;
}
.detail-order {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 52px;
  padding: 10px 16px;
  border-radius: 8px;
  color: white;
  background: var(--detail-accent);
  font-weight: 800;
  text-align: center;
}
.detail-order:hover { background: #086b63; }
.detail-order-note { text-align: center; }
.detail-guides { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-block-start: 12px; font-size: 13px; font-weight: 700; }
.detail-qc {
  position: relative;
  border-top: 1px solid #dbe5e5;
  margin-block-start: 48px;
  padding-block-start: 26px;
  scroll-margin-top: 96px;
}
.qc-heading { padding-inline-end: 100px; }
.qc-heading h2 { margin: 0 0 7px; font-size: clamp(25px, 3vw, 34px); }
.qc-stats { margin: 0; font-size: 13px; font-weight: 700; }
.qc-strip-tools {
  position: absolute;
  inset-block-start: 29px;
  inset-inline-end: 0;
  display: flex;
  gap: 6px;
}
.qc-strip-tools[hidden], .qc-progress[hidden], .viewer-tools[hidden] { display: none; }
.qc-strip-tools button { min-width: 40px; height: 39px; cursor: pointer; }
.qc-strip-tools button span { display: inline-block; }
.qc-strip-tools button:disabled { opacity: .4; cursor: default; }
.qc-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(144px, 22vw, 235px);
  gap: 13px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
  list-style: none;
  margin: 16px 0 0;
  padding: 4px 4px 10px;
}
.qc-strip li { scroll-snap-align: start; }
.qc-group { display: block; min-width: 0; }
.qc-cover {
  display: grid;
  place-items: center;
  position: relative;
  aspect-ratio: 4 / 3;
  background: #eef2f2;
  border-radius: 8px;
  overflow: hidden;
}
.qc-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #eef2f2; }
.qc-image-placeholder { padding: 10px; color: #53686b; text-align: center; font-size: 12px; }
.qc-count {
  position: absolute;
  inset-block-start: 7px;
  inset-inline-end: 7px;
  padding: 3px 7px;
  background: #fff;
  color: var(--ink);
  border-radius: 5px;
  font-size: 11px;
  font-weight: 800;
}
.qc-group-label { display: block; padding-block-start: 7px; font-size: 13px; font-weight: 700; }
.qc-group:hover .qc-group-label { text-decoration: underline; }
.qc-progress {
  display: block;
  width: min(230px, 100%);
  height: 8px;
  margin: 8px auto 0;
  appearance: none;
  background: repeating-linear-gradient(90deg, #d4dfdf 0 calc(var(--qc-tick, 25%) - 3px), transparent calc(var(--qc-tick, 25%) - 3px) var(--qc-tick, 25%));
  border-radius: 999px;
  cursor: pointer;
}
.qc-progress::-webkit-slider-thumb { appearance: none; width: 25px; height: 8px; background: #355d60; border-radius: 999px; }
.qc-progress::-moz-range-thumb { width: 25px; height: 8px; border: 0; background: #355d60; border-radius: 999px; }
.qc-empty {
  margin: 16px 0 0;
  padding: 26px 12px;
  background: #f4f6f6;
  border-radius: 8px;
  text-align: center;
  color: #52696e;
}
.detail-viewer {
  position: fixed;
  width: min(94vw, 1000px);
  max-height: 94dvh;
  padding: 46px 14px 12px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
}
.detail-viewer::backdrop { background: #061416ca; }
.viewer-close, .viewer-tools button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid #d8e1e2;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 22px;
}
.viewer-close { position: absolute; inset-block-start: 3px; inset-inline-end: 6px; }
.viewer-tools button:disabled { opacity: .4; cursor: default; }
.viewer-image { display: grid; place-items: center; min-height: 100px; background: #f5f7f7; }
.viewer-image img { display: block; max-width: 100%; max-height: 69dvh; object-fit: contain; }
.viewer-image img[hidden] { display: none; }
.viewer-tools { display: flex; justify-content: center; align-items: center; gap: 17px; padding-top: 8px; }
.viewer-position { font-size: 13px; }
.product-detail :focus-visible { outline: 2px solid var(--detail-accent); outline-offset: 3px; }
@media (max-width: 1100px) {
  body:has(.product-detail) .site-header.has-header-search { --header-height: 70px; }
  body:has(.product-detail) .header-search-slot { display: none; }
}
@media (max-width: 700px) {
  .product-detail { padding-block: 83px 48px; }
  .detail-back { margin-block-end: 12px; }
  .detail-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .detail-image { aspect-ratio: auto; height: clamp(205px, 58vw, 320px); }
  .detail-figure figcaption { margin-block-start: 5px; }
  .detail-info h1 { margin-block: 10px 12px; }
  .detail-qc-link { margin-block: 12px; }
  .detail-sizes { margin-block-end: 13px; }
  .detail-qc { margin-block-start: 34px; padding-block-start: 20px; scroll-margin-top: 76px; }
  .qc-strip-tools { inset-block-start: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .detail-image img { transition: none; }
}
