/* Catalog-only treatment. Product-detail, trust and instruction badges keep their own styles. */
body.aal-product-cards .product-small.col > .col-inner {
  position: relative;
  container-type: inline-size;
}
body.aal-product-cards .product-small.col .product-small.box:not(.box-vertical) .box-image {
  border-radius: 10px;
  background: #f7f7f6;
  box-shadow: 0 3px 9px rgba(20, 20, 20, .06);
  overflow: hidden;
  isolation: isolate;
}
body.aal-product-cards .product-small.col .product-small.box:not(.box-vertical) .box-text-products {
  display: block;
  position: static;
  height: auto !important; /* Flatsome's equalizer writes inline heights for the old flex layout. */
  padding: 17px 3px 4px;
  text-align: left;
  background: transparent;
}
body.aal-product-cards .product-small.col .product-small.box:not(.box-vertical) .title-wrapper,
body.aal-product-cards .product-small.col .product-small.box:not(.box-vertical) .price-wrapper {
  width: 100%;
  max-width: none;
  flex: none;
  text-align: left;
}
body.aal-product-cards .product-small.col .box-text-products .product-cat {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: .055em;
  color: #707070;
  opacity: 1;
  margin-bottom: 6px;
}
body.aal-product-cards .product-small.col .product-small.box:not(.box-vertical) .product-title {
  height: auto !important;
  min-height: 2.7em;
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.015em;
}
body.aal-product-cards .product-small.col .product-title a {
  color: #202020;
  text-decoration: none;
}
body.aal-product-cards .product-small.col .product-title a:hover { color: #b70000; }
body.aal-product-cards .product-small.col .product-small.box:not(.box-vertical) .price-wrapper {
  height: auto !important;
  margin-top: 10px;
  padding: 0;
}
body.aal-product-cards .product-small.col .price {
  display: block;
  color: #202020;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
}
body.aal-product-cards .product-small.col .price .amount { color: inherit; font-weight: inherit; }
body.aal-product-cards .product-small.col .price del { color: #777; font-weight: 400; }
body.aal-product-cards .product-small.col .price ins { background: transparent; text-decoration: none; }
body.aal-product-cards .product-small.col a:focus-visible {
  outline: 2px solid #b70000;
  outline-offset: 3px;
}
/* Flatsome automatic New, manual New/custom bubbles and WooCommerce Sale share one system. */
body.aal-product-cards .product-small.col > .col-inner > .badge-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  top: 9px;
  left: 9px;
  margin: 0;
  width: calc(100% - 18px);
  z-index: 13;
  pointer-events: none;
}
body.aal-product-cards .product-small.col .badge-container .badge {
  display: inline-flex;
  position: static;
  top: auto !important;
  left: auto !important;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #fff !important;
  color: #252525 !important;
  box-shadow: 0 1px 5px rgba(0,0,0,.08);
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: .025em;
}
body.aal-product-cards .product-small.col .badge-container .badge-inner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: static;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  padding: 6px 9px;
  border: 0;
  border-radius: inherit;
  background: #fff !important;
  color: #252525 !important;
  box-shadow: none;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  white-space: normal;
  text-transform: uppercase;
}
body.aal-product-cards .product-small.col .badge-inner:is(.new-bubble-auto,.new-bubble)::before {
  content: '';
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: #b70000;
}
body.aal-product-cards .product-small.col .badge-container .on-sale {
  background: #b70000 !important;
  color: #fff !important;
}
body.aal-product-cards .product-small.col .badge-container .onsale {
  display: inline;
  position: static;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  color: inherit;
  box-shadow: none;
  font: inherit;
  line-height: inherit;
}
/* Quick-Ship renders in box-text, but its wrapper is positioned against col-inner. */
body.aal-product-cards .products .product-small.col .col-inner > .aal-qs-badge-wrap,
body.aal-product-cards .products .product-small.col .box-text > .aal-qs-badge-wrap {
  position: absolute;
  top: 9px;
  right: 9px;
  bottom: auto;
  left: auto;
  transform: none;
  max-width: calc(100% - 18px);
  z-index: 12;
  pointer-events: none;
}
body.aal-product-cards .products .product-small.col .aal-qs-badge {
  display: block;
  padding: 6px 9px;
  border: 0;
  border-radius: 999px;
  background: #23733d;
  color: #fff;
  box-shadow: 0 1px 5px rgba(0,0,0,.08);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .01em;
  text-transform: uppercase;
  white-space: normal;
  overflow-wrap: anywhere;
}
body.aal-product-cards .products .product-small.col .aal-qs-badge--options { background: #2f6b40; }
body.aal-product-cards .products .product-small.col .aal-qs-badge--production { background: #275b7c; }
body.aal-product-cards .product-small.col .out-of-stock-label {
  font-size: 11px;
  font-weight: 700;
  padding: 8px;
  background: rgba(255,255,255,.94);
  color: #555;
}
/* Actual card width, rather than viewport, also covers sliders and campaign grids. */
@container (max-width: 270px) {
  body.aal-product-cards .products .product-small.col .col-inner:has(.badge-container .badge) .aal-qs-badge-wrap {
    top: 43px;
  }
  body.aal-product-cards .products .product-small.col .col-inner:has(.badge-container .badge:nth-child(2)) .aal-qs-badge-wrap {
    top: 76px;
  }
}
@media (max-width: 549px) {
  body.aal-product-cards .product-small.col .product-small.box:not(.box-vertical) .box-text-products { padding-top: 13px; }
  body.aal-product-cards .product-small.col .product-small.box:not(.box-vertical) .product-title { font-size: 15px; }
  body.aal-product-cards .product-small.col .price { font-size: 15px; }
  body.aal-product-cards .product-small.col .box-text-products .product-cat { font-size: 10px; }
  body.aal-product-cards .product-small.col .badge-container .badge,
  body.aal-product-cards .products .product-small.col .aal-qs-badge { font-size: 10px; }
}
/* The child theme forces underlines; override only catalog title links. */
body.aal-product-cards .product-small.col .product-title a { text-decoration: none !important; }
body.aal-product-cards .product-small.col > .col-inner,
body.aal-product-cards .product-small.col > .col-inner:hover {
  box-shadow: none;
  transform: none;
}
body.aal-product-cards .product-small.col > .col-inner { height: 100%; }
body.aal-product-cards .product-small.col .product-small.box:not(.box-vertical) {
  display: flex;
  flex-direction: column;
  height: 100%;
}
body.aal-product-cards .product-small.col .product-small.box:not(.box-vertical) .box-image { flex: 0 0 auto; width: 100%; align-self: stretch; }
body.aal-product-cards .product-small.col .product-small.box:not(.box-vertical) .box-text-products {
  display: flex;
  flex-direction: column;
  flex: 1;
}
body.aal-product-cards .product-small.col .product-small.box:not(.box-vertical) .title-wrapper { flex: 1; }
/* Match the storefront heading family for a clear title / price hierarchy. */
body.aal-product-cards .product-small.col .product-title,
body.aal-product-cards .product-small.col .product-title a,
body.aal-product-cards .product-small.col .price { font-family: Inter, sans-serif; }

/* Short brand accent from the selected mock, aligned above each price. */
body.aal-product-cards .product-small.col .product-small.box:not(.box-vertical) .price-wrapper::before {
  content: '';
  display: block;
  width: 30px;
  height: 3px;
  margin: 0 0 10px;
  background: #b70000;
}
/* The AI Product Expert uses its own product-card renderer rather than Flatsome. */
body.aal-product-cards .aal-expert-products article[data-product-id] {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}
body.aal-product-cards .aal-expert-products .aal-expert-product-image {
  flex: 0 0 auto;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #f7f7f6;
  box-shadow: 0 3px 9px rgba(20,20,20,.06);
}
body.aal-product-cards .aal-expert-products article[data-product-id] > div {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 17px 3px 4px;
}
body.aal-product-cards .aal-expert-products article[data-product-id] p {
  min-height: 0;
  margin-bottom: 6px;
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: .055em;
  color: #707070;
}
body.aal-product-cards .aal-expert-products article[data-product-id] h3 {
  min-height: 2.7em;
  margin: 0 0 10px;
  font: 700 18px/1.35 Inter, sans-serif;
  letter-spacing: -.015em;
}
body.aal-product-cards .aal-expert-products article[data-product-id] h3 a {
  color: #202020;
  text-decoration: none !important;
}
body.aal-product-cards .aal-expert-products article[data-product-id] h3 a:hover { color: #b70000; }
body.aal-product-cards .aal-expert-products article[data-product-id] small { margin-bottom: 10px; }
body.aal-product-cards .aal-expert-products article[data-product-id] strong {
  display: block;
  margin-top: auto;
  color: #202020;
  font: 700 18px/1.45 Inter, sans-serif;
}
body.aal-product-cards .aal-expert-products article[data-product-id] strong::before {
  content: '';
  display: block;
  width: 30px;
  height: 3px;
  margin-bottom: 10px;
  background: #b70000;
}
body.aal-product-cards .aal-expert-products article[data-product-id] a:focus-visible {
  outline: 2px solid #b70000;
  outline-offset: 3px;
}
@media (max-width: 549px) {
  body.aal-product-cards .aal-expert-products article[data-product-id] h3,
  body.aal-product-cards .aal-expert-products article[data-product-id] strong { font-size: 15px; }
}
/* Campaign Discounts keeps its sections, but uses the shared unboxed card treatment. */
body.aal-product-cards .cd-sale-tier .product-small.col > .col-inner {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  transition: none;
}
body.aal-product-cards .cd-sale-tier .product-small.col .box-image {
  min-height: 0;
  aspect-ratio: 1;
}
body.aal-product-cards .cd-sale-tier .product-small.col .box-image > div:first-child {
  height: 100%;
}
body.aal-product-cards .cd-sale-tier .product-small.col .box-image a {
  height: 100%;
}
body.aal-product-cards .cd-sale-tier .product-small.col .box-image img {
  border-radius: 0;
  object-fit: cover;
  object-position: center;
}
/* One image-fill contract for native grids, search, sliders and related cards. */
body.aal-product-cards .product-small.col .product-small.box:not(.box-vertical) .box-image {
  aspect-ratio: 1;
  height: auto !important;
  min-height: 0;
  padding-top: 0 !important;
}
body.aal-product-cards .product-small.col .product-small.box:not(.box-vertical) .box-image > div:first-child {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding-top: 0 !important;
}
body.aal-product-cards .product-small.col .product-small.box:not(.box-vertical) .box-image > div:first-child > a {
  display: block;
  width: 100%;
  height: 100%;
}
body.aal-product-cards .product-small.col .product-small.box .box-image > div:first-child > a > img {
  object-fit: cover;
  object-position: center;
  width: 100% !important;
  height: 100% !important;
}
body.aal-product-cards .product-small.col .product-small.box:not(.box-vertical) .box-image > div:first-child > a > img {
  position: absolute !important;
  inset: 0 !important;
}
body.aal-product-cards .aal-expert-products .aal-expert-product-image { aspect-ratio: 1; }
body.aal-product-cards .aal-expert-products .aal-expert-product-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
