/* =========================================================================
   VIVO Baubedarf – Gestaltungssystem
   Markenwerte aus vivo-floor.de (berechnete Stile):
   Schwarz #000000, Weiß #FFFFFF, Eiche #BE9A74, Anthrazit #282626, Stein #E8E6E6
   Schrift: Agrandir (Regular / Text Bold) – Dateien siehe src/assets/fonts/README.txt
   ========================================================================= */

:root {
  --black: #000000;
  --white: #ffffff;
  --oak: #be9a74;          /* Markenakzent – nur auf Dunkel oder als Fläche mit schwarzer Schrift */
  --oak-ink: #7a5a38;      /* abgeleitet: Eiche als Textfarbe auf Hell (Kontrast 6,3:1) */
  --anthracite: #282626;
  --stone: #e8e6e6;
  --paper: #fafafa;
  --muted: #5c5757;        /* Sekundärtext auf Weiß (7,1:1) */
  --muted-dark: #b5adaa;   /* Sekundärtext auf Anthrazit (6,8:1) */
  --line: #d6d2d0;

  --font: "Agrandir", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: clamp(1.125rem, 1.07rem + 0.25vw, 1.25rem);
  --step-2: clamp(1.375rem, 1.24rem + 0.6vw, 1.75rem);
  --step-3: clamp(1.75rem, 1.5rem + 1.1vw, 2.5rem);
  --step-4: clamp(2.1rem, 1.6rem + 2.3vw, 3.6rem);

  --gutter: clamp(1rem, 0.6rem + 2vw, 2.5rem);
  --section: clamp(3.5rem, 2.5rem + 4vw, 7rem);
  --maxw: 1320px;
  --edge: 6px;             /* „Eichenkante“ – wiederkehrendes Markenelement */
  --header-h: 64px;
  --bar-h: 0px;
  --radius: 2px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; font-family: var(--font); font-size: var(--step-0); line-height: 1.6;
  color: var(--black); background: var(--white);
  padding-bottom: var(--bar-h);
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html.menu-open, html.sheet-open { overflow: hidden; }
img, picture { display: block; max-width: 100%; height: auto; }
.hero-media > picture, .pagehead-media > picture, .area-img > picture, .local-img > picture, .pcard-img > picture, .mat-img > picture, .detail-grid picture img, .door-models picture img { width: 100%; height: 100%; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { font-weight: 400; line-height: 1.15; margin: 0 0 0.6em; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: var(--step-4); }
h2, .section-h { font-size: var(--step-3); }
h3, .h3 { font-size: var(--step-2); }
.h4 { font-size: var(--step-1); margin-top: 1.5em; }
p { margin: 0 0 1em; max-width: 68ch; }
strong { font-weight: 700; }
button, input, select, textarea { font: inherit; color: inherit; }
fieldset { min-width: 0; }

:focus-visible { outline: 3px solid var(--oak); outline-offset: 3px; }
.section-dark :focus-visible, .hero-panel :focus-visible, .pagehead-panel :focus-visible, .site-footer :focus-visible { outline-color: var(--white); }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 1rem; top: -100px; z-index: 100; background: var(--black); color: var(--white); padding: 0.75rem 1rem; }
.skip:focus { top: 1rem; }
main:focus { outline: none; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.narrow { max-width: 860px; }

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px; padding: 0.75rem 1.4rem; border: 1px solid transparent; border-radius: var(--radius);
  font-weight: 700; font-size: 0.95rem; letter-spacing: 0.01em; line-height: 1.2; text-decoration: none;
  cursor: pointer; transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--oak); color: var(--black); }
.btn-primary:hover { background: #cfae8b; }
.btn-ghost { background: transparent; border-color: var(--black); color: var(--black); }
.btn-ghost:hover { background: var(--black); color: var(--white); }
.btn-ghost-light { background: transparent; border-color: rgba(255,255,255,.7); color: var(--white); }
.btn-ghost-light:hover { background: var(--white); color: var(--black); }
.btn-sm { min-height: 44px; padding: 0.55rem 1rem; font-size: 0.875rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-busy="true"] { opacity: .65; cursor: progress; }
.btn svg { flex: none; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.textlink { display: inline-block; font-weight: 700; text-decoration: underline; text-underline-offset: 0.25em; padding-block: 0.6rem; }

/* Header ----------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--stone); }
.header-bar { display: flex; align-items: center; gap: 1rem; height: var(--header-h); }
.brand { display: block; flex: none; }
.brand img { width: 96px; height: auto; }
.nav-desktop { display: none; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; }
.header-tel { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-width: 44px; min-height: 44px; text-decoration: none; font-weight: 700; font-size: .95rem; }
.header-tel span { display: none; }
.header-cta { display: none; }
.menu-toggle, .menu-close {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; min-width: 44px; padding: 0 .6rem;
  background: none; border: 1px solid var(--black); border-radius: var(--radius); cursor: pointer; font-weight: 700; font-size: .875rem;
}
@media (min-width: 640px) { .header-cta { display: inline-flex; } }
@media (min-width: 1140px) {
  :root { --header-h: 80px; }
  .brand img { width: 120px; }
  .nav-desktop { display: block; margin-left: 2rem; }
  .nav-desktop > ul { display: flex; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
  .nav-desktop li { position: relative; display: flex; align-items: center; }
  .nav-desktop a { display: block; padding: .7rem .65rem; text-decoration: none; font-size: .95rem; }
  .nav-desktop a:hover, .nav-desktop a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--oak); text-decoration-thickness: 2px; text-underline-offset: .45em; }
  .sub-toggle { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 44px; margin-left: -.4rem; background: none; border: 0; cursor: pointer; }
  .sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
  .sub { position: absolute; top: 100%; left: 0; min-width: 220px; list-style: none; margin: 0; padding: .5rem 0; background: var(--white); border: 1px solid var(--stone); border-top: var(--edge) solid var(--oak); box-shadow: 0 12px 30px rgba(40,38,38,.12); }
  .sub a { padding: .65rem 1.1rem; }
  .menu-toggle { display: none; }
}
@media (min-width: 1260px) { .header-tel span { display: inline; } }

/* Mobiles Menü */
.mobile-menu {
  position: fixed; inset: 0; z-index: 60; background: var(--white);
  display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain;
  padding: 0 var(--gutter) calc(1.5rem + env(safe-area-inset-bottom));
}
.mobile-menu[hidden] { display: none; }
.mobile-menu-head { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); border-bottom: 1px solid var(--stone); position: sticky; top: 0; background: var(--white); z-index: 1; }
.mobile-nav { list-style: none; margin: 0; padding: .5rem 0; }
.mobile-nav > li { border-bottom: 1px solid var(--stone); }
.mobile-nav a { display: flex; align-items: center; min-height: 52px; text-decoration: none; font-size: 1.25rem; }
.mobile-nav a[aria-current="page"] { box-shadow: inset var(--edge) 0 0 var(--oak); padding-left: 1rem; }
.mobile-nav ul { list-style: none; margin: -0.25rem 0 0.75rem; padding: 0 0 0 1rem; border-left: 1px solid var(--stone); }
.mobile-nav ul a { font-size: 1rem; min-height: 44px; color: var(--muted); }
.mobile-menu-contact { display: grid; gap: .75rem; margin-top: 1.5rem; }
.mobile-menu-contact p { color: var(--muted); font-size: .9rem; margin: .25rem 0 0; }

/* Breadcrumbs */
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: .25rem .5rem; list-style: none; margin: 0; padding: 1rem 0 0; font-size: var(--step--1); color: var(--muted); }
.breadcrumbs li + li::before { content: "/"; margin-right: .5rem; color: var(--line); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a, .breadcrumbs span { display: inline-block; padding-block: .3rem; }

/* Hero & Seitenkopf: Anthrazitfläche + Eichenkante + Bild ------------------- */
.hero, .pagehead { display: grid; background: var(--anthracite); color: var(--white); }
.hero-media, .pagehead-media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--stone); }
.hero-media img, .pagehead-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media img { object-position: 62% 60%; }
.hero-panel, .pagehead-panel { border-top: var(--edge) solid var(--oak); }
.hero-inner, .pagehead-inner { padding: 2rem var(--gutter) 2.5rem; max-width: 640px; }
.hero h1 { font-size: var(--step-4); margin-bottom: .5em; }
.pagehead h1 { font-size: clamp(1.9rem, 1.45rem + 2vw, 3.1rem); }
.lead { font-size: var(--step-1); color: #e9e4e1; line-height: 1.55; }
.lead-dark { color: var(--muted); }
.hero-contact { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.25rem; margin: 1.75rem 0 0; color: var(--muted-dark); font-size: .95rem; }
.hero-contact a { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; color: var(--white); font-weight: 700; text-decoration: none; }
.pagehead-note { margin-top: 1.25rem; color: var(--muted-dark); font-size: .95rem; }
@media (min-width: 640px) { .hero-media, .pagehead-media { aspect-ratio: 16 / 9; } }
@media (min-width: 960px) {
  .hero, .pagehead { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); min-height: min(78vh, 720px); }
  .pagehead { min-height: min(62vh, 560px); }
  .hero-media, .pagehead-media { order: 2; aspect-ratio: auto; }
  .hero-panel, .pagehead-panel { order: 1; border-top: 0; border-right: var(--edge) solid var(--oak); display: flex; align-items: center; }
  .hero-inner, .pagehead-inner { padding: 3rem clamp(2rem, 4vw, 4.5rem); margin-left: auto; max-width: 600px; }
}

/* Abschnitte ------------------------------------------------------------- */
.section { padding-block: var(--section); }
.section-tight { padding-block: clamp(2rem, 1.5rem + 2vw, 3.5rem); }
.section-stone { background: var(--stone); }
.section-dark { background: var(--anthracite); color: var(--white); }
.section-h { margin-bottom: .5em; }
.section-sub { color: var(--muted); margin-top: -0.4em; margin-bottom: 2rem; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 2rem; margin-bottom: 1.5rem; }
.section-head .section-h { margin: 0; }

/* Bereichswahl */
.area-list { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 2rem; }
.area a { display: block; text-decoration: none; }
.area-img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--stone); margin-bottom: 1rem; }
.area-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.area a:hover .area-img img { transform: scale(1.03); }
.area h3 { margin-bottom: .3em; }
.area p { color: var(--muted); margin-bottom: .25rem; }
@media (min-width: 640px) and (max-width: 959px) {
  .area a { display: grid; grid-template-columns: 2fr 3fr; gap: 1.5rem; align-items: center; }
  .area-img { margin: 0; grid-row: span 3; }
}
@media (min-width: 960px) {
  .area-list { grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 3vw, 3rem); }
  .area-img { aspect-ratio: 3 / 4; }
  .area:nth-child(2) { margin-top: 4rem; }
}

/* Versprechen / Definitionslisten */
.promise-list { display: grid; gap: 0; margin: 1.5rem 0 0; }
.promise-list > div { padding: 1.25rem 0; border-top: 1px solid rgba(0,0,0,.18); }
.promise-list dt { font-weight: 700; font-size: var(--step-1); margin-bottom: .35rem; }
.promise-list dd { margin: 0; color: #3b3838; max-width: 52ch; }
.section-stone .promise-list dd { color: #3b3838; }
@media (min-width: 760px) { .promise-list { grid-template-columns: repeat(2, 1fr); column-gap: 3rem; } }
@media (min-width: 1100px) { .promise-list:has(> div:nth-child(4)) { grid-template-columns: repeat(4, 1fr); } .promise-list:not(:has(> div:nth-child(4))) { grid-template-columns: repeat(3, 1fr); } }

/* Ablauf (echte Reihenfolge, daher nummeriert) */
.steps { list-style: none; counter-reset: step; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1.5rem; }
.steps li { counter-increment: step; position: relative; padding-left: 3.25rem; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -.1rem; width: 2.25rem; height: 2.25rem; display: grid; place-items: center; border: 1px solid var(--black); border-radius: 50%; font-weight: 700; font-size: .95rem; }
.steps h3 { font-size: var(--step-1); font-weight: 700; margin-bottom: .25rem; }
.steps p { color: var(--muted); margin: 0; }
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; }
  .steps li { padding: 3.25rem 0 0; border-top: 1px solid var(--line); }
  .steps li::before { top: 1rem; }
  .steps:has(> li:nth-child(5)) { grid-template-columns: repeat(3, 1fr); }
}

/* Lokal / Beratung */
.local-grid { display: grid; gap: 2rem; align-items: center; }
.local-img { aspect-ratio: 4 / 3; overflow: hidden; border-bottom: var(--edge) solid var(--oak); }
.local-img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.local-text p { color: #e9e4e1; }
.local-address { font-weight: 700; color: var(--white) !important; }
@media (min-width: 960px) { .local-grid { grid-template-columns: 5fr 6fr; gap: 5rem; } .local-img { aspect-ratio: 4 / 5; border-bottom: 0; border-right: var(--edge) solid var(--oak); } }

.hours { display: grid; gap: .35rem; margin: 1.25rem 0; }
.hours > div { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); padding-bottom: .35rem; }
.hours dt { font-weight: 700; }
.hours dd { margin: 0; text-align: right; }
.hours-dark > div { border-color: rgba(255,255,255,.2); }

/* FAQ */
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 56px; padding: 1rem 0; cursor: pointer; list-style: none; font-size: var(--step-1); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { flex: none; transition: transform .2s; }
.faq details[open] summary svg { transform: rotate(180deg); }
.faq-a { padding-bottom: 1.25rem; color: #3b3838; }
.faq-a a { color: var(--oak-ink); }

/* CTA-Band */
.cta-band { background: var(--stone); border-top: var(--edge) solid var(--oak); }
.cta-band-inner { display: grid; gap: 1rem; padding-block: clamp(2.5rem, 2rem + 2vw, 4rem); align-items: center; }
.cta-band h2 { font-size: var(--step-3); margin-bottom: .3em; }
.cta-band p { color: var(--muted); margin: 0; }
.cta-band .actions { margin-top: .5rem; }
@media (min-width: 900px) { .cta-band-inner { grid-template-columns: 1fr auto; gap: 3rem; } .cta-band .actions { margin: 0; } }

/* Produktkarten ------------------------------------------------------------ */
.pgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem 1rem; }
@media (min-width: 760px) { .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.25rem 1.5rem; } }
@media (min-width: 1200px) { .pgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .catalog .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1400px) { .catalog .pgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pgrid-scroll { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 68%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 1rem; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
.pgrid-scroll > li { scroll-snap-align: start; }
@media (min-width: 760px) { .pgrid-scroll { grid-auto-columns: 40%; } }
@media (min-width: 1200px) { .pgrid-scroll { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; margin-inline: 0; padding-inline: 0; } }
.pcard-link { display: block; text-decoration: none; height: 100%; }
.pcard-img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--stone); }
.pcard-img picture, .pcard-img img { width: 100%; height: 100%; object-fit: cover; }
.pcard-link:hover .pcard-img { outline: var(--edge) solid var(--oak); outline-offset: -6px; }
.pcard-link:hover .pcard-title { text-decoration: underline; text-underline-offset: .2em; }
.pcard-body { padding-top: .75rem; }
.pcard-series { font-size: .8rem; color: var(--muted); margin: 0 0 .15rem; }
.pcard-title { font-size: var(--step-1); margin: 0 0 .35rem; line-height: 1.25; }
.pcard-facts { font-size: .82rem; color: var(--muted); margin: 0 0 .35rem; line-height: 1.45; }
.pcard-price { font-size: .82rem; font-weight: 700; margin: 0; }
.noimg { width: 100%; height: 100%; aspect-ratio: 4 / 3; display: flex; flex-direction: column; justify-content: flex-end; gap: .25rem; padding: 1rem; background: repeating-linear-gradient(90deg, #ece9e8 0 46px, #e2dedc 46px 47px); color: var(--muted); }
.noimg span { font-size: var(--step-1); color: var(--black); }
.noimg small { font-size: .8rem; }

/* Katalog & Filter ------------------------------------------------------------ */
.two-ways { display: grid; gap: 1rem; }
.way { display: block; padding: 1.5rem; border: 1px solid var(--line); border-left: var(--edge) solid var(--oak); text-decoration: none; }
.way:hover { background: var(--paper); }
.way p { color: var(--muted); margin-bottom: .25rem; }
@media (min-width: 760px) { .two-ways { grid-template-columns: 1fr 1fr; gap: 1.5rem; } }

.catalog { display: grid; gap: 1.5rem; }
.catalog-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.result-count { margin: 0; }
.filters-open .badge { display: inline-grid; place-items: center; min-width: 1.4rem; height: 1.4rem; padding: 0 .3rem; border-radius: 999px; background: var(--oak); color: var(--black); font-size: .75rem; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.25rem; padding: 0; }
.chips button { display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: .35rem .75rem; border: 1px solid var(--black); background: var(--white); border-radius: 999px; font-size: .85rem; cursor: pointer; }
.chips button:hover { background: var(--stone); }
.chips .chip-reset { border-color: transparent; text-decoration: underline; }
.empty { padding: 2rem; border: 1px dashed var(--line); }
.empty p { color: var(--muted); }

.filters { display: none; }
.filters fieldset { border: 0; margin: 0 0 1.5rem; padding: 0; }
.filters legend { font-weight: 700; margin-bottom: .5rem; }
.filters-head { display: flex; justify-content: space-between; align-items: center; }
.filters-head .h3 { margin: 0; font-size: var(--step-1); font-weight: 700; }
.filters-close { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: 0 .6rem; background: none; border: 1px solid var(--black); border-radius: var(--radius); cursor: pointer; font-weight: 700; font-size: .875rem; }
.filters-foot { display: flex; gap: .75rem; flex-wrap: wrap; }
.check { display: flex; align-items: center; gap: .65rem; min-height: 44px; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 0; accent-color: var(--black); flex: none; }
.check .count { margin-left: auto; color: var(--muted); font-size: .85rem; }
.check:has(input:disabled) { color: var(--muted); cursor: not-allowed; }

/* Mobile: Filter als Bottom-Sheet */
@media (max-width: 1023px) {
  .filters.is-open {
    display: block; position: fixed; inset: auto 0 0 0; z-index: 70; max-height: 88vh; overflow-y: auto; overscroll-behavior: contain;
    background: var(--white); padding: 0 var(--gutter) calc(1rem + env(safe-area-inset-bottom)); border-top: var(--edge) solid var(--oak);
    box-shadow: 0 -20px 60px rgba(0,0,0,.25);
  }
  .filters.is-open .filters-head { position: sticky; top: 0; background: var(--white); padding: .75rem 0; z-index: 1; }
  .filters.is-open .filters-foot { position: sticky; bottom: 0; background: var(--white); padding: .75rem 0; border-top: 1px solid var(--stone); }
  .filters.is-open .filters-foot .btn { flex: 1; }
  .sheet-backdrop { position: fixed; inset: 0; z-index: 65; background: rgba(0,0,0,.45); }
}
@media (min-width: 1024px) {
  .catalog { grid-template-columns: 240px minmax(0, 1fr); gap: 3rem; align-items: start; }
  .filters { display: block; position: sticky; top: calc(var(--header-h) + 1.5rem); }
  .filters-close, .filters-foot [data-filters-apply], .filters-open { display: none; }
  .filters-head { margin-bottom: 1rem; }
}

.cat-intro-grid { display: grid; gap: 2rem; }
.cat-intro h1 { font-size: clamp(2rem, 1.5rem + 2vw, 3.2rem); }
.cat-aside picture { border-bottom: var(--edge) solid var(--oak); }
.cat-switch { margin-top: 1rem; color: var(--muted); }
.cat-switch a { color: var(--black); font-weight: 700; }
@media (min-width: 960px) { .cat-intro-grid { grid-template-columns: 3fr 2fr; gap: 4rem; align-items: center; } }

/* Produktdetail ---------------------------------------------------------------- */
.product-grid { display: grid; gap: 2rem; }
@media (min-width: 960px) { .product-grid { grid-template-columns: 7fr 5fr; gap: 4rem; align-items: start; } .product-info { position: sticky; top: calc(var(--header-h) + 1.5rem); } }
.gallery-main { background: var(--stone); }
.gallery-slide { margin: 0; }
.gallery-slide img { width: 100%; max-height: 72vh; object-fit: contain; background: var(--stone); }
.gallery-thumbs { display: flex; gap: .5rem; margin-top: .75rem; overflow-x: auto; }
.gallery-thumbs button { flex: none; width: 88px; height: 66px; padding: 0; border: 2px solid transparent; background: var(--stone); cursor: pointer; }
.gallery-thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs button[aria-pressed="true"] { border-color: var(--oak); }
.product-series { margin: 0 0 .25rem; }
.product-series a { color: var(--oak-ink); font-weight: 700; text-decoration: none; }
.product-info h1 { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); margin-bottom: .4em; }
.product-intro { color: #3b3838; }
.keyfacts { list-style: none; margin: 1.25rem 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.keyfacts li { padding: .75rem 0; border-bottom: 1px solid var(--line); font-weight: 700; }
.keyfacts li:nth-child(odd) { padding-right: 1rem; }
.keyfacts span { display: block; font-weight: 400; font-size: .8rem; color: var(--muted); }
.product-price { font-size: var(--step-1); font-weight: 700; margin: 1rem 0 0; }
.product-help { margin-top: 1rem; color: var(--muted); font-size: .95rem; }
.product-help a { color: var(--black); }

.spec-grid { display: grid; gap: 3rem; }
@media (min-width: 960px) { .spec-grid { grid-template-columns: 7fr 5fr; gap: 4rem; } }
.spec { margin: 0; border-top: 1px solid var(--line); }
.spec > div { display: grid; grid-template-columns: minmax(8rem, 2fr) 3fr; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.spec dt { color: var(--muted); }
.spec dd { margin: 0; }
.fineprint { font-size: .85rem; color: var(--muted); margin-top: 1rem; }

.calc { align-self: start; background: var(--paper); border: 1px solid var(--line); border-top: var(--edge) solid var(--oak); padding: 1.5rem; }
.calc-standalone { padding: clamp(1.5rem, 1rem + 2vw, 2.5rem); }
.calc-out { margin: 1rem 0 0; padding: 1rem; background: var(--white); border: 1px solid var(--line); }
.calc-out p { margin: 0; }
.calc-out .big { font-size: var(--step-2); font-weight: 700; display: block; }

/* Fenster / Türen ---------------------------------------------------------------- */
.materials { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 1rem; }
.mat-img { background: var(--white); margin-bottom: 1rem; display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; }
.mat-img img { width: 100%; height: 100%; object-fit: contain; }
.materials-door .mat-img { aspect-ratio: 3 / 4; }
.section-stone .mat-img { background: var(--white); }
.materials h3 { font-size: var(--step-1); font-weight: 700; margin-bottom: .3rem; }
.materials p { color: #3b3838; font-size: .95rem; }
@media (min-width: 960px) { .materials { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.5rem; } }

.detail-grid, .door-models { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.detail-grid picture, .door-models picture { aspect-ratio: 4 / 3; overflow: hidden; background: var(--white); }
.door-models picture { aspect-ratio: 1; }
.detail-grid img, .door-models img { width: 100%; height: 100%; object-fit: cover; }
.detail-grid p, .door-models p { margin: .5rem 0 0; font-size: .9rem; }
@media (min-width: 960px) { .detail-grid, .door-models { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; } }

.split { display: grid; gap: 2rem; }
.split-img { margin-top: 1.5rem; }
@media (min-width: 960px) { .split { grid-template-columns: 5fr 7fr; gap: 5rem; align-items: start; } }
.criteria { margin: 0; display: grid; gap: 0; }
.criteria > div { padding: 1.1rem 0 1.1rem 1.25rem; border-left: var(--edge) solid var(--oak); margin-bottom: 1rem; background: rgba(255,255,255,.55); }
.section:not(.section-stone) .criteria > div { background: var(--paper); }
.criteria dt { font-weight: 700; font-size: var(--step-1); margin-bottom: .25rem; }
.criteria dd { margin: 0; color: #3b3838; padding-right: 1rem; }

/* Formulare ------------------------------------------------------------------ */
.form-layout { display: grid; gap: 2.5rem; }
@media (min-width: 1024px) { .form-layout { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 4rem; align-items: start; } .contact-aside { position: sticky; top: calc(var(--header-h) + 1.5rem); } }
.inquiry, .form-success { background: var(--white); padding: clamp(1.25rem, 1rem + 2vw, 2.5rem); border-top: var(--edge) solid var(--oak); }
.section:not(.section-stone) .inquiry { border: 1px solid var(--line); border-top: var(--edge) solid var(--oak); }
.form-h { font-size: var(--step-2); }
.form-intro { color: var(--muted); }
.field { display: grid; gap: .35rem; margin-bottom: 1.1rem; min-width: 0; }
.field label, .field legend, .topic-switch legend { font-weight: 700; font-size: .95rem; }
.opt { font-weight: 400; color: var(--muted); font-size: .85rem; }
.field input:not([type="checkbox"]):not([type="radio"]), .field select, .field textarea {
  width: 100%; min-height: 48px; padding: .7rem .85rem; border: 1px solid #8f8885; border-radius: var(--radius); background: var(--white); font-size: 1rem;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:not([type="checkbox"]):focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--oak); outline-offset: 0; border-color: var(--black); }
.field [aria-invalid="true"] { border-color: #a1260d; border-width: 2px; }
.field-error { color: #a1260d; font-size: .9rem; margin: 0; }
.field-help { color: var(--muted); font-size: .9rem; }
.field-row { display: grid; gap: 0 1rem; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } .field-row:has(.field-plz) { grid-template-columns: 8rem 1fr; } .field-row:has(.field-short) { grid-template-columns: 11rem 1fr; } }
.checks { border: 0; padding: 0; margin: 0 0 1rem; }
.topic-switch { border: 0; padding: 0; margin: 0 0 1.5rem; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .5rem; }
@media (min-width: 760px) { .seg { grid-template-columns: repeat(4, 1fr); } }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 52px; padding: .5rem; border: 1px solid #8f8885; border-radius: var(--radius); font-weight: 700; font-size: .9rem; }
.seg input:checked + span { background: var(--anthracite); color: var(--white); border-color: var(--anthracite); box-shadow: inset 0 calc(var(--edge) * -1) 0 var(--oak); }
.seg input:focus-visible + span { outline: 3px solid var(--oak); outline-offset: 2px; }
.fgroup.sub { padding: 1rem; background: var(--paper); border-left: var(--edge) solid var(--oak); margin-bottom: 1rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.privacy-note { font-size: .85rem; color: var(--muted); }
.form-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.form-status { margin: 0; color: var(--muted); }
.form-status.is-error { color: #a1260d; }
.form-errors { border: 2px solid #a1260d; padding: 1rem 1.25rem; margin-bottom: 1.5rem; }
.form-errors p { margin: 0 0 .5rem; font-weight: 700; }
.form-errors ul { margin: 0; padding-left: 1.2rem; }
.form-errors a { color: #a1260d; }
.form-success { border: 1px solid var(--line); border-top: var(--edge) solid var(--oak); }
.form-success:focus { outline: none; }
.spinner { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.contact-aside .h3 { font-size: var(--step-2); }
.contact-aside p { color: #3b3838; }
.contact-list { list-style: none; margin: 1rem 0; padding: 0; }
.contact-list a { display: flex; align-items: center; gap: .75rem; min-height: 48px; text-decoration: none; font-weight: 700; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }

/* Inhaltsseiten */
.prose h2 { font-size: var(--step-2); margin-top: 1.6em; }
.legal h2 { font-size: var(--step-1); font-weight: 700; margin-top: 2em; }
.legal p { max-width: 75ch; }
.nf-links { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: .5rem; }
.nf-links a { display: flex; align-items: center; min-height: 52px; padding: 0 1rem; border-left: var(--edge) solid var(--oak); background: var(--paper); font-size: var(--step-1); text-decoration: none; }
.nf-links a:hover { background: var(--stone); }

/* Footer ---------------------------------------------------------------------- */
.site-footer { background: var(--anthracite); color: #e9e4e1; border-top: var(--edge) solid var(--oak); padding-top: clamp(3rem, 2rem + 3vw, 5rem); }
.site-footer a { color: var(--white); }
.footer-grid { display: grid; gap: 2.25rem; }
.footer-brand img { width: 140px; height: auto; margin-bottom: 1rem; }
.footer-owner { color: var(--muted-dark); font-size: .9rem; }
.footer-h { font-size: 1rem; font-weight: 700; color: var(--white); margin-bottom: .75rem; }
.site-footer address { font-style: normal; margin-bottom: 1rem; }
.site-footer .hours > div { border-color: rgba(255,255,255,.15); display: block; }
.site-footer .hours dd { text-align: left; color: var(--muted-dark); }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links a { display: inline-flex; align-items: center; min-height: 40px; }
.footer-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-block: 1.5rem; border-top: 1px solid rgba(255,255,255,.15); font-size: .9rem; color: var(--muted-dark); }
.footer-meta p { margin: 0; }
.footer-meta ul { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin: 0; padding: 0; }
.footer-meta a { display: inline-flex; align-items: center; min-height: 40px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr .8fr; gap: 3rem; } }

/* Mobile Kontaktleiste */
.contact-bar { display: none; }
@media (max-width: 759px) {
  :root { --bar-h: calc(60px + env(safe-area-inset-bottom)); }
  .contact-bar {
    display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    height: var(--bar-h); padding-bottom: env(safe-area-inset-bottom); background: var(--white); border-top: 1px solid var(--line);
    transition: transform .25s ease;
  }
  .contact-bar.is-hidden { transform: translateY(100%); }
  .contact-bar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; font-size: .78rem; font-weight: 700; }
  .contact-bar a + a { border-left: 1px solid var(--stone); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header, .contact-bar, .site-footer, .inquiry, .contact-aside { display: none !important; }
}

/* Lange deutsche Komposita auf kleinen Displays */
.legal, .prose { overflow-wrap: break-word; }
@media (max-width: 480px) { h1, h2, .legal p, .criteria dd, .faq-a { hyphens: auto; -webkit-hyphens: auto; } }
