/* Standard-Theme von JDS Web. Farben über die Variablen anpassen. */
:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --text: #1c1917;
  --muted: #78716c;
  --border: #e7e5e4;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-text: #ffffff;
  --sale: #dc2626;
  --success: #15803d;
  --radius: 12px;
  --max: 1160px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
h2 { font-size: 1.5rem; margin-top: 1.5em; }
h3 { font-size: 1.1rem; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.section { padding-top: 40px; padding-bottom: 40px; }
.site-main { flex: 1; }
.lead { font-size: 1.15rem; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.warn { color: var(--sale); }
.meta { color: var(--muted); font-size: .875rem; margin-bottom: .5em; }
.page-title { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.empty { text-align: center; padding: 48px 16px; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { font-weight: 800; font-size: 1.25rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { max-height: 40px; width: auto; }
.main-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.main-nav > a { color: var(--text); padding: 8px 12px; border-radius: 8px; font-weight: 500; }
.main-nav > a:hover, .main-nav > a.active { background: var(--bg); text-decoration: none; }
.nav-search input { width: 150px; padding: 7px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg); font: inherit; color: inherit; }
.cart-link .badge { background: var(--accent); color: var(--accent-text); border-radius: 999px; padding: 0 7px; font-size: .75rem; }
.nav-toggle, .nav-toggle-label { display: none; }
.lang-switch { display: inline-flex; gap: 2px; margin-left: 4px; }
.lang-switch a { color: var(--muted); padding: 6px 6px; font-size: .8rem; font-weight: 600; border-radius: 6px; }
.lang-switch a.active { color: var(--text); background: var(--bg); }
.login-form { display: grid; gap: 12px; max-width: 420px; }
/* Offizielle Joel-Digitals-Knöpfe (Grafik unverändert lassen) */
.jd-sso-button { display: inline-block; border-radius: 16px; line-height: 0; transition: transform .2s, box-shadow .2s; }
.jd-sso-button img { width: 100%; max-width: 320px; height: auto; border-radius: 16px; }
.jd-sso-button:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -10px rgba(59, 89, 152, .6); }
.jd-sso-button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.jd-sso-hint { margin: 16px 0 6px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; max-width: 420px; margin: 24px 0; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--border); }

@media (max-width: 760px) {
  .nav-toggle-label { display: block; cursor: pointer; padding: 12px 4px; }
  .nav-toggle-label span, .nav-toggle-label span::before, .nav-toggle-label span::after {
    display: block; width: 22px; height: 2px; background: var(--text); position: relative; content: "";
  }
  .nav-toggle-label span::before { position: absolute; top: -7px; }
  .nav-toggle-label span::after { position: absolute; top: 7px; }
  .main-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: 12px; }
  .nav-toggle:checked ~ .main-nav { display: flex; }
  .nav-search input { width: 100%; }
}

/* Buttons & Formulare */
.button {
  display: inline-block; background: var(--accent); color: var(--accent-text); border: 0;
  padding: 11px 20px; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer; text-align: center;
}
.button:hover { background: var(--accent-hover); text-decoration: none; }
.button:disabled { opacity: .5; cursor: not-allowed; }
.button-ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.button-ghost:hover { background: var(--accent); color: var(--accent-text); }
.button-small { padding: 7px 14px; font-size: .875rem; }
.button-block { display: block; width: 100%; margin-top: 16px; }
.link-button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1rem; }
input, select, textarea {
  font: inherit; color: inherit; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--surface); width: 100%;
}
input[type="checkbox"], input[type="radio"] { width: auto; }
label { font-weight: 500; font-size: .9rem; }
.errorlist { color: var(--sale); list-style: none; padding: 0; margin: 4px 0 0; font-size: .875rem; }

/* Meldungen */
.messages { padding-top: 16px; }
.message { padding: 12px 16px; border-radius: 10px; background: #eef2ff; margin-bottom: 8px; }
.message-success { background: #dcfce7; color: var(--success); }
.message-error { background: #fee2e2; color: var(--sale); }
.notice { background: #eef2ff; border-radius: var(--radius); padding: 16px 20px; margin: 16px 0; }
.draft-note { display: inline-block; background: #fef3c7; color: #92400e; padding: 4px 10px; border-radius: 6px; font-size: .8rem; }

/* Hero */
.hero { background: linear-gradient(135deg, #eef2ff, #fdf4ff); padding: 72px 0; text-align: center; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.section-head h2 { margin-top: 0; }

/* Raster & Karten */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card-media { position: relative; aspect-ratio: 4 / 3; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 { margin: 0; }
.card-body h3 a { color: var(--text); }
.card-body p { margin: 0; }
.product-card form { margin-top: auto; padding-top: 8px; }
.placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 3rem; font-weight: 800; color: var(--accent); background: linear-gradient(135deg, #eef2ff, #f5f5f4);
  text-transform: uppercase;
}
.tag { position: absolute; top: 10px; left: 10px; background: var(--text); color: #fff; font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.tag-sale { background: var(--sale); }
.price del { color: var(--muted); font-weight: 400; }
.price-large { font-size: 1.6rem; margin: 0; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.chips a { padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px; color: var(--text); background: var(--surface); font-size: .9rem; }
.chips a.active, .chips a:hover { background: var(--text); color: var(--surface); text-decoration: none; }
.toolbar { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.toolbar .chips { margin-bottom: 16px; }
.sort select { width: auto; }

.pagination { display: flex; justify-content: center; gap: 16px; align-items: center; margin-top: 32px; }

/* Inhalt */
.content { font-size: 1.05rem; }
.content img { border-radius: var(--radius); margin: 1em 0; }
.content blockquote { border-left: 4px solid var(--accent); margin: 1.5em 0; padding: .2em 1.2em; color: var(--muted); }
.content .products { margin: 1.5em 0; }
.featured-image { border-radius: var(--radius); margin: 16px 0 24px; width: 100%; }
.search-form { display: flex; gap: 8px; max-width: 560px; margin-bottom: 24px; }
.result-list { padding-left: 1.2em; }

/* Produktseite */
.product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.product-image { aspect-ratio: 1; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.product-image img { width: 100%; height: 100%; object-fit: cover; }
.product-image .placeholder { font-size: 6rem; }
.thumbs { display: flex; gap: 8px; margin-top: 8px; }
.thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }
.add-to-cart { display: flex; gap: 8px; margin: 20px 0 8px; }
.add-to-cart input { width: 80px; }
.product-description { margin-top: 40px; }
@media (max-width: 760px) { .product-layout { grid-template-columns: 1fr; gap: 24px; } }

/* Warenkorb & Kasse */
.cart-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.cart-table th, .cart-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.cart-table th { font-size: .8rem; text-transform: uppercase; color: var(--muted); }
.cart-table input { width: 80px; }
@media (max-width: 640px) {
  .cart-table thead { display: none; }
  .cart-table tr { display: grid; grid-template-columns: 1fr auto; border-bottom: 1px solid var(--border); padding: 8px 0; }
  .cart-table td { border: 0; padding: 4px 12px; }
  .cart-table td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: .85rem; }
}
.totals { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; max-width: 420px; margin-left: auto; margin-top: 24px; }
.totals > div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.totals .total { font-weight: 700; font-size: 1.15rem; border-top: 1px solid var(--border); margin-top: 8px; padding-top: 12px; }
.totals h2 { margin-top: 0; font-size: 1.2rem; }
.totals hr { border: 0; border-top: 1px solid var(--border); }
.narrow .totals { margin-left: 0; max-width: none; }

.checkout { display: grid; grid-template-columns: 1fr 380px; gap: 40px; align-items: start; }
.checkout .totals { margin: 0; position: sticky; top: 84px; }
.checkout h2:first-child { margin-top: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field-email, .field-street, .field-note, .field-country { grid-column: 1 / -1; }
.has-error input { border-color: var(--sale); }
.pay-option { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 8px; cursor: pointer; }
.pay-option small { display: block; color: var(--muted); font-weight: 400; }
.checkbox { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; }
@media (max-width: 860px) {
  .checkout { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 32px 0; margin-top: 48px; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-inner strong { color: var(--text); }
.footer-nav { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-nav a { color: var(--muted); }

/* --- Baukasten-Blöcke ------------------------------------------------------ */
.blk { padding: 56px 0; }
.blk + .blk { padding-top: 0; }
.blk-page-title { margin-top: 40px; }
.blk-title { text-align: center; margin: 0 0 32px; }
.blk-hero { padding: 96px 0; text-align: center; background: linear-gradient(135deg, #eef2ff, #fdf4ff); }
.blk-hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); max-width: 860px; margin: 0 auto 16px; }
.blk-hero .lead { max-width: 680px; margin: 0 auto 28px; }
.blk-hero-dunkel { background: linear-gradient(160deg, #0f172a, #312e81); color: #f8fafc; }
.blk-hero-dunkel .lead { color: #cbd5e1; }
.blk-hero-hell { background: var(--surface); border-bottom: 1px solid var(--border); }
.blk-hero[style*="--hero-image"] { background: linear-gradient(rgba(15, 23, 42, .55), rgba(15, 23, 42, .55)), var(--hero-image) center / cover; color: #fff; }
.blk-hero[style*="--hero-image"] .lead { color: #e2e8f0; }
.blk + .blk-hero, .blk-hero + .blk { padding-top: 56px; }
.blk-image figcaption { color: var(--muted); font-size: .9rem; text-align: center; margin-top: 8px; }
.blk-image img { width: 100%; border-radius: var(--radius); }
.blk-image-wide img { border-radius: 0; }
.blk-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.blk-gallery-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.blk-columns-grid, .blk-team-grid, .blk-quotes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.blk-column img { width: 100%; border-radius: 10px; margin-bottom: 12px; }
.blk-column h3 { margin-bottom: 6px; }
.blk-column p { color: var(--muted); margin: 0; }
.blk-pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; align-items: stretch; }
.blk-plan { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; }
.blk-plan ul { list-style: none; padding: 0; margin: 0 0 20px; flex: 1; }
.blk-plan li { padding: 5px 0 5px 24px; position: relative; }
.blk-plan li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.blk-plan-featured { border: 2px solid var(--accent); box-shadow: 0 18px 40px -20px rgba(79, 70, 229, .45); }
.blk-plan-price { font-size: 2rem; font-weight: 800; margin: 0 0 16px; }
.blk-plan-price small { font-size: .9rem; font-weight: 400; color: var(--muted); }
.blk-faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 0 18px; margin-bottom: 10px; }
.blk-faq-item summary { cursor: pointer; padding: 14px 0; font-weight: 600; }
.blk-faq-item p { margin: 0 0 14px; color: var(--muted); }
.blk-person { text-align: center; }
.blk-avatar, .blk-person img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin: 0 auto 12px; display: block; }
.blk-avatar-empty { display: flex; align-items: center; justify-content: center; background: var(--bg); border: 1px solid var(--border); font-size: 2.4rem; font-weight: 800; color: var(--accent); }
.blk-person h3 { margin: 0; }
.blk-quote { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.blk-quote p { font-size: 1.05rem; margin: 0 0 12px; }
.blk-quote footer { color: var(--muted); font-size: .9rem; }
.blk-cta { text-align: center; }
.blk-cta .container { background: var(--text); color: var(--surface); border-radius: 20px; padding: 48px 24px; }
.blk-cta p { opacity: .8; }
.blk-consent { border: 1px dashed var(--border); border-radius: var(--radius); padding: 28px; text-align: center; background: var(--surface); }
.blk-consent iframe { width: 100%; height: 420px; border: 0; border-radius: var(--radius); }
.blk-consent-loaded { padding: 0; border: 0; }
.blk-video-frame { aspect-ratio: 16 / 9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: #0f172a; color: #cbd5e1; }
.blk-video-frame.blk-consent-loaded iframe { height: 100%; }
.blk-play { width: 72px; height: 72px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; font-size: 1.6rem; cursor: pointer; }
.blk-spacer-klein { height: 24px; } .blk-spacer-mittel { height: 56px; } .blk-spacer-gross { height: 112px; }
.builder-form { display: grid; gap: 14px; }
.builder-form .field small { display: block; margin-top: 2px; }
.entry-fields dt { font-weight: 600; margin-top: 12px; }
.entry-fields dd { margin: 0; color: var(--muted); }
.entry-image img { border-radius: var(--radius); margin: 8px 0 16px; width: 100%; }
picture { display: contents; }
