body {
  background: rgba(246, 244, 240, 0.96);
  overflow-x: clip;
}

.detail-page {
  min-height: 100vh;
  overflow-x: clip;
}

.detail-close {
  position: fixed;
  z-index: 30;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(246, 244, 240, 0.88);
  color: var(--text);
  font-size: 26px;
  line-height: 1;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.detail-close:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(300px, min(460px, 40vw));
  align-items: stretch;
  min-height: 100vh;
  overflow-x: clip;
}

.detail-media {
  position: sticky;
  top: 0;
  display: grid;
  align-content: center;
  min-width: 0;
  height: 100vh;
  height: 100dvh;
  padding: clamp(12px, 2vw, 28px);
  background: #e2ddd3;
}

.detail-media__stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.detail-main-image {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100dvh - 96px);
  object-fit: contain;
}

.detail-arrow {
  position: absolute;
  z-index: 5;
  top: 50%;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(246, 244, 240, 0.82);
  color: var(--text);
  font-size: 30px;
  line-height: 1;
  transform: translateY(-50%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, opacity 160ms ease;
}

.detail-arrow:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.detail-arrow:disabled,
.detail-page--single-image .detail-arrow {
  opacity: 0.28;
  cursor: default;
  pointer-events: none;
}

.detail-arrow--prev {
  left: clamp(10px, 1.6vw, 20px);
}

.detail-arrow--next {
  right: clamp(10px, 1.6vw, 20px);
}

.detail-counter {
  position: absolute;
  top: clamp(14px, 1.8vw, 22px);
  left: 50%;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(246, 244, 240, 0.82);
  color: var(--muted);
  font-size: 11px;
  font-weight: var(--weight-regular, 400);
  letter-spacing: var(--tracking-caps, 0.1em);
  line-height: 1;
  text-transform: uppercase;
  transform: translateX(-50%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.detail-counter__current {
  color: var(--text);
}

.detail-thumbs {
  position: absolute;
  left: clamp(10px, 1.6vw, 20px);
  right: clamp(10px, 1.6vw, 20px);
  bottom: clamp(10px, 1.6vw, 20px);
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.detail-thumbs[hidden],
.detail-media--single .detail-thumbs {
  display: none;
}

.detail-thumbs::-webkit-scrollbar {
  display: none;
}

.detail-thumb {
  flex: 0 0 auto;
  width: 52px;
  aspect-ratio: 3 / 4;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  overflow: hidden;
  opacity: 0.62;
  transition: opacity 160ms ease, border-color 160ms ease;
}

.detail-thumb:hover,
.detail-thumb.is-active {
  opacity: 1;
  border-color: var(--accent);
}

.detail-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-info {
  position: sticky;
  top: 0;
  display: flex;
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  border-left: 1px solid var(--line);
  background: var(--bg);
  overflow: hidden;
}

.detail-info__inner {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  min-height: min(100%, 100dvh);
  max-height: 100dvh;
  padding: clamp(28px, 4.2vw, 60px) clamp(22px, 3vw, 44px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.detail-header {
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.detail-header .breadcrumbs {
  margin-bottom: 18px;
}

.detail-category {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: var(--weight-regular, 400);
  letter-spacing: var(--tracking-caps, 0.1em);
  line-height: 1.3;
  text-transform: uppercase;
}

.detail-title {
  margin: 0;
  max-width: none;
  font-size: clamp(24px, 2.2vw, 32px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.28;
  text-wrap: pretty;
  word-break: normal;
  hyphens: manual;
  overflow-wrap: normal;
}

.detail-copy {
  margin-bottom: 24px;
}

.detail-description {
  max-width: 36em;
  margin: 0;
  color: var(--muted);
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.65;
  text-wrap: pretty;
  overflow-wrap: break-word;
}

.detail-specs {
  display: grid;
  gap: 10px;
  margin: 0 0 26px;
  padding: 0;
}

.detail-spec {
  display: grid;
  grid-template-columns: minmax(100px, 0.4fr) minmax(0, 1fr);
  gap: 14px;
  padding: 0;
  align-items: baseline;
}

.detail-spec dt,
.detail-spec dd {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

.detail-spec dt {
  min-width: 0;
  color: var(--muted);
  font-weight: var(--weight-regular, 400);
  letter-spacing: var(--tracking-caps, 0.1em);
  text-transform: uppercase;
  overflow-wrap: normal;
}

.detail-spec dd {
  min-width: 0;
  color: var(--text);
  font-weight: var(--weight-medium, 500);
  overflow-wrap: break-word;
}

.detail-purchase {
  display: grid;
  gap: 18px;
  margin-top: 2px;
}

.detail-price-block {
  display: grid;
  gap: 8px;
}

.detail-price-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: var(--weight-regular, 400);
  letter-spacing: var(--tracking-caps, 0.1em);
  line-height: 1.25;
  text-transform: uppercase;
}

.detail-price {
  margin: 0;
  color: var(--text);
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: var(--weight-regular, 400);
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-transform: none;
}

.detail-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0;
  min-width: 0;
  max-width: 100%;
}

.detail-groups .group-chip {
  max-width: 100%;
  white-space: normal;
  text-align: center;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.detail-cta {
  width: 100%;
  max-width: 320px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: var(--weight-medium, 500);
  letter-spacing: var(--tracking-caps, 0.1em);
  text-transform: uppercase;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.detail-cta:hover {
  background: transparent;
  color: var(--accent);
}

.detail-related {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.detail-related__title {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: var(--weight-medium, 500);
  letter-spacing: var(--tracking-caps, 0.1em);
  text-transform: uppercase;
}

@media (max-width: 1180px) {
  .detail-layout {
    grid-template-columns: minmax(0, 1.12fr) minmax(280px, 42vw);
  }
}

@media (max-width: 960px) {
  .detail-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .detail-media {
    position: relative;
    top: auto;
    height: auto;
    min-height: min(78dvh, 760px);
    padding: clamp(64px, 10vw, 84px) clamp(14px, 3vw, 24px) clamp(18px, 3vw, 28px);
  }

  .detail-main-image {
    max-height: min(72dvh, 700px);
  }

  .detail-info {
    position: relative;
    top: auto;
    min-height: auto;
    max-height: none;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .detail-info__inner {
    justify-content: flex-start;
    min-height: auto;
    max-height: none;
    padding: clamp(28px, 5vw, 44px) clamp(18px, 4vw, 28px) clamp(36px, 6vw, 56px);
    overflow: visible;
  }
}

@media (max-width: 520px) {
  .detail-media {
    min-height: min(70dvh, 640px);
    padding-top: 58px;
  }

  .detail-main-image {
    max-height: min(64dvh, 560px);
  }

  .detail-thumb {
    width: 44px;
  }

  .detail-close {
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
  }

  .detail-arrow {
    top: auto;
    bottom: 16px;
    transform: none;
  }

  .detail-thumbs {
    bottom: 68px;
  }

  .detail-title {
    font-size: 24px;
    line-height: 1.3;
  }

  .detail-spec {
    grid-template-columns: minmax(88px, 0.44fr) minmax(0, 1fr);
    gap: 12px;
  }

  .detail-cta {
    max-width: none;
  }
}
