.product-detail {
  padding-top: 46px;
}

.product-detail__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: start;
  gap: clamp(48px, 7vw, 94px);
}

.product-gallery {
  min-width: 0;
}

.product-gallery__main {
  --product-gallery-main-inset: 24px;
  position: relative;
  display: grid;
  overflow: hidden;
  aspect-ratio: 1;
  padding: 0;
  place-items: center;
  border: 1px solid var(--color-border);
  border-radius: 24px;
  background: var(--color-background-gray);
}

.product-gallery__main img {
  position: absolute;
  inset: var(--product-gallery-main-inset);
  width: calc(100% - (var(--product-gallery-main-inset) * 2));
  height: calc(100% - (var(--product-gallery-main-inset) * 2));
  object-fit: contain;
}

.product-gallery__carousel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.product-gallery__carousel[hidden],
.product-gallery__nav[hidden] {
  display: none;
}

.product-gallery__thumbs {
  display: flex;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 12px;
  scroll-behavior: smooth;
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
  touch-action: pan-x;
}

.product-gallery__thumbs::-webkit-scrollbar {
  display: none;
}

.product-gallery__thumbs button {
  flex: 0 0 112px;
  overflow: hidden;
  width: 112px;
  height: 112px;
  padding: 5px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.product-gallery__thumbs button.is-active {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(190, 39, 94, 0.1);
}

.product-gallery__thumbs button:hover,
.product-gallery__thumbs button:focus-visible {
  border-color: var(--color-primary);
}

.product-gallery__thumbs img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-gallery__nav {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(190, 39, 94, 0.28);
  border-radius: 50%;
  color: var(--color-primary);
  background: #fff;
  box-shadow: 0 8px 18px rgba(92, 24, 51, 0.08);
  font-size: 1.5rem;
  line-height: 1;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

.product-gallery__nav:hover:not(:disabled),
.product-gallery__nav:focus-visible:not(:disabled) {
  border-color: var(--color-primary);
  color: #fff;
  background: var(--color-primary);
}

.product-gallery__nav:disabled {
  cursor: default;
  opacity: 0.35;
}

.product-detail__info {
  position: sticky;
  top: 135px;
  align-self: start;
}

.product-detail__info h1 {
  margin: 10px 0 26px;
  font-size: clamp(2.1rem, 4vw, 3.4rem);
}

.product-detail__facts {
  margin: 0 0 28px;
  border-top: 1px solid var(--color-border);
}

.product-detail__facts div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 20px;
  padding-block: 13px;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.92rem;
}

.product-detail__facts dt {
  color: var(--color-text-secondary);
  font-weight: 500;
}

.product-detail__facts dd {
  margin: 0;
  font-weight: 650;
}

.product-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.product-detail__support {
  margin-top: 18px;
  color: var(--color-text-light);
  font-size: 0.78rem;
}

.product-information__inner {
  display: grid;
  max-width: 980px;
  gap: 56px;
}

.product-content-block {
  scroll-margin-top: 130px;
}

.product-content-block h2 {
  margin: 10px 0 20px;
}

.product-description {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 1rem;
  line-height: 1.8;
  white-space: pre-line;
}

.product-feature-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.product-feature-list li {
  position: relative;
  padding: 15px 18px 15px 48px;
  border: 1px solid rgba(190, 39, 94, 0.1);
  border-radius: 13px;
  color: var(--color-text-secondary);
  background: #fff;
  line-height: 1.65;
}

.product-feature-list li::before {
  position: absolute;
  top: 17px;
  left: 18px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--color-primary);
  content: "✓";
  font-size: 0.7rem;
  font-weight: 800;
}

.specification-table-wrap {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #fff;
}

.specification-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.specification-table th,
.specification-table td {
  padding: 15px 20px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.specification-table thead th {
  color: #fff;
  background: var(--color-primary);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.specification-table tbody th {
  width: 42%;
  color: var(--color-text-secondary);
  font-weight: 600;
}

.specification-table tbody td {
  color: var(--color-text);
  font-weight: 650;
}

.specification-table tbody tr:last-child > * {
  border-bottom: 0;
}

.specification-table__group th {
  color: var(--color-primary) !important;
  background: rgba(190, 39, 94, 0.055);
  font-weight: 800 !important;
}

.specification-table__child th {
  padding-left: 40px;
  font-weight: 500 !important;
}

@media (max-width: 991.98px) {
  .product-detail__grid {
    grid-template-columns: 1fr;
  }

  .product-detail__info {
    position: static;
  }

  .product-gallery__thumbs button {
    flex-basis: 96px;
    width: 96px;
    height: 96px;
  }
}

@media (max-width: 580px) {
  .product-detail {
    padding-top: 28px;
  }

  .product-gallery__main {
    --product-gallery-main-inset: 12px;
    padding: 0;
  }

  .product-gallery__thumbs {
    gap: 8px;
  }

  .product-gallery__carousel {
    gap: 7px;
  }

  .product-gallery__thumbs button {
    flex-basis: 82px;
    width: 82px;
    height: 82px;
    border-radius: 10px;
  }

  .product-gallery__nav {
    width: 32px;
    height: 32px;
    font-size: 1.3rem;
  }

  .product-detail__actions {
    flex-direction: column;
  }

  .product-information__inner {
    gap: 42px;
  }

  .specification-table th,
  .specification-table td {
    padding: 12px 13px;
    font-size: 0.84rem;
  }

  .specification-table__child th {
    padding-left: 25px;
  }
}
