/* Price: everywhere.
   Sale: old price (struck, grey) on top, new price bold underneath.
   Regular price: normal weight. Loaded last so it keeps priority. */

.price,
.wc-block-components-product-price {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  text-align: left !important;
  font-size: 21px !important;
  font-weight: 400 !important;
  line-height: 1.1 !important;
  letter-spacing: -0.02em !important;
  color: #111111 !important;
  white-space: nowrap !important;
}

:is(.price, .wc-block-components-product-price, .product_list_widget li) :is(.amount, bdi, .woocommerce-Price-currencySymbol) {
  color: inherit !important;
  font-weight: inherit !important;
  font-size: inherit !important;
}

:is(.price, .wc-block-components-product-price, .product_list_widget li) del {
  order: 1 !important;
  display: block !important;
  margin: 0 0 3px !important;
  font-size: 14px !important;
  font-weight: 300 !important;
  color: #9ca3af !important;
  text-decoration: line-through !important;
  text-decoration-thickness: 1px !important;
  opacity: 1 !important;
}

:is(.price, .wc-block-components-product-price, .product_list_widget li) ins {
  order: 2 !important;
  display: block !important;
  text-decoration: none !important;
  background: transparent !important;
  color: #111111 !important;
  font-weight: 700 !important;
}

/* Ranges (₹99 – ₹199): one line, a bit smaller */
.price:not(:has(ins)):has(.woocommerce-Price-amount + .woocommerce-Price-amount) {
  flex-direction: row !important;
  align-items: baseline !important;
  gap: 4px !important;
  font-size: 16px !important;
}

/* Product cards: rating left, price right */
.product-small .price-wrapper {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin: 0 !important;
}

.product-small .price-wrapper .star-rating {
  margin-bottom: 3px !important;
}

.product-small .price {
  align-items: flex-end !important;
  margin: 0 0 0 auto !important;
  text-align: right !important;
}

/* Single product page: price aligned right and larger */
.single-product :is(
  .product-price-container,
  .product-main .price-wrapper,
  .summary .price-wrapper,
  .product-info .price-wrapper,
  .woocommerce-variation-price
):not(.products *):not(.product-small *) {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-left: auto !important;
  text-align: right !important;
}

.single-product :is(
  .product-page-price,
  .product-main .price,
  .summary .price,
  .product-info .price,
  .woocommerce-variation-price .price,
  .wp-block-woocommerce-product-price .wc-block-components-product-price
):not(.products *):not(.product-small *) {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: 0 !important;
  text-align: right !important;
  font-size: 46px !important;
  line-height: 1.05 !important;
}

.single-product :is(.product-page-price, .product-main .price, .summary .price, .product-info .price, .woocommerce-variation-price .price, .wc-block-components-product-price):not(.products *):not(.product-small *) :is(del, ins) {
  align-self: flex-end !important;
  margin-left: auto !important;
  text-align: right !important;
}

.single-product :is(.product-page-price, .product-main .price, .summary .price, .product-info .price, .woocommerce-variation-price .price, .wc-block-components-product-price):not(.products *):not(.product-small *) :is(.amount, bdi, .woocommerce-Price-currencySymbol) {
  font-size: inherit !important;
}

.single-product :is(.product-page-price, .product-main .price, .summary .price, .product-info .price, .woocommerce-variation-price .price, .wc-block-components-product-price):not(.products *):not(.product-small *) ins {
  font-size: 26px !important;
}

.single-product :is(.product-page-price, .product-main .price, .summary .price, .product-info .price, .woocommerce-variation-price .price, .wc-block-components-product-price):not(.products *):not(.product-small *) del {
  font-size: 15px !important;
  margin-bottom: 6px !important;
}

@media (max-width: 549px) {
  .single-product :is(.product-page-price, .product-main .price, .summary .price, .product-info .price, .woocommerce-variation-price .price, .wc-block-components-product-price):not(.products *):not(.product-small *),
  .single-product :is(.product-page-price, .product-main .price, .summary .price, .product-info .price, .woocommerce-variation-price .price, .wc-block-components-product-price):not(.products *):not(.product-small *) ins {
    font-size: 34px !important;
  }

  .single-product :is(.product-page-price, .product-main .price, .summary .price, .product-info .price, .woocommerce-variation-price .price, .wc-block-components-product-price):not(.products *):not(.product-small *) del {
    font-size: 18px !important;
  }
}

/* Remove gap under single product price */
html body.single-product .price:not(.products *):not(.product-small *),
html body.single-product p.price:not(.products *):not(.product-small *),
html body.single-product .price-wrapper:not(.products *):not(.product-small *) {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
  min-height: 0 !important;
  height: auto !important;
}
