/* base.css */

/* 📌 Google Fonts bitte im <head> deiner HTML einbinden (nicht hier):
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap" rel="stylesheet">
*/

/* 🔧 Design Tokens */
:root {
  --bg: #f9f9f9;
  --text: #333;
  --text-strong: #222;
  --brand: #0785b6;
  --brand-contrast: #ffffff;
  --brand-hover: #056d95;
  --border: #ddd;
  --border-soft: #ccc;
  --muted: #777;
  --search-bg: #e6f2fb;
  --search-border: #cce0f0;
  --focus: #1a73e8;
  --radius-sm: 4px;
  --radius-md: 8px;
  --shadow-sm: 0 2px 6px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
}

/* 🧱 Grundlayout & Typografie */
html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }

body {
  font-family: 'Roboto', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-strong);
  line-height: 1.3;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

h1 {
  font-weight: 300;
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1.2;
  margin: 0 0 1.5rem;
}

h2 {
  font-weight: 400;
  font-size: 1.6rem;
  margin-top: 2rem;
}

h3 {
  font-weight: 500;
  font-size: 1.2rem;
}

p { margin-bottom: 1rem; }

/* 🧭 Layout Container */
.layout-xl,
.layout-lg {
  margin: 0 auto;
  padding: 1rem 2rem;
}
.layout-xl { max-width: 1600px; }
.layout-lg { max-width: 1200px; }

.text-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem 0;
}

/* 🔍 Header & Navigation */
header {
  background: var(--brand);
  color: var(--brand-contrast);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem;
}

.logo { height: 100px; }

.brand-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.brand-link {
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--brand-contrast);
  background-color: transparent;
  border: 2px solid transparent; /* ▶️ macht border-color sichtbar */
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.brand-link:hover { background-color: var(--brand-contrast); color: #990000; }

/* markenspezifische Akzente */
.brand-link.lego      { border-color: #e3000b; }
.brand-link.playmobil { border-color: #007ac2; }
.brand-link.schleich  { border-color: #a90061; }
.brand-link.bruder    { border-color: #007940; }

/* 🔎 Suche */
.search-bar {
  background: var(--search-bg);
  padding: 1rem;
  text-align: center;
  border-bottom: 1px solid var(--search-border);
  position: relative;
}

.search-bar input {
  width: 100%;
  max-width: 600px;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  font-size: 1rem;
  outline: none;
}

.search-bar input:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(26,115,232,.2);
}

/* 🔽 Suchvorschläge (UL) */
.suggestions {
  position: absolute;
  z-index: 10;
  top: calc(100% - 0.5rem);
  left: 0;
  right: 0;
  background: #fff;
  max-width: 600px;
  margin: 0 auto;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  list-style: none;
  display: none;
  padding: 0;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* LI */
.suggestions li {
  padding: 0.5rem 1rem;
  cursor: pointer;
  outline: none;
}

/* Hover + Tastaturauswahl (passend zu search.js .active) */
.suggestions li:hover,
.suggestions li.active,
.suggestions li:focus,
.suggestions li:focus-visible {
  background: #f2f2f2;
}

/* 📦 Footer */
footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* 🧾 Filter-System */
.filter-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem;
  align-items: flex-start;
}

.filter-group {
  display: flex;
  flex-direction: column;
  min-width: 150px;
}

.product-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem;
  align-items: center;
}

.product-filter label {
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.product-filter select {
  padding: 0.3rem;
}

/* 🖼 Produktbild (Detailseite) */
.product-image { max-width: 100%; border-radius: var(--radius-sm); display: block; }

.produktbild-rahmen {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  text-align: center;
  align-self: start;
  box-shadow: var(--shadow-sm);
  margin: 0;
}
.produktbild-rahmen:hover { box-shadow: var(--shadow-md); }

.produktbild { max-width: 100%; border-radius: .5rem; cursor: zoom-in; }

/* 🔳 Layout: Flexbasiertes 3-Spalten-System */
.dreispaltig {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  max-width: 1600px;
  margin: 0 auto;
  flex-wrap: nowrap;
}

.left-column,
.side-column {
  width: 320px;
  flex-shrink: 0;
  box-sizing: border-box;
}

.content-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-self: start;
  flex-grow: 1;
  min-width: 0;
  box-sizing: border-box;
}

/* 📱 Responsive */
@media (max-width: 960px) {
  .header-inner { gap: .5rem; }
  .logo { height: 64px; } /* kompakter auf Mobile */

  .dreispaltig {
    display: block !important;
    padding: 0 1rem;
  }

  .left-column,
  .side-column {
    width: 100%;
    margin-bottom: 1rem; /* ▶️ Abstand zwischen "Spalten" im Stack */
  }

  .search-bar { padding: .75rem 1rem 1.25rem; }
  .suggestions { left: 1rem; right: 1rem; } /* bündig zum Padding */
}

/* 🧩 Set-Details */
#set-details, #details { margin: 0; padding: 0; }

#set-details h2, #details h2 { margin-bottom: 0.5rem; }

.set-details-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.set-details-list li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.4rem;
}

.set-details-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0.1rem;
  height: 0.7rem;
  background-color: var(--text);
  border-radius: 50%;
}

/* ♿ Fokus gut sichtbar – global fallback */
a:focus-visible,
button:focus-visible,
select:focus-visible,
input[type="text"]:focus-visible,
[role="option"]:focus-visible {
  outline: 3px solid rgba(26,115,232,.5);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* 🌀 Weniger Bewegung, wenn gewünscht */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
