/* =====================================================
   Schlafklar – Global Styles (mobile-first, iOS-like)
   Gilt für Schlafanalyse + Matratzenfinder
   ===================================================== */

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

:root {
  --bg: #f5f5f7;
  --card-bg: #ffffff;
  --text: #1c1c1e;
  --text-soft: #6c6c70;
  --primary: #007aff;
  --primary-soft: #e8f0ff;
  --border-soft: rgba(0,0,0,0.06);
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow-soft: 0 6px 18px rgba(0,0,0,0.06);
}

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

body {
  -webkit-font-smoothing: antialiased;
}

/* =====================================================
   NAVBAR
===================================================== */

.navbar {
  width: 100%;
  background: rgba(255,255,255,0.9);
  padding: 12px 16px;
  display: flex;
  justify-content: center;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 999;
  border-bottom: 1px solid var(--border-soft);
  backdrop-filter: blur(12px);
}

.navbar a {
  font-weight: 600;
  text-decoration: none;
  font-size: 15px;
  color: var(--text);
  padding: 6px 12px;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.navbar a:hover {
  background: #f2f2f7;
  color: var(--primary);
}

.navbar a.active {
  background: var(--primary-soft);
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Mobile Navbar tighter */
@media (max-width: 640px) {
  .navbar {
    gap: 10px;
    padding: 10px 8px;
  }
  .navbar a {
    font-size: 14px;
    padding: 6px 10px;
  }
}

/* =====================================================
   HEADER / LOGO
===================================================== */

header {
  display: flex;
  justify-content: center;
  margin-top: 18px;
  margin-bottom: 4px;
}

.logo-container {
  width: 140px;
}

.logo-container img {
  width: 100%;
  height: auto;
  display: block;
}

/* =====================================================
   PAGE CONTAINER
===================================================== */

.page-container {
  max-width: 900px;
  margin: 0 auto 40px;
  padding: 0 16px 24px;
}

/* =====================================================
   TRUST BANNER
===================================================== */

.trust-banner {
  max-width: 900px;
  margin: 0 auto 18px;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.trust-banner .icon {
  font-size: 26px;
}

.trust-banner .text {
  font-size: 14px;
  color: var(--text-soft);
}

.trust-banner .text strong {
  color: var(--text);
}

/* Mobile: Vollbreite */
@media (max-width: 640px) {
  .trust-banner {
    margin-inline: 16px;
  }
}

/* =====================================================
   CARD (Form-Karten)
===================================================== */

.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 20px 18px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 20px;
}

.card h1 {
  font-size: 22px;
  margin: 0 0 6px;
}

.description {
  margin: 0 0 8px;
  color: var(--text-soft);
  font-size: 14px;
}

.description.small {
  font-size: 13px;
  margin-bottom: 14px;
}

/* =====================================================
   FORM
===================================================== */

form {
  margin-top: 4px;
}

fieldset {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 10px 12px 8px;
  margin: 0 0 12px;
}

legend {
  padding: 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.field label {
  font-size: 13px;
  color: var(--text);
}

.field input,
.field select {
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid #d1d1d6;
  font-size: 14px;
  background: #fbfbfd;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.field input:focus,
.field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(0,122,255,0.16);
  background: #ffffff;
}

/* =====================================================
   BUTTONS
===================================================== */

.submit-btn {
  width: 100%;
  padding: 12px 14px;
  border-radius: 999px;
  border: none;
  background: var(--primary);
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.1s ease;
  box-shadow: 0 6px 14px rgba(0,122,255,0.25);
}

.submit-btn:hover {
  background: #005fcc;
}

.submit-btn:active {
  transform: translateY(1px);
  box-shadow: 0 3px 8px rgba(0,122,255,0.25);
}

/* =====================================================
   FEHLERANZEIGE
===================================================== */

.form-error {
  color: #d70015;
  font-size: 13px;
  margin-top: 4px;
}

/* =====================================================
   RESULTS GENERIC
===================================================== */

.results {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px 24px;
}

.result-card,
.recommendation-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 16px 16px 14px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 12px;
}

.result-card h3,
.result-card h4,
.recommendation-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.result-card p,
.recommendation-card p {
  margin: 0 0 4px;
  font-size: 14px;
  color: var(--text-soft);
}

.result-card p strong,
.recommendation-card p strong {
  color: var(--text);
}

/* =====================================================
   PRODUKT-KARTEN (kompakt, iOS-like)
===================================================== */

.product-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 14px 14px 12px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-soft);
}

.product-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.product-info .title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
}

.product-info .brand {
  font-size: 13px;
  color: var(--text-soft);
}

.product-info .price {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}

.product-info .match {
  font-size: 13px;
  color: #34c759;
}

.product-info .desc {
  font-size: 13px;
  color: var(--text-soft);
}

.product-info .why {
  font-size: 13px;
  color: var(--text-soft);
}

/* CTA-Button in Produktkarte */
.product-cta {
  margin-top: 6px;
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

/* Optional: kleines Icon statt Bild (Emoji von JS) */
.product-icon {
  font-size: 26px;
  line-height: 1;
  margin-top: 2px;
}

/* =====================================================
   FOOTER
===================================================== */

footer {
  max-width: 900px;
  margin: 0 auto 24px;
  padding: 0 16px;
  font-size: 12px;
  color: var(--text-soft);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

footer a {
  color: var(--primary);
  text-decoration: none;
}

/* =====================================================
   COOKIE-BANNER
===================================================== */

.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 420px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 12px 14px;
  display: none;
  font-size: 13px;
  color: var(--text-soft);
  z-index: 9999;
}

.cookie-banner.show {
  display: block;
}

.cookie-banner button {
  margin-top: 8px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 999px;
  border: none;
  background: var(--primary);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* =====================================================
   RESPONSIVE ANPASSUNGEN
===================================================== */

@media (min-width: 768px) {
  .card {
    padding: 22px 24px;
  }
  .result-card,
  .recommendation-card,
  .product-card {
    padding: 18px 20px;
  }
}
