
/* Loaded under EVERY theme. Theme-specific compatibility now lives in
   reset_for_others_themes.css, which is skipped when codbrand is active. */

/* Core block buttons must not inherit a link underline. Needed under our own
   theme too: codbrand ships no link styling at all, so without this the browser
   default underlines every block button. */
a.wp-block-button__link {
    text-decoration: none !important;
}

/* GUARD for every heading the plugin renders. A preset or a component's own CSS
   does not always declare margin, size or weight, and the browser's defaults then
   decide them: `margin-block: 1em` (so the space around a title grew with its font
   size), bold, and 1.17em on an h3. A <div> has none of those, so this gives a
   plugin heading the same starting point a <div> title has.
   - Scoped by the heading's OWN class: every plugin heading carries a `cl-` class,
     and page content does not. NOT by ancestor — page content, custom blocks and
     product/category descriptions all render inside plugin wrappers
     (`.cl-boxed-mode-padded`, …), and their headings must stay untouched.
   - ZERO specificity (`:where`), so presets (.cl-preset-N x3), a component's own
     class rule (.cl-instagram-heading, .cl-consent-title) and merchant CSS always
     win. It only replaces the browser defaults; a theme's own heading rules still
     beat it, which is why the two page titles below keep class-level resets.
   - A new plugin heading needs nothing here: a `cl-` class is enough. */
:where(h1, h2, h3, h4, h5, h6):where([class^="cl-"], [class*=" cl-"]) {
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
}

/* Same GUARD for links the plugin renders: an <a> whose preset or style key sets
   no colour (a JS-built link, a footer link whose saved style dropped `color`, the
   WhatsApp button's currentColor icon) otherwise takes the browser's link blue.
   Same scope rule (the link's OWN `cl-` class, so merchant links in page content,
   descriptions and custom blocks keep theirs) and same zero specificity (presets,
   component CSS and merchant CSS win). The underline is already off (public.css). */
:where(a):where([class^="cl-"], [class*=" cl-"]) {
    color: inherit;
}

/* The two page titles are <h1>s, which themes style (`h1`, `.entry-content h1`).
   These class-level resets keep a theme's h1 margin off them too, as before.
   The category one lived in the category design's generated CSS until 26-09-2026. */
.is_category_block h1.cat-title {
    margin: 0;
}

/* The product title became an <h1> on single product pages (SEO/a11y — the page
   previously contributed no heading at all). The typography preset already wins
   on specificity, because its selector is tripled
   (.cl-preset-N.cl-preset-N.cl-preset-N = 0-3-0) and beats a theme's
   `.single h1` / `.entry-content h1` (0-1-1). The ONE thing it does not declare
   is margin, which every UA stylesheet gives an h1 (~0.67em top and bottom) and
   gives a div none — so without this the title gains vertical space the div
   never had. Loaded under EVERY theme because the UA default applies regardless
   of theme. Scoped to our own class so no other h1 on the page is touched. */
h1.cl-product-title {
    margin-top: 0;
    margin-bottom: 0;
}
