/* Only native sale prices in the main product summary, never product grids,
   recommended products, upgrade cards, the configuration total or the cart.
   No HTML replacement, price filters or JavaScript are needed: variation
   prices retain the same design when WooCommerce updates their native HTML. */
body.single-product :is(
  .summary > .price-wrapper > .price,
  .summary > .price,
  .summary .woocommerce-variation-price > .price
):has(> del):has(> ins) {
  --ps-price-current-size: 34px;
  --ps-price-before-size: 22px;
  display: inline-flex;
  align-items: stretch;
  flex-wrap: wrap;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
  gap: 0;
  margin: 0 0 14px;
  padding: 14px 22px 16px;
  border: 0;
  border-radius: 16px;
  background: #eeeeef;
  color: #080b16;
  font-family: inherit;
  font-size: var(--ps-price-current-size);
  line-height: 1.15;
  text-align: left;
}

body.single-product :is(
  .summary > .price-wrapper > .price,
  .summary > .price,
  .summary .woocommerce-variation-price > .price
):has(> del):has(> ins) > :is(del, ins) {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  flex: 0 1 auto;
  min-width: 0;
  gap: 7px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  opacity: 1;
  text-decoration: none;
  vertical-align: baseline;
}

body.single-product :is(
  .summary > .price-wrapper > .price,
  .summary > .price,
  .summary .woocommerce-variation-price > .price
):has(> del):has(> ins) > ins {
  margin-left: 30px;
  padding-left: 30px;
  border-left: 1px solid #a5a5a8;
}

body.single-product :is(
  .summary > .price-wrapper > .price,
  .summary > .price,
  .summary .woocommerce-variation-price > .price
):has(> del):has(> ins) > :is(del, ins)::before {
  display: block;
  color: #5b5b62;
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
  letter-spacing: 0;
  text-decoration: none;
}

body.single-product :is(
  .summary > .price-wrapper > .price,
  .summary > .price,
  .summary .woocommerce-variation-price > .price
):has(> del):has(> ins) > del::before { content: "Antes"; }

body.single-product :is(
  .summary > .price-wrapper > .price,
  .summary > .price,
  .summary .woocommerce-variation-price > .price
):has(> del):has(> ins) > ins::before { content: "Ahora"; }

body.single-product :is(
  .summary > .price-wrapper > .price,
  .summary > .price,
  .summary .woocommerce-variation-price > .price
):has(> del):has(> ins) > del .amount {
  color: #7b7b80;
  font-size: var(--ps-price-before-size);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.3px;
  opacity: 1;
  text-decoration: none;
}

body.single-product :is(
  .summary > .price-wrapper > .price,
  .summary > .price,
  .summary .woocommerce-variation-price > .price
):has(> del):has(> ins) > ins .amount {
  color: #080b16;
  font-size: var(--ps-price-current-size);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.6px;
  text-decoration: none;
}

body.single-product :is(
  .summary > .price-wrapper > .price,
  .summary > .price,
  .summary .woocommerce-variation-price > .price
):has(> del):has(> ins) bdi {
  position: relative;
  display: inline-flex;
  flex-direction: row-reverse;
  align-items: baseline;
  gap: 0.2em;
  white-space: nowrap;
}

/* An explicit stroke stays visible across the native inline-flex amount and
   currency; text-decoration cannot cross atomic flex children reliably. */
body.single-product :is(
  .summary > .price-wrapper > .price,
  .summary > .price,
  .summary .woocommerce-variation-price > .price
):has(> del):has(> ins) > del bdi::after {
  content: "";
  position: absolute;
  top: 54%;
  inset-inline: 0;
  border-top: 1.5px solid currentColor;
  pointer-events: none;
}

body.single-product :is(
  .summary > .price-wrapper > .price,
  .summary > .price,
  .summary .woocommerce-variation-price > .price
):has(> del):has(> ins) .woocommerce-Price-currencySymbol {
  font-size: 0.65em;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}

body.single-product :is(
  .summary > .price-wrapper > .price,
  .summary > .price,
  .summary .woocommerce-variation-price > .price
):has(> del):has(> ins) > .woocommerce-price-suffix {
  flex-basis: 100%;
  margin-top: 8px;
  color: #5b5b62;
  font-size: 12px;
  font-weight: 400;
}

@media (max-width: 549px) {
  body.single-product :is(
    .summary > .price-wrapper > .price,
    .summary > .price,
    .summary .woocommerce-variation-price > .price
  ):has(> del):has(> ins) {
    --ps-price-current-size: 28px;
    --ps-price-before-size: 20px;
    padding: 13px 16px 15px;
    border-radius: 14px;
  }

  body.single-product :is(
    .summary > .price-wrapper > .price,
    .summary > .price,
    .summary .woocommerce-variation-price > .price
  ):has(> del):has(> ins) > ins {
    margin-left: 20px;
    padding-left: 20px;
  }
}

@media (max-width: 359px) {
  body.single-product :is(
    .summary > .price-wrapper > .price,
    .summary > .price,
    .summary .woocommerce-variation-price > .price
  ):has(> del):has(> ins) {
    --ps-price-current-size: 25px;
    --ps-price-before-size: 18px;
    padding-inline: 12px;
  }

  body.single-product :is(
    .summary > .price-wrapper > .price,
    .summary > .price,
    .summary .woocommerce-variation-price > .price
  ):has(> del):has(> ins) > ins {
    margin-left: 14px;
    padding-left: 14px;
  }
}
