.detail-body {
  overflow-x: clip;
}

.detail-body .page {
  overflow: visible;
}

.product-detail-page {
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.5), rgba(251, 247, 240, 0.88)),
    var(--page-bg);
}

.detail-topbar {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.breadcrumbs {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  color: #5f4b43;
  font-size: 13px;
  white-space: nowrap;
}

.breadcrumbs span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.breadcrumbs > span:not(:last-child) {
  color: #aa8a69;
}

.detail-assurances {
  display: flex;
  align-items: center;
  gap: 28px;
  color: #5b463e;
  font-size: 14px;
  white-space: nowrap;
}

.detail-assurances > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.detail-assurances .icon {
  width: 21px;
  height: 21px;
  color: var(--gold-deep);
}

.product-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(440px, 0.92fr);
  gap: 50px;
  padding: 4px 0 20px;
}

.product-gallery {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 18px;
  min-width: 0;
}

.gallery-thumbnails {
  display: grid;
  grid-template-rows: 132px 120px 112px 92px 20px;
  gap: 10px;
  min-height: 0;
  align-content: start;
}

.gallery-thumb {
  width: 82px;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0;
  background: var(--surface);
}

.gallery-thumb.is-active {
  border: 2px solid var(--wine-deep);
  box-shadow: 0 0 0 2px rgba(98, 3, 11, 0.08);
}

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

.gallery-more {
  display: inline-flex;
  height: 20px;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-size: 20px;
}

.gallery-main {
  height: 520px;
  overflow: hidden;
  border-radius: 8px;
  background: #2e1e17;
  box-shadow: var(--shadow-soft);
}

.gallery-main img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.product-info {
  min-width: 0;
  padding-top: 2px;
}

.product-kickers {
  display: flex;
  gap: 9px;
  margin-bottom: 12px;
}

.product-kickers .badge {
  min-height: 27px;
  padding: 0 10px;
  font-size: 12px;
}

.product-info h1 {
  margin: 0;
  font-size: 31px;
  line-height: 1.2;
  font-weight: 800;
}

.product-subtitle {
  margin: 8px 0 7px;
  font-size: 18px;
  font-weight: 800;
}

.origin-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 10px;
  color: #5d4942;
  font-size: 12px;
}

.origin-line > span:not(:first-child) {
  position: relative;
  padding-right: 10px;
}

.origin-line > span:not(:first-child)::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 0;
  width: 1px;
  height: 12px;
  background: var(--line);
}

.origin-line > span:last-child::after {
  display: none;
}

.flag-fr {
  display: inline-grid;
  grid-template-columns: repeat(3, 5px);
  width: 15px;
  height: 13px;
  overflow: hidden;
}

.flag-fr i:nth-child(1) {
  background: #1e4a8e;
}

.flag-fr i:nth-child(2) {
  background: #fff;
}

.flag-fr i:nth-child(3) {
  background: #c62f3a;
}

.detail-price {
  margin-top: 17px;
  color: var(--wine);
  font-size: 25px;
  font-weight: 900;
}

.detail-price span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.product-tags span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  color: #72513a;
  font-size: 12px;
  font-weight: 800;
}

.product-summary {
  margin: 14px 0 0;
  color: #5b463e;
  font-size: 13px;
  line-height: 1.7;
}

.detail-selections {
  display: grid;
  gap: 11px;
  margin-top: 18px;
}

.selection-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
}

.selection-label {
  font-size: 14px;
  font-weight: 900;
}

.option-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.option-group button {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 16px;
  background: rgba(255, 253, 248, 0.88);
  color: #49352f;
  font-size: 13px;
}

.option-group button.is-active {
  border-color: var(--wine);
  box-shadow: inset 0 0 0 1px rgba(125, 6, 18, 0.1);
  color: var(--wine);
}

.quantity-control {
  display: grid;
  grid-template-columns: 40px 50px 40px;
  width: max-content;
  height: 36px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 253, 248, 0.9);
}

.quantity-control button,
.quantity-control output {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #59433b;
  font-size: 15px;
}

.quantity-control output {
  color: var(--ink);
  font-weight: 800;
}

.detail-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 12px;
  margin-top: 18px;
}

.detail-actions .btn {
  height: 48px;
  border-radius: 7px;
  font-size: 16px;
}

.detail-favorite.is-active {
  border-color: var(--wine);
  background: #fff4f2;
  color: var(--wine);
}

.pickup-note {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  margin-top: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  padding: 10px 14px;
  color: #655149;
  font-size: 12px;
}

.pickup-note .icon {
  width: 28px;
  height: 28px;
  color: var(--gold-deep);
}

.pickup-note strong {
  display: block;
  color: #4a352f;
  font-size: 13px;
}

.detail-lower {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(300px, 1fr);
  gap: 36px;
  border-top: 1px solid var(--line);
  padding-bottom: 34px;
}

.detail-section-heading {
  display: flex;
  height: 56px;
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
}

.detail-section-heading h2 {
  position: relative;
  margin: 0;
  padding: 0 10px;
  color: var(--wine);
  font-size: 18px;
  font-weight: 800;
}

.detail-section-heading h2::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -17px;
  left: 0;
  height: 2px;
  background: var(--wine);
}

.wine-intro-content {
  min-height: 176px;
  padding: 28px 12px 12px 10px;
}

.wine-intro-content p {
  max-width: 760px;
  margin: 0;
  color: #4f3b35;
  font-size: 14px;
  line-height: 1.9;
}

.related-products {
  min-width: 0;
}

.related-heading {
  display: flex;
  height: 56px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line-soft);
}

.related-heading h2 {
  margin: 0;
  font-size: 18px;
}

.related-heading a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #5e453d;
  font-size: 12px;
}

.related-carousel {
  position: relative;
  padding: 10px 18px 0;
}

.related-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.related-track::-webkit-scrollbar {
  display: none;
}

.related-card {
  display: grid;
  height: 180px;
  grid-template-columns: 42% minmax(0, 1fr);
  grid-template-rows: 1fr 1fr;
  align-items: center;
  gap: 0 12px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 253, 248, .9);
  scroll-snap-align: start;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.related-card:hover,
.related-card:focus-visible {
  border-color: var(--gold);
  outline: 0;
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

.related-card img {
  display: block;
  width: 100%;
  height: 100%;
  grid-row: 1 / 3;
  aspect-ratio: auto;
  border-radius: 7px;
  object-fit: cover;
}

.related-card h3 {
  align-self: end;
  min-height: 0;
  margin: 0 0 5px;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 700;
}

.related-card strong {
  align-self: start;
  color: var(--wine);
  font-size: 17px;
}

.related-arrow {
  position: absolute;
  top: 72px;
  z-index: 2;
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-soft);
  border-radius: 50%;
  background: var(--surface);
  color: var(--gold-deep);
  box-shadow: var(--shadow-soft);
}

.related-arrow .icon {
  width: 17px;
  height: 17px;
}

.related-arrow--left {
  left: 0;
}

.related-arrow--right {
  right: 0;
}

.related-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 12px;
}

.related-dots button {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: #d8c9b7;
  transition: background .18s ease, transform .18s ease;
}

.related-dots button.is-active {
  background: var(--wine);
  transform: scale(1.18);
}

@media (max-width: 1280px) {
  .product-overview {
    grid-template-columns: minmax(0, 1.05fr) minmax(430px, 0.95fr);
    gap: 34px;
  }

  .product-gallery {
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 14px;
  }

  .gallery-thumb {
    width: 74px;
  }

  .gallery-main,
  .gallery-thumbnails {
    height: 490px;
  }

  .gallery-thumbnails {
    grid-template-rows: 120px 110px 100px 82px 20px;
  }

  .product-info h1 {
    font-size: 27px;
  }

  .product-summary {
    font-size: 12px;
  }

  .option-group button {
    padding: 0 12px;
  }

  .detail-actions {
    grid-template-columns: minmax(0, 1fr) 168px;
  }

  .detail-lower {
    gap: 28px;
  }
}

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

  .product-gallery {
    max-width: 720px;
  }

  .detail-lower {
    grid-template-columns: 1fr;
  }

  .related-products {
    max-width: 520px;
  }
}

@media (max-width: 720px) {
  .related-carousel {
    padding-inline: 16px;
  }

  .related-track {
    grid-auto-columns: 100%;
  }

  .related-arrow {
    top: 78px;
  }
}
