/* Scoped, open image stages: original pixels and native WooCommerce content remain intact. */
.products .product.bactive-collection-product {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible;
  color: #242222 !important;
  padding: 0 !important;
}
.products .product.bactive-collection-product:hover { box-shadow: none; }
.products .bactive-collection-product figure { margin: 0 0 20px; }
.products .bactive-collection-product .ct-media-container {
  display: block;
  aspect-ratio: auto;
  background: #f9f7f4 !important;
  overflow: hidden;
  border-radius: 0 !important;
}
.products .bactive-collection-product .ct-media-container img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto 2 / 3 !important;
  object-fit: contain;
  border-radius: 0 !important;
}
.woocommerce ul.products li.bactive-collection-product .woocommerce-loop-product__title {
  margin: 0 0 6px;
  font: 600 clamp(23px, 2vw, 29px) / 1.15 var(--bactive-font-head, Rajdhani, sans-serif);
  letter-spacing: 0 !important;
}
.products .bactive-collection-product .entry-meta { margin: 0 0 12px; }
.products .bactive-collection-product .ct-woo-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 0 !important;
}
.products .bactive-collection-product .price {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  font: 400 16px / 1.5 Inter, sans-serif;
  font-variant-numeric: tabular-nums;
}
.products .bactive-collection-product .ct-woo-card-actions .button {
  position: static;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  min-height: 44px;
  padding: 10px 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #40543c !important;
  font: 500 14px / 1.5 Inter, sans-serif;
  text-decoration: underline;
  text-underline-offset: 5px;
}
.bactive-collection-product a:focus-visible, .bactive-editorial a:focus-visible {
  outline: 2px solid #40543c;
  outline-offset: 4px;
}
.bactive-collection-product ::selection, .bactive-editorial ::selection { background: #829677; color: #242222; }
.bactive-editorial {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: stretch;
  margin: clamp(56px, 7vw, 104px) auto;
  max-width: 1464px;
  background: #f9f7f4 !important;
  color: #242222 !important;
}
.bactive-editorial-media { min-width: 0; }
.bactive-editorial-image { display: block; width: 100%; height: 100%; object-fit: contain; }
.bactive-editorial-copy { align-self: center; padding: clamp(28px, 5vw, 72px); }
.bactive-editorial h2 {
  margin: 0 0 24px;
  font: 600 clamp(34px, 4vw, 58px) / 1.05 var(--bactive-font-head, Rajdhani, sans-serif);
  text-wrap: balance;
}
.bactive-editorial p { max-width: 45ch; margin: 0 0 28px; font: 400 17px / 1.65 Inter, sans-serif; }
.bactive-editorial a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 24px !important;
  background: #40543c !important;
  color: #f9f7f4 !important;
  font: 500 16px / 1.4 Inter, sans-serif;
  text-decoration: none;
}
.bactive-editorial a:hover { background: #242222; color: #f9f7f4; }
@media (max-width: 699px) {
  .bactive-editorial { grid-template-columns: 1fr; }
  .bactive-editorial-copy { padding: 32px 24px; }
  .products .bactive-collection-product figure { margin-bottom: 14px; }
}

.products .product.bactive-collection-product { text-align: left; transition: none !important; }
.products .product.bactive-collection-product:hover { transform: none !important; box-shadow: none !important; }
.products .bactive-collection-product .woocommerce-loop-product__title a { font: inherit; }
.products .bactive-collection-product .entry-meta { justify-content: flex-start; }
.products .bactive-collection-product .ct-woo-card-actions .button:hover { background: transparent !important; color: #242222 !important; transform: none !important; box-shadow: none !important; }
.bactive-editorial a:hover { background: #242222 !important; color: #f9f7f4 !important; }

/* Release only grids containing reviewed cards; Blocksy retains native card content. */
.products:has(> .bactive-collection-product) {
  --shop-columns: repeat(4, minmax(0, 1fr));
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 40px 24px !important;
}
.products .product.bactive-collection-product { min-width: 0; display: flex; flex-direction: column; }
.products .bactive-collection-product .woocommerce-loop-product__title { min-height: 2.3em; }
.products .bactive-collection-product .ct-woo-card-actions { margin-top: 0; }
/* Share content tracks within each card row; optional previews cannot lift prices.
 * Keep native/mixed grids and unfamiliar Blocksy card structures on the flex fallback. */
@supports (grid-template-rows: subgrid) {
  .products:not(:has(> :not(.bactive-collection-product), > .product > :not(figure, .woocommerce-loop-product__title, .entry-meta, .ct-woo-card-actions, .bactive-colour-previews))) > .product.bactive-collection-product {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: subgrid;
    grid-row: span 5;
    row-gap: 0;
    align-items: start;
  }
  .products:not(:has(> :not(.bactive-collection-product), > .product > :not(figure, .woocommerce-loop-product__title, .entry-meta, .ct-woo-card-actions, .bactive-colour-previews))) > .product.bactive-collection-product > :is(figure, .ct-woo-card-actions) {
    width: 100%;
    margin-inline: 0;
  }
  .products > .bactive-collection-product > figure { grid-row: 1; }
  .products > .bactive-collection-product > .woocommerce-loop-product__title { grid-row: 2; }
  .products > .bactive-collection-product > .entry-meta { grid-row: 3; }
  .products > .bactive-collection-product > .ct-woo-card-actions { grid-row: 4; }
  .products > .bactive-collection-product > .bactive-colour-previews { grid-row: 5; }
}
.bactive-colour-previews { display: flex; flex-wrap: wrap; gap: 0 12px; margin-top: 10px; }
.bactive-colour-preview { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font: 400 12px/1.3 Inter, sans-serif; color: #40543c; text-decoration: none; }
.bactive-colour-preview:hover { text-decoration: underline; text-underline-offset: 3px; }
.bactive-colour-dot { width: 18px; height: 18px; flex: 0 0 18px; border: 1px solid #b1b1a9; border-radius: 50%; background: var(--bactive-preview); }
/* The existing fit section receives only this class after its reviewed block hash matches. */
.bactive-editorial-existing { background: #f9f7f4 !important; margin-block: clamp(56px,7vw,104px) !important; padding: 0 !important; color: #242222 !important; }
.bactive-editorial-existing > .wp-block-columns { display: grid !important; grid-template-columns: 1.2fr 1fr !important; gap: 0 !important; align-items: stretch !important; max-width: 1464px; margin: 0 auto !important; }
.bactive-editorial-existing .wp-block-column { min-width: 0; }
.bactive-editorial-existing .wp-block-column:has(h2) { align-self: center; padding: clamp(28px,5vw,72px) !important; }
.bactive-editorial-existing figure { margin: 0 !important; height: 100%; }
.bactive-editorial-existing img { display: block; width: 100% !important; height: 100% !important; max-height: none !important; object-fit: contain !important; border-radius: 0 !important; }
.bactive-editorial-existing h2 { margin: 0 0 24px !important; font: 600 clamp(34px,4vw,58px)/1.05 var(--bactive-font-head,Rajdhani,sans-serif) !important; color: #242222 !important; text-wrap: balance; }
.bactive-editorial-existing p { max-width: 45ch; margin: 0 0 28px !important; font: 400 17px/1.65 Inter,sans-serif !important; }
.bactive-editorial-existing a { display: inline-flex; align-items: center; min-height: 48px; padding: 12px 24px !important; background: #40543c !important; color: #f9f7f4 !important; font: 500 16px/1.4 Inter,sans-serif !important; text-transform: none !important; text-decoration: none; border-radius: 0 !important; }
.bactive-editorial-existing a:focus-visible { outline: 2px solid #40543c; outline-offset: 4px; }
.bactive-editorial-existing a:hover { background: #242222 !important; }
@media (max-width: 999px) {
  .products:has(> .bactive-collection-product) { grid-template-columns: repeat(2,minmax(0,1fr)) !important; --shop-columns: repeat(2,minmax(0,1fr)); gap: 32px 16px !important; }
}
@media (max-width: 699px) {
  .bactive-editorial-existing > .wp-block-columns { grid-template-columns: 1fr !important; }
  .bactive-editorial-existing .wp-block-column:has(h2) { padding: 32px 24px !important; }
  .products .bactive-collection-product .ct-woo-card-actions { align-items: flex-start; flex-direction: column; gap: 0; }
  .woocommerce ul.products li.bactive-collection-product .woocommerce-loop-product__title { font-size: 23px; }
}

.bactive-collection-product .bactive-colour-preview[aria-pressed="true"] .bactive-colour-dot {
  outline: 2px solid #40543c;
  outline-offset: 3px;
}
.bactive-collection-product .bactive-colour-preview[aria-busy="true"] { cursor: progress; }

.bactive-card-preview-selected .ct-media-container > img.ct-swap { display: none !important; }
.bactive-card-preview-selected .ct-media-container > img:not(.ct-swap) { opacity: 1 !important; }
.bactive-collection-product .bactive-colour-preview:is(:link, :visited, :hover, :focus, :active) {
  color: #40543c;
}
@media (max-width: 999px) {
  .related.products:has(.bactive-collection-product) { display: block !important; }
}

/* Match the displayed photo, including legacy or detail hover images. */
.products .bactive-collection-product .bactive-photo-frame-ready { position: relative; }
.products .bactive-collection-product .bactive-photo-frame-ready > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
