/* ════════════════════════════════════════════════════════════════════════
   01-base.css — Reset, body, typografie, odkazy, obrázky

   Přepisuje Divi defaulty kde je třeba.

   GUARD PRO DIVI 5 VISUAL BUILDER:
   Všechny globální ELEMENTOVÉ selektory (h1–h6, p, ul, a, img, button,
   input…) nesou :where(:not(.et-vb-top-window-ui *, .et-vb-modal *)),
   aby nestylovaly UI builderu (pravý panel a modály — portál v top okně).
   :where() má nulovou specificitu → kaskáda na frontendu i v canvasu
   builderu zůstává beze změny. Detaily viz 13-divi-vb-fix.css.
   ════════════════════════════════════════════════════════════════════════ */

/* ── Light reset (Divi má vlastní reset, jen doplnění) ──────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* ── Body ────────────────────────────────────────────────────────── */
body {
  font-family: var(--font-base) !important;   /* nutné !important kvůli Divi */
  color: var(--ink);
  background: var(--bg);
  font-size: var(--fs-body);
  line-height: var(--lh-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Body s mobile sticky CTA (single-product) — padding pod CTA na mobilu */
@media (max-width: 640px) {
  body.has-mobile-cta {
    padding-bottom: 72px;
  }
}

/* ── Headings ────────────────────────────────────────────────────── */
h1:where(:not(.et-vb-top-window-ui *, .et-vb-modal *)),
h2:where(:not(.et-vb-top-window-ui *, .et-vb-modal *)),
h3:where(:not(.et-vb-top-window-ui *, .et-vb-modal *)),
h4:where(:not(.et-vb-top-window-ui *, .et-vb-modal *)),
h5:where(:not(.et-vb-top-window-ui *, .et-vb-modal *)),
h6:where(:not(.et-vb-top-window-ui *, .et-vb-modal *)) {
  font-family: var(--font-base);
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: var(--lh-tight);
  margin: 0;
  padding: 0;          /* override Divi default padding-bottom: 10px */
}

h1:where(:not(.et-vb-top-window-ui *, .et-vb-modal *)) { font-size: var(--fs-h1); letter-spacing: -0.02em; line-height: 1.1; }
h2:where(:not(.et-vb-top-window-ui *, .et-vb-modal *)) { font-size: var(--fs-h2); }
h3:where(:not(.et-vb-top-window-ui *, .et-vb-modal *)) { font-size: var(--fs-h3); font-weight: 800; letter-spacing: -0.01em; }
h4:where(:not(.et-vb-top-window-ui *, .et-vb-modal *)) { font-size: var(--fs-h4); font-weight: 700; }
h5:where(:not(.et-vb-top-window-ui *, .et-vb-modal *)) { font-size: var(--fs-h5); font-weight: 700; }
h6:where(:not(.et-vb-top-window-ui *, .et-vb-modal *)) { font-size: var(--fs-h6); font-weight: 700; }

/* ── em v nadpisech (zvýraznění klíčového slova růžovou barvou) ── */
h1 em:where(:not(.et-vb-top-window-ui *, .et-vb-modal *)),
h2 em:where(:not(.et-vb-top-window-ui *, .et-vb-modal *)),
h3 em:where(:not(.et-vb-top-window-ui *, .et-vb-modal *)) {
  font-style: normal;
  color: var(--pink);
  white-space: nowrap;
}

/* ── Paragraf, lists ─────────────────────────────────────────────── */
p:where(:not(.et-vb-top-window-ui *, .et-vb-modal *)) {
  margin: 0;
  line-height: var(--lh-base);
}

ul:where(:not(.et-vb-top-window-ui *, .et-vb-modal *)),
ol:where(:not(.et-vb-top-window-ui *, .et-vb-modal *)) {
  margin: 0;
  padding: 0;
}

/* ── Linky ───────────────────────────────────────────────────────── */
a:where(:not(.et-vb-top-window-ui *, .et-vb-modal *)) {
  color: inherit;
  text-decoration: none;
  transition: color var(--t-fast);
}
a:hover:where(:not(.et-vb-top-window-ui *, .et-vb-modal *)) {
  color: var(--pink);
}

/* ── Obrázky ─────────────────────────────────────────────────────── */
img:where(:not(.et-vb-top-window-ui *, .et-vb-modal *)) {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── Buttons (reset) ─────────────────────────────────────────────── */
button:where(:not(.et-vb-top-window-ui *, .et-vb-modal *)) {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}

/* ── Form elementy (base) ───────────────────────────────────────── */
input:where(:not(.et-vb-top-window-ui *, .et-vb-modal *)),
textarea:where(:not(.et-vb-top-window-ui *, .et-vb-modal *)),
select:where(:not(.et-vb-top-window-ui *, .et-vb-modal *)) {
  font-family: inherit;
  font-size: inherit;
  color: var(--ink);
}

input:focus:where(:not(.et-vb-top-window-ui *, .et-vb-modal *)),
textarea:focus:where(:not(.et-vb-top-window-ui *, .et-vb-modal *)),
select:focus:where(:not(.et-vb-top-window-ui *, .et-vb-modal *)) {
  outline: 0;
}

/* ── Divi-specific overrides ────────────────────────────────────── */

/* Divi občas přebíjí line-height a font-family — vynutíme náš */
.et_pb_module,
.et_pb_section,
.et_pb_row,
.et_pb_text,
.et_pb_text_inner,
.et_pb_blurb_content {
  font-family: var(--font-base);
}

/* Divi container — max-width řídíme přes .container (12-utilities.css).
   Žádný padding zleva/zprava — width % na containeru drží okraje. */
.et_pb_row {
  max-width: var(--container) !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* HTML hidden atribut musí vždy vyhrát — naše display pravidla na classách
   (.badge apod.) by ho jinak přebila (quirk #30) */
[hidden] {
  display: none !important;
}
