/* Hide category image on WooCommerce category pages (Shoptimizer) */
.woocommerce-products-header__image,
.archive-header img,
.woocommerce-products-header img,
.woocommerce-category-header img {
    display: none !important;
}

.woocommerce-products-header::after {
  content: "";
  display: block;
  width: 80px;
  height: 2px;
  margin: 0px 0 0;
  background-color: #385112; /* Ravenol blue, for example */
}

/* Force square 1:1 ratio for sub-category images */
.woocommerce ul.products li.product-category a img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  width: 100%;
  height: auto;
}
/* --- Make add-ons blocks reserve space and sit above widgets --- */

/* Advanced Product Fields (APF) */
.single-product .wapf-wrapper,
.single-product .wapf-fields,
.single-product .wapf-totals,
.single-product .wapf {
  display: block;
  margin-bottom: 18px;
  position: relative;
  z-index: 2; /* sit above any absolutely-positioned badges */
}

/* WooCommerce Product Add-Ons (official) */
.single-product .wc-pao-addons-container,
.single-product .wc-pao-addon,
.single-product .wc-pao-subtotal-line,
.single-product .wc-pao-subtotal {
  display: block;
  margin-bottom: 18px;
  position: relative;
  z-index: 2;
}

/* YITH Product Add-Ons */
.single-product .yith-wapo-wrapper,
.single-product .yith-wapo-container,
.single-product .yith-wapo-options,
.single-product .yith-wapo-total {
  display: block;
  margin-bottom: 18px;
  position: relative;
  z-index: 2;
}

/* --- Force Klarna/Clearpay widgets to their own line and clear floats/flex --- */

/* Klarna */
.single-product .klarna-placement,
.single-product [data-klarna-placement],
.single-product .klarna-product-placement {
  display: block !important;
  clear: both !important;
  float: none !important;
  position: static !important;
  width: 100% !important;
  margin-top: 14px !important;
  z-index: 1;
}

/* Clearpay / Afterpay (UK plugins vary in classnames) */
.single-product #clearpay-widget,
.single-product #clearpay-product-widget,
.single-product .clearpay-widget,
.single-product .afterpay-paragraph,
.single-product .afterpay-widget {
  display: block !important;
  clear: both !important;
  float: none !important;
  position: static !important;
  width: 100% !important;
  margin-top: 12px !important;
}

/* If your theme wraps them together, allow wrapping and spacing */
.single-product .summary .price ~ * {
  /* prevent inline elements or flex rows from squashing widgets */
  flex-basis: 100%;
}

/* In case the price/short description area is a flex row in Shoptimizer */
.single-product .summary,
.single-product .summary > .price,
.single-product .summary > .woocommerce-product-details__short-description {
  flex-wrap: wrap;
}

/* Defensive: stop any absolute badges overlapping totals within add-ons */
.single-product .wapf-totals,
.single-product .wc-pao-subtotal,
.single-product .yith-wapo-total {
  position: relative;
  z-index: 2;
}

/* Force product images into 1:1 square ratio on grids (home, shop, category) */
.woocommerce ul.products li.product a img,
.woocommerce-page ul.products li.product a img {
  aspect-ratio: 1 / 1;
  width: 100%;
  height: auto;
  object-fit: cover; /* crops edges neatly */
}

/* If your theme wraps images differently (e.g. Shoptimizer), this helps */
.shoptimizer ul.products li.product .woocommerce-LoopProduct-link img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
/* AHS Ravenol badge */
.ahs-badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: .2px;
}

/* Badge styling */
.ahs-badge--ravenol {
  background: #344e0e;
  color: #fff;
}

/* Position badge on product cards */
.woocommerce ul.products li.product {
  position: relative;
}

.woocommerce ul.products li.product .ahs-badge--ravenol {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5;
}

/* Single product badge area */
.ahs-badge-wrap {
  margin: 10px 0 14px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.ahs-badge-note {
  font-size: 13px;
  opacity: .85;
}
/* Fix Klarna / Clearpay overlap on product pages */
.woocommerce div.product .price {
    margin-bottom: 12px;
}
.klarna-placement,
.klarna-widget {
    min-height: 40px;
}


.woocommerce div.product .klarna-widget,
.woocommerce div.product .wc-klarna-placement,
.woocommerce div.product .payment-methods,
.woocommerce div.product .afterpay-placement,
.woocommerce div.product .clearpay-placement {
    display: block;
    margin-bottom: 40px;
    line-height: 1.4;
}

/* Ensure short description starts cleanly below payment widgets */
.woocommerce div.product .woocommerce-product-details__short-description {
    clear: both;
    margin-top: 50px;
}
.ahs-stock-message.ahs-uk-stock {
  color: #354f0f;
  font-weight: 600;
}

.ahs-stock-message.ahs-supplier {
  color: #555;
}