/* ============================================================
   KlimaQuelle — Shop-Design
   ============================================================ */

:root {
  --text: #212529;
  --heading: #1a1d20;
  --muted: #6c757d;
  --bg: #ffffff;
  --bg-soft: #f4f5f6;
  --border: #dee2e6;
  --border-soft: #e9ecef;
  --link: #1971c2;
  --cta: #e8590c;
  --cta-hover: #d9480f;
  --green: #2f9e44;
  --red: #c92a2a;
  --star: #f59f00;
  --radius: 6px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: Arial, "Helvetica Neue", Helvetica, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  font-size: 15px;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.3; color: var(--heading); font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 16px; }

/* ---------- Top-Leiste ---------- */

.topbar {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.8rem;
  color: var(--muted);
}
.topbar-inner {
  display: flex; justify-content: space-between; align-items: center;
  height: 32px; gap: 16px;
}
.topbar-usps { display: flex; gap: 20px; }
.topbar-usps span::before { content: "✓ "; color: var(--green); font-weight: 700; }
.topbar a { color: var(--muted); }
@media (max-width: 700px) { .topbar-usps span:nth-child(n+3) { display: none; } }

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

header.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px; gap: 20px;
}
.logo {
  display: flex; align-items: baseline; gap: 2px;
  font-size: 1.35rem; font-weight: 800; color: var(--heading);
  letter-spacing: -0.5px; text-decoration: none;
}
.logo:hover { text-decoration: none; }
.logo .logo-dot { color: var(--cta); }
nav.main-nav { display: flex; align-items: center; gap: 22px; }
nav.main-nav a { color: var(--text); font-size: 0.95rem; }
nav.main-nav a:hover { color: var(--link); }

.cart-link {
  position: relative; display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 7px 13px; font-weight: 600; color: var(--text) !important;
}
.cart-link:hover { border-color: var(--muted); text-decoration: none; }
.cart-badge {
  display: none; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 999px; background: var(--cta); color: #fff;
  font-size: 0.72rem; font-weight: 700;
}

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

.hero { background: var(--bg-soft); border-bottom: 1px solid var(--border-soft); }
.hero-inner {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px;
  align-items: center; padding: 44px 0;
}
@media (max-width: 820px) { .hero-inner { grid-template-columns: 1fr; padding: 32px 0; } .hero-img { display: none; } }
.hero h1 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); margin-bottom: 12px; }
.hero p { max-width: 540px; margin-bottom: 20px; color: #495057; }
.hero-list { list-style: none; margin: 0 0 24px; font-size: 0.92rem; }
.hero-list li { padding: 3px 0; }
.hero-list li::before { content: "✓"; color: var(--green); font-weight: 700; margin-right: 8px; }
.hero-img { border: 1px solid var(--border-soft); border-radius: var(--radius); overflow: hidden; background: #fff; }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: var(--radius); cursor: pointer;
  font-size: 0.95rem; font-weight: 700; padding: 11px 20px;
  font-family: inherit; text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-buy { background: var(--cta); color: #fff; }
.btn-buy:hover { background: var(--cta-hover); }
.btn-lg { padding: 13px 26px; font-size: 1rem; }
.btn-block { width: 100%; }
.link-btn {
  background: none; border: none; color: var(--link);
  cursor: pointer; font-size: 0.85rem; padding: 0; font-family: inherit;
}
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: var(--red); }

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

section { padding: 40px 0; }
.section-head { margin-bottom: 24px; }
.section-head h2 { font-size: 1.4rem; margin-bottom: 4px; }
.section-head p { color: var(--muted); font-size: 0.92rem; }

/* ---------- Produkt-Grid ---------- */

.grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
}
.card {
  position: relative; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius);
  display: flex; flex-direction: column; overflow: hidden;
}
.card:hover { box-shadow: 0 2px 10px rgba(33, 37, 41, 0.1); }
.badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: var(--red); color: #fff; border-radius: 3px;
  font-size: 0.7rem; font-weight: 700; padding: 3px 8px;
  text-transform: uppercase; letter-spacing: 0.4px;
}
.card-img { border: none; padding: 0; cursor: pointer; background: var(--bg-soft); display: block; border-bottom: 1px solid var(--border-soft); }
.card-img svg, .card-img img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { font-size: 0.98rem; line-height: 1.35; }
.title-btn {
  background: none; border: none; padding: 0; cursor: pointer;
  font: inherit; color: var(--heading); text-align: left;
}
.title-btn:hover { color: var(--link); text-decoration: underline; }

.stars { display: flex; align-items: center; gap: 1px; color: var(--star); }
.star-empty { color: var(--border); }
.stars-count { color: var(--muted); font-size: 0.8rem; margin-left: 5px; }

.card-specs { list-style: none; margin: 0; font-size: 0.83rem; color: #495057; flex: 1; }
.card-specs li { padding: 1.5px 0 1.5px 14px; position: relative; }
.card-specs li::before { content: "·"; position: absolute; left: 4px; font-weight: 700; }

.stock { font-size: 0.83rem; color: var(--green); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.stock-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; }

.card-price { display: flex; flex-direction: column; gap: 1px; }
.uvp { font-size: 0.8rem; color: var(--muted); }
.uvp s { color: var(--red); text-decoration-color: var(--red); }
.price { font-size: 1.45rem; font-weight: 800; color: var(--heading); letter-spacing: -0.5px; }
.price-lg { font-size: 1.9rem; }
.price-note { font-size: 0.76rem; color: var(--muted); }

/* ---------- Vorteile / Ablauf ---------- */

.section-alt { background: var(--bg-soft); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }

.features { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.feature {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
  display: flex; gap: 14px; align-items: flex-start;
}
.feature .icon { color: var(--cta); flex-shrink: 0; margin-top: 2px; }
.feature h3 { font-size: 0.95rem; margin-bottom: 3px; }
.feature p { font-size: 0.85rem; color: var(--muted); }

.steps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.step { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.step-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--heading); color: #fff; font-weight: 700; font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center; margin-bottom: 10px;
}
.step h3 { font-size: 0.95rem; margin-bottom: 4px; }

/* ---------- Modal ---------- */

.modal {
  position: fixed; inset: 0; z-index: 100; display: none;
  align-items: center; justify-content: center;
  background: rgba(33, 37, 41, 0.55); padding: 20px;
}
.modal.open { display: flex; }
.modal-box {
  position: relative; background: #fff; border-radius: var(--radius);
  max-width: 880px; width: 100%; max-height: 90vh; overflow-y: auto;
  padding: 28px;
}
.modal-close {
  position: absolute; top: 12px; right: 14px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  width: 34px; height: 34px; font-size: 1.25rem; cursor: pointer; color: var(--muted);
}
.modal-close:hover { color: var(--heading); }
.modal-grid { display: grid; gap: 28px; grid-template-columns: 1fr 1.2fr; align-items: start; }
.modal-img { border: 1px solid var(--border-soft); border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); }
.modal-grid h2 { margin: 4px 0 10px; font-size: 1.25rem; }
.modal-price { margin-bottom: 10px; }
.modal-desc { margin: 12px 0 16px; font-size: 0.92rem; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 0.87rem; margin-bottom: 20px; }
.spec-table td { padding: 6px 8px; border-bottom: 1px solid var(--border-soft); }
.spec-table td:first-child { color: var(--muted); width: 45%; }
.spec-table tr:nth-child(odd) td { background: var(--bg-soft); }
@media (max-width: 700px) { .modal-grid { grid-template-columns: 1fr; } }

/* ---------- Warenkorb ---------- */

.page-title { padding: 28px 0 4px; }
.page-title h1 { font-size: 1.5rem; }

#cart-page { display: grid; gap: 20px; grid-template-columns: 1fr 330px; align-items: start; padding: 16px 16px 60px; }
@media (max-width: 820px) { #cart-page { grid-template-columns: 1fr; } }

.cart-list { display: flex; flex-direction: column; gap: 12px; }
.cart-item {
  display: grid; grid-template-columns: 100px 1fr auto auto;
  gap: 14px; align-items: center;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px;
}
.cart-item-img { width: 100px; border: 1px solid var(--border-soft); border-radius: 4px; overflow: hidden; background: var(--bg-soft); }
.cart-item-info h3 { font-size: 0.95rem; }
.cart-item-info .muted { font-size: 0.8rem; }
.cart-item-price { font-weight: 800; color: var(--heading); min-width: 90px; text-align: right; }
.qty { display: flex; align-items: center; gap: 4px; }
.qty button {
  width: 28px; height: 28px; border-radius: 4px;
  border: 1px solid var(--border); background: #fff; cursor: pointer;
  font-size: 1rem; line-height: 1;
}
.qty button:hover { background: var(--bg-soft); }
.qty span { min-width: 26px; text-align: center; font-weight: 600; }
@media (max-width: 560px) {
  .cart-item { grid-template-columns: 76px 1fr; }
  .cart-item-img { width: 76px; }
  .cart-item-price { text-align: left; }
}

.summary, .panel {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.summary h3, .panel h3 { margin-bottom: 12px; font-size: 1.05rem; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 0.92rem; }
.summary-row.total { border-top: 2px solid var(--border); margin-top: 8px; padding-top: 10px; font-weight: 800; font-size: 1.05rem; }
.summary .btn { margin-top: 14px; }

.empty-state { text-align: center; padding: 60px 0; grid-column: 1 / -1; }
.empty-state h2 { margin-bottom: 8px; }
.empty-state .btn { margin-top: 18px; }

/* ---------- Kasse ---------- */

#checkout-grid { display: grid; gap: 20px; grid-template-columns: 1.4fr 1fr; align-items: start; padding: 16px 16px 60px; }
@media (max-width: 820px) { #checkout-grid { grid-template-columns: 1fr; } }

form.checkout-form { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.form-row { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; margin-bottom: 12px; }
.form-row.single { grid-template-columns: 1fr; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.field label { display: block; font-size: 0.85rem; font-weight: 700; margin-bottom: 4px; }
.field input, .field textarea {
  width: 100%; padding: 10px 12px; border-radius: 4px;
  border: 1px solid var(--border); font-size: 0.95rem; font-family: inherit;
  background: #fff; color: var(--text);
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--link); outline-offset: -1px; }
.checkbox-row { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0; font-size: 0.85rem; }
.checkbox-row input { margin-top: 3px; }

.payment-info {
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 4px;
  padding: 12px 14px; font-size: 0.87rem; margin-bottom: 16px;
}

/* ---------- Danke-Seite ---------- */

#thanks-page { padding: 0 16px 60px; display: flex; flex-direction: column; gap: 20px; }
.thanks-head { text-align: center; padding: 36px 0 6px; }
.thanks-head .check {
  width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 50%;
  background: #d3f9d8; color: var(--green); font-size: 1.7rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.thanks-head h1 { font-size: 1.5rem; }
.thanks-grid { display: grid; gap: 20px; grid-template-columns: 1fr 1fr; }
@media (max-width: 820px) { .thanks-grid { grid-template-columns: 1fr; } }
.panel p { margin-bottom: 10px; font-size: 0.92rem; }
.bank-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.bank-table td { padding: 7px 8px; border-bottom: 1px solid var(--border-soft); }
.bank-table td:first-child { color: var(--muted); width: 40%; }
.bank-table tr:nth-child(odd) td { background: var(--bg-soft); }

/* ---------- Rechtliche Seiten ---------- */

.legal-content { max-width: 760px; padding-bottom: 60px; }
.legal-content h2 { margin: 24px 0 8px; font-size: 1.1rem; }
.legal-content p { margin-bottom: 10px; font-size: 0.93rem; }
.todo-note {
  background: #fff9db; border: 1px solid #ffe066; border-radius: 4px;
  padding: 12px 16px; margin: 16px 0; font-size: 0.88rem;
}

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

footer.site-footer {
  background: #212529; color: #adb5bd; padding: 36px 0 24px; margin-top: 32px;
  font-size: 0.88rem;
}
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1.5fr 1fr 1fr; margin-bottom: 24px; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
footer h4 { color: #fff; margin-bottom: 10px; font-size: 0.95rem; }
footer a { color: #adb5bd; display: block; margin-bottom: 6px; }
footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #343a40; padding-top: 16px; font-size: 0.8rem; }
.footer-bottom a { display: inline; }

/* ---------- Toast ---------- */

#toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: #212529; color: #fff; border-radius: 4px;
  padding: 11px 20px; font-weight: 600; font-size: 0.9rem;
  opacity: 0; pointer-events: none; transition: all 0.2s; z-index: 200;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
