/**
 * @file
 * Product-route PDP polish and related-product cards.
 *
 * Late-loaded only on commerce product canonical pages so it can beat
 * chrome-layout-fix and commerce-storefront-ui without touching catalog
 * listings. Geometry follows the Johnny Detail PDP; colors stay Cyberlytics
 * green.
 */

html body.path-product.cyb-storefront-product #wrapper {
  --cyb-pdp-forest: #0a4f2f;
  --cyb-pdp-green: #0e6c3e;
  --cyb-pdp-accent: #138450;
  --cyb-pdp-leaf: #4fa36f;
  --cyb-pdp-mint: #eaf7ee;
  --cyb-pdp-mist: #f7fcf9;
  --cyb-pdp-ink: #102d20;
  --cyb-pdp-muted: #5b7166;
  --cyb-pdp-line: #c8e3d3;
}

/* -------------------------------------------------------------------------
 * Shell
 * ---------------------------------------------------------------------- */

html body.path-product.cyb-storefront-product #wrapper .product-post,
html body.path-product.cyb-storefront-product #wrapper .product-post.pdp-content {
  overflow: visible !important;
}

/* Shared by the default, 32, and 56 full-product templates. */
html body.path-product.cyb-storefront-product #wrapper .product-post.pdp-content {
  box-sizing: border-box !important;
  margin: 20px auto 1rem !important;
  max-width: 1196px !important;
  min-width: 0 !important;
  padding: 28px 24px !important;
  width: 100% !important;
}

html body.path-product.cyb-storefront-product #wrapper .product-post > .row {
  gap: 2.6rem !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

html body.path-product.cyb-storefront-product #wrapper .product-post :is(.product-image-wrap, .product-content-wrap) {
  margin: 0 !important;
  min-width: 0 !important;
  padding: 0 !important;
}

/* Colorbox adds a link around the image; give it the same contained frame. */
html body.path-product.cyb-storefront-product #wrapper .product-post .product-gallery-main > a {
  align-items: center;
  display: flex;
  height: 100%;
  justify-content: center;
  min-width: 0;
  width: 100%;
}

html body.path-product.cyb-storefront-product #wrapper .product-post .product-gallery-main-img {
  object-fit: contain !important;
}

html body.path-product.cyb-storefront-product #wrapper .product-post .product-info {
  margin-top: clamp(24px, 4vw, 40px) !important;
}

html body.path-product.cyb-storefront-product #wrapper .product-post .product-tab-item {
  padding: 0 !important;
}

html body.path-product.cyb-storefront-product #wrapper .product-post :is(.product-meta-item, .product-title, .product-variation-selector) {
  min-width: 0;
  overflow-wrap: anywhere;
}

html body.path-product.cyb-storefront-product #wrapper .product-post .product-add-cart :is(.form-item, .form-actions) {
  min-width: 0;
}

/* Commerce attribute widgets span the purchase row above quantity and submit. */
html body.path-product.cyb-storefront-product #wrapper .product-post .commerce-order-item-add-to-cart-form > :not(.field--name-quantity):not(.form-actions):not(input) {
  grid-column: 1 / -1;
}

html body.path-product.cyb-storefront-product #wrapper .product-post .product-variation-selector select {
  max-width: 100%;
  width: 100%;
}

@media (max-width: 991.98px) {
  html body.path-product.cyb-storefront-product #wrapper .product-post.pdp-content {
    padding: 16px !important;
    width: calc(100% - 32px) !important;
  }

  html body.path-product.cyb-storefront-product #wrapper .product-post > .row {
    gap: 1.4rem !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* -------------------------------------------------------------------------
 * Gallery thumbs: circular, centered, brand ring
 * ---------------------------------------------------------------------- */

html body.path-product.cyb-storefront-product #wrapper .product-post .product-gallery-thumbs {
  align-items: center !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.65rem !important;
  grid-template-columns: none !important;
  justify-content: center !important;
  margin: 0 !important;
  overflow: visible !important;
  padding: 0.25rem 0.15rem 0.45rem !important;
  width: 100% !important;
}

html body.path-product.cyb-storefront-product #wrapper .product-post .product-gallery-thumb {
  align-items: center !important;
  aspect-ratio: 1 !important;
  background: #ffffff !important;
  border: 2px solid var(--cyb-pdp-line) !important;
  border-radius: 50% !important;
  box-shadow: none !important;
  display: inline-flex !important;
  flex: 0 0 77px !important;
  height: 77px !important;
  justify-content: center !important;
  margin: 0 !important;
  max-width: 77px !important;
  min-height: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  scroll-snap-align: start;
  transform: none !important;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease !important;
  width: 77px !important;
}

html body.path-product.cyb-storefront-product #wrapper .product-post .product-gallery-thumb img {
  border: 0 !important;
  border-radius: 50% !important;
  display: block !important;
  height: 100% !important;
  margin: 0 !important;
  object-fit: contain !important;
  padding: 0 !important;
  width: 100% !important;
}

html body.path-product.cyb-storefront-product #wrapper .product-post .product-gallery-thumb:is(:hover, :focus-visible) {
  border-color: var(--cyb-pdp-leaf) !important;
  box-shadow: 0 0 0 3px rgba(19, 132, 80, 0.16) !important;
  transform: scale(1.05) !important;
}

html body.path-product.cyb-storefront-product #wrapper .product-post .product-gallery-thumb:is(.is-main-thumb, [aria-current='true']) {
  border-color: var(--cyb-pdp-accent) !important;
  box-shadow: 0 0 0 3px rgba(19, 132, 80, 0.2) !important;
}

html body.path-product.cyb-storefront-product #wrapper .product-post .product-gallery-thumb.is-main-thumb:hover {
  transform: none !important;
}

/* -------------------------------------------------------------------------
 * SKU / brand / category chips (full-width stack on small screens)
 * ---------------------------------------------------------------------- */

html body.path-product.cyb-storefront-product #wrapper .product-post .product-content-wrap > .product-meta {
  background: transparent !important;
  border: 0 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.4rem 0.5rem !important;
  margin: 0.35rem 0 0.85rem !important;
  padding: 0 !important;
}

html body.path-product.cyb-storefront-product #wrapper .product-post .product-meta-item {
  align-items: center !important;
  background: #ffffff !important;
  border: 1.5px solid var(--cyb-pdp-accent) !important;
  border-radius: 999px !important;
  color: var(--cyb-pdp-ink) !important;
  display: inline-flex !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  gap: 0.3rem !important;
  grid-template-columns: none !important;
  line-height: 1.25 !important;
  margin: 0 !important;
  max-width: 100% !important;
  padding: 0.35rem 0.7rem !important;
  -webkit-text-fill-color: var(--cyb-pdp-ink) !important;
}

html body.path-product.cyb-storefront-product #wrapper .product-post .product-meta-item .field-label {
  display: none !important;
}

/* -------------------------------------------------------------------------
 * Variation + add to cart
 * ---------------------------------------------------------------------- */

html body.path-product.cyb-storefront-product #wrapper .product-post .product-variation-wrap {
  background: linear-gradient(145deg, #ffffff 0%, var(--cyb-pdp-mist) 52%, var(--cyb-pdp-mint) 100%) !important;
  border: 1px solid rgba(19, 132, 80, 0.22) !important;
  border-radius: 14px !important;
  border-top: 4px solid var(--cyb-pdp-accent) !important;
  box-shadow: 0 12px 28px -22px rgba(7, 55, 32, 0.55) !important;
  margin: 0.75rem 0 0 !important;
  padding: clamp(0.9rem, 2vw, 1.15rem) !important;
}

html body.path-product.cyb-storefront-product #wrapper .product-post .commerce-order-item-add-to-cart-form {
  align-items: end !important;
  display: grid !important;
  gap: 0.65rem !important;
  grid-template-columns: minmax(88px, 0.42fr) minmax(0, 1fr) !important;
}

html body.path-product.cyb-storefront-product #wrapper .product-post .product-add-cart :is(input[type='number'], .button--add-to-cart, .form-submit) {
  height: 48px !important;
  min-height: 48px !important;
}

html body.path-product.cyb-storefront-product #wrapper .product-post .product-add-cart .form-actions {
  align-self: end !important;
  margin: 0 !important;
}

html body.path-product.cyb-storefront-product #wrapper .product-post .product-add-cart .button--add-to-cart {
  margin: 0 !important;
}

/* -------------------------------------------------------------------------
 * Description / Reviews tabs
 * ---------------------------------------------------------------------- */

html body.path-product.cyb-storefront-product #wrapper .product-post .product-info > .nav.nav-tabs,
html body.path-product.cyb-storefront-product #wrapper .product-post .pdp-tabs {
  background: transparent !important;
  border: 0 !important;
  display: grid !important;
  gap: 0.45rem !important;
  grid-template-columns: 1fr 1fr !important;
  list-style: none !important;
  margin: 0 0 0.85rem !important;
  padding: 0.35rem !important;
}

html body.path-product.cyb-storefront-product #wrapper .product-post .product-info > .nav.nav-tabs > li,
html body.path-product.cyb-storefront-product #wrapper .product-post .pdp-tabs > li {
  margin: 0 !important;
  min-width: 0 !important;
  width: 100% !important;
}

html body.path-product.cyb-storefront-product #wrapper .product-post .product-info > .nav.nav-tabs > li > a,
html body.path-product.cyb-storefront-product #wrapper .product-post .pdp-tabs > li > a {
  align-items: center !important;
  background: #ffffff !important;
  border: 1px solid var(--cyb-pdp-line) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  color: var(--cyb-pdp-green) !important;
  display: inline-flex !important;
  font-size: 0.86rem !important;
  font-weight: 800 !important;
  justify-content: center !important;
  min-height: 44px !important;
  padding: 0.7rem 1rem !important;
  text-decoration: none !important;
  text-underline-offset: 4px !important;
  width: 100% !important;
  -webkit-text-fill-color: var(--cyb-pdp-green) !important;
}

html body.path-product.cyb-storefront-product #wrapper .product-post .product-info > .nav.nav-tabs > li.active > a,
html body.path-product.cyb-storefront-product #wrapper .product-post .product-info > .nav.nav-tabs > li > a.active,
html body.path-product.cyb-storefront-product #wrapper .product-post .pdp-tabs > li.active > a {
  background: linear-gradient(135deg, var(--cyb-pdp-green) 0%, var(--cyb-pdp-accent) 100%) !important;
  border-color: var(--cyb-pdp-forest) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

html body.path-product.cyb-storefront-product #wrapper .product-post .product-info > .nav.nav-tabs > li:not(.active) > a:is(:hover, :focus-visible),
html body.path-product.cyb-storefront-product #wrapper .product-post .pdp-tabs > li:not(.active) > a:is(:hover, :focus-visible) {
  background: #ffffff !important;
  border-color: var(--cyb-pdp-line) !important;
  color: var(--cyb-pdp-accent) !important;
  text-decoration: underline !important;
  -webkit-text-fill-color: var(--cyb-pdp-accent) !important;
}

html body.path-product.cyb-storefront-product #wrapper .product-post .product-info > .nav.nav-tabs > li.active > a:is(:hover, :focus-visible),
html body.path-product.cyb-storefront-product #wrapper .product-post .pdp-tabs > li.active > a:is(:hover, :focus-visible) {
  background: linear-gradient(135deg, var(--cyb-pdp-forest) 0%, var(--cyb-pdp-green) 100%) !important;
  color: #ffffff !important;
  text-decoration: underline !important;
  -webkit-text-fill-color: #ffffff !important;
}

html body.path-product.cyb-storefront-product #wrapper .product-post .product-info .tab-content {
  background: #ffffff !important;
  border: 1px solid rgba(19, 132, 80, 0.18) !important;
  border-radius: 14px !important;
  box-shadow: 0 16px 38px -30px rgba(7, 55, 32, 0.55) !important;
}

/* -------------------------------------------------------------------------
 * Product Description badge + jump chips
 * ---------------------------------------------------------------------- */

html body.path-product.cyb-storefront-product #wrapper .product-post #product-detail .product-tab-item > h2,
html body.path-product.cyb-storefront-product #wrapper .product-post .product-tab-item > h2.margin-bottom-20 {
  background: linear-gradient(135deg, var(--cyb-pdp-forest) 0%, var(--cyb-pdp-accent) 100%) !important;
  border: 0 !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  color: #ffffff !important;
  display: inline-flex !important;
  font-size: clamp(0.82rem, 1.8vw, 0.95rem) !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em !important;
  line-height: 1.3 !important;
  margin: 0 0 1rem !important;
  max-width: 100% !important;
  padding: 0.55rem 0.9rem !important;
  text-align: left !important;
  text-transform: uppercase !important;
  width: auto !important;
  -webkit-text-fill-color: #ffffff !important;
}

html body.path-product.cyb-storefront-product #wrapper .product-post #product-detail .product-tab-item > h2::before,
html body.path-product.cyb-storefront-product #wrapper .product-post #product-detail .product-tab-item > h2::after,
html body.path-product.cyb-storefront-product #wrapper .product-post .product-tab-item > h2.margin-bottom-20::before,
html body.path-product.cyb-storefront-product #wrapper .product-post .product-tab-item > h2.margin-bottom-20::after {
  content: none !important;
  display: none !important;
}

html body.path-product.cyb-storefront-product #wrapper .product-post .pdp-jump-nav {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.4rem !important;
  list-style: none !important;
  margin: 0 0 1rem !important;
  padding: 0 !important;
}

html body.path-product.cyb-storefront-product #wrapper .product-post .pdp-jump-nav a {
  align-items: center !important;
  background: var(--cyb-pdp-mint) !important;
  border: 1.5px solid var(--cyb-pdp-accent) !important;
  border-radius: 10px !important;
  color: var(--cyb-pdp-forest) !important;
  display: inline-flex !important;
  font-size: 0.8rem !important;
  font-weight: 800 !important;
  gap: 0.35rem !important;
  min-height: 2.25rem !important;
  padding: 0.35rem 0.75rem 0.35rem 0.55rem !important;
  text-decoration: none !important;
  text-underline-offset: 3px !important;
  -webkit-text-fill-color: var(--cyb-pdp-forest) !important;
}

html body.path-product.cyb-storefront-product #wrapper .product-post .pdp-jump-nav a:is(:hover, :focus-visible) {
  background: var(--cyb-pdp-mint) !important;
  border-color: var(--cyb-pdp-accent) !important;
  color: var(--cyb-pdp-forest) !important;
  text-decoration: underline !important;
  -webkit-text-fill-color: var(--cyb-pdp-forest) !important;
}

/* -------------------------------------------------------------------------
 * Description accordions
 * ---------------------------------------------------------------------- */

html body.path-product.cyb-storefront-product #wrapper .product-post .pdp-section {
  background: #f7fcf9 !important;
  border: 1px solid rgba(19, 132, 80, 0.18) !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 24px -22px rgba(7, 55, 32, 0.6) !important;
  margin: 0 0 0.85rem !important;
  overflow: hidden !important;
  padding: 0 !important;
}

html body.path-product.cyb-storefront-product #wrapper .product-post .pdp-section__toggle,
html body.path-product.cyb-storefront-product #wrapper .product-post button.pdp-section__toggle {
  align-items: center !important;
  background: linear-gradient(135deg, #ffffff 0%, var(--cyb-pdp-mist) 100%) !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--cyb-pdp-forest) !important;
  display: flex !important;
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  justify-content: space-between !important;
  letter-spacing: 0 !important;
  min-height: 52px !important;
  padding: 0.7rem 0.75rem 0.7rem 1rem !important;
  text-align: left !important;
  text-transform: none !important;
  width: 100% !important;
  -webkit-text-fill-color: var(--cyb-pdp-forest) !important;
}

html body.path-product.cyb-storefront-product #wrapper .product-post .pdp-section:not(.is-collapsed) .pdp-section__toggle {
  background: linear-gradient(135deg, var(--cyb-pdp-forest), var(--cyb-pdp-accent)) !important;
  border-radius: 0 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

html body.path-product.cyb-storefront-product #wrapper .product-post .pdp-section__toggle::after {
  align-items: center !important;
  background: var(--cyb-pdp-mint) !important;
  border: 0 !important;
  border-radius: 50% !important;
  color: var(--cyb-pdp-green) !important;
  content: '▾' !important;
  display: inline-flex !important;
  flex: 0 0 32px !important;
  font-size: 0.85rem !important;
  height: 32px !important;
  justify-content: center !important;
  line-height: 1 !important;
  margin: 0 !important;
  position: static !important;
  right: auto !important;
  top: auto !important;
  transform: none !important;
  width: 32px !important;
  -webkit-text-fill-color: var(--cyb-pdp-green) !important;
}

html body.path-product.cyb-storefront-product #wrapper .product-post .pdp-section:not(.is-collapsed) .pdp-section__toggle::after {
  background: rgba(255, 255, 255, 0.16) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

html body.path-product.cyb-storefront-product #wrapper .product-post .pdp-section.is-collapsed .pdp-section__toggle::after {
  transform: rotate(-90deg) !important;
}

html body.path-product.cyb-storefront-product #wrapper .product-post .pdp-section__toggle:focus-visible {
  box-shadow: inset 0 0 0 3px rgba(19, 132, 80, 0.32) !important;
  outline: 3px solid rgba(10, 79, 47, 0.35) !important;
  outline-offset: 2px !important;
}

html body.path-product.cyb-storefront-product #wrapper .product-post .pdp-section__body {
  background: var(--cyb-pdp-mist) !important;
  border-top: 1px solid rgba(19, 132, 80, 0.14) !important;
  color: var(--cyb-pdp-ink) !important;
  padding: clamp(0.85rem, 2.2vw, 1.2rem) !important;
}

html body.path-product.cyb-storefront-product #wrapper .product-post .pdp-section.is-collapsed .pdp-section__body {
  display: none !important;
}

html body.path-product.cyb-storefront-product #wrapper .product-post .pdp-section__body > p,
html body.path-product.cyb-storefront-product #wrapper .product-post #product-detail .product-tab-item p {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 0 0.9rem !important;
  padding: 0 !important;
}

html body.path-product.cyb-storefront-product #wrapper .product-post .pdp-section__body > p:last-child {
  margin-bottom: 0 !important;
}

/* -------------------------------------------------------------------------
 * Related products on the PDP
 * ---------------------------------------------------------------------- */

html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid,
html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products {
  background:
    radial-gradient(circle at 8% 0%, rgba(19, 132, 80, 0.12), transparent 28%),
    radial-gradient(circle at 94% 100%, rgba(14, 108, 62, 0.1), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, var(--cyb-pdp-mist) 100%) !important;
  border: 2px solid black !important;
  border-radius: 10px !important;
  box-shadow:
    0 24px 55px -38px rgba(7, 55, 32, 0.46),
    0 8px 24px -18px rgba(7, 55, 32, 0.24) !important;
  isolation: isolate;
  margin: 3rem 0 2.25rem !important;
  max-width: 100% !important;
  overflow: hidden !important;
  padding: clamp(1.2rem, 2.8vw, 2.35rem) !important;
  position: relative !important;
  width: 100% !important;
}

html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid .related-grid__kicker {
  align-items: center !important;
  background: rgba(19, 132, 80, 0.13) !important;
  border: 1px solid rgba(14, 108, 62, 0.28) !important;
  border-radius: 999px !important;
  color: var(--cyb-pdp-accent) !important;
  display: inline-flex !important;
  font-size: 0.72rem !important;
  font-weight: 850 !important;
  letter-spacing: 0.14em !important;
  line-height: 1.2 !important;
  margin: 0 0 0.65rem !important;
  min-height: 2rem !important;
  padding: 0.38rem 0.8rem !important;
  text-transform: uppercase !important;
}

html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid .related-grid__title {
  color: var(--cyb-pdp-forest) !important;
  -webkit-text-fill-color: var(--cyb-pdp-forest) !important;
}

html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .product-teaser {
  background: #ffffff !important;
  border: 1px solid #d7eadf !important;
  border-radius: 18px !important;
  border-top: 4px solid var(--cyb-pdp-leaf) !important;
  box-shadow:
    0 18px 38px -28px rgba(7, 55, 32, 0.55),
    0 8px 20px -16px rgba(19, 132, 80, 0.3) !important;
  overflow: hidden !important;
}

html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .product-teaser::before {
  display: none !important;
}

html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .product-teaser-image {
  aspect-ratio: 1 / 1 !important;
  background:
    radial-gradient(circle at 50% 42%, #ffffff 0%, #ffffff 50%, var(--cyb-pdp-mist) 100%) !important;
  padding: clamp(0.8rem, 1.7vw, 1.15rem) !important;
}

html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .product-teaser-image img {
  height: 100% !important;
  object-fit: contain !important;
  padding: 0 !important;
  width: 100% !important;
}

html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products :is(.product-meta-wrap, .product-meta, .product-title, .product-title a, .product-title-link, .product-old-price, .product-price-wrap) {
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .product-title a,
html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products a.product-title-link {
  -webkit-box-orient: vertical !important;
  color: var(--cyb-pdp-forest) !important;
  display: -webkit-box !important;
  font-size: clamp(0.98rem, 1.35vw, 1.08rem) !important;
  font-weight: 850 !important;
  -webkit-line-clamp: 2 !important;
  line-height: 1.35 !important;
  min-height: 2.7em !important;
  overflow: hidden !important;
  text-align: center !important;
  -webkit-text-fill-color: var(--cyb-pdp-forest) !important;
}

html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .product-price-wrap {
  margin: 1rem 0 2rem !important;
}

html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .product-price,
html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .product-price .field,
html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .product-price .field-item,
html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .price {
  color: var(--cyb-pdp-accent) !important;
  justify-content: center !important;
  text-align: center !important;
  -webkit-text-fill-color: var(--cyb-pdp-accent) !important;
}

html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .product-price .field-item,
html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .price {
  font-size: 1.18rem !important;
  font-weight: 900 !important;
  margin-bottom: -1rem !important;
}

html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .product-variation-wrap {
  background: transparent !important;
  border: 0 !important;
  border-top: 0 !important;
  box-shadow: none !important;
  margin: 0.65rem 0 0 !important;
  padding: 0 !important;
}

html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .product-desc {
  background: linear-gradient(180deg, #f9fdfb 0%, var(--cyb-pdp-mint) 100%) !important;
  border: 1px solid #d7eadf !important;
  border-radius: 12px !important;
  color: #4d5f55 !important;
  font-size: 0.86rem !important;
  height: 6.55rem !important;
  line-height: 1.45 !important;
  max-height: 6.55rem !important;
  min-height: 6.55rem !important;
  overflow: hidden !important;
  padding: 0.65rem 0.72rem !important;
  text-align: left !important;
}

html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .product-desc .field-item,
html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .product-desc p {
  -webkit-box-orient: vertical !important;
  color: #4d5f55 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 4 !important;
  max-height: calc(1.45em * 4) !important;
  min-height: 0 !important;
  overflow: hidden !important;
  text-align: left !important;
  -webkit-text-fill-color: #4d5f55 !important;
}

html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .product-teaser-learn-more,
html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products a.btn.product-teaser-learn-more {
  background: linear-gradient(135deg, var(--cyb-pdp-forest) 0%, var(--cyb-pdp-green) 58%, var(--cyb-pdp-accent) 100%) !important;
  border: 1px solid var(--cyb-pdp-forest) !important;
  border-radius: 11px !important;
  box-shadow: 0 10px 20px -13px rgba(7, 55, 32, 0.85) !important;
  color: #ffffff !important;
  min-height: 44px !important;
  width: 100% !important;
  -webkit-text-fill-color: #ffffff !important;
}

html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .related-grid__items {
  grid-template-columns: minmax(0, 1fr) !important;
}

@media (min-width: 768px) {
  html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .related-grid__items {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 992px) {
  html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .related-grid__items {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 1200px) {
  html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .related-grid__items {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (hover: hover) and (pointer: fine) {
  html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .product-teaser:hover {
    border-color: var(--cyb-pdp-leaf) !important;
    box-shadow:
      0 26px 48px -30px rgba(7, 55, 32, 0.72),
      0 11px 24px -17px rgba(19, 132, 80, 0.45) !important;
    transform: translateY(-5px) !important;
  }

  html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .product-teaser:hover .product-teaser-image img {
    transform: scale(1.035) !important;
  }

  html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .product-teaser-learn-more:hover,
  html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products a.btn.product-teaser-learn-more:hover {
    filter: brightness(1.06) saturate(1.04) !important;
  }
}

/* -------------------------------------------------------------------------
 * Mobile
 * ---------------------------------------------------------------------- */

@media (max-width: 767.98px) {
  html body.path-product.cyb-storefront-product #wrapper .product-post .product-gallery-thumb {
    flex-basis: 60px !important;
    height: 60px !important;
    max-width: 60px !important;
    width: 60px !important;
  }

  html body.path-product.cyb-storefront-product #wrapper .product-post .product-tab-item {
    padding: 4px 0 !important;
  }

  html body.path-product.cyb-storefront-product #wrapper .product-post .product-content-wrap > .product-meta {
    flex-direction: column !important;
  }

  html body.path-product.cyb-storefront-product #wrapper .product-post .product-meta-item {
    justify-content: center !important;
    width: 100% !important;
  }

  html body.path-product.cyb-storefront-product #wrapper .product-post .commerce-order-item-add-to-cart-form {
    display: grid !important;
    gap: 0.65rem !important;
    grid-template-columns: minmax(88px, 0.42fr) minmax(0, 1fr) !important;
    padding: 0 !important;
  }

  html body.path-product.cyb-storefront-product #wrapper .product-post .commerce-order-item-add-to-cart-form .form-actions,
  html body.path-product.cyb-storefront-product #wrapper .product-post .commerce-order-item-add-to-cart-form .form-actions.form-wrapper {
    align-self: end !important;
    display: block !important;
    margin: 0 !important;
    max-width: 100% !important;
    padding: 0 !important;
    text-align: inherit !important;
    width: 100% !important;
  }

  html body.path-product.cyb-storefront-product #wrapper .product-post .commerce-order-item-add-to-cart-form .form-actions input.button,
  html body.path-product.cyb-storefront-product #wrapper .product-post .commerce-order-item-add-to-cart-form .form-actions input.button--add-to-cart,
  html body.path-product.cyb-storefront-product #wrapper .product-post .product-add-cart .button--add-to-cart {
    display: inline-flex !important;
    height: 48px !important;
    margin: 0 !important;
    max-width: 100% !important;
    min-height: 48px !important;
    padding: 0 1rem !important;
    width: 100% !important;
  }

  html body.path-product.cyb-storefront-product #wrapper .product-post .pdp-section__body {
    padding: 0.8rem !important;
  }

  html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid {
    border-radius: 10px !important;
    margin: 2.25rem auto 2rem !important;
    padding: 1.2rem 0.9rem 1.35rem !important;
    width: calc(100% - 35px) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body.path-product.cyb-storefront-product #wrapper .product-post .product-gallery-thumb,
  html body.path-product.cyb-storefront-product #wrapper .product-post .pdp-section__toggle::after,
  html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .product-teaser,
  html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .product-teaser-image img {
    transition: none !important;
    transform: none !important;
  }
}

@media (forced-colors: active) {
  html body.path-product.cyb-storefront-product #wrapper .product-post .product-gallery-thumb,
  html body.path-product.cyb-storefront-product #wrapper .product-post .pdp-section,
  html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid,
  html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .product-teaser {
    border: 1px solid CanvasText !important;
  }
}

@media (max-width: 374.98px) {
  html body.path-product.cyb-storefront-product #wrapper .product-post .commerce-order-item-add-to-cart-form {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* Reference geometry shared by all full-product templates. Keep typography
 * inside product fields so the existing RRSSB panel retains its own styles. */
html body.path-product.cyb-storefront-product #wrapper .product-post :is(.product-title, .product-stock, .product-short-description, .product-meta-item, .product-variation-wrap, .product-info) {
  font-family: var(--cyb-font-text, "Source Sans 3", "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
}

html body.path-product.cyb-storefront-product #wrapper .product-post .product-stock .stock-label {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: var(--cyb-pdp-ink) !important;
  font-size: 1rem !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  margin: 0 !important;
  padding: 0 !important;
}

html body.path-product.cyb-storefront-product #wrapper .product-post .product-variation-wrap {
  border-top-color: var(--cyb-pdp-leaf) !important;
}

html body.path-product.cyb-storefront-product #wrapper .product-post .product-info > .nav.nav-tabs > li > a {
  border-width: 2px !important;
  box-shadow: 0 3px 10px -5px rgba(7, 55, 32, 0.4) !important;
}

html body.path-product.cyb-storefront-product #wrapper .product-post #product-detail .product-tab-item > h2 {
  border: 2px solid var(--cyb-pdp-forest) !important;
  box-shadow: 0 3px 8px -4px rgba(7, 55, 32, 0.4) !important;
  font-size: clamp(1rem, 1.8vw, 1.3rem) !important;
  margin-bottom: 1.5rem !important;
}

/* Give section jump links the reference's individual outlined tiles. */
html body.path-product.cyb-storefront-product #wrapper .product-post .pdp-jump-nav li {
  align-items: center !important;
  background: var(--cyb-pdp-mist) !important;
  border: 1px solid var(--cyb-pdp-line) !important;
  border-radius: 12px !important;
  display: flex !important;
  gap: 0.65rem !important;
  margin: 0 !important;
  max-width: 100% !important;
  padding: 0.85rem !important;
}

html body.path-product.cyb-storefront-product #wrapper .product-post .pdp-jump-nav li::before {
  align-items: center !important;
  background: var(--cyb-pdp-accent) !important;
  border: 0 !important;
  border-radius: 50% !important;
  color: white !important;
  content: '\2713' !important;
  display: inline-flex !important;
  flex: 0 0 1.5rem !important;
  height: 1.5rem !important;
  justify-content: center !important;
  margin: 0 !important;
  position: static !important;
  width: 1.5rem !important;
}

html body.path-product.cyb-storefront-product #wrapper .product-post .pdp-jump-nav a {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* A square image frame and a consistent title slot keep card rows aligned. */
html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .related-grid__items {
  gap: clamp(1rem, 2vw, 1.4rem) !important;
}

html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .product-teaser-image {
  aspect-ratio: 1 / 1 !important;
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  padding: clamp(0.8rem, 1.7vw, 1.15rem) !important;
}

html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .product-teaser-image img {
  height: 100% !important;
  max-height: none !important;
  object-fit: contain !important;
  width: 100% !important;
}

html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .product-meta-wrap {
  padding: 1rem !important;
}

html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .product-meta {
  gap: 0.45rem !important;
}

html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .product-title {
  display: block !important;
  flex: 0 0 98px !important;
  height: 98px !important;
  margin: 0 !important;
  max-height: 98px !important;
  min-height: 98px !important;
  overflow: hidden !important;
  width: 100% !important;
}

html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products :is(.product-title a, a.product-title-link) {
  font-family: var(--cyb-font-display, "Plus Jakarta Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
  font-size: clamp(0.98rem, 1.35vw, 1.08rem) !important;
  font-weight: 850 !important;
  line-height: 1.4 !important;
  margin-inline: auto !important;
}

html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .product-price-wrap {
  margin: 1rem 0 2rem !important;
  padding: 0 !important;
}

html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .product-price .field-item {
  margin: 0 !important;
}

html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .product-teaser-actions {
  margin: auto 0 0 !important;
  padding: 0.8rem 0 0 !important;
}

html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products a.btn.product-teaser-learn-more {
  font-size: 0.91rem !important;
  padding: 0.65rem 1rem !important;
}

@media (max-width: 767.98px) {
  html body.path-product.cyb-storefront-product #wrapper .product-post.pdp-content {
    padding: 1.05rem 1rem 1.15rem !important;
    margin-top: 5rem !important;
  }

  html body.path-product.cyb-storefront-product #wrapper .product-post .product-info > .nav.nav-tabs {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html body.path-product.cyb-storefront-product #wrapper .product-post .commerce-order-item-add-to-cart-form {
    padding: 0.75rem 0 !important;
  }

  html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .related-grid__header {
    margin-bottom: 1.25rem !important;
    padding: 0 0.25rem !important;
  }

  html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .related-grid__items {
    gap: 1.15rem !important;
  }

  html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .product-meta-wrap {
    padding: 0.9rem !important;
  }

  html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .product-desc {
    font-size: 0.84rem !important;
    height: 6.45rem !important;
    max-height: 6.45rem !important;
    min-height: 6.45rem !important;
  }
}

/* Override the catalog's fixed flex-basis as well as its image height. */
html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .product-teaser-image {
  flex: 0 0 auto !important;
  background: #ffffff !important;
}

html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .product-price {
  align-items: baseline !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  gap: 0.3rem !important;
}

html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .product-price :is(.field, .field-item, .price) {
  display: inline !important;
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
}

/* Keep desktop zoom inside the preserved gallery frame, with its preview
 * hidden until hover. Legacy rules otherwise leave an empty preview visible. */
@media (min-width: 768px) {
  html body.path-product.cyb-storefront-product #wrapper .product-post .product-gallery-main {
    aspect-ratio: auto !important;
    background: #ffffff !important;
    display: block !important;
    height: 496px !important;
    max-width: none !important;
    width: 100% !important;
    min-height: 0 !important;
    padding: 0 !important;
  }

  html body.path-product.cyb-storefront-product #wrapper .product-post .product-gallery-main .piczoomer-pic-wp {
    background: #ffffff !important;
    border: 0 !important;
    height: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    width: 100% !important;
  }

  html body.path-product.cyb-storefront-product #wrapper .product-post .product-gallery-main .product-gallery-main-img {
    height: 100% !important;
    max-height: none !important;
    object-fit: contain !important;
    width: 100% !important;
  }
}

html body.path-product.cyb-storefront-product #wrapper .product-post .product-gallery-main .piczoomer-zoom-wp {
  display: none !important;
  pointer-events: none !important;
}

@media (hover: hover) and (pointer: fine) {
  html body.path-product.cyb-storefront-product #wrapper .product-post .product-gallery-main:has(.piczoomer-pic-wp:hover) .piczoomer-zoom-wp {
    display: block !important;
  }
}

html body.path-product.cyb-storefront-product #wrapper #main-content .related-grid--products .product-teaser-image img {
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
}
