:root {
  background: #ffffff;
}

html.product-page-document {
  min-width: 0;
}

body.product-page {
  min-width: 0;
  background: #ffffff;
  color: #17191d;
}

.product-page .site-header {
  background: #171b1e;
}

.product-main {
  min-height: calc(100vh - 78px);
  padding: clamp(26px, 2.5vw, 34px) 0 56px;
  background: #ffffff;
}

.product-container {
  width: min(calc(100% - 80px), 1136px);
  margin-inline: auto;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 26px;
  color: #747982;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
}

.breadcrumbs span[aria-hidden="true"] {
  color: #9298a1;
  font-size: 23px;
  font-weight: 300;
  line-height: 0;
}

.product-back-link {
  display: inline-block;
  margin-top: 8px;
  color: #4f565f;
  font-size: 14px;
  line-height: 1.2;
}

.product-back-link:hover,
.product-back-link:focus-visible {
  color: #ef1824;
}

.product-detail {
  display: grid;
  grid-template-columns: 600px minmax(450px, 500px);
  gap: 36px;
  margin-top: 6px;
}

.product-detail[hidden] {
  display: none;
}

.product-not-found {
  max-width: 480px;
  padding: 72px 0 96px;
}

.product-not-found h1,
.product-not-found p {
  margin: 0;
}

.product-not-found h1 {
  color: #17191d;
  font-size: 34px;
  letter-spacing: -0.8px;
  line-height: 1.05;
}

.product-not-found p {
  margin-top: 12px;
  color: #6d737c;
  font-size: 16px;
  line-height: 1.4;
}

.product-not-found .button {
  display: inline-flex;
  margin-top: 24px;
}

.product-gallery__main,
.product-gallery__thumb {
  border: 1px solid #e2e5e8;
  border-radius: 5px;
  background: #f4f5f6;
}

.product-gallery__main {
  height: var(--product-gallery-height, 608px);
  margin-top: 0;
  overflow: hidden;
}

.product-gallery__main img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.product-gallery__thumbs[hidden] {
  display: none;
}

.product-gallery__thumb {
  height: 141px;
  padding: 0;
  cursor: default;
}

.product-gallery__thumb--active {
  border-color: #ef1824;
  box-shadow: inset 0 0 0 1px #ef1824;
}

.product-info {
  max-width: 500px;
}

.product-info__brand,
.product-info__sku,
.product-info h1,
.product-info h2 {
  margin: 0;
}

.product-info__brand {
  color: #6d737c;
  font-size: 15px;
  line-height: 1.3;
}

.product-info h1 {
  margin-top: 0;
  color: #111318;
  font-size: 35px;
  font-weight: 700;
  letter-spacing: -0.85px;
  line-height: 1.05;
}

.product-info__sku {
  margin-top: 16px;
  color: #5d636c;
  font-size: 16px;
  line-height: 1.2;
}

.product-info__section {
  margin-top: 17px;
  padding-top: 14px;
  border-top: 1px solid #dce0e3;
}

.product-info h2,
.product-terms h2 {
  color: #16181c;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.15;
}

.product-specifications {
  margin: 8px 0 0;
  border: 1px solid #dce0e3;
}

.product-specifications div {
  display: grid;
  grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
  align-items: start;
  height: auto;
  min-height: 26px;
  border-bottom: 1px solid #dce0e3;
}

.product-specifications div[hidden] {
  display: none;
}

.product-specifications div:last-child {
  border-bottom: 0;
}

.product-specifications dt,
.product-specifications dd {
  margin: 0;
  min-width: 0;
  padding-block: 4px;
  color: #6d737c;
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.product-specifications dt {
  padding-left: 12px;
}

.product-specifications dd {
  padding-left: 12px;
  border-left: 1px solid #dce0e3;
  color: #686e77;
  text-align: left;
  white-space: normal;
}

/* Enduro supplier descriptions can be much longer than compact e-bike facts.
   Keep the shared two-column table, but let only Enduro rows grow naturally. */
.product-detail:is([data-product-category="motorcycle"], [data-product-category="atv"]) .product-specifications div {
  grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
  align-items: start;
  height: auto;
  min-height: 26px;
}

.product-detail:is([data-product-category="motorcycle"], [data-product-category="atv"]) .product-specifications dt,
.product-detail:is([data-product-category="motorcycle"], [data-product-category="atv"]) .product-specifications dd {
  min-width: 0;
  padding-block: 4px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.product-detail:is([data-product-category="motorcycle"], [data-product-category="atv"]) .product-specifications dd {
  white-space: normal;
}

.product-equipment {
  margin-top: 15px;
  padding-top: 0;
  border-top: 0;
}

.product-equipment ul {
  margin: 8px 0 0;
  padding-left: 22px;
  color: #68707a;
  font-size: 15px;
  line-height: 1.4;
}

.product-terms {
  margin-top: 18px;
  padding: 14px 16px 16px;
  border: 1px solid #dbe0e4;
  border-radius: 6px;
  background: #f7f8f9;
}

.product-terms__grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.25fr;
  margin-top: 16px;
}

.product-terms__grid div {
  display: flex;
  min-height: 58px;
  padding: 0 16px;
  flex-direction: column;
  justify-content: flex-start;
}

.product-terms__grid div:first-child {
  padding-left: 11px;
}

.product-terms__grid div + div {
  border-left: 1px solid #d6dbe0;
}

.product-terms strong {
  color: #1d2025;
  font-size: 15px;
  line-height: 1.12;
}

.product-terms span {
  margin-top: 7px;
  color: #6b727c;
  font-size: 14px;
  line-height: 1.1;
}

.product-order {
  display: grid;
  grid-template-columns: 141px minmax(0, 1fr);
  gap: 16px;
  align-items: end;
  margin-top: 22px;
}

.product-quantity > span {
  display: block;
  margin-bottom: 8px;
  color: #3b4047;
  font-size: 14px;
  line-height: 1;
}

.quantity-control {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  height: 49px;
  overflow: hidden;
  border: 1px solid #cfd5db;
  border-radius: 6px;
}

.quantity-control button,
.quantity-control output {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: #ffffff;
  color: #22262c;
  font-family: inherit;
  font-size: 21px;
  line-height: 1;
}

.quantity-control button + output,
.quantity-control output + button {
  border-left: 1px solid #d9dde1;
}

.quantity-control output {
  font-size: 16px;
}

.product-add-button {
  height: 49px;
  border: 0;
  border-radius: 5px;
  background: #ef1824;
  color: #ffffff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
}

html.product-modal-open,
body.product-modal-open {
  overflow: hidden;
}

.product-modal[hidden] {
  display: none;
}

.product-modal {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px 40px;
  overflow-y: auto;
  background: rgba(17, 20, 24, 0.56);
}

.product-modal__dialog {
  position: relative;
  width: min(1200px, 100%);
  max-height: calc(100vh - 56px);
  padding: 28px;
  overflow-y: auto;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
  outline: 0;
}

.product-modal__close {
  position: absolute;
  z-index: 1;
  top: 14px;
  right: 17px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #20242a;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 32px;
  font-weight: 300;
  line-height: 1;
}

.product-modal .product-detail {
  grid-template-columns: 520px minmax(430px, 1fr);
  gap: 34px;
  margin: 0;
}

.product-modal .product-gallery__main {
  height: 522px;
}

.product-modal .product-gallery__thumb {
  height: 106px;
}

.product-modal .product-info {
  max-width: none;
  padding-right: 6px;
}

.product-modal .product-info h2 {
  margin-top: 11px;
  padding-right: 42px;
  color: #111318;
  font-size: 35px;
  font-weight: 700;
  letter-spacing: -0.85px;
  line-height: 1.05;
}

.product-modal .product-info h3,
.product-modal .product-terms h3 {
  margin: 0;
  color: #16181c;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.15;
}

.product-modal .product-specifications div {
  grid-template-columns: minmax(0, 1fr) minmax(160px, 42%);
}

.product-modal .product-terms__grid {
  grid-template-columns: 1fr 1fr 1.55fr;
}

.product-modal .product-terms__grid div:last-child strong {
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .product-container {
    width: calc(100% - 64px);
  }

  .product-detail {
    grid-template-columns: minmax(0, 1fr) minmax(380px, 0.86fr);
    gap: 28px;
  }

  .product-gallery__main {
    height: var(--product-gallery-height, 520px);
  }
}

@media (max-width: 860px) {
  .product-page .site-header {
    height: auto;
    min-height: 78px;
    flex-wrap: wrap;
    gap: 16px;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .product-page .site-nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }

  .product-detail {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }

  .product-gallery__main {
    height: 520px;
    margin-top: 0;
  }

  .product-gallery {
    max-width: 620px;
    margin-inline: auto;
  }

  .product-info {
    max-width: 620px;
    width: 100%;
    margin-inline: auto;
  }
}

@media (max-width: 640px) {
  .product-container {
    width: calc(100% - 32px);
  }

  .product-main {
    padding-top: 24px;
  }

  .product-page .site-header {
    padding-right: var(--header-gutter);
    padding-left: var(--header-gutter);
  }

  .product-page .site-nav {
    gap: 12px;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 2px;
  }

  .breadcrumbs {
    gap: 8px;
    overflow-x: auto;
    font-size: 12px;
  }

  .product-gallery__main {
    height: 360px;
  }

  .product-gallery__thumbs {
    gap: 8px;
    margin-top: 8px;
  }

  .product-gallery__thumb {
    height: 78px;
  }

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

  .product-specifications div {
    grid-template-columns: minmax(0, 40%) minmax(0, 1fr);
  }

  .product-specifications dd {
    white-space: normal;
  }

  .product-detail:is([data-product-category="motorcycle"], [data-product-category="atv"]) .product-specifications div {
    grid-template-columns: minmax(0, 40%) minmax(0, 1fr);
  }

  .product-terms__grid,
  .product-order {
    grid-template-columns: 1fr;
  }

  .product-terms__grid div {
    min-height: 0;
    padding: 13px 0;
  }

  .product-terms__grid div:first-child {
    padding-left: 0;
  }

  .product-terms__grid div + div {
    border-top: 1px solid #d6dbe0;
    border-left: 0;
  }
}

@media (max-width: 420px) {
  .product-gallery__main {
    height: 300px;
  }

  .product-gallery__thumb {
    height: 64px;
  }

  .product-specifications div {
    grid-template-columns: minmax(0, 39%) minmax(0, 1fr);
  }

  .product-specifications dt,
  .product-specifications dd {
    font-size: 13px;
  }

  .product-detail:is([data-product-category="motorcycle"], [data-product-category="atv"]) .product-specifications div {
    grid-template-columns: minmax(0, 39%) minmax(0, 1fr);
  }
}

/* Match the compact shared header on phones. The action buttons remain in the
   top row while navigation wraps below them in normal document flow. */
@media (max-width: 600px) {
  .product-page .site-header {
    display: grid;
    grid-template-columns: clamp(96px, 31vw, 126px) minmax(0, 1fr) 42px;
    grid-template-areas:
      "brand consultation cart"
      "nav nav nav";
    min-height: 0;
    padding: 12px var(--header-gutter) 14px;
    column-gap: clamp(5px, 2vw, 12px);
    row-gap: 12px;
  }

  .product-page .site-header .brand,
  .product-page .site-header .brand img {
    width: clamp(96px, 31vw, 126px);
  }

  .product-page .site-header .brand {
    grid-area: brand;
    min-width: 0;
    flex-basis: auto;
  }

  .product-page .site-header .cart-toggle {
    grid-area: cart;
    justify-self: end;
    margin: 0;
  }

  .product-page .site-header .consultation-link {
    grid-area: consultation;
    width: auto;
    min-width: 0;
    height: 44px;
    margin: 0;
    padding-inline: clamp(4px, 2.4vw, 16px);
    justify-self: end;
    font-size: clamp(10px, 3vw, 13px);
  }

  .product-page .site-header .site-nav {
    grid-area: nav;
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px 14px;
    overflow: visible;
  }

  .product-page .site-header .site-nav a {
    font-size: 14px;
  }

  .breadcrumbs {
    flex-wrap: wrap;
    gap: 6px 8px;
    overflow: visible;
    white-space: normal;
  }
}
