/* Self-hosted Nunito (no Google Fonts to keep things GDPR-friendly). */
@font-face {
  font-family: 'Nunito'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/static/fonts/nunito-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Nunito'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('/static/fonts/nunito-latin-700-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Nunito'; font-style: normal; font-weight: 800; font-display: swap;
  src: url('/static/fonts/nunito-latin-800-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Nunito'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/static/fonts/nunito-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Nunito'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('/static/fonts/nunito-latin-ext-700-normal.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Nunito'; font-style: normal; font-weight: 800; font-display: swap;
  src: url('/static/fonts/nunito-latin-ext-800-normal.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --accent:    #ee683f;   /* primary: orange */
  --bg-1:      #e4feff;   /* secondary: icy cyan */
  --rule:      #ee683f;
  --text:      #1c1c1c;
  --muted:     #5a5a5a;
  --card:      #ffffff;   /* pure white card on the very pale body */
  --hover:     #fde6dc;   /* pale orange tint */
  --border:    #f3cebd;   /* warm neutral border */
  --max-width: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { font: 100%/1.55 "Nunito", "Helvetica Neue", Helvetica, Arial, sans-serif; color: var(--text); }
body { margin: 0; background: var(--bg-1); }

img { max-width: 100%; height: auto; }

a { color: var(--accent); }
a:hover, a:focus { text-decoration: underline; }

.skip-link {
  position: absolute; left: -10000px; top: auto;
  background: var(--accent); color: #fff; padding: 0.5rem 1rem; z-index: 10;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- header ---------- */
.site-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.header-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0 0.5rem;
}
.site-title {
  margin: 0; line-height: 1;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.site-title a { color: var(--accent); text-decoration: none; }
.site-title a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.header-logo { flex-shrink: 0; display: block; }
.header-logo img { display: block; height: 70px; width: auto; }
.header-rule {
  margin: 0; border: 0;
  border-top: 3px solid var(--accent);
}
.site-nav {
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: 0.4rem 0.8rem;
  padding: 0.75rem 0 1.1rem;
  font-size: 1.35rem;
}
.site-nav a {
  color: var(--accent); text-decoration: none;
  padding: 0.1rem 0;
}
.site-nav a:hover, .site-nav a:focus { text-decoration: underline; }
.site-nav a[aria-current="page"] { font-weight: 700; }
.nav-sep { color: var(--accent); opacity: 0.6; user-select: none; }

@media (max-width: 600px) {
  .header-bar { padding-top: 1rem; }
  .header-logo img { height: 50px; }
}

/* ---------- main / footer ---------- */
main { max-width: var(--max-width); margin: 0 auto; padding: 1.5rem 1.5rem 2rem; }
.site-footer {
  margin-top: 2rem; padding: 1rem 1.5rem;
  background: var(--card); color: var(--text);
  text-align: center; font-size: 0.9rem;
  border-top: 1px solid var(--border);
}
.site-footer a { color: var(--accent); }

/* ---------- home ---------- */
.home-frame { display: block; }
.home-content {
  max-width: 760px; margin: 0 auto;
  background: var(--card); padding: 1.5rem 2rem; border-radius: 6px;
}
.home-content p { text-align: justify; }
.home-content address { font-style: normal; text-align: center; }
.contact-block {
  margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border);
}

/* ---------- narrow pages (static: versand/agb/impressum) ---------- */
.page-narrow {
  max-width: 760px; margin: 0 auto;
  background: var(--card); padding: 1.5rem 2rem; border-radius: 6px;
}
.page-narrow h1 { text-align: center; color: var(--accent); }
.page-narrow h2 { margin-top: 2rem; color: var(--accent); }
.agb-toc ol { padding-left: 1.5rem; }

/* ---------- catalog layout (sidebar on the right) ---------- */
.catalog-layout { display: grid; grid-template-columns: 1fr 220px; gap: 1.5rem; }
.catalog-layout .catalog-sidebar { grid-column: 2; grid-row: 1; }
.catalog-layout [data-catalog-main],
.catalog-layout [data-catalog-results] { grid-column: 1; grid-row: 1; }
@media (max-width: 780px) {
  .catalog-layout { grid-template-columns: 1fr; }
  .catalog-layout .catalog-sidebar,
  .catalog-layout [data-catalog-main],
  .catalog-layout [data-catalog-results] { grid-column: 1; grid-row: auto; }
}

.catalog-sidebar { font-size: 1rem; }
.sidebar-title {
  margin: 0.25rem 0 0.5rem;
  font-weight: 700; color: var(--accent);
  font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase;
}
.catalog-sidebar ul { list-style: none; padding: 0; margin: 0; }
.catalog-sidebar li { margin: 0; }
.catalog-sidebar a {
  display: block; padding: 0.25rem 0;
  text-decoration: none; color: var(--text);
}
.catalog-sidebar a:hover, .catalog-sidebar a:focus { color: var(--accent); }
.catalog-sidebar a[aria-current="page"] { color: var(--accent); font-weight: 700; }

/* ---------- catalog content ---------- */
.catalog { background: var(--card); padding: 1rem 1.5rem; border-radius: 6px; }
.catalog h1 { margin: 0 0 0.25rem; color: var(--accent); }
.catalog-meta { margin: 0 0 1rem; color: var(--muted); }

.book {
  padding: 1rem 0; border-bottom: 1px solid var(--border);
  scroll-margin-top: 1rem;
}
.book-heading { margin: 0 0 0.4rem; font-size: 1.05rem; line-height: 1.4; }
.book-heading .autor { color: var(--accent); font-weight: 700; }
.book-heading .titel { color: var(--text); }

.bibl, .zustand, .anmerkung { margin: 0.25rem 0; }
.anmerkung { font-style: italic; }

.book-meta {
  margin: 0.75rem 0; display: grid;
  grid-template-columns: max-content 1fr; gap: 0.2rem 1rem;
  font-size: 0.95rem;
}
.book-meta dt { font-weight: 700; color: var(--muted); }
.book-meta dd { margin: 0; }
.book-meta a { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }

.book-images {
  list-style: none; padding: 0; margin: 0.75rem 0;
  display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.book-images li { margin: 0; }
.book-images img {
  width: 133px; height: 133px; object-fit: cover;
  border: 1px solid var(--border);
}

.versand-link { margin: 0.5rem 0 0; font-size: 0.9rem; }

.catalog-landing { text-align: center; }
.catalog-landing .worldmap { max-width: 100%; height: auto; }

/* ---------- catalog search ---------- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}
.catalog-search { margin-bottom: 1rem; }
.catalog-search input {
  width: 100%; padding: 0.5rem 0.6rem;
  border: 2px solid var(--accent); border-radius: 4px;
  font: inherit; background: #fff;
}
.catalog-search input:focus {
  outline: 2px solid var(--accent); outline-offset: 1px;
}

.search-results-pane .search-summary { margin: 0 0 1rem; }
.search-results { list-style: none; padding: 0; margin: 0; }
.search-results li { border-bottom: 1px solid var(--border); }
.search-results a {
  display: block; padding: 0.6rem 0.5rem;
  text-decoration: none; color: var(--text);
}
.search-results a:hover, .search-results a:focus { background: var(--hover); }
.search-results .r-autor { color: var(--accent); font-weight: 700; }
.search-results .r-titel { margin-left: 0.4rem; }
.search-results .r-meta  { display: block; font-size: 0.85rem; color: var(--muted); }

/* ---------- lightbox ---------- */
.lightbox {
  border: none; padding: 0; background: #111; color: #fff;
  max-width: 95vw; max-height: 95vh; overflow: visible;
}
.lightbox::backdrop { background: rgba(0, 0, 0, 0.75); }
.lightbox img {
  display: block; margin: 0 auto;
  max-width: 95vw; max-height: 85vh;
}
.lb-caption {
  margin: 0; padding: 0.5rem 1rem; text-align: center;
  font-size: 0.9rem; background: #111;
}
.lightbox button {
  position: absolute; background: rgba(0, 0, 0, 0.55); color: #fff;
  border: none; cursor: pointer; line-height: 1;
  font-size: 1.75rem; padding: 0.25rem 0.6rem; border-radius: 4px;
}
.lightbox button:hover, .lightbox button:focus { background: rgba(0, 0, 0, 0.85); }
.lb-close { top: 0.5rem; right: 0.5rem; }
.lb-prev  { left:  0.5rem; top: 50%; transform: translateY(-50%); }
.lb-next  { right: 0.5rem; top: 50%; transform: translateY(-50%); }
