

/* Native item data stays intact; text, color-group labels and images align. */
body.woocommerce-page #main dl.variation,
body #header dl.variation,
body #cart-popup dl.variation {
  display: grid !important;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: start;
  gap: 3px 8px;
  min-width: 0;
  max-width: 100%;
  margin: 6px 0 0 !important;
  padding: 0 !important;
  font: 400 11px/18px "Segoe UI", Arial, sans-serif;
}

body :is(#main, #header, #cart-popup) dl.variation > :is(dt, dd) {
  display: block !important;
  float: none !important;
  clear: none !important;
  align-self: start;
  min-width: 0;
  min-height: 0;
  margin: 0 !important;
  padding: 0 !important;
  font-family: "Segoe UI", Arial, sans-serif !important;
  font-size: 11px !important;
  line-height: 18px !important;
  vertical-align: top;
  overflow-wrap: anywhere;
}

body :is(#main, #header, #cart-popup) dl.variation > dt { color: #657080; font-weight: 500; }

body :is(#main, #header, #cart-popup) dl.variation > dd { color: #3e4958; font-weight: 400; }

body :is(#main, #header, #cart-popup) dl.variation > dd::after { display: none !important; }

body :is(#main, #header, #cart-popup) dl.variation dd :is(p, .wcpa_cart_val, .wcpa_cart_type_color-group, .wcpa_cart_type_image-group) {
  margin: 0 !important;
  padding: 0 !important;
  clear: none !important;
  font-size: inherit !important;
  line-height: 18px !important;
  color: inherit;
}

body :is(#main, #header, #cart-popup) dl.variation dd :is(.wcpa_cart_type_color-group, .wcpa_cart_type_image-group) {
  display: flex !important;
  align-items: flex-start;
  gap: 3px 5px;
}

body :is(#main, #header, #cart-popup) dl.variation dd .wcpa_cart_color.label_inside {
  display: inline !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: 100%;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #3e4958 !important;
  font: inherit !important;
  line-height: 18px !important;
  text-align: left;
}

body :is(#main, #header, #cart-popup) dl.variation dd .wcpa_cart_color:not(.label_inside) {
  width: 14px;
  height: 14px;
  margin: 2px 0 0;
}

body :is(#main, #header, #cart-popup) dl.variation dd .wcpa_cart_val { word-break: normal; overflow-wrap: anywhere; }


@media (max-width: 549px) {
  body.woocommerce-page #main dl.variation { gap: 2px 6px; }
}


/* Comparison and badge stay beside the current product price. */
body #main .hr-reference-price {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  order: 2;
  gap: 6px 10px;
  min-width: 0;
  max-width: 100%;
  vertical-align: middle;
}

body #main .hr-reference-price[hidden] { display: none !important; }

body #main .hr-reference-price .hr-reference-amount {
  margin: 0;
  color: #8c94a1;
  font: 500 21px/1.15 "Segoe UI", Arial, sans-serif;
  opacity: 1;
  white-space: nowrap;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  font-variant-numeric: tabular-nums;
}

body #main .hr-reference-price .hr-reference-amount .amount { color: inherit !important; font: inherit !important; }

body #main .hr-reference-discount {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  margin: 0;
  padding: 4px 7px;
  border-radius: 5px;
  color: #fff;
  background: #bd252a;
  box-shadow: 0 3px 10px rgba(189,37,42,.15);
  font: 750 12px/1.3 "Segoe UI", Arial, sans-serif;
  letter-spacing: .1px;
  white-space: nowrap;
}

body #main .product-small .price-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: inherit;
  gap: 4px 8px;
}

body #main .product-small .text-center .price-wrapper { justify-content: center; }

body #main .product-small .hr-reference-price { gap: 4px 6px; }

body #main .product-small .hr-reference-price .hr-reference-amount { font-size: 12px; }

body #main .product-small .hr-reference-discount { padding: 3px 5px; font-size: 9px; box-shadow: none; }

@media (max-width: 549px) {
  body #main .product-small .price-wrapper { gap: 3px 6px; }
}
