/* ══════════════════════════════════════════════════════════════════════════
   Price — one component, five sizes, one rule set (§2.2).

   The markup inside is WooCommerce's own `get_price_html()` output, styled in
   place and never re-formatted. The NBSP group separator and the `Ft` suffix
   are Woo's strings: re-formatting them in a template is how a harvested
   string like "38 000 Ft 19 000 Ft / g" (finder-data-v1.json:233) ships.

   Price is never green — green is the action colour, and a green price makes
   the price look clickable and the button look like a label. Price is never
   inside a shape: no badge, no pill, no fill, no border. The archive
   prototype's amber price pills are retired here.
   ══════════════════════════════════════════════════════════════════════ */

@layer components {
  .rtv-price {
    /* Two variables, set per size below, so a new context is one declaration
       rather than a copy of the whole block. */
    --rtv-price-size: var(--t-19);
    --rtv-price-suffix: .62em;

    display: block;
    color: var(--rtv-ink);
    font-family: var(--rtv-font-goods);
    font-size: var(--rtv-price-size);
    font-weight: 700;
    line-height: var(--lh-goods);
    /* A column of prices must align on the digit grid. */
    font-variant-numeric: tabular-nums;
  }

  .rtv-price--card   { --rtv-price-size: var(--t-19); --rtv-price-suffix: .62em; }
  .rtv-price--pdp    { --rtv-price-size: var(--t-40); --rtv-price-suffix: .55em; }
  .rtv-price--line   { --rtv-price-size: var(--t-17); --rtv-price-suffix: .66em; }
  .rtv-price--totals { --rtv-price-size: var(--t-27); --rtv-price-suffix: .60em; }

  @media (max-width: 640px) {
    .rtv-price--pdp { --rtv-price-size: var(--t-34); --rtv-price-suffix: .58em; }
  }

  /* Woo wraps the currency symbol; it is the machine's unit, not merchandise
     shouting, so it steps back in size, weight and ink. */
  .rtv-price .woocommerce-Price-currencySymbol {
    color: var(--rtv-ink-2);
    font-size: var(--rtv-price-suffix);
    font-weight: 500;
  }

  .rtv-price bdi {
    /* HUF is a space-separated format; the amount must never break across
       lines between the group separator and the suffix. */
    white-space: nowrap;
  }

  /* A variable product with no selection emits `18 899 Ft – 22 000 Ft`. It is
     rendered verbatim at the same size; only the dash steps back. */
  .rtv-price--range {
    white-space: normal;
  }

  /* ── sale ───────────────────────────────────────────────────────────────
     Zero SKUs are on sale today. There is deliberately NO percentage badge
     rule here and none may be added: a discount percentage is technically
     derivable but it is the visual grammar of a discount store, and it drags
     scarcity furniture in behind it (§2.2). */
  .rtv-price del {
    color: var(--rtv-ink-3);
    font-size: .8em;
    font-weight: 600;
    text-decoration: line-through;
    text-decoration-thickness: 1px;
  }

  .rtv-price del .woocommerce-Price-currencySymbol {
    color: var(--rtv-ink-3);
  }

  .rtv-price ins {
    background-color: transparent;
    text-decoration: none;
  }

  .rtv-price del + ins,
  .rtv-price del + span {
    margin-inline-start: var(--s-2);
  }

  /* Woo's own "from" prefix and unit-price suffix, when it emits them. */
  .rtv-price .woocommerce-Price-amount + small,
  .rtv-price small {
    color: var(--rtv-ink-2);
    font-family: var(--rtv-font-system);
    font-size: var(--t-13);
    font-weight: 400;
  }
}
