/* ════════════════════════════════════════════════════════════════════════
   Reset. Normalisation only — no opinions, no colour, no type.

   Everything opinionated belongs in `base`. Keeping this layer purely
   corrective is what lets it lose every cascade fight it is ever in.
   ════════════════════════════════════════════════════════════════════════ */

@layer reset {

  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  /* Margin is a layout decision. Nothing inherits one by accident. */
  body,
  h1, h2, h3, h4, h5, h6,
  p, figure, blockquote, dl, dd,
  ul[class], ol[class] {
    margin: 0;
  }

  ul[class],
  ol[class] {
    padding: 0;
    list-style: none;
  }

  /* Long Hungarian product names wrap unbounded on every surface (§2.1).
     `overflow-wrap` here rather than `word-break` so a 77-character name
     breaks between words first and only splits a word it cannot fit. */
  body {
    min-block-size: 100vh;
    overflow-wrap: break-word;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
  }

  /* Packshots letterbox inside a fixed-aspect tray; they are never cropped
     (§5.3.3). A stray `height:auto` from a vendor sheet must not defeat that,
     so intrinsic sizing is set here and the tray owns the box. */
  img,
  picture,
  svg,
  video,
  canvas {
    display: block;
    max-inline-size: 100%;
  }

  img,
  video {
    block-size: auto;
  }

  /* Controls inherit type. The alternative is every button in the store
     silently falling back to the UA font, which is how a "Kosárba" ends up
     set in Arial next to a Gabarito price. */
  button,
  input,
  select,
  textarea {
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
    margin: 0;
  }

  button {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
  }

  table {
    border-collapse: collapse;
    border-spacing: 0;
  }

  /* Woo emits several fixed-width tables; the cart must not force a
     horizontal scrollbar at 320px (gate G8). */
  table,
  th,
  td {
    text-align: start;
  }

  /* The UA's :focus-visible ring is replaced per control (§2.3/§2.6), but a
     control that has not been styled yet must still show one. Removing the
     outline globally is how keyboard access disappears silently. */
  :focus-visible {
    outline: 3px solid var(--rtv-ink);
    outline-offset: 2px;
  }

  [hidden] {
    display: none;
  }
}
