.item-page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 34px 24px 84px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.breadcrumbs a {
  color: var(--ink);
}

.breadcrumbs a:hover,
.related-head a:hover {
  color: var(--red);
}

.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 48px;
  align-items: start;
}

.product-gallery {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 16px;
}

.thumb-list {
  display: grid;
  align-content: start;
  gap: 10px;
}

.thumb-list button {
  width: 86px;
  height: 86px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  overflow: hidden;
}

.thumb-list button.is-active,
.thumb-list button:hover,
.thumb-list button:focus-visible {
  border-color: var(--red);
}

.thumb-list img,
.main-image img,
.related-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.main-image {
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  overflow: hidden;
}

.product-summary {
  min-width: 0;
  padding-top: 8px;
}

.product-summary h1 {
  margin: 0;
  max-width: 720px;
  font-size: 42px;
  line-height: 1.08;
  font-weight: 950;
  word-break: break-word;
}

.detail-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin-top: 22px;
}

.detail-price strong {
  color: var(--red);
  font-size: 28px;
  line-height: 1.1;
}

.detail-price del {
  color: #8992a3;
  font-weight: 800;
}

.detail-price span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #fff;
  background: var(--red);
  font-size: 12px;
  font-weight: 950;
}

.stock-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 15px;
  color: var(--green);
  font-weight: 950;
}

.stock-line.is-empty {
  color: #7b8190;
}

.stock-line svg {
  width: 19px;
  height: 19px;
}

.stock-line .sku {
  color: var(--muted);
  font-size: 13px;
}

.summary-copy {
  margin: 22px 0 0;
  color: #30394f;
  font-size: 16px;
}

.option-block,
.spec-block {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.option-title {
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 950;
}

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

.size-options button {
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  text-align: left;
}

.size-options button.is-active,
.size-options button:hover,
.size-options button:focus-visible {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(1, 35, 103, 0.1);
}

.size-options button.is-disabled {
  color: #8b93a2;
  background: var(--soft);
  text-decoration: line-through;
  cursor: not-allowed;
}

.size-options span,
.size-options small {
  display: block;
}

.size-options span {
  font-weight: 950;
}

.size-options small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.spec-list {
  margin: 0;
}

.spec-list div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 18px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.spec-list dt,
.spec-list dd {
  margin: 0;
}

.spec-list dt {
  color: var(--muted);
  font-weight: 900;
}

.spec-list dd {
  font-weight: 850;
  overflow-wrap: anywhere;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.detail-actions .button {
  gap: 8px;
}

.detail-actions svg {
  width: 18px;
  height: 18px;
}

.description-block,
.related-products {
  margin-top: 62px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

.description-block h2,
.related-head h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 950;
}

.description-copy {
  max-width: 820px;
  margin-top: 18px;
  color: #30394f;
  font-size: 16px;
}

.related-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.related-head a {
  color: var(--navy);
  font-weight: 950;
}

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

.related-card {
  display: grid;
  gap: 10px;
  padding-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.related-card:hover,
.related-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(7, 18, 48, 0.11);
}

.related-card img {
  aspect-ratio: 1 / 1;
  background: var(--soft);
}

.related-card span,
.related-card strong {
  padding: 0 12px;
}

.related-card span {
  min-height: 43px;
  font-size: 14px;
  font-weight: 950;
  line-height: 1.35;
}

.related-card strong {
  color: var(--red);
}

.item-empty {
  min-height: 420px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 14px;
}

.item-empty h1 {
  margin: 0;
  font-size: 42px;
  line-height: 1.08;
}

.item-empty p {
  max-width: 580px;
  margin: 0;
  color: var(--muted);
}

@media (max-width: 980px) {
  .product-layout {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .product-gallery {
    position: static;
  }

  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .item-page {
    padding: 24px 18px 70px;
  }

  .product-gallery {
    grid-template-columns: 1fr;
  }

  .thumb-list {
    grid-template-columns: repeat(4, 1fr);
    order: 2;
  }

  .thumb-list button {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .product-summary h1,
  .item-empty h1 {
    font-size: 31px;
  }

  .size-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .spec-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .detail-actions .button {
    width: 100%;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }
}
