.wp-site-blocks > header .forma-service-strip { display: none; }
@media (min-width: 1024px) {
  body.home .wp-site-blocks > header .forma-service-strip { display: block; }
}

.forma-single-product {
  --forma-product-line: color-mix(in srgb, var(--forma-forest) 19%, white);
  --forma-product-tint: color-mix(in srgb, var(--forma-forest) 5%, white);
  padding-top: clamp(1rem, 2vw, 2rem);
}
.forma-single-product > :is(.woocommerce-breadcrumb, .alignwide, .forma-product-details) {
  max-width: var(--forma-content-max) !important;
}
.forma-single-product > .woocommerce-breadcrumb {
  color: var(--wp--preset--color--muted);
  font-size: .75rem;
  margin-block: 0;
}
.forma-single-product .forma-product-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  grid-template-areas: "gallery title" "gallery buy" "gallery .";
  grid-template-rows: auto auto 1fr;
  align-items: start;
  column-gap: clamp(1.5rem, 3.5vw, 3rem) !important;
  row-gap: 1.15rem !important;
  margin-top: 1.65rem !important;
}
.forma-product-summary > * { min-width: 0; width: 100%; max-width: none !important; margin: 0 !important; }
.forma-product-gallery-area { grid-area: gallery; }
.forma-product-summary .forma-product-title {
  grid-area: title;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: -.035em;
  line-height: 1.12;
}
.forma-product-buy-panel { grid-area: buy; }
.forma-product-buy-panel > * { width: 100%; max-width: none !important; }
.forma-product-price-stack > * { max-width: none !important; }
.forma-buy-rating {
  position: relative;
  display: inline-block;
  width: max-content;
  margin: 0 0 .35rem !important;
  color: #c88e00;
  font: 1.25rem/1 "Segoe UI Symbol", sans-serif;
  letter-spacing: .06em;
  white-space: nowrap;
}
.forma-rating-fill { position: absolute; inset: 0 auto 0 0; overflow: hidden; }

.forma-product-gallery-area .wc-block-product-gallery {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  max-width: none;
}
.forma-product-gallery-area .wc-block-product-gallery-thumbnails {
  flex: 0 0 clamp(52px, 6vw, 72px) !important;
  width: clamp(52px, 6vw, 72px) !important;
  max-width: none !important;
}
.forma-product-gallery-area .wc-block-product-gallery-thumbnails__scrollable {
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
.forma-product-gallery-area .wc-block-product-gallery-thumbnails__thumbnail {
  width: 100%;
  flex: 0 0 auto;
  padding: 0;
}
.forma-product-gallery-area .wc-block-product-gallery-thumbnails__thumbnail__image {
  display: block;
  width: 100%;
  height: auto;
  border: 2px solid transparent;
  border-radius: .45rem;
  opacity: 1;
}
.forma-product-gallery-area .wc-block-product-gallery-thumbnails__thumbnail__image--is-active {
  border-color: var(--forma-forest);
  opacity: 1;
}
.forma-product-gallery-area .wc-block-product-gallery-large-image {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
  border-radius: .55rem;
  background: #f5f5f5;
}
.forma-product-gallery-area .wc-block-product-gallery-large-image__container { border-radius: inherit; }
.forma-product-gallery-area .wc-block-next-previous-buttons { opacity: 0; }
.forma-product-gallery-area :is(.wc-block-product-gallery-large-image:hover, .wc-block-product-gallery-large-image:focus-within) .wc-block-next-previous-buttons { opacity: 1; }
.forma-gallery-enlarge {
  position: absolute;
  z-index: 2;
  inset: auto .7rem .7rem auto;
  padding: .45rem .7rem;
  border: 1px solid #eee;
  border-radius: .35rem;
  background: #fff;
  color: #202020;
  font-size: .78rem;
  cursor: pointer;
}

.forma-product-highlights { grid-area: highlights; }
.forma-product-summary:has(.forma-product-highlights:empty) .forma-product-highlights { display: none; }
.forma-highlight-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  list-style: none;
  padding: 0;
  margin: 0;
}
.forma-highlight-list > li {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: .2rem;
  padding: .35rem .7rem;
  text-align: center;
  font-size: .8rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.forma-highlight-list > li + li { border-inline-start: 1px solid var(--forma-product-line); }
.forma-highlight-list > li > span:last-child { color: var(--wp--preset--color--muted); }
.forma-highlight-icon {
  display: block;
  width: 26px;
  height: 26px;
  margin-bottom: .15rem;
  background: var(--forma-forest);
  mask: url(icons/tag.svg) center / contain no-repeat;
}
.forma-highlight-list > li:nth-child(2) .forma-highlight-icon { mask-image: url(icons/bolt.svg); }
.forma-highlight-list > li:nth-child(3) .forma-highlight-icon { mask-image: url(icons/check.svg); }

.forma-price-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem 1rem;
  margin: 0 0 1rem !important;
}
.forma-product-buy-panel .forma-buy-price { margin: 0 !important; font-weight: 750; }
.forma-product-buy-panel .forma-buy-price .wc-block-components-product-price {
  color: var(--forma-forest);
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  line-height: 1.2;
}
.forma-buy-price del {
  font-size: .63em;
  font-weight: 500;
  margin-inline-end: .3em;
}
.forma-buy-price ins { text-decoration: none; }
.forma-buy-price .wc-block-components-product-price:has(> ins) {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .25rem .55rem;
}
.forma-buy-price del { order: 1; }
.forma-price-savings {
  padding: .28rem .75rem;
  border-radius: 99px;
  background: var(--forma-forest);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
}
.woocommerce div.product .forma-product-buy-panel form.cart { margin-block: 0; }
.woocommerce div.product .forma-product-buy-panel form.variations_form { display: block; }
.forma-product-buy-panel form.cart .variations { margin-bottom: .85rem; }
.forma-product-buy-panel form.cart .variations tbody { display: block; width: 100%; }
.forma-product-buy-panel form.cart .variations th,
.forma-product-buy-panel .stock { font-size: .85rem; }
.forma-product-buy-panel .stock.in-stock { color: #286249; }
.forma-product-buy-panel form.cart :is(.variations td, .variations th) { padding: 0 0 .45rem; }
.forma-product-buy-panel form.cart .variations tr + tr { margin-top: .6rem; }
.woocommerce div.product .forma-product-buy-panel form.cart .variations select {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding-block: 0;
  font-size: .93rem;
  line-height: normal;
}
.forma-product-buy-panel .variations select[hidden] { display: none !important; }
.forma-product-buy-panel .reset_variations { font-size: .8rem; }
.forma-product-buy-panel .woocommerce-variation-price { margin-block: .2rem; }
.forma-product-buy-panel.forma-variation-price-active .woocommerce-variation-price { display: none; }
.forma-product-buy-panel .woocommerce-variation-availability > .stock { margin-block: 0 .65rem; }
.forma-product-buy-panel .woocommerce-variation-add-to-cart,
.forma-product-buy-panel form.cart.forma-has-quantity:not(.variations_form) {
  display: flex;
  align-items: stretch;
  gap: .65rem;
}
.forma-product-buy-panel form.cart.forma-has-quantity:not(.variations_form) { padding-inline: 0; }
.forma-product-buy-panel .single_add_to_cart_button,
.woocommerce div.product .forma-product-buy-panel form.cart .single_add_to_cart_button {
  flex: 1;
  min-width: 0;
  min-height: 50px;
  width: 100%;
  padding: .7rem .85rem !important;
  border-radius: .5rem !important;
}
.forma-product-buy-panel .quantity.forma-quantity {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  border: 1px solid var(--forma-product-line);
  border-radius: .5rem;
  margin: 0 !important;
}
.forma-quantity button {
  width: 38px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--wp--preset--color--ink);
  cursor: pointer;
}
.forma-quantity button:disabled { opacity: .4; cursor: default; }
.forma-product-buy-panel .forma-quantity input.qty {
  width: 3ch;
  min-height: 38px;
  padding: 0;
  border: 0;
  text-align: center;
  appearance: textfield;
}
.forma-quantity input.qty::-webkit-inner-spin-button { appearance: none; }
.forma-colour-swatches {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem;
  margin-block: .1rem .35rem;
}
.forma-colour-swatches button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 3px;
  border: 1px solid var(--forma-product-line);
  border-radius: 99px;
  background: #fff;
  color: #232323;
  font-size: .82rem;
  cursor: pointer;
}
.forma-colour-swatches button:disabled { opacity: .42; cursor: default; }
.forma-colour-swatches button[aria-pressed="true"] {
  outline: 2px solid var(--forma-forest);
  outline-offset: 1px;
}
.forma-colour-swatches button:focus-visible {
  box-shadow: 0 0 0 4px var(--forma-product-line);
}
.forma-colour-dot {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: var(--swatch);
}
.forma-colour-dot img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}
.forma-colour-heading { margin-top: .65rem; }
.forma-colour-selection { color: inherit; font-weight: 700; margin-inline-start: .4rem; }

.forma-product-assurance {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .85rem;
  background: var(--forma-product-tint);
  border: 1px solid var(--forma-product-line);
  border-radius: .65rem;
  padding: 1rem 1.4rem;
}
.forma-product-assurance > .forma-product-assurance-item {
  display: flex;
  align-items: center;
  gap: .65rem;
  max-width: none;
  margin: 0 !important;
  padding-inline-start: .85rem;
}
.forma-product-assurance-item + .forma-product-assurance-item { border-inline-start: 1px solid var(--forma-product-line); }
.forma-product-assurance-item > p { font-size: .85rem; line-height: 1.4; margin: 0 !important; }
.forma-product-assurance-item .forma-icon { width: 26px; height: 26px; }
.forma-product-assurance-item img { filter: hue-rotate(100deg) saturate(2.7) brightness(1.35); }
.forma-single-product .forma-product-details { margin-block: 1.65rem !important; }
.forma-single-product .wc-tabs { border-block: 1px solid var(--forma-product-line); }

.forma-product-rail:not(:has(.wc-block-product)) { display: none; }
.editor-styles-wrapper .forma-product-rail { display: block; }
.forma-product-rail :is(.forma-rail-heading, .forma-section-heading) {
  display: flex;
  align-items: center;
  gap: .8rem 1.15rem;
  max-width: none !important;
  margin-block: 0 .95rem !important;
}
.forma-product-rail :is(.forma-rail-heading, .forma-section-heading)::after {
  content: "";
  flex: 1 1 1.2rem;
  height: 4px;
  background: #eee;
  order: 5;
}
.forma-product-rail .forma-rail-buttons {
  display: flex;
  gap: .5rem;
  order: 6;
  margin: 0 !important;
}
.forma-product-rail .forma-rail-buttons[hidden] { display: none; }
.forma-rail-buttons button {
  width: 42px;
  height: 42px;
  border-radius: .45rem;
  border: 1px solid #e3e3e3;
  background: #fff;
  color: #222;
  cursor: pointer;
}
.forma-rail-buttons button:disabled { opacity: .43; cursor: default; }
.forma-product-rail h2 { font-size: clamp(1.35rem, 2.5vw, 1.9rem); margin: 0 !important; }
.forma-product-rail .wp-block-woocommerce-product-collection { max-width: none !important; }
.forma-product-rail .wc-block-product-template {
  display: grid !important;
  grid-template-columns: none !important;
  grid-auto-flow: column;
  grid-auto-columns: clamp(180px, 22%, 275px);
  gap: clamp(.75rem, 2vw, 1.4rem) !important;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  margin: 0;
  padding: .25rem 0 .45rem;
}
.forma-product-rail .wc-block-product {
  scroll-snap-align: start;
  min-width: 0;
  margin: 0 !important;
  padding: .9rem;
  border: 1px solid #eee;
  border-radius: .75rem;
  background: #fff;
  text-align: start;
}
.forma-product-rail .wc-block-product .wc-block-components-product-image { background: #fff; border-radius: .35rem; }
.forma-product-rail .wc-block-product img { object-fit: contain; }
.forma-product-rail .wc-block-product .wp-block-post-title,
.forma-product-rail .wc-block-product .wp-block-woocommerce-product-price { font-weight: 700; }
.forma-product-rail .wp-block-post-title a { color: #161616; }
.forma-product-rail .wp-block-post-title a:hover,
.forma-product-rail .wp-block-post-title a:focus-visible { color: var(--forma-forest); }
.forma-product-rail .wc-block-product .wp-block-button__link {
  display: block;
  width: 100%;
  min-height: 40px;
  padding: .55rem .45rem;
  border-radius: .45rem;
  font-size: .84rem;
}

@media (max-width: 781px) {
  .single-product:has(.forma-product-summary) { padding-bottom: 0; }
  .forma-single-product .forma-product-summary {
    grid-template-columns: minmax(0, 1fr) minmax(70px, 24%);
    grid-template-areas: "gallery highlights" "title title" "price price" "buy buy";
    grid-template-rows: auto auto auto auto;
    gap: .7rem .55rem !important;
    margin-top: .9rem !important;
  }
  .forma-single-product .forma-product-summary:not(:has(.forma-highlight-list)) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "gallery" "title" "price" "buy";
  }
  .forma-product-summary .forma-product-buy-panel { display: contents; }
  .forma-product-buy-panel > :is(.forma-product-price-stack, .forma-product-highlights, .wp-block-add-to-cart-form) { margin: 0 !important; }
  .forma-product-price-stack { grid-area: price; }
  .forma-product-buy-panel > .wp-block-add-to-cart-form { grid-area: buy; }
  .forma-product-summary .forma-product-title { font-size: clamp(1.4rem, 6vw, 2rem); }
  .forma-product-gallery-area .wc-block-product-gallery {
    flex-direction: column !important;
    align-items: center;
    gap: .3rem;
  }
  .forma-product-gallery-area .wc-block-product-gallery-thumbnails {
    order: 2 !important;
    flex: 0 0 38px !important;
    width: auto !important;
    height: 38px !important;
    aspect-ratio: auto !important;
    max-width: 100% !important;
  }
  .forma-product-gallery-area .wc-block-product-gallery-thumbnails__scrollable {
    flex-direction: row;
    gap: .3rem;
    min-height: 38px;
    max-height: 42px;
  }
  .forma-product-gallery-area .wc-block-product-gallery-thumbnails__thumbnail { flex: 0 0 36px; height: 36px; }
  .forma-product-gallery-area .wc-block-product-gallery-thumbnails__thumbnail__image {
    height: 100%;
    object-fit: cover;
  }
  .forma-product-gallery-area .wc-block-product-gallery-large-image { flex: 0 0 auto; order: 1; }
  .forma-gallery-enlarge { inset: auto .4rem .45rem auto; font-size: .68rem; }
  .forma-product-highlights { align-self: stretch; }
  .forma-highlight-list { grid-template-columns: 1fr; grid-auto-rows: 1fr; gap: .3rem; height: 100%; }
  .forma-product-summary:has(.wc-block-product-gallery-thumbnails:not([hidden])) .forma-highlight-list {
    height: calc(100% - 38px);
  }
  .forma-highlight-list > li,
  .forma-highlight-list > li + li {
    border: 0;
    border-radius: .38rem;
    background: var(--forma-product-tint);
    padding: .45rem .15rem;
    font-size: .66rem;
  }
  .forma-highlight-icon { width: 19px; height: 19px; }
  .forma-single-product .forma-product-assurance { display: none; }
  .forma-product-rail .wc-block-product-template { grid-auto-columns: clamp(142px, 52%, 220px); }
}

@media (prefers-reduced-motion: reduce) {
  .forma-product-rail .wc-block-product:hover img { transform: none; transition: none; }
}
