/* ─── Product Hero ───────────────────────────────────────────── */

.product-hero {
  background-color: var(--color-dark);
  background-image: url('../../img/catalog/product-bg.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  gap: 50px;
  padding-bottom: 70px;
}

.product-hero .container {
  flex: 1;
  display: flex;
  align-items: center;
}

.product-hero__breadcrumb-wrap {
  width: 100%;
  max-width: 1680px;
  margin-inline: auto;
  padding: 10px 20px;
}

.product-hero__breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-family: var(--font-base);
  font-size: var(--fs-sm);
  font-weight: var(--fw-regular);
  line-height: var(--lh-base);
}

.product-hero__crumb {
  color: #5c5c5c;
  transition: color var(--transition-fast);
}

.product-hero__crumb:hover {
  color: var(--color-white);
}

.product-hero__sep {
  color: #5c5c5c;
}

.product-hero__crumb--active {
  font-weight: var(--fw-medium);
  color: var(--color-gray);
}

.product-hero__layout {
  display: flex;
  align-items: center;
  gap: 60px;
}


.product-hero__content {
  flex: 1 0 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  justify-content: center;
}

.product-hero__title {
  font-family: var(--font-base);
  font-size: var(--fs-3xl);
  font-weight: var(--fw-medium);
  color: var(--color-black);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-heading);
  text-transform: uppercase;
}

.product-hero__title--accent {
  color: var(--color-red);
}

.product-hero__desc {
  font-family: var(--font-base);
  font-size: var(--fs-md);
  font-weight: var(--fw-light);
  color: var(--color-black);
  line-height: var(--lh-base);
}


.product-hero__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.product-hero__doc-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 4px 24px;
  border: 1.2px solid rgba(58, 56, 55, 0.3);
  border-radius: var(--radius-sm);
  font-family: var(--font-base);
  font-size: var(--fs-sm);
  font-weight: var(--fw-regular);
  color: var(--color-dark);
  background: transparent;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.product-hero__doc-btn:hover {
  border-color: rgba(58, 56, 55, 0.6);
}

.product-hero__doc-btn--red {
  border-color: rgba(143, 43, 53, 0.4);
  color: var(--color-red);
}

.product-hero__doc-btn--red:hover {
  border-color: var(--color-red);
}

.product-hero__chevron {
  width: 24px;
  height: 24px;
  opacity: 0.5;
  transition: transform var(--transition-base);
}

.product-hero__doc-btn:not(.product-hero__doc-btn--red) img {
  filter: brightness(0) saturate(100%) invert(20%) sepia(8%) saturate(400%) hue-rotate(340deg) brightness(85%);
}


.product-hero__doc-wrap {
  position: relative;
}

.product-hero__doc-btn.open .product-hero__chevron {
  transform: rotate(180deg);
  opacity: 1;
}

.product-hero__dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 100%;
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  z-index: var(--z-dropdown);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--transition-base), transform var(--transition-base), visibility var(--transition-base);
  pointer-events: none;
}

.product-hero__dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.product-hero__dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-family: var(--font-base);
  font-size: var(--fs-sm);
  font-weight: var(--fw-regular);
  color: var(--color-dark);
  white-space: nowrap;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.product-hero__dropdown-item:hover {
  background-color: var(--color-bg-light);
  color: var(--color-red);
}

.product-hero__dropdown-item + .product-hero__dropdown-item {
  border-top: 1px solid var(--color-border);
}


.product-hero__img-wrap {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 340px;
  filter: drop-shadow(33px 43px 54px rgba(0,0,0,0.13)) drop-shadow(8px 11px 30px rgba(0,0,0,0.15));
}

.product-hero__img {
  max-height: 340px;
  width: auto;
  max-width: 520px;
  object-fit: contain;
  display: block;
}

/* ─── Product Content ───────────────────────────────────────── */

.product-content {
  padding: 30px 0 80px;
  background-color: var(--color-white);
}

.product-content__breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-family: var(--font-base);
  font-size: var(--fs-sm);
  font-weight: var(--fw-regular);
  color: var(--color-dark);
  line-height: var(--lh-base);
  margin-bottom: 60px;
}

.product-content__crumb {
  color: var(--color-dark);
  transition: color var(--transition-fast);
}

.product-content__crumb:hover {
  color: var(--color-red);
}

.product-content__crumb--active {
  font-weight: var(--fw-medium);
  color: var(--color-red);
}

.product-content__sep {
  color: var(--color-dark);
}

.product-content__desc-wrap {
  display: flex;
  gap: 60px;
  align-items: flex-start;
  margin-bottom: 60px;
}

.product-content__desc-left {
  flex: 0 0 459px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.product-content__label {
  font-family: var(--font-base);
  font-size: var(--fs-sm);
  font-weight: var(--fw-regular);
  color: var(--color-red);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: var(--lh-base);
}

.product-content__title {
  font-family: var(--font-base);
  font-size: 26px;
  font-weight: var(--fw-bold);
  color: var(--color-dark);
  line-height: var(--lh-base);
}

.product-content__text {
  flex: 1 0 0;
  min-width: 0;
  font-family: var(--font-base);
  font-size: var(--fs-base);
  font-weight: var(--fw-light);
  color: var(--color-gray);
  line-height: var(--lh-loose);
}

/*
 * [FIX] Rich-text (WYSIWYG) rendering for the product description.
 * The description comes from the admin WYSIWYG editor as sanitized HTML
 * (<p>, <h2>-<h6>, <ul>/<ol>, <a>, <strong>, <blockquote>, <table>...).
 * The global reset in global.css zeroes all margins/padding, removes list
 * markers (`ul, ol { list-style: none }`), strips link styling and gives
 * headings no font-size — so formatted content rendered flat. These scoped
 * rules restore typographic formatting only inside .product-content__text,
 * without affecting the rest of the theme's design system.
 */
.product-content__text > *:first-child {
  margin-top: 0;
}

.product-content__text > *:last-child {
  margin-bottom: 0;
}

.product-content__text p {
  margin: 0 0 1em;
}

.product-content__text h2,
.product-content__text h3,
.product-content__text h4,
.product-content__text h5,
.product-content__text h6 {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: var(--color-dark);
  margin: 1.4em 0 0.5em;
}

.product-content__text h2 {
  font-size: 24px;
}

.product-content__text h3 {
  font-size: 20px;
}

.product-content__text h4 {
  font-size: 18px;
}

.product-content__text h5,
.product-content__text h6 {
  font-size: var(--fs-base);
}

.product-content__text ul,
.product-content__text ol {
  margin: 0 0 1em;
  padding-left: 1.5em;
}

.product-content__text ul {
  list-style: disc;
}

.product-content__text ol {
  list-style: decimal;
}

.product-content__text li {
  margin-bottom: 0.4em;
}

.product-content__text li::marker {
  color: var(--color-red);
}

.product-content__text a {
  color: var(--color-red);
  text-decoration: underline;
}

.product-content__text a:hover {
  text-decoration: none;
}

.product-content__text strong,
.product-content__text b {
  font-weight: var(--fw-bold);
  color: var(--color-dark);
}

.product-content__text em,
.product-content__text i {
  font-style: italic;
}

.product-content__text u {
  text-decoration: underline;
}

.product-content__text s {
  text-decoration: line-through;
}

.product-content__text blockquote {
  margin: 0 0 1em;
  padding: 8px 0 8px 20px;
  border-left: 3px solid var(--color-red);
  color: var(--color-dark);
  font-style: italic;
}

.product-content__text hr {
  border: 0;
  border-top: 1px solid var(--color-border, #e5e5e5);
  margin: 1.5em 0;
}

.product-content__text img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  margin: 0.5em 0;
}

.product-content__text figure {
  margin: 0 0 1em;
}

.product-content__text figcaption {
  font-size: var(--fs-sm);
  color: var(--color-gray);
  margin-top: 0.5em;
}

.product-content__text table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1em;
}

.product-content__text th,
.product-content__text td {
  border: 1px solid var(--color-border, #e5e5e5);
  padding: 8px 12px;
  text-align: left;
}

.product-content__text th {
  font-weight: var(--fw-bold);
  color: var(--color-dark);
  background-color: var(--color-bg-light);
}

.product-content__text sub {
  vertical-align: sub;
  font-size: 0.75em;
}

.product-content__text sup {
  vertical-align: super;
  font-size: 0.75em;
}

.product-content__text code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background-color: var(--color-bg-light);
  padding: 2px 6px;
  border-radius: 4px;
}

.product-content__text pre {
  background-color: var(--color-bg-light);
  padding: 16px;
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin: 0 0 1em;
}

.product-content__text pre code {
  background: none;
  padding: 0;
}

.product-content__benefits {
  display: flex;
  gap: 20px;
  align-items: stretch;
  margin-bottom: 60px;
}

.product-content__benefit {
  flex: 1 0 0;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 60px 16px 24px;
  background-color: var(--color-bg-light);
  border-radius: var(--radius-lg);
  text-align: center;
}

.product-content__benefit-icon {
  flex-shrink: 0;
}

.product-content__benefit-name {
  font-family: var(--font-base);
  font-size: var(--fs-md);
  font-weight: var(--fw-regular);
  color: var(--color-dark);
  line-height: var(--lh-base);
  text-transform: uppercase;
}

.product-content__benefit-desc {
  font-family: var(--font-base);
  font-size: var(--fs-base);
  font-weight: var(--fw-light);
  color: var(--color-gray);
  line-height: var(--lh-loose);
}

.product-content__banner-wrap {
  max-width: 1660px;
  margin-inline: auto;
  padding-inline: 20px;
}

.product-content__banner {
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.product-content__banner img {
  width: 100%;
  height: auto;
  display: block;
  /* Banners differ per product, so the box ratio comes from each image's own
     width/height attributes. object-fit:cover (instead of the default `fill`)
     keeps the picture undistorted if a responsive srcset variant or a replaced
     upload has a slightly different ratio than the box — it fills and crops
     rather than squishing. */
  object-fit: cover;
}

/* ─── Product Specs ─────────────────────────────────────────── */

.product-specs {
  padding: 80px 0;
  background-color: var(--color-bg-light);
}

.product-specs__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  margin-bottom: 40px;
}

.product-specs__label {
  font-family: var(--font-base);
  font-size: var(--fs-sm);
  font-weight: var(--fw-regular);
  color: var(--color-red);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.product-specs__title {
  font-family: var(--font-base);
  font-size: 26px;
  font-weight: var(--fw-bold);
  color: var(--color-dark);
  line-height: var(--lh-base);
}

.product-specs__tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.specs-tab {
  height: 44px;
  padding: 0 16px;
  border-radius: 4px;
  font-family: var(--font-base);
  font-size: var(--fs-sm);
  font-weight: var(--fw-regular);
  color: rgba(0, 0, 0, 0.5);
  background-color: #e9e9e9;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.specs-tab--active {
  background-color: var(--color-red);
  color: var(--color-white);
}

.product-specs__content {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.product-specs__slider-wrap {
  flex: 0 0 auto;
  width: 480px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-specs__slider {
  flex: 1;
  min-width: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-color: var(--color-white);
}

.product-specs__slide img {
  width: 100%;
  height: 420px;
  object-fit: contain;
  display: block;
  padding: 20px;
}

.specs-arrow {
  flex-shrink: 0;
}

.specs-arrow--prev img {
  transform: rotate(180deg);
}

.product-specs__table {
  flex: 1 0 0;
  min-width: 0;
}

.specs-panel {
  display: none;
}

.specs-panel--active {
  display: block;
}

.specs-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.specs-row {
  display: flex;
  gap: 10px;
}

.spec-item {
  flex: 1 0 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 8px;
  border-bottom: 1px solid #efefef;
}

.spec-item__label {
  font-family: var(--font-base);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--color-black);
  line-height: var(--lh-base);
}

.spec-item__value {
  font-family: var(--font-base);
  font-size: var(--fs-sm);
  font-weight: var(--fw-light);
  color: var(--color-gray);
  line-height: var(--lh-loose);
}

.specs-notes {
  list-style: decimal;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-base);
  font-size: 13px;
  font-weight: var(--fw-light);
  color: rgba(0, 0, 0, 0.4);
  line-height: var(--lh-base);
}

/* ─── Related Products ───────────────────────────────────────── */

.related-products {
  padding: 80px 0;
  background-color: var(--color-white);
}

.related-products__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  margin-bottom: 50px;
}

.related-products__title {
  font-family: var(--font-base);
  font-size: var(--fs-3xl);
  font-weight: var(--fw-medium);
  color: var(--color-dark);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-heading);
  text-transform: uppercase;
}

.related-products__subtitle {
  font-family: var(--font-base);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  color: var(--color-gray);
  line-height: var(--lh-base);
}

.related-products__slider-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.related-products__slider {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.related-products__slide {
  padding: 0 10px;
  box-sizing: border-box;
}

.related-products__arrow {
  position: absolute;
  top: 50%;
  z-index: 1;
  background-color: var(--color-bg-light);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: background-color var(--transition-fast), box-shadow var(--transition-fast);
}

.related-products__arrow:hover {
  background-color: var(--color-bg-fill);
  box-shadow: var(--shadow-card);
}

.related-products__arrow--prev {
  left: -52px;
  transform: translateY(-50%) rotate(180deg);
}

.related-products__arrow--next {
  right: -52px;
  transform: translateY(-50%);
}

@media (min-width: 1025px) and (max-width: 1440px) {
  .related-products .container {
    padding-inline: 72px;
  }
}


/* ─── Responsive ────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .related-products {
    padding: 60px 0;
  }

  .related-products__arrow {
    position: static;
    transform: none;
    flex-shrink: 0;
  }

  .related-products__arrow--prev {
    transform: rotate(180deg);
  }
}

@media (max-width: 1024px) {
  .product-specs__tabs {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

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

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

  .product-specs__slider-wrap {
    width: 100%;
  }

  .product-specs__slide img {
    height: 320px;
  }
}

@media (max-width: 1024px) {
  .product-hero {
    gap: 30px;
  }

  .product-hero__layout {
    gap: 40px;
  }

  .product-hero__title {
    font-size: var(--fs-2xl);
  }

  .product-hero__img {
    max-width: 380px;
  }

  .product-content__desc-wrap {
    flex-direction: column;
    gap: 24px;
  }

  .product-content__desc-left {
    flex: none;
    width: 100%;
  }

  .product-content__benefits {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
  }

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

  .product-content__benefit {
    flex: 0 0 320px;
    scroll-snap-align: start;
  }

  .product-content__benefit-name {
    font-size: var(--fs-base);
  }

  .product-content__benefit-desc {
    font-size: var(--fs-sm);
  }
}

@media (max-width: 767px) {
  .product-hero {
    padding: 0 0 30px;
    gap: 20px;
  }

  .product-hero__layout {
    flex-direction: column;
    gap: 30px;
  }

  .product-hero__title {
    font-size: var(--fs-xl);
  }

  .product-hero__desc {
    font-size: var(--fs-base);
  }

  .product-hero__img {
    max-width: 100%;
    max-height: 260px;
  }

  .product-hero__doc-btn span {
    display: none;
  }

  .product-content__benefit {
    flex: 0 0 300px;
    padding: 40px 16px 24px;
  }

  .product-content__benefit-icon {
    width: 40px;
    height: 40px;
  }

  .product-content__benefit-name {
    font-size: var(--fs-base);
  }

  .product-content__benefit-desc {
    font-size: var(--fs-sm);
  }

}
