/* Shared product page. Native gallery, product form and wallet blocks remain in place. */
body.catalog-product-view #maincontent .ah-pdp-action-wrap {
  display: block;
  margin: 12px 0 0;
}

body.catalog-product-view #maincontent .ah-pdp-actions {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 46px !important;
  align-items: center;
  gap: 8px;
  width: min(100%, 480px);
  margin: 0;
}

body.catalog-product-view #maincontent .ah-pdp-actions > div:has(> input[name="qty"]) {
  grid-area: 1 / 1 / 2 / -1;
  margin: 0;
}

body.catalog-product-view #maincontent .ah-pdp-actions > #product-addtocart-button {
  grid-area: 2 / 1 / 3 / 2;
  width: 100%;
  min-height: 46px;
  justify-content: center;
  border-radius: 6px;
  padding-inline: 8px;
}

body.catalog-product-view #maincontent .ah-pdp-actions:not(:has(#add-to-wishlist)) > #product-addtocart-button {
  grid-column: 1 / -1;
}

body.catalog-product-view #maincontent .ah-pdp-actions > .mcstan:has(#add-to-wishlist) {
  grid-area: 2 / 2 / 3 / 3;
  justify-self: stretch;
}

body.catalog-product-view #maincontent .ah-pdp-actions #add-to-wishlist {
  width: 46px;
  height: 46px;
  margin: 0;
  border: 1px solid #d1ded5;
  border-radius: 6px;
  background: #fff;
  color: #07552c;
}

body.catalog-product-view #maincontent .ah-pdp-actions > #payment-method-messaging-element {
  grid-area: 4 / 1 / 5 / -1;
}

body.catalog-product-view #maincontent .ah-pdp-actions > #payment-method-messaging-element:empty {
  display: none;
}

.ah-pdp-buy-now {
  grid-area: 3 / 1 / 4 / 2;
  min-height: 44px;
  width: 100%;
  border: 1px solid #98b1a0;
  border-radius: 6px;
  background: #fff;
  color: #07552c;
  font-weight: 700;
}

.ah-pdp-actions:not(:has(#add-to-wishlist)) > .ah-pdp-buy-now {
  grid-column: 1 / -1;
}

.ah-pdp-buy-now:hover,
.ah-pdp-trust a:hover,
body.catalog-product-view #maincontent .ah-pdp-actions #add-to-wishlist:hover {
  background: #eaf5ed;
}

.ah-pdp-buy-now:focus-visible,
.ah-pdp-trust a:focus-visible,
#gallery #thumbs button:focus-visible {
  outline: 2px solid #087442;
  outline-offset: -3px;
}

.ah-pdp-trust {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid #dce9df;
  border-radius: 8px;
  background: #f3f8f4;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.ah-pdp-trust li { display: flex; min-width: 0; }
.ah-pdp-trust a {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 62px;
  gap: 9px;
  padding: 9px 10px;
  color: #173b28;
  text-decoration: none;
  line-height: 1.24;
}
.ah-pdp-trust a > svg {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  color: #087442;
}
.ah-pdp-trust strong { display: block; font-size: .875rem; }
.ah-pdp-trust small { display: block; color: #435d4c; font-size: .75rem; }
.ah-pdp-trust li:nth-child(even) { border-inline-start: 1px solid #dce9df; }
.ah-pdp-trust li:nth-child(n+3) { border-block-start: 1px solid #dce9df; }

@media (min-width: 768px) {
  .ah-pdp-trust { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ah-pdp-trust li:nth-child(n+2) { border-inline-start: 1px solid #dce9df; border-block-start: 0; }
  .ah-pdp-trust a { padding-inline: 14px; }

  #gallery > div:not([role="dialog"]) {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    position: relative;
  }
  #gallery > div:not([role="dialog"]) > div:has(> #thumbs) {
    grid-area: 1 / 1;
    min-width: 0;
  }
  #gallery > div:not([role="dialog"]) > .self-center {
    grid-area: 1 / 2;
    align-self: start;
    min-width: 0;
    border: 1px solid #e1eae3;
    border-radius: 8px;
    background: #fff;
  }
  #gallery > div:not([role="dialog"]) > .self-center > div { margin-bottom: 0; }
  #gallery > div:not([role="dialog"]) #thumbs {
    width: clamp(58px, 5.5vw, 74px);
    max-height: clamp(270px, 34vw, 466px);
    align-items: stretch;
  }
  #gallery > div:not([role="dialog"]) #thumbs > button { display: none; }
  #gallery > div:not([role="dialog"]) #thumbs .js_thumbs_slides {
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    gap: 6px;
    padding: 2px;
    scroll-snap-type: y proximity;
  }
  #gallery > div:not([role="dialog"]) #thumbs .js_thumbs_slide {
    width: 100%;
    margin: 0;
    scroll-snap-align: start;
  }
  #gallery > div:not([role="dialog"]) #thumbs .js_thumbs_slide button {
    width: 100%;
    min-height: 44px;
    border-radius: 5px;
    background: #fff;
  }
  #gallery > div:not([role="dialog"]) #thumbs .js_thumbs_slide img {
    width: 100%;
    aspect-ratio: 1;
    height: auto;
    object-fit: contain;
  }
}

/* Title, model information, review summary and overview in blueprint order. */
body.catalog-product-view #maincontent .container:has(> .ah-pdp-heading-meta) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: start;
  align-items: start;
  column-gap: 12px;
  margin-block: 0 10px;
}

body.catalog-product-view #maincontent .container:has(> .ah-pdp-heading-meta) > h1 {
  grid-column: 1;
  margin: 0;
  font-size: clamp(1.35rem, 2.3vw, 2rem);
  line-height: 1.19;
  font-weight: 750;
}

.ah-pdp-brand {
  grid-column: 2;
  margin-block-start: 3px;
  padding: 3px 8px;
  border: 1px solid #dce9df;
  border-radius: 5px;
  background: #f4f8f5;
  color: #193d29;
  font-size: .8125rem;
  font-weight: 800;
  line-height: 1.45;
  max-width: 130px;
  overflow-wrap: anywhere;
}

.ah-pdp-heading-meta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 13px;
  margin-top: 8px;
  font-size: .875rem;
  font-weight: 500;
  color: #445249;
  text-align: start;
}

.ah-pdp-heading-meta a,
.ah-pdp-why-buy a,
.ah-pdp-information a {
  text-decoration: none;
}

.ah-pdp-review-jump,
.ah-pdp-why-buy a {
  color: #07552c;
  font-weight: 700;
}

.ah-pdp-review-jump {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.ah-pdp-stock {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  color: #173b28;
  font-size: .875rem;
}

.ah-pdp-overview {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.ah-pdp-overview-copy { min-width: 0; }
.ah-pdp-highlights,
.ah-pdp-why-buy ul {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}
.ah-pdp-highlights li,
.ah-pdp-why-buy li {
  position: relative;
  padding-inline-start: 1.5rem;
  margin-block-start: 8px;
  font-size: .875rem;
  line-height: 1.4;
}
.ah-pdp-highlights li::before,
.ah-pdp-why-buy li::before {
  content: "";
  position: absolute;
  inset-inline-start: .2rem;
  top: .31rem;
  width: 6px;
  height: 9px;
  border: solid #087442;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.ah-pdp-highlights strong { margin-inline-end: .35rem; }
.ah-pdp-why-buy {
  align-self: start;
  padding: 14px;
  background: #f1f8f2;
  border: 1px solid #dce9df;
  border-radius: 7px;
}
.ah-pdp-why-buy h2 { margin: 0; color: #173b28; font-size: 1rem; font-weight: 750; }
.ah-pdp-why-buy ul { margin-bottom: 0; }
.ah-pdp-why-buy a { display: inline-block; padding-block: 3px; }
.ah-pdp-review-jump:focus-visible,
.ah-pdp-why-buy a:focus-visible,
.ah-pdp-tab:focus-visible {
  outline: 2px solid #087442;
  outline-offset: -2px;
}
#ah-pdp-reviews { scroll-margin-top: 6rem; }

@media (min-width: 768px) {
  .ah-pdp-overview { grid-template-columns: minmax(0, 1fr) minmax(200px, 27%); }
  .ah-pdp-tab {
    min-height: 44px;
    padding-inline: 14px;
    border-radius: 0;
    border: 0;
    border-bottom: 3px solid transparent;
    color: #243b2e;
    background: transparent;
  }
  .ah-pdp-tab[aria-selected="true"] {
    border-bottom-color: #087442;
    color: #07552c;
    font-weight: 750;
  }
}

@media (max-width: 767px) {
  .ah-pdp-brand { max-width: 82px; }
  #gallery > div:not([role="dialog"]) #thumbs .js_thumbs_slide button { min-width: 52px; min-height: 52px; }
  #gallery > div:not([role="dialog"]) #thumbs .js_thumbs_slide img { width: 52px; height: 52px; object-fit: contain; }
}

@media (max-width: 599px) {
  body.catalog-product-view #maincontent .container:has(> .ah-pdp-heading-meta) {
    grid-template-columns: minmax(0, 1fr);
    padding-inline: 0;
  }

  .ah-pdp-brand {
    grid-column: 1;
    justify-self: start;
    margin-top: 8px;
  }

  .ah-pdp-heading-meta { margin-top: 4px; }
}
