/* Shared commerce type, after legacy page-specific presentation layers. */
html body {
  --rcs-commerce-font: var(--rcs-font-ui, 'Inter', system-ui, sans-serif);
}
html[data-rcs-lang='mr'] body,
html[data-rcs-lang='hi'] body {
  --rcs-commerce-font: 'Noto Sans Devanagari', 'Inter', sans-serif;
}

/* WooCommerce markup is shared by cards, bags, checkout and account orders.
   Keep the currency symbol and nested price text in the same upright face. */
html body :is(.woocommerce-Price-amount, .woocommerce-Price-amount bdi,
  .woocommerce-Price-currencySymbol, .wc-block-components-formatted-money-amount,
  .wc-block-components-totals-item__value, .wc-block-components-product-price),
html body.woocommerce-checkout .rcs-payment-summary-top__head > strong,
html body.woocommerce-checkout #order_review .woocommerce-Price-amount,
html body.woocommerce-checkout #order_review .woocommerce-Price-amount bdi,
html body.woocommerce-cart .rcs-cart-sticky::before {
  font-family: var(--rcs-commerce-font) !important;
  font-style: normal !important;
  font-variant-numeric: lining-nums tabular-nums !important;
  letter-spacing: 0 !important;
}

/* Match product names to the shop and PDP without restyling section headings. */
html body :is(.rcs-product-card__title, .rcs-cart-item__title,
  .rcs-minicart__name, .rcx-remove-product strong,
  .wc-block-components-product-name, .wc-block-cart-item__product-name,
  .rcp-pc .rcp-nm),
html body.woocommerce-checkout #order_review .product-name,
html body .woocommerce-mini-cart-item > a:not(.remove) {
  font-family: var(--rcs-commerce-font) !important;
  font-style: normal !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

/* Quantity fields should use the same numeric face as prices. */
html body :is(.rcs-qty input.qty, .wc-block-components-quantity-selector__input) {
  font-family: var(--rcs-commerce-font) !important;
  font-style: normal !important;
  font-variant-numeric: lining-nums tabular-nums !important;
}

/* Decimal and larger totals must leave room for the checkout label on phones. */
@media (max-width: 1023px) {
  html body.woocommerce-cart .rcs-cart-sticky .rcs-btn {
    min-width: 0 !important;
    min-height: 50px !important;
    height: auto !important;
    padding: 8px 12px !important;
    gap: 8px !important;
    white-space: normal !important;
    line-height: 1.25 !important;
    text-align: center;
  }
  html body.woocommerce-cart .rcs-cart-sticky .rcs-btn .ph {
    flex-shrink: 0;
  }
}

/* Give desktop bag thumbnails a definite height instead of stretching the
   percentage-height image to the full intrinsic photograph height. */
@media (min-width: 1024px) {
  html body.woocommerce-cart .rcs-cart-item__image {
    width: 96px !important;
    height: 128px !important;
    align-self: start;
  }
  html body.woocommerce-cart .rcs-cart-item__image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }
}
