/*
Theme Name:     Traumbetten Bett-Bestellt
Theme URI:      https://traumbetten-shop.de/
Description:    Premium-Bettenshop mit Konfigurator auf Jenva Core. Built by Sleek Line Designs.
Author:         Sleek Line Designs
Author URI:     https://sleekline.net/
Template:       jenva-core-theme
Version:        1.0.5
Requires at least: 6.4
Requires PHP:   8.1
Text Domain:    tbb
Tags:           woocommerce, configurator, custom-colors, custom-logo, threaded-comments
*/

/* ============================================================================
   MOCKUP-TOKENS (Single Source of Truth — extrahiert aus allen 6 Mockup-HTMLs)
   Brand ist BLAU (Traumbetten-Tradition), nicht Rot.
   Diese Tokens sind GLOBAL (auf :root) damit alle CSS-Files Zugriff haben.
   ============================================================================ */
:root {
    --color-accent: #1e5baa;
    --color-accent-deep: #1e3a8a;
    --color-accent-hover: #1d4ed8;
    --color-accent-on-dark: #7aa2ff;
    --color-accent-soft: #e8efff;
    --color-accent-text: #ffffff;
    --color-bg: #f5f6f8;
    --color-bg-alt: #ffffff;
    --color-border: #e1e4ea;
    --color-border-soft: #eef0f3;
    --color-brand: #1E5BAA;
    --color-brand-dark: #164781;
    --color-brand-darker: #0F3461;
    --color-btn-bg: var(--color-accent);
    --color-btn-bg-hover: var(--color-accent-hover);
    --color-btn-ghost-border: var(--color-border);
    --color-btn-text: var(--color-accent-text);
    --color-btn-text-hover: var(--color-accent-text);
    --color-cream: #FAFAF7;
    --color-error: #c0392b;
    --color-gold: #C9A227;
    --color-ink: #1F2937;
    --color-ink-muted: #6B7280;
    --color-ink-soft: #4B5563;
    --color-line: #E5E7EB;
    --color-line-soft: #F1F2F4;
    --color-sale: #c0392b;
    --color-star: #fbbf24;
    --color-stone: #F4F2EC;
    --color-success: #15803d;
    --color-success-soft: #dcfce7;
    --color-surface: #ffffff;
    --color-surface-2: #eef0f3;
    --color-text: #0b0d12;
    --color-text-link: var(--color-accent-hover);
    --color-text-link-hover: var(--color-accent-deep);
    --color-text-muted: #6b7280;
    --color-text-soft: #3d4350;
    /* Dark-Surface-Tokens — für Footer und dunkle Sections (Single Source) */
    --color-dark-surface: #0F1419;
    --color-dark-border:  #1F2937;
    --color-text-on-dark: #dfe2e8;
    --color-text-on-dark-muted: #c1c7d0;
    --color-text-on-dark-soft:  #a8b0bf;
    --color-text-on-dark-meta:  #9CA3AF;
    --color-warning: #b45309;
    --color-warning-soft: #fef3c7;
    --container: 1400px;
    --container-max: 1400px;
    --container-narrow: 760px;
    --container-prose: 720px;
    --duration: 240ms;
    --ease: cubic-bezier(.16, 1, .3, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --font-display: 'Fraunces', Georgia, serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --fs-body: 15px;
    --fs-eyebrow: 11px;
    --fs-h2: clamp(24px, 2.4vw, 34px);
    --fs-h3: clamp(20px, 1.6vw, 24px);
    --fs-hero: clamp(28px, 3.6vw, 44px);
    --fs-lead: 17px;
    --fs-price: clamp(28px, 3vw, 38px);
    --fs-small: 13px;
    --gutter: clamp(20px, 4vw, 48px);
    --header-h: 76px;
    --lh-base: 1.6;
    --lh-snug: 1.35;
    --lh-tight: 1.15;
    --radius: 10px;
    --radius-card: 6px;
    --radius-lg: 16px;
    --radius-sm: 6px;
    --shadow: 0 4px 12px rgb(11 13 18 / .07), 0 1px 3px rgb(11 13 18 / .05);
    --shadow-1: 0 1px 2px rgb(11 13 18 / .04), 0 2px 6px rgb(11 13 18 / .04);
    --shadow-3: 0 14px 36px rgb(11 13 18 / .12);
    --shadow-card: 0 1px 2px rgba(15, 52, 97, 0.04), 0 4px 12px rgba(15, 52, 97, 0.05);
    --shadow-pop: 0 8px 28px rgba(15, 52, 97, 0.12);
    --space-1: .25rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-2: .5rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --space-3: .75rem;
    --space-32: 8rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-section: clamp(56px, 7vw, 96px);
    --space-section-tight: clamp(40px, 5vw, 72px);
    --text-2xl: clamp(1.5rem, 1.3rem + 1vw, 1.875rem);
    --text-3xl: clamp(1.75rem, 1.4rem + 1.4vw, 2.25rem);
    --text-base: 1rem;
    --text-display: var(--text-hero);
    --text-hero: clamp(2.25rem, 1.6rem + 3vw, 3.75rem);
    --text-lg: clamp(1.125rem, 1rem + .4vw, 1.25rem);
    --text-md: 1.0625rem;
    --text-prose: var(--text-md);
    --text-sm: .9375rem;
    --text-xl: clamp(1.375rem, 1.2rem + .8vw, 1.625rem);
    --text-xs: .8125rem;
}

/* ============================================================================
   TBB-Aliase für interne Helper-Klassen (kompatibel mit Mockup-Tokens)
   ============================================================================ */
:root {
    --tbb-color-primary:  var(--color-accent);
    --tbb-color-dark:     var(--color-brand-darker);
    --tbb-color-bg:       var(--color-bg);
    --tbb-color-text:     var(--color-text);
    --tbb-color-border:   var(--color-border);
    --tbb-font-sans:      var(--font-sans);
    --tbb-font-serif:     var(--font-display);
    --tbb-header-h:       80px;
}

/* ============================================================================
   GLOBAL BASE — wirkt überall (auch auf Parent-rendered Views)
   ============================================================================ */
html { font-family: var(--font-sans, system-ui, sans-serif); color: var(--color-text); background: var(--color-bg); }
body { margin: 0; line-height: 1.55; -webkit-font-smoothing: antialiased; }
*, *::before, *::after { box-sizing: border-box; }
img, svg, video { max-width: 100%; height: auto; display: block; }
/* Hero + Stoff-Sektion: Bilder füllen ihre Box (object-fit: cover) */
.hero-visual > img,
.hero-visual img.hero-visual-bed-img,
.hero-visual img.hero-visual-image,
.child-configurator-visual > img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center;
}
.hero-visual:has(> img) {
  background: none;
}
.child-configurator-visual:has(> img) {
  background: #1f2937;
}
button { font: inherit; cursor: pointer; }

a { color: var(--color-accent, #1e5baa); text-decoration: none; }
a:hover { color: var(--color-accent-hover, #1d4ed8); }

h1, h2, h3, h4 {
    font-family: var(--font-display, var(--font-sans));
    line-height: 1.2;
    margin: 0 0 var(--space-3, 12px);
    letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 var(--space-3, 12px); }
em { font-style: italic; }
strong { font-weight: 600; }

/* Tokens-Aliase für Helper-Mockup-Selektoren */
.tbb-chrome {
    --accent-color: var(--color-accent);
    --header-h:     var(--tbb-header-h);
}

/* Universelle Utilities (Pattern 2) */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 400ms cubic-bezier(0.22,1,0.36,1), transform 400ms cubic-bezier(0.22,1,0.36,1); }
.reveal.is-visible { opacity: 1; transform: none; }
.header-wishlist-count:empty,
.header-cart-count:empty { display: none; }

/* Buttons (immer verfügbar, nicht nur in .tbb-page) */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 8px;
    font: inherit; font-weight: 600;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background 200ms, border-color 200ms, color 200ms, transform 200ms;
    text-decoration: none;
}
.btn-primary {
    background: var(--color-accent);
    color: var(--color-accent-text, #fff);
    border-color: var(--color-accent);
}
.btn-primary:hover {
    background: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
    color: #fff;
}
.btn-secondary {
    background: transparent;
    color: var(--color-text);
    border-color: var(--color-border);
}
.btn-secondary:hover {
    background: var(--color-bg-alt);
    border-color: var(--color-text);
}
.btn-light {
    background: var(--color-bg-alt, #fff);
    color: var(--color-text);
    border-color: var(--color-border);
}

/* Skip-Link */
.skip-link {
    position: absolute; left: -9999px; top: auto;
}
.skip-link:focus {
    position: static; padding: 8px 16px; background: #000; color: #fff;
}

/* Screen-Reader-Text */
.screen-reader-text {
    border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
    height: 1px; width: 1px; overflow: hidden; position: absolute;
    word-wrap: normal !important;
}
