/* ============================================================
   HANDYHANS – STYLESHEET
   ============================================================ */

:root {
  --white: #ffffff;
  --bg: #f6f9fd;
  --powder: #dce9f7;
  --powder-deep: #c4dbf1;
  --line: #e2e9f2;
  --ink: #101529;
  --muted: #67748c;
  --accent: #2b2c7a;
  --accent-dark: #1c1d55;
  --accent-soft: #eceef9;
  --green: #1f9a58;

  --radius-m: 18px;
  --radius-l: 26px;

  --shell: 1140px;
  --gap: clamp(18px, 3vw, 28px);

  --font: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3 {
  margin: 0;
  line-height: 1.06;
  letter-spacing: -0.035em;
  font-weight: 700;
}

h1 { font-size: clamp(2.3rem, 6.4vw, 4.1rem); }
h2 { font-size: clamp(1.55rem, 3.4vw, 2.25rem); }
h3 { font-size: 1.12rem; letter-spacing: -0.02em; }

p { margin: 0; }

.wrap {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 22px;
}

.lead {
  color: var(--muted);
  font-size: clamp(1.02rem, 1.8vw, 1.2rem);
  max-width: 46ch;
  line-height: 1.5;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.14rem;
  letter-spacing: -0.035em;
  margin-right: auto;
}

.logo-mark {
  width: 24px;
  height: 34px;
  border-radius: 8px;
  border: 2.5px solid var(--accent);
  position: relative;
  flex: none;
}

.logo-mark::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 3px;
  width: 9px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav > a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.97rem;
  color: var(--muted);
  padding: 9px 13px;
  border-radius: 10px;
  transition: color 0.16s, background 0.16s;
}

.nav > a:hover { color: var(--ink); background: var(--bg); }

.nav > a[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-soft);
}

.nav .btn { margin-left: 10px; }
.nav-mobile-only { display: none; }

.burger {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  cursor: pointer;
  padding: 0;
  position: relative;
}

.burger span {
  position: absolute;
  left: 11px;
  width: 20px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s;
}

.burger span:nth-child(1) { top: 17px; }
.burger span:nth-child(2) { top: 25px; }

.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 13px 22px;
  transition: transform 0.14s ease, background 0.16s, border-color 0.16s;
}

.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }

.btn-quiet {
  background: var(--white);
  color: var(--ink);
  border-color: var(--line);
}
.btn-quiet:hover { border-color: var(--powder-deep); background: var(--bg); }

.btn-big {
  width: 100%;
  padding: 19px 24px;
  font-size: 1.12rem;
  border-radius: 16px;
}

.btn svg { flex: none; }

/* ---------- Sections ---------- */

.section { padding: clamp(48px, 7vw, 86px) 0; }
.section-tight { padding: clamp(34px, 5vw, 54px) 0; }
.section-bg { background: var(--bg); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: clamp(20px, 3vw, 32px);
}

.text-link {
  font-weight: 650;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 2px solid var(--powder-deep);
  padding-bottom: 2px;
}
.text-link:hover { border-color: var(--accent); }

/* ---------- Hero ---------- */

.hero { padding: clamp(44px, 7vw, 80px) 0 clamp(28px, 4vw, 42px); }
.hero h1 { max-width: 20ch; }
.hero .lead { margin-top: 20px; }

.page-hero { padding: clamp(42px, 6vw, 70px) 0 clamp(24px, 3vw, 34px); }
.page-hero h1 { max-width: 18ch; }
.page-hero .lead { margin-top: 16px; }

/* ---------- Drei Hauptaktionen ---------- */

.actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  padding-bottom: clamp(44px, 6vw, 72px);
}

.action {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  background: linear-gradient(170deg, var(--powder) 0%, #f2f7fd 78%);
  border: 1px solid var(--powder-deep);
  border-radius: var(--radius-l);
  padding: clamp(24px, 3vw, 34px);
  min-height: 258px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.action:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px -22px rgba(43, 44, 122, 0.55);
}

.action-icon { color: var(--accent); margin-bottom: 4px; }
.action h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); }
.action p { color: var(--muted); font-size: 0.97rem; max-width: 26ch; }

.action-cta {
  margin-top: auto;
  font-weight: 700;
  color: var(--accent);
  padding-top: 16px;
}

/* ---------- Produkte ---------- */

.grid-products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--powder-deep);
  box-shadow: 0 20px 36px -26px rgba(16, 21, 41, 0.5);
}

.card-media {
  background: var(--bg);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  position: relative;
}

.card-media img { max-height: 100%; width: auto; object-fit: contain; }

.card-body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.card-specs { color: var(--muted); font-size: 0.94rem; }

.card-price {
  margin-top: auto;
  padding-top: 14px;
  font-size: 1.42rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.tag {
  position: absolute;
  top: 14px; left: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 650;
  padding: 5px 11px;
  border-radius: 999px;
}

.tag-sold { background: var(--ink); color: #fff; border-color: var(--ink); }
.card-sold { opacity: 0.55; }

/* ---------- Kontakt-Kacheln ---------- */

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(188px, 1fr));
  gap: 16px;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 24px 22px 26px;
  min-height: 148px;
  transition: transform 0.16s ease, border-color 0.16s, box-shadow 0.16s;
}

.tile:hover {
  transform: translateY(-2px);
  border-color: var(--powder-deep);
  box-shadow: 0 16px 30px -24px rgba(16, 21, 41, 0.55);
}

.tile-icon { color: var(--accent); margin-bottom: 8px; }
.tile strong { font-size: 1.1rem; letter-spacing: -0.02em; }
.tile span { color: var(--muted); font-size: 0.93rem; }
.tile-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.tile-primary .tile-icon { color: #fff; }
.tile-primary span { color: rgba(255, 255, 255, 0.78); }

/* ---------- Chips ---------- */

.chips { display: flex; flex-wrap: wrap; gap: 10px; }

.chip {
  font: inherit;
  font-size: 0.97rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 18px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.chip:hover { border-color: var(--powder-deep); }

.chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ---------- Formular ---------- */

.form {
  display: grid;
  gap: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: clamp(22px, 3vw, 30px);
  max-width: 560px;
  box-shadow: 0 24px 48px -38px rgba(16, 21, 41, 0.6);
}

.field { display: grid; gap: 7px; }
.field label { font-size: 0.9rem; font-weight: 650; color: var(--muted); }

.field input,
.field textarea,
.field select {
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 15px;
  width: 100%;
}

.field textarea { min-height: 108px; resize: vertical; }

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--white);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-note { font-size: 0.86rem; color: var(--muted); }

.form-status {
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--green);
  display: none;
}
.form-status.is-visible { display: block; }
.form-status.is-error { color: #c1392b; }

/* ---------- Produktdetail ---------- */

.detail {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(26px, 5vw, 60px);
  align-items: start;
  padding: clamp(28px, 5vw, 54px) 0 clamp(40px, 6vw, 70px);
}

.detail-media {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 4vw, 46px);
}

.detail-media img { max-height: 100%; width: auto; object-fit: contain; }

.detail-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 22px;
}

.fact {
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 650;
  padding: 8px 15px;
  border-radius: 999px;
}

.price-big {
  font-size: clamp(2.4rem, 5vw, 3.3rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 22px;
}

.mini-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.mini-contacts a {
  font-size: 0.93rem;
  font-weight: 650;
  text-decoration: none;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 15px;
  transition: border-color 0.15s, background 0.15s;
}

.mini-contacts a:hover { border-color: var(--powder-deep); background: var(--bg); }

.back-link {
  display: inline-block;
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 650;
  text-decoration: none;
  margin-bottom: 14px;
}
.back-link:hover { color: var(--accent); }

details.more {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

details.more summary {
  cursor: pointer;
  font-weight: 650;
  font-size: 0.97rem;
  color: var(--accent);
  list-style: none;
}

details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: "+ "; }
details.more[open] summary::before { content: "– "; }
details.more p { color: var(--muted); font-size: 0.95rem; margin-top: 10px; }

/* ---------- Vertrauen ---------- */

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 26px;
}

.trust span { display: inline-flex; align-items: center; gap: 8px; }
.trust span::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--powder-deep);
}

/* ---------- Bestellung ---------- */

.summary {
  display: flex;
  gap: 18px;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 16px 18px;
  max-width: 560px;
  margin-bottom: 22px;
}

.summary img { width: 70px; height: 70px; object-fit: contain; flex: none; }
.summary-price { margin-left: auto; font-weight: 700; font-size: 1.2rem; }

/* ---------- Rechtstexte ---------- */

.legal { padding: clamp(34px, 5vw, 58px) 0 clamp(50px, 7vw, 80px); max-width: 68ch; }
.legal h2 { font-size: 1.3rem; margin: 34px 0 10px; }
.legal p { color: var(--muted); margin-bottom: 10px; }
.legal a { color: var(--accent); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding: 40px 0 34px;
  font-size: 0.95rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 26px 48px;
  justify-content: space-between;
}

.footer-brand strong { font-size: 1.06rem; letter-spacing: -0.03em; }
.footer-brand p { color: var(--muted); margin-top: 5px; }

.footer-links { display: flex; flex-wrap: wrap; gap: 26px 44px; }
.footer-links ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }

.footer-bottom {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

/* ---------- Mobile Quickbar ---------- */

.quickbar { display: none; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .actions { grid-template-columns: 1fr; }
  .action { min-height: 0; }
  .grid-products { grid-template-columns: repeat(2, 1fr); }
  .detail { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  body { font-size: 16px; padding-bottom: 76px; }

  .burger { display: block; }
  .nav-mobile-only { display: block; }

  .nav {
    position: fixed;
    inset: 72px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 14px 18px 22px;
    box-shadow: 0 22px 34px -28px rgba(16, 21, 41, 0.7);
    transform: translateY(-14px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s, transform 0.18s;
  }

  .nav.is-open { opacity: 1; transform: none; pointer-events: auto; }

  .nav > a { font-size: 1.05rem; padding: 13px 12px; }
  .nav .btn { margin: 8px 0 0; justify-content: center; padding: 15px; }

  .grid-products { grid-template-columns: 1fr; gap: 16px; }

  .hero { padding-top: 32px; }

  .quickbar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 55;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
    padding: 8px 10px max(8px, env(safe-area-inset-bottom));
  }

  .quickbar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 7px 4px;
    text-decoration: none;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 650;
    border-radius: 12px;
  }

  .quickbar a svg { color: var(--accent); }
  .quickbar a:active { background: var(--bg); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   ERGÄNZUNGEN – neue Bausteine der fertigen Seite
   ============================================================ */

/* Sprunglink für Tastatur- und Screenreader-Nutzung */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--accent); color: #fff;
  padding: 12px 18px; border-radius: 0 0 12px 0;
  text-decoration: none; font-weight: 600;
}
.skip:focus { left: 0; }

/* Logo als Bilddatei (aktiv, sobald config.js -> logoSrc gesetzt ist) */
.logo-mark.logo-img {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 1px solid rgba(16, 21, 41, 0.14);
  background: var(--white);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(16, 21, 41, 0.12);
}
.logo-mark.logo-img::after { content: none; }
.logo-mark.logo-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Überschrift über einem Block */
.block-title {
  font-size: clamp(1.3rem, 2.6vw, 1.75rem);
  margin-bottom: 20px;
}

/* Schmalere Spalte, z. B. Bestellseite */
.wrap.narrow { max-width: 720px; }

/* Buttonreihe */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Kopf + Button nebeneinander */
.cta-row {
  display: flex; flex-wrap: wrap; gap: 20px;
  align-items: center; justify-content: space-between;
}
.cta-row > div { flex: 1 1 320px; }
.cta-row > .btn { flex: 0 0 auto; }

/* Hervorgehobener Hinweiskasten */
.notice {
  background: var(--accent-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: clamp(22px, 4vw, 34px);
}
.notice h2 { font-size: clamp(1.2rem, 2.4vw, 1.5rem); margin-bottom: 10px; }
.notice p { color: var(--muted); max-width: 68ch; }

/* Preisliste Reparatur */
.pricelist {
  list-style: none; margin: 0 0 16px; padding: 0;
  border-top: 1px solid var(--line);
  max-width: 620px;
}
.pricelist li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 15px 2px;
  border-bottom: 1px solid var(--line);
}
.pricelist li span:last-child { font-weight: 700; white-space: nowrap; }

/* Nummerierter Ablauf (Ankauf) */
.steps {
  list-style: none; counter-reset: s;
  margin: 0; padding: 0;
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.steps li {
  counter-increment: s;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 22px;
}
.steps li::before {
  content: counter(s);
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; margin-bottom: 12px;
  border-radius: 50%;
  background: var(--accent); color: #fff;
  font-weight: 700; font-size: 0.9rem;
}
.steps li strong { display: block; margin-bottom: 5px; }
.steps li span { color: var(--muted); font-size: 0.96rem; }

/* Zwei Infoblöcke nebeneinander (Kontaktseite) */
.infobox {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.infobox > div {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 24px;
}
.infobox h2 { font-size: 1.1rem; margin-bottom: 8px; }
.infobox p { color: var(--muted); font-size: 0.98rem; }

/* FAQ-Liste */
.faq { max-width: 720px; }
.faq .more + .more { margin-top: 0; }

/* Muster-Widerrufsformular */
.muster {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 24px;
  margin-top: 16px;
}
.muster p { margin-bottom: 12px; color: var(--muted); font-size: 0.96rem; }
.muster p:last-child { margin-bottom: 0; }

/* Checkbox mit Text daneben (Bestellung) */
.check {
  display: flex; gap: 12px; align-items: flex-start;
  margin-bottom: 16px;
  font-size: 0.94rem; color: var(--muted);
  line-height: 1.45;
  cursor: pointer;
}
.check input {
  width: 20px; height: 20px; flex: none; margin-top: 1px;
  accent-color: var(--accent); cursor: pointer;
}

/* Label über einer Chipgruppe */
.field-label {
  display: block; font-weight: 600;
  font-size: 0.92rem; margin-bottom: 10px;
}

/* Leerer Bestand */
.empty {
  grid-column: 1 / -1;
  background: var(--bg);
  border: 1px dashed var(--line);
  border-radius: var(--radius-m);
  padding: 32px 24px;
  color: var(--muted);
  text-align: center;
}

/* Platzhaltergrafik, wenn zu einem Gerät noch kein Foto da ist */
.ph {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  background: var(--powder);
  color: var(--accent);
}
.ph svg { width: 58%; height: 58%; }
.card-media .ph, .detail-media .ph { background: none; }
.summary-media { display: block; width: 62px; height: 62px; border-radius: 12px; overflow: hidden; flex: none; }
.summary-media .ph svg { width: 70%; height: 70%; }

/* Zusatzzeile unter dem Preis */
.price-note {
  color: var(--muted);
  font-size: 0.88rem;
  margin: -10px 0 18px;
}

@media (max-width: 620px) {
  .cta-row { flex-direction: column; align-items: flex-start; }
  .cta-row .btn { width: 100%; }
}
/* ============================================================
   AKTIONS-DESIGN – Buttons sichtbarer, Hover deutlicher
   Dieser Block steht bewusst ganz am Ende und überschreibt
   die Regeln weiter oben. Nichts darüber löschen.
   ============================================================ */

:root {
  /* Helleres Blau-Lila für alles Klickbare */
  --action: #4f46d6;
  --action-hover: #372fa8;
  --action-wash: #eeecfb;
}

/* ---------- 1. WhatsApp-Button im Header ----------
   Vorher hat die Navigations-Regel .nav > a die Buttonfarbe
   überschrieben: grauer Text auf Dunkelblau, beim Hover wurde
   der Button weiß und damit unsichtbar. */
.nav > a.btn { color: #fff; }
.nav > a.btn-primary { background: var(--action); }
.nav > a.btn-primary:hover {
  background: var(--action-hover);
  color: #fff;
}

/* ---------- 2. Buttons allgemein ---------- */
.btn-primary { background: var(--action); color: #fff; }
.btn-primary:hover {
  background: var(--action-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 22px -12px rgba(79, 70, 214, 0.75);
}

.btn-quiet:hover {
  background: var(--action-wash);
  border-color: var(--action);
  color: var(--action);
}

/* ---------- 3. Die drei Hauptaktionen ----------
   Karte wird weiß und ruhig, der Handlungsaufruf darin
   wird ein echter Button. Damit ist sofort klar, wo man klickt. */
.action {
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 2px 4px rgba(16, 21, 41, 0.04);
}
.action:hover {
  transform: translateY(-4px);
  border-color: var(--action);
  box-shadow: 0 22px 40px -24px rgba(79, 70, 214, 0.6);
}

.action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: var(--action-wash);
  color: var(--action);
  margin-bottom: 6px;
}

.action-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: auto;
  padding: 14px 22px;
  border-radius: 14px;
  background: var(--action);
  color: #fff;
  font-weight: 650;
  font-size: 1rem;
  transition: background 0.16s ease;
}
.action-cta::after {
  content: "";
  width: 7px;
  height: 7px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.16s ease;
}
.action:hover .action-cta { background: var(--action-hover); }
.action:hover .action-cta::after { transform: rotate(45deg) translate(2px, -2px); }

/* ---------- 4. Kontakt-Kacheln ---------- */
.tile-primary { background: var(--action); border-color: var(--action); }
.tile:hover {
  transform: translateY(-3px);
  border-color: var(--action);
  box-shadow: 0 18px 32px -22px rgba(79, 70, 214, 0.55);
}
.tile-primary:hover { background: var(--action-hover); border-color: var(--action-hover); }

/* ---------- 5. Produktkarten ---------- */
.card:hover {
  transform: translateY(-4px);
  border-color: var(--action);
  box-shadow: 0 22px 38px -24px rgba(79, 70, 214, 0.5);
}
.card-price { color: var(--action); }

/* ---------- 6. Kleinteile ---------- */
.text-link { color: var(--action); }
.text-link:hover { border-color: var(--action); color: var(--action-hover); }
.chip[aria-pressed="true"] { background: var(--action); border-color: var(--action); color: #fff; }
.chip:hover { border-color: var(--action); color: var(--action); }
.mini-contacts a:hover { border-color: var(--action); color: var(--action); }
.price-big { color: var(--action); }
.nav > a[aria-current="page"] { color: var(--action); background: var(--action-wash); }
.steps li::before { background: var(--action); }
.check input { accent-color: var(--action); }
.notice { background: var(--action-wash); border-color: #d9d5f5; }

/* Breiter Button neben einer Überschrift soll nicht die volle Zeile füllen */
.cta-row > .btn-big { width: auto; }


/* ============================================================
   PRODUKTGALERIE – mehrere Bilder pro Gerät
   ============================================================ */

.gallery { position: sticky; top: 96px; }

.gal-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.gal-thumbs .gal-thumb { flex: 1 1 46px; max-width: 104px; }

.gal-thumb {
  padding: 0;
  cursor: pointer;
  background: var(--bg);
  border: 2px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.gal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}
.gal-thumb:hover { border-color: var(--action); transform: translateY(-2px); }
.gal-thumb.is-active { border-color: var(--action); }

/* Mehr als vier Bilder: zweite Reihe statt Quetschen */
@media (max-width: 780px) {
  .gallery { position: static; }
}

/* ============================================================
   PRODUKTBILDER – Ecken, Zentrierung, kein Überlaufen
   ------------------------------------------------------------
   Vorher standen die Bilder auf width:auto. Bei Fotos, die nicht
   quadratisch sind, wurden sie dadurch breiter als ihr Rahmen und
   liefen seitlich heraus – auf Mobilgeräten sichtbar abgeschnitten.
   width/height 100% plus object-fit:contain hält jedes Bild
   zuverlässig im Rahmen, egal welches Seitenverhältnis.
   ============================================================ */

/* Quadratische Kacheln passen besser zu Handyfotos als 4:3 */
.card-media {
  aspect-ratio: 1 / 1;
  padding: 14px;
  border-radius: var(--radius-l) var(--radius-l) 0 0;
  overflow: hidden;
}

.detail-media {
  overflow: hidden;
}

.card-media img,
.detail-media img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  border-radius: 16px;
}

/* Vorschaubilder der Galerie */
.gal-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
}
.gal-thumb img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  padding: 0;
  border-radius: 8px;
}

/* Kleines Bild in der Bestellübersicht: die alte Regel .summary img
   setzte 70px in einen 62px-Rahmen – daher war es dort beschnitten. */
.summary-media {
  display: flex;
  align-items: center;
  justify-content: center;
}
.summary .summary-media img,
.summary-media img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  border-radius: 8px;
}

/* Platzhaltergrafik mit gleicher Rundung */
.card-media .ph,
.detail-media .ph { border-radius: 16px; }

/* ============================================================
   GALERIE: PFEILE UND GROSSANSICHT
   ============================================================ */

.detail-media { position: relative; }

/* Das grosse Bild ist ein Knopf, damit es anklickbar
   und mit der Tastatur erreichbar ist. */
.gal-open {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

/* Halbtransparente Pfeile links und rechts am Bild */
.gal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(16, 21, 41, 0.08);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--ink);
  cursor: pointer;
  opacity: 0.55;
  box-shadow: 0 2px 10px rgba(16, 21, 41, 0.14);
  transition: opacity 0.16s ease, background 0.16s ease, transform 0.16s ease;
}
.gal-nav svg { width: 21px; height: 21px; }
.gal-prev { left: 12px; }
.gal-next { right: 12px; }

/* Beim Darüberfahren treten die Pfeile hervor */
.gallery:hover .gal-nav { opacity: 0.95; }
.gal-nav:hover { opacity: 1; background: #fff; }
.gal-nav:focus-visible { opacity: 1; }
.gal-prev:hover { transform: translateY(-50%) translateX(-2px); }
.gal-next:hover { transform: translateY(-50%) translateX(2px); }

/* Bildzähler unten rechts */
.gal-count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(16, 21, 41, 0.55);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  pointer-events: none;
}

/* Lupensymbol als Hinweis, dass man klicken kann */
.gal-hint {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 0.16s ease;
}
.gal-hint svg { width: 17px; height: 17px; }
.gallery:hover .gal-hint { opacity: 0.9; }

/* ---------- Grossansicht ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(11, 14, 26, 0.93);
  animation: lbAuf 0.16s ease;
}
.lightbox.is-open { display: flex; }
@keyframes lbAuf { from { opacity: 0; } to { opacity: 1; } }

body.lb-open { overflow: hidden; }

.lb-img {
  max-width: min(96vw, 1100px);
  max-height: 86vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 14px;
  background: #fff;
}

.lb-close,
.lb-nav {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  transition: background 0.16s ease, transform 0.16s ease;
}
.lb-close:hover,
.lb-nav:hover { background: rgba(255, 255, 255, 0.26); }

.lb-close { top: 18px; right: 18px; width: 44px; height: 44px; }
.lb-close svg { width: 22px; height: 22px; }

.lb-nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; }
.lb-nav svg { width: 26px; height: 26px; }
.lb-prev { left: 18px; }
.lb-next { right: 18px; }
.lb-prev:hover { transform: translateY(-50%) translateX(-3px); }
.lb-next:hover { transform: translateY(-50%) translateX(3px); }

.lb-count {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Auf schmalen Bildschirmen sind die Flächen zum Tippen wichtiger
   als die Optik – Pfeile bleiben sichtbar, sitzen aber enger. */
@media (max-width: 620px) {
  .gal-nav { width: 38px; height: 38px; opacity: 0.75; }
  .gal-prev { left: 8px; }
  .gal-next { right: 8px; }
  .gal-hint { display: none; }
  .lb-nav { width: 44px; height: 44px; bottom: 20px; top: auto; transform: none; }
  .lb-prev { left: 20px; }
  .lb-next { right: 20px; }
  .lb-prev:hover, .lb-next:hover { transform: none; }
  .lb-count { bottom: 34px; }
  .lb-img { max-height: 74vh; }
}

/* Solange die Grossansicht offen ist, stoert die Schnellkontakt-Leiste */
body.lb-open .quickbar { display: none; }

/* ============================================================
   RECHTSSEITEN – lange Woerter und Formularlinien umbrechen
   "Allgemeine Geschaeftsbedingungen" und die Unterstrich-Linien
   im Muster-Widerrufsformular waren auf schmalen Bildschirmen
   breiter als die Seite und erzeugten seitliches Scrollen.
   ============================================================ */

.legal h1,
.legal h2,
.legal p,
.legal li {
  overflow-wrap: break-word;
  hyphens: auto;
}

.legal h1 { font-size: clamp(2rem, 8vw, 3.4rem); }

.muster p { overflow-wrap: anywhere; }

/* ============================================================
   AKTIONSBANNER MIT MASKOTTCHEN
   ============================================================ */

.aktion-banner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: clamp(20px, 4vw, 48px);
  padding: clamp(26px, 4vw, 40px);
  border-radius: var(--radius-l);
  background: linear-gradient(135deg, var(--action-wash) 0%, #e3ecfb 100%);
  border: 1px solid #ddd8f6;
  overflow: hidden;
}

/* Faellt das Maskottchen aus, nimmt der Text die volle Breite */
.aktion-banner.ohne-bild { grid-template-columns: 1fr; }

.aktion-text { min-width: 0; }

.aktion-label {
  display: inline-block;
  padding: 5px 13px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: var(--action);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.aktion-banner h2 {
  font-size: clamp(1.4rem, 3.2vw, 2.05rem);
  line-height: 1.15;
  margin-bottom: 10px;
}

.aktion-banner p {
  color: var(--muted);
  max-width: 56ch;
  margin-bottom: 20px;
}

.aktion-cta { display: flex; flex-wrap: wrap; gap: 10px; }

.aktion-bild {
  width: clamp(130px, 17vw, 205px);
  height: auto;
  align-self: end;
  margin-bottom: calc(clamp(26px, 4vw, 40px) * -1);
  filter: drop-shadow(0 14px 28px rgba(43, 44, 122, 0.22));
}

/* Das Handy-Bild ist auf grossen Bildschirmen immer aus */
.aktion-bild-mobil { display: none; }

@media (max-width: 720px) {
  .aktion-banner {
    grid-template-columns: 1fr;
    text-align: left;
  }

  /* Auf dem Handy kein Maskottchen - der Text hat dort Vorrang */
  .aktion-bild-desktop { display: none; }

  /* Falls im HTML ein eigenes Handy-Bild aktiviert wurde */
  .aktion-bild-mobil {
    display: block;
    width: min(100%, 240px);
    justify-self: center;
    margin: 4px auto 0;
  }

  .aktion-cta .btn { flex: 1 1 auto; justify-content: center; }
}