/* ============================================================
   CANISANUM · base.css — gemeinsame Komponenten (Vanilla, tokenbasiert)
   Benötigt: tokens.css (davor laden). Keine Framework-Abhängigkeit.
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
/* scrollbar-gutter: Platz fuer die Scrollbar bleibt dauerhaft reserviert.
   Sonst wird der Viewport breiter, sobald das Scrollen gesperrt wird (Warenkorb-
   Drawer, Mobilmenue) - fixed positionierte Elemente wie die Sticky-CTA springen
   dann nach rechts, der Body-Inhalt nach links. */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-gutter: stable; }
body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--color-sage-deep); text-decoration: none; }
a:hover { color: var(--color-gold-deep); }
ul { list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; border-radius: 3px; }

/* ---- Layout-Helfer ------------------------------------------- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad-inline); }
.section { padding-block: var(--space-section); }
.section--alt { background: var(--color-bg-2); }
.stack > * + * { margin-top: var(--space-s); }

/* ---- Typografie ---------------------------------------------- */
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: var(--heading-weight); line-height: var(--lh-tight); letter-spacing: var(--heading-tracking); color: var(--color-text); text-wrap: balance; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
.display { font-size: var(--fs-display); line-height: var(--lh-tight); }
.lead { font-size: var(--fs-lead); color: var(--color-text-soft); line-height: var(--lh-body); }
em { font-style: italic; color: var(--color-sage-deep); }

/* ---- Fliesstext-Seiten (Impressum, Datenschutz, AGB ...) ------ */
/* Rendern ueber index.php -> .entry-title + .entry-content. Ohne diese
   Regeln erben die Ueberschriften den globalen margin:0 und kleben am
   vorigen Absatz. Hier: Lesebreite + Abstand vor jeder Ueberschrift.
   ACHTUNG: WooCommerce-Shortcode-Seiten (Cart/Checkout/Account) nutzen
   dieselbe .entry-content -> die Lesebreite wird dort in woocommerce.css
   wieder aufgehoben (.woocommerce-page .entry-content). Nicht entfernen. */
.entry-title { margin-bottom: var(--space-m); }
.entry-content { max-width: var(--maxw-text); }
.entry-content > :first-child { margin-top: 0; }
.entry-content p,
.entry-content ul,
.entry-content ol { line-height: var(--lh-body); margin-bottom: var(--space-s); }
.entry-content ul,
.entry-content ol { padding-left: 1.4em; }
.entry-content li + li { margin-top: var(--space-2xs); }
.entry-content h2 { margin-top: var(--space-xl); margin-bottom: var(--space-s); }
.entry-content h3 { margin-top: var(--space-l); margin-bottom: var(--space-xs); }
.entry-content h4 { margin-top: var(--space-m); margin-bottom: var(--space-2xs); }
/* Überlange Wörter und Links (Rechtstexte: „Verbraucherstreitbeilegungsgesetz", PayPal-URLs)
   notfalls umbrechen, statt die Seite auf dem Handy seitlich zu verbreitern (2026-09-22). */
.entry-content { overflow-wrap: anywhere; }
@media (max-width: 600px) { .entry-content { -webkit-hyphens: auto; hyphens: auto; } }
.entry-content a { color: var(--color-sage-deep); text-decoration: underline; }
/* Buttons in Textseiten (z. B. „Newsletter bestätigt") behalten ihre Button-Optik —
   die Linkregel darüber färbte die Schrift grün auf grün und unterstrich sie. */
.entry-content a.btn { text-decoration: none; }
.entry-content a.btn-primary { color: var(--color-on-primary); }

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2xs);
  font-family: var(--font-sans); font-size: var(--fs-xs); font-weight: 700;
  letter-spacing: var(--label-tracking); text-transform: uppercase; color: var(--color-gold-text);
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--color-gold); }
.eyebrow.solo::before { display: none; }

/* ---- Buttons -------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2xs);
  padding: 0.9rem 1.6rem; border-radius: var(--radius-pill);
  font-weight: 600; font-size: var(--fs-body); letter-spacing: .005em;
  text-align: center; white-space: nowrap; cursor: pointer;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn svg { width: 1.15em; height: 1.15em; }
.btn-primary { background: var(--color-sage); color: var(--color-on-primary); box-shadow: var(--btn-shadow); }
.btn-primary:hover { background: var(--color-sage-deep); transform: translateY(-2px); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: transparent; color: var(--color-text); border: 1.5px solid var(--color-line); }
.btn-ghost:hover { border-color: var(--color-gold); color: var(--color-gold-deep); }
.btn-lg { padding: 1.05rem 2rem; font-size: var(--fs-lead); }
.btn-block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
/* Loading-State */
.btn.is-loading { color: transparent; position: relative; pointer-events: none; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 1.15em; height: 1.15em; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent;
  color: var(--color-on-primary); animation: cani-spin .7s linear infinite;
}
@keyframes cani-spin { to { transform: rotate(360deg); } }

/* ---- Badges / Chips ------------------------------------------ */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 4px 10px; border-radius: var(--radius-pill); }
.badge-accent { background: var(--color-gold); color: var(--color-on-primary); }
.badge-soft { background: var(--color-surface-2); color: var(--color-sage-deep); border: 1px solid var(--color-line); }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius-pill); font-size: var(--fs-sm); font-weight: 600; color: var(--color-text-soft); }
.chip svg { width: 15px; height: 15px; color: var(--color-sage); }

/* ---- Karten --------------------------------------------------- */
.card { background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius-card); padding: var(--space-l); }
.card--pad-s { padding: var(--space-m); }

/* ---- Preis-Darstellung (mit Pflichtangaben) ------------------ */
.price { display: flex; flex-direction: column; gap: 2px; }
.price__amount { font-family: var(--font-heading); font-weight: var(--heading-weight); font-size: 1.9rem; color: var(--color-text); line-height: 1.1; }
.price__meta { font-size: var(--fs-xs); color: var(--color-muted); }
.price__meta b { color: var(--color-text-soft); font-weight: 600; }

/* ---- Formularelemente ---------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--space-s); }
.field label { font-size: var(--fs-sm); font-weight: 600; color: var(--color-text); }
.field .req { color: var(--color-gold-deep); }
.field .hint { font-size: var(--fs-xs); color: var(--color-muted); }
.input, .select, .textarea {
  width: 100%; padding: 0.8rem 0.95rem; font: inherit; font-size: var(--fs-body);
  color: var(--color-text); background: var(--color-surface);
  border: 1.5px solid var(--color-line); border-radius: var(--radius-input);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.input::placeholder { color: var(--color-muted); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--color-sage); box-shadow: 0 0 0 3px rgba(80,112,58,.16); }
.field.has-error .input, .field.has-error .select { border-color: var(--color-error); background: var(--color-error-bg); }
.field .error-msg { font-size: var(--fs-xs); color: var(--color-error); font-weight: 600; }
.field.has-error .error-msg::before { content: "⚠ "; }

/* Fehler-Summary am Formularanfang */
.form-errors { background: var(--color-error-bg); border: 1px solid var(--color-error); border-radius: var(--radius-sm); padding: var(--space-s) var(--space-m); margin-bottom: var(--space-m); }
.form-errors h3 { color: var(--color-error); font-family: var(--font-sans); font-size: var(--fs-body); margin-bottom: 6px; }
.form-errors ul { list-style: disc; padding-left: 1.2em; }
.form-errors a { color: var(--color-error); font-weight: 600; }

/* Checkbox / Radio-Grundform */
.check { display: flex; align-items: flex-start; gap: 10px; font-size: var(--fs-sm); color: var(--color-text-soft); }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--color-sage); flex: none; }

/* ---- Radio-Cards (Kaufoptionen K1) --------------------------- */
.opt-card { position: relative; display: flex; align-items: center; gap: var(--space-s); padding: var(--space-s) var(--space-m); border: 1.5px solid var(--color-line); border-radius: var(--radius-card); background: var(--color-surface); cursor: pointer; transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.opt-card:hover { border-color: var(--color-sage-soft); }
.opt-card:has(input:focus-visible) { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.opt-card.is-selected, .opt-card:has(input:checked) { border-color: var(--color-sage); box-shadow: inset 0 0 0 1px var(--color-sage); }
.opt-card input { position: absolute; opacity: 0; pointer-events: none; }
.opt-card__radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--color-line); flex: none; display: grid; place-items: center; }
.opt-card:has(input:checked) .opt-card__radio { border-color: var(--color-sage); }
.opt-card:has(input:checked) .opt-card__radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--color-sage); }
.opt-card__main { flex: 1; min-width: 0; }
.opt-card__name { font-weight: 700; font-size: var(--fs-body); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.opt-card__sub { font-size: var(--fs-xs); color: var(--color-muted); margin-top: 2px; }
.opt-card__price { text-align: right; flex: none; }
.opt-card__price .amt { font-family: var(--font-heading); font-weight: var(--heading-weight); font-size: 1.4rem; white-space: nowrap; }
.opt-card__price .base { font-size: var(--fs-xs); color: var(--color-muted); }
.opt-card[aria-disabled="true"] { opacity: .5; pointer-events: none; }

/* ---- Akkordeon (FAQ / Rechtstext-Sprungziel) ----------------- */
.acc__item { border-top: 1px solid var(--color-line); }
.acc__item:last-child { border-bottom: 1px solid var(--color-line); }
.acc__q { width: 100%; text-align: left; display: flex; align-items: center; justify-content: space-between; gap: var(--space-m); padding: var(--space-m) 2px; font-family: var(--font-heading); font-size: var(--fs-h3); color: var(--color-text); }
.acc__ic { flex: none; width: 26px; height: 26px; position: relative; }
.acc__ic::before, .acc__ic::after { content: ""; position: absolute; background: var(--color-gold-deep); transition: transform var(--dur) var(--ease); }
.acc__ic::before { top: 12px; left: 4px; right: 4px; height: 1.5px; }
.acc__ic::after { left: 12px; top: 4px; bottom: 4px; width: 1.5px; }
.acc__item.open .acc__ic::after { transform: scaleY(0); }
.acc__a { max-height: 0; overflow: hidden; transition: max-height var(--dur) var(--ease); }
.acc__a-inner { padding: 0 2px var(--space-m); color: var(--color-text-soft); max-width: var(--maxw-text); }

/* ---- Tabellen (Warenkorb, Bestellung) ------------------------ */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: var(--space-s); border-bottom: 1px solid var(--color-line); vertical-align: middle; }
.table th { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .1em; color: var(--color-muted); font-weight: 700; }
.table td.num, .table th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Mengen-Stepper */
.qty { display: inline-flex; align-items: center; border: 1px solid var(--color-line); border-radius: var(--radius-pill); overflow: hidden; background: var(--color-surface); }
.qty button { width: 34px; height: 34px; display: grid; place-items: center; color: var(--color-text-soft); }
.qty button:hover { background: var(--color-surface-2); }
.qty .n { min-width: 32px; text-align: center; font-weight: 600; font-size: var(--fs-sm); }

/* ---- Bild-Platzhalter (Markenstil, feste Ratios) ------------- */
.ph { position: relative; background:
    radial-gradient(120% 90% at 70% 20%, var(--color-anthracite-2), var(--color-anthracite));
  display: grid; place-items: center; overflow: hidden; border-radius: var(--radius-card); }
.ph[data-ar="hero"]       { aspect-ratio: var(--ar-hero); }
.ph[data-ar="anwendung"]  { aspect-ratio: var(--ar-anwendung); }
.ph[data-ar="textur"]     { aspect-ratio: var(--ar-textur); }
.ph[data-ar="manufaktur"] { aspect-ratio: var(--ar-manufaktur); }
.ph__icon { width: clamp(48px, 12%, 88px); height: auto; color: var(--color-gold); opacity: .85; }
.ph__label { position: absolute; bottom: 12px; left: 0; right: 0; text-align: center; font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.5); }
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---- Trust-Zeile --------------------------------------------- */
.trust { border-block: 1px solid var(--color-line); background: var(--color-surface); }
.trust__row { display: flex; flex-wrap: wrap; gap: var(--space-m) var(--space-xl); align-items: center; justify-content: center; padding-block: var(--space-m); }
.trust__item { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); font-weight: 600; color: var(--color-text-soft); }
.trust__item svg { width: 20px; height: 20px; color: var(--color-sage); }

/* ---- Header / Footer (statisches Theme-Chrome) --------------- */
.site-header { position: sticky; top: 0; z-index: var(--z-header); background: color-mix(in srgb, var(--color-bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--color-line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-m); height: 76px; }
.wordmark { font-family: var(--font-sans); font-weight: 800; font-size: 1.3rem; letter-spacing: .02em; color: var(--color-text); }
.wordmark b { color: var(--color-sage); font-weight: 800; }
.site-nav { display: flex; gap: var(--space-l); }
.site-nav a { font-size: var(--fs-sm); color: var(--color-text-soft); }
.site-nav a:hover { color: var(--color-sage-deep); }
.header-actions { display: flex; align-items: center; gap: var(--space-s); }
.cart-btn { position: relative; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--color-line); color: var(--color-text); }
.cart-btn:hover { border-color: var(--color-sage); color: var(--color-sage); }
.cart-btn svg { width: 21px; height: 21px; }
.cart-count { position: absolute; top: -5px; right: -5px; min-width: 21px; height: 21px; padding: 0 5px; background: var(--color-gold); color: var(--color-text); border-radius: var(--radius-pill); font-size: var(--fs-xs); font-weight: 700; display: grid; place-items: center; border: 2px solid var(--color-bg); }
@media (max-width: 860px) { .site-nav { display: none; } }

.site-footer { background: var(--color-surface); border-top: 1px solid var(--color-line); padding-block: var(--space-xl) var(--space-l); }
.footer-cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: var(--space-l); margin-bottom: var(--space-l); }
.footer-col h2 { font-family: var(--font-sans); font-size: var(--fs-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--color-muted); margin-bottom: var(--space-s); }
.footer-col a { display: block; font-size: var(--fs-sm); color: var(--color-text-soft); padding: 5px 0; }
.footer-col a:hover { color: var(--color-sage-deep); }
.footer-bottom { border-top: 1px solid var(--color-line); padding-top: var(--space-m); display: flex; justify-content: space-between; gap: var(--space-s); flex-wrap: wrap; font-size: var(--fs-xs); color: var(--color-muted); }
@media (max-width: 720px) { .footer-cols { grid-template-columns: 1fr 1fr; } .footer-col--brand { grid-column: span 2; } }

/* ---- Drawer / Overlay (Mini-Cart) ---------------------------- */
.overlay { position: fixed; inset: 0; z-index: var(--z-overlay); background: rgba(28,32,24,.5); opacity: 0; pointer-events: none; transition: opacity var(--dur) var(--ease); }
.overlay.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; z-index: var(--z-drawer); width: min(420px, 100vw); height: 100%; background: var(--color-bg); box-shadow: -20px 0 60px rgba(0,0,0,.22); transform: translateX(100%); transition: transform var(--dur) var(--ease); display: flex; flex-direction: column; }
.drawer.open { transform: translateX(0); }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: var(--space-m); border-bottom: 1px solid var(--color-line); }
.drawer__body { flex: 1; overflow-y: auto; padding: var(--space-m); }
.drawer__foot { border-top: 1px solid var(--color-line); padding: var(--space-m); background: var(--color-surface); }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--color-line); }
.icon-btn:hover { background: var(--color-surface-2); }

/* ---- Notice / Info-Box --------------------------------------- */
.notice { border-radius: var(--radius-sm); padding: var(--space-s) var(--space-m); font-size: var(--fs-sm); }
.notice--info { background: var(--color-info-bg); border: 1px solid var(--color-line); color: var(--color-text-soft); }
.notice--success { background: var(--color-success-bg); border: 1px solid var(--color-success); color: var(--color-success); }

/* ---- Sektions-Kopf ------------------------------------------- */
.section-head { max-width: 640px; margin-bottom: var(--space-xl); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { margin: var(--space-s) 0; }
.section-head .lead { margin-top: var(--space-xs); }

/* Nur fuer Screenreader (z. B. „Niedrigster Preis der letzten 30 Tage:" am Streichpreis). */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Grafik 50 ml (template-parts/grafik-pflege-50ml.php) -----------------
   Produktseite (Preis & Wert) und Ratgeber. HTML statt Bild: Text bleibt auf dem
   Handy lesbar. Schichthoehen per flex-grow = Prozent; Mindesthoehe = Beschriftung. */
.jars { margin: var(--space-l) 0; color: var(--color-text); }
.jars-title { font-family: var(--font-heading); font-weight: var(--heading-weight); font-size: var(--fs-h3); line-height: var(--lh-tight); text-align: center; margin-bottom: var(--space-m); }
.jars-row { display: grid; grid-template-columns: repeat(2, minmax(0, 190px)); justify-content: center; gap: var(--space-m); }
.jar { display: flex; flex-direction: column; align-items: stretch; }
.jar-name { order: 3; margin: var(--space-xs) 0 0; text-align: center; font-weight: 700; font-size: var(--fs-sm); line-height: var(--lh-snug); }
.jar-lid { order: 1; align-self: center; width: 84%; padding: 4px 0; margin-bottom: 5px; border-radius: 7px; text-align: center; font-size: var(--fs-xs); font-weight: 700; color: var(--color-on-primary); background: var(--color-muted-fill); }
.jar--balsam .jar-lid { background: var(--color-anthracite); }
.jar-body { order: 2; display: flex; flex-direction: column; height: 280px; border: 3px solid var(--color-anthracite); border-radius: 22px; overflow: hidden; background: var(--color-surface); }
.jar-layer { flex-basis: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px 8px; text-align: center; font-size: var(--fs-xs); line-height: 1.3; }
.jar-layer strong { font-family: var(--font-heading); font-weight: var(--heading-weight); font-size: 1.6rem; line-height: 1.05; }
.jar-layer--oel { background: color-mix(in srgb, var(--color-gold) 38%, var(--color-surface)); }
.jar-layer--hilf { padding-block: 3px; font-size: 0.6875rem; background: color-mix(in srgb, var(--color-muted-fill) 42%, var(--color-surface)); }
.jar-layer--wasser {
  color: var(--color-text-soft);
  background: repeating-linear-gradient(90deg, var(--color-surface-2) 0 12px, color-mix(in srgb, var(--color-line) 70%, var(--color-surface-2)) 12px 14px);
}
.jar-layer--wasser strong { color: var(--color-text); }
.jar-layer--balsam { flex-grow: 1; gap: 4px; background: var(--color-gold); color: var(--color-anthracite); }
.jar-layer--balsam strong { font-size: 2.3rem; }
.jar-layer--balsam span { font-size: var(--fs-sm); font-weight: 600; }
.jar-layer--balsam small { margin-top: var(--space-2xs); font-size: var(--fs-xs); }
.jars-note { margin: var(--space-s) auto 0; max-width: 46ch; text-align: center; font-size: var(--fs-xs); line-height: var(--lh-snug); color: var(--color-muted); }
@media (max-width: 420px) {
  .jars-row { gap: var(--space-s); }
  .jar-body { height: 250px; border-radius: 18px; }
  .jar-layer strong { font-size: 1.35rem; }
  .jar-layer--balsam strong { font-size: 1.9rem; }
}
