/* ========================================
OHG-BOOKTIME - STYLE SHEET
========================================
Struktur:
1. Variablen & Themes
2. Reset & Base Styles
3. Typography
4. Layout & Container
5. Components (Buttons, Forms, Cards)
6. Header & Navigation
7. Sections & Grids
8. Footer
9. Utilities & Animations
10. Responsive Design
*/


/* ===== 1. Variablen & Themes ===== */
:root {
    /* Primary Palette – modern blue */
    --primary: #1a6aff;
    --primary-dark: #0f4fd4;
    --accent: #F59E0B;
    --accent-dark: #F4A261;

    /* Backgrounds */
    --bg-body: #f4f7ff;
    --bg-surface: #ffffff;
    --bg-surface-alt: #eaf0ff;

    /* Text */
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-heading: #0f172a;
    --text-on-primary: #ffffff;

    /* Borders & Shadows */
    --border-color: rgba(26,106,255,0.18);
    --shadow-sm: 0 1px 4px rgba(26,106,255,0.07);
    --shadow-md: 0 4px 16px rgba(26,106,255,0.11);
    --shadow-lg: 0 10px 32px rgba(26,106,255,0.15);
}

[data-theme="dark"] {
    --bg-body: #0f172a;
    --bg-surface: #1e293b;
    --bg-surface-alt: #1e2d4a;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --text-heading: #f8fafc;
    --border-color: rgba(26,106,255,0.25);
    --primary: #5ba4d6;
}

/* ===== Toast Notifications (aus Version 2) ===== */
/* Toast container (zentriert oben) */
.site-toast-container {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 99999;
  pointer-events: none; /* damit Klicks durchgehen, außer auf Buttons in toasts */
}

/* Einzelner Toast */
.site-toast {
  pointer-events: auto;
  min-width: 220px;
  max-width: 90vw;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  font-size: 0.95rem;
  line-height: 1.2;
  background: var(--toast-bg, #ffffff);
  color: var(--toast-fg, #111);
  border: 1px solid rgba(0,0,0,0.06);
  transform: translateY(-120%);
  opacity: 0;
  transition: transform 260ms cubic-bezier(.2,.9,.3,1), opacity 260ms;
}

/* sichtbar */
.site-toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Varianten */
.site-toast.success { border-left: 4px solid #28a745; }
.site-toast.error   { border-left: 4px solid #d9534f; }
.site-toast.info    { border-left: 4px solid #007bff; }

/* optional: kleiner close-button */
.site-toast .toast-close {
  margin-left: 0.5rem;
  background: transparent;
  border: none;
  font-size: 1rem;
  cursor: pointer;
}

/* Der blaue Bestätigungs-Button */
.my-swal-confirm {
    background-color: #1d4ed8 !important; /* Dein Blau */
    color: white !important;
    border-radius: 9999px !important; /* Pill-Form */
    padding: 10px 25px !important;
    font-weight: 600 !important;
    margin: 10px !important; /* Abstand zwischen den Buttons */
    border: none !important;
    cursor: pointer !important;
    font-size: 16px !important;
    display: inline-block !important; /* Damit sie nebeneinander stehen */
}

/* Der graue Abbrechen-Button */
.my-swal-cancel {
    background-color: #f3f4f6 !important; /* Hellgrau */
    color: #374151 !important;
    border-radius: 9999px !important;
    padding: 10px 25px !important;
    font-weight: 600 !important;
    margin: 10px !important;
    border: none !important;
    cursor: pointer !important;
    font-size: 16px !important;
    display: inline-block !important;
}

/* Optional: Damit das Popup-Fenster auch abgerundete Ecken hat */
.my-swal-popup {
    border-radius: 20px !important;
    padding: 2rem !important;
}

/* ===== Login Modal (aus Version 2) ===== */
.login-modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 120000;
  backdrop-filter: blur(2px);
  background: rgba(0,0,0,0.25);
  opacity: 1;
  transition: opacity 220ms ease;
}
.login-modal-overlay.hide { opacity: 0; pointer-events: none; }

.login-modal {
  max-width: 90%;
  width: 420px;
  border-radius: 10px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.2);
  background: #fff;
  padding: 1rem;
  transform: translateY(-6px);
  transition: transform 200ms ease;
}
.login-modal.success { border-left: 6px solid #28a745; }
.login-modal.error { border-left: 6px solid #dc3545; }
.login-modal.info { border-left: 6px solid #007bff; }

.login-modal-content { display: flex; flex-direction: column; gap: 0.5rem; }
.login-modal-title { font-size: 1.05rem; }
.login-modal-message { font-size: 0.95rem; color: #333; }
.login-modal-close {
  align-self: flex-end;
  padding: .35rem .6rem;
  border-radius: 6px;
  border: none;
  background: #eee;
  cursor: pointer;
}

/* ===== Cookie Consent Banner (aus Version 2) ===== */
.cookie-consent-banner {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 18px;
  max-width: 1100px;
  width: calc(100% - 32px);
  background: var(--bg-surface);
  color: var(--text-main);
  border-radius: 12px;
  padding: 14px 16px;
  z-index: 99999;
  box-shadow: 0 18px 40px rgba(11,22,70,0.08);
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(0,0,0,0.04);
  font-family: inherit;
}

.cookie-consent-inner { display:flex; gap:12px; align-items:center; width:100%; }
.cookie-text { flex:1 1 60%; color:var(--text-main); }
.cookie-text strong { color: var(--primary); display:block; margin-bottom:4px; font-size:1rem; }
.cookie-text a { color: var(--primary); text-decoration: underline; }

.cookie-actions { display:flex; gap:8px; align-items:center; flex-shrink:0; }
.cookie-actions button {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(15,23,36,0.06);
  background: transparent;
  cursor: pointer;
  font-weight:600;
  color: var(--text-main);
}

/* primär / sekundär Varianten an Site-Buttons anglehnt */
.cookie-actions .cookie-accept-all {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(43,107,230,0.08);
}
.cookie-actions .cookie-accept-necessary {
  background: transparent;
  color: var(--primary);
  border: 1px solid rgba(43,107,230,0.12);
}
.cookie-actions .cookie-open-settings {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid rgba(15,23,36,0.06);
}

/* ===== Cookie Settings Dialog (aus Version 2) ===== */
.cookie-settings-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(rgba(2,6,23,0.55), rgba(2,6,23,0.65));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 120000;
  padding: 20px;
}

/* Dialog-Karte: visuell konsistent zur Seite */
.cookie-settings {
  width: 100%;
  max-width: 560px;
  background: var(--bg-surface);
  color: var(--text-main);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 30px 70px rgba(2,6,23,0.35);
  border: 1px solid rgba(0,0,0,0.04);
  font-family: inherit;
  position: relative;
  outline: none;
}

/* Close-Button (CSS vorbereitet; JS kann ein Button .cookie-close einfügen) */
.cookie-settings .cookie-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 18px;
  padding: 6px;
  cursor: pointer;
  color: var(--text-muted);
}

/* Dialog Typographie */
.cookie-settings h3 {
  margin: 0 0 8px 0;
  color: var(--primary);
  font-size: 1.15rem;
  font-weight:700;
}
.cookie-settings p { margin: 0 0 10px 0; color: var(--text-muted); font-size:0.95rem; }

/* Reihen / Buttons */
.cookie-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  text-align: left;
}

.cookie-row label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text-main);
  flex: 1 1 auto;
}

.cookie-row .muted {
  margin-left: 0;
  font-size: 12px;
  color: var(--text-muted);
}

/* Dialog Buttons an Site-Style anlehnen */
.cookie-buttons { display:flex; gap:10px; justify-content:flex-end; margin-top:14px; }
.cookie-button-primary {
  background: var(--primary);
  color: #fff;
  border:none;
  padding:10px 14px;
  border-radius:10px;
  cursor:pointer;
  font-weight:700;
}
.cookie-button-secondary {
  background: transparent;
  border:1px solid rgba(15,23,36,0.06);
  color: var(--text-main);
  padding:10px 14px;
  border-radius:10px;
  cursor:pointer;
}

/* Kleine Accessibility-/Focus-Visuals */
.cookie-settings :focus { outline: 3px solid rgba(66,146,201,0.18); outline-offset:3px; }

/* ===== 2. Reset & Base Styles ===== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

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

/* ===== 3. Typography ===== */

h1, h2, h3, h4, h5, h6 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--text-heading);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

h1 { font-size: 2.5rem; line-height: 1.2; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p { margin-bottom: 1rem; }

a {
    text-decoration: none;
    color: var(--primary);
    transition: color 0.2s;
}

/* a:hover { color: var(--primary-dark); } orange button*/ 



/* ===== 4. Layout & Container ===== */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

section {
    padding: 2rem 0;
}


/* ===== 5. Components: Buttons & Forms ===== */

.btn-accent {
    background-color: var(--accent);
    color: #0f172a; 
}

.btn-accent:hover {
    background-color: var(--accent-dark);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: #fff;
    border: 1.5px solid var(--border-color);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    background-color: var(--bg-surface);
    color: var(--text-main);
    transition: border-color 0.2s;
}

input:read-only {
    background-color: var(--bg-surface-alt);
    cursor: not-allowed;
    color: var(--text-muted);
}


.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.6rem;
    border-radius: 100px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--text-on-primary);
    box-shadow: 0 4px 14px rgba(26,106,255,0.3);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    color: white;
    box-shadow: 0 8px 22px rgba(26,106,255,0.38);
}

.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-heading);
}

input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    background-color: var(--bg-surface);
    color: var(--text-main);
    transition: border-color 0.2s;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(66, 146, 201, 0.2);
}

.back-link span{
    text-decoration: none;
    color: #0077cc;
    font-size: 18px;
}

.back-link span:hover {
    text-decoration: underline;
}

/* Password Field (aus Version 2) */
.password-field {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 10px;
    bottom: 0.75rem;
    top: auto;
    transform: none;
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    font-size: 1rem;
    line-height: 1;
    color: var(--text-muted);
    z-index: 1;
}

/* Input in password-field etwas Platz für den Button lassen */
.password-field input {
    padding-right: 2.5rem;
}


/* == 9. Auth Card == */
.auth-card {
    max-width: 420px;
    margin: 0 auto;
    background-color: var(--bg-surface);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

/* ====== größere Variante der auth-card (aus Version 2) ====== */
.auth-card--wide {
  max-width: 700px;
}

/* Style für den Kartentitel (aus Version 2) */
.auth-card__title {
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
}

/* == KAUFEN auswahl */

select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    background-color: var(--bg-surface);
    color: var(--text-main);
    transition: border-color 0.2s;
}

select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(66, 146, 201, 0.2);
}

/* kompaktere Form-Gruppen in der Filterleiste */
.form-group-compact {
    margin-bottom: 0;
    min-width: 160px;
}

/* kleinere Labels für Filter */
.filter-label {
    font-size: 0.85rem;
}

/* Verkaufen */
.isbn-search {
  margin-bottom: 1.25rem;
  background: var(--bg-surface-alt);
  padding: 1rem 1.25rem 0.5rem;
  border-radius: 8px;
}

/* Row mit Input + Button */
.isbn-search__row {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* optionaler gezielter Input-Stil (vererbt bereits von input) */
.input--isbn {
  background: white; /* war inline gesetzt */
}

/* kleine Hilfs-Hinweistext */
.isbn-search__hint {
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

/* Book-found preview */
.book-found-container { /* container selbst hat nur Struktur; sichtbar/hidden über .hidden */
  margin-bottom: 1rem;
}

.book-found-preview {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.book-thumb {
    width: 60px;
    height: 85px;
    background: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    border: 1px solid #ddd;
    background-color: transparent;
    object-fit: contain;
}

.book-thumb .fa-book {
  font-size: 2rem;
  color: #666;
}

/* book info */
.book-info h4 {
  margin: 0;
  color: var(--primary);
  font-size: 1rem;
}

.book-info p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Zustand-Box (sichtbar hervorheben) */
.condition-box {
  background: rgba(66, 146, 201, 0.1);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--primary);
}

/* Preis-Input Darstellung */
.sell-price-row { margin-top: 1rem; }

.sell-price-wrapper {
  position: relative;
}

.sell-price-input {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.1rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: none;
  background: transparent;
}

/* Upload Dropzone */
.upload-dropzone {
  border: 2px dashed var(--border-color);
  padding: 1.5rem;
  text-align: center;
  border-radius: 6px;
  cursor: pointer;
  background-color: var(--bg-surface-alt);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.upload-dropzone__icon {
  font-size: 2rem;
  color: var(--text-muted);
}

.upload-dropzone__text {
  margin: 0;
  color: var(--text-muted);
}

/* Vorschau-Container (Thumbnails) */
.upload-preview {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.preview-thumb {
  width: 100px;        /* feste Breite */
  height: 100px;       /* feste Höhe */
  flex: 0 0 100px;     /* verhindert Dehnen */
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  background: #f7f7f7;
  position: relative;
}

.preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.preview-thumb .remove-thumb {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(255,255,255,0.85);
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

/* Form-Aktionen (Buttons rechts ausgerichtet) */
.form-actions {
  margin-top: 2rem;
  text-align: right;
}

.form-actions .btn { margin-left: 0.5rem; }

/* kompakte 2-spaltige Zeile für Formfelder (aus Version 2) */
.form-row--2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* spez. Top-Spacing für diese Sektion (aus Version 2) */
.section--pt-8 {
  padding-top: 2rem;
}


/* ===== 6. Header & Navigation ===== */

header {
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav{
    height: fit-content;
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(26,106,255,0.1);
    box-shadow: 0 2px 16px rgba(26,106,255,0.07);
    color: var(--text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.nav_logo img {
    margin: 0 10px 0 30px;
    width: 150px;
    height: auto;
}

nav ul {
    display: flex;
    margin: 0;
    padding: 0;
}
 
nav ul li {
    height: 100%;
    padding: 0 30px;
    list-style-type: none;
    border-bottom: 4px solid transparent; /*Damit es keinen "hopper" gibt, wenn man auf die nav-leiste geht*/
}

nav a {
  position: relative;
  text-decoration: none;
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 15px;
  padding-bottom: 5px;
}

nav a:hover{
    color: var(--primary);
}

nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary);

    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease-in-out;
}

nav a:hover::after{
    transform: scaleX(1);
}

nav ul li a {
    color: var(--text-main);
    font-size: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-weight: 600;
}

/* ===== 8. Sections & Grids ===== */

/* Textzentrierung für Sections */
.text-center {
    text-align: center;
}

.full-width {
    width: 100%;
}

/*== KAUFEN ==*/

/* filter bar (Filterleiste) */
.filter-bar {
    background-color: var(--bg-surface);
    padding: 1.1rem 1.4rem;
    border-radius: 16px;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

/* Produktraster */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Produktkarte */
.product-card {
    background-color: var(--bg-surface);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(26,106,255,0.14);
}

/* Zustand-Badge (aus Version 2) */
.zustand-badge {
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

/* Farben je Zustand (aus Version 2) */
.zustand-badge[data-condition="1"] { background: #28a745; color: white; }
.zustand-badge[data-condition="2"] { background: #8bc34a; color: white; }
.zustand-badge[data-condition="3"] { background: #ffc107; color: white; }
.zustand-badge[data-condition="4"] { background: #ff9800; color: white; }
.zustand-badge[data-condition="5"] { background: #f44336; color: white; }

/* Bildbereich der Karte */
.card-image {
    height: 200px;
    background-color: var(--bg-surface-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 3rem;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Karteninhalt */
.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-heading);
}

.card-details {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.card-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: auto;
}

/* Badge (z. B. "Neu", "Reserviert" etc.) */
.badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--accent);
    color: #333;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* ===== Marktplatz ===== */

.section-marketplace {
    padding-top: 2rem; /* ersetzt inline padding-top */
}

/* Header über dem Marktplatz */
.marketplace-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

/* Load-More-Bereich */
.marketplace-load-more {
    text-align: center;
    margin-top: 3rem;
}



/* ===== 8. Footer ===== */

footer {
    background-color: var(--bg-surface);
    padding: 2.5rem 0;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.88rem;
}

/* ===== 10. Utilities & Animations ===== */

/* == Fade-in Animation == */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* == Scroll Reveal (buy.html, etc.) == */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/*verkauf*/
.hidden { display: none !important; }

/* leichte Anpassungen für Icons in Dropzone */
.fa-solid { line-height: 1; }


.toggle-button {
    position: absolute;
    top: 40px;
    right: 25px;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 23px;
}

.toggle-button .bar {
    height: 3px;
    width: 100%;
    background-color: var(--text-main);
    border-radius: 100px;
}

.toggle-button:hover .bar{
    background-color: var(--primary);
}


.preis-verlauf {
  display: block;           /* Span als Block für volle Breite */
  width: 100%;              /* volle Breite des Containers */
  height: 20px;             /* Höhe der Leiste */
  border-radius: 10px;      /* abgerundete Ecken */
  background: linear-gradient(to right, #28a745, #ffc107, #dc3545);
  margin-top: 15px;
}

.text-muted {
    color: var(--text-muted);
}



/* ===================== detail.html ===============*/

.detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 1.25rem;
    align-items: start;
}
@media (max-width: 900px) {
    .detail-container { grid-template-columns: 1fr; }
}

.info-card {
    background: var(--card-bg, #fff);
    border-radius: 8px;
    box-shadow: var(--card-shadow, 0 6px 18px rgba(0,0,0,0.06));
    padding: 1.25rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.product-title {
    font-size: 1.45rem;
    margin: 0.25rem 0 0.6rem 0;
}

.price-row {
    display:flex;
    gap:1rem;
    align-items: baseline;
    margin-bottom:0.8rem;
}

.original-price {
    text-decoration: line-through;
    opacity: 0.7;
    font-size: 0.95rem;
}
.sale-price {
    font-size: 1.4rem;
    font-weight: 700;
}

.meta-grid {
    display:flex;
    gap:1rem;
    margin-bottom:0.8rem;
    flex-wrap:wrap;
}
.meta-item {
    background: var(--muted-bg, #f5f5f5);
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    font-size: 0.95rem;
}

.description {
    margin-top:0.8rem;
    color: var(--text-muted);
    line-height:1.4;
}

/* Chat */
.chat-card {
    background: var(--card-bg, #fff);
    border-radius:8px;
    padding:0.75rem;
    box-shadow: var(--card-shadow, 0 6px 18px rgba(0,0,0,0.06));
    display:flex;
    flex-direction:column;
    height: 100%;
    min-height: 360px;
}

/* Chat-Disabled State (aus Version 2) */
.chat-form-disabled {
    opacity: 0.7;
    pointer-events: none;
}

/* Logged-Out Message (aus Version 2) */
.logged-out-message {
    margin: 0.5rem auto;
    padding: 0.75rem 1rem;
    max-width: 90%;
    border-radius: 8px;
    background: #fef3c7; /* Hellgelb (Achtungsfarbe) */
    color: var(--text-main);
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
}

/* System-/Verkäuferhinweis im Chat (aus Version 2) */
.seller-info-message {
    margin: 0.5rem auto;
    padding: 0.75rem 1rem;
    max-width: 90%;
    border-radius: 8px; 
    background: #e5e7eb; 
    color: var(--text-main);
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: none; 
}

/* Der Hinweis-Container (Cookie-Ersatz für den Chat) */
.cookie-hint {
    margin: 1rem auto;
    padding: 1.25rem;
    max-width: 90%;
    background-color: #E3C36D;
    border: 1px solid #e5e7eb; /* Subtiler grauer Rahmen */
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); /* Weicher Schatten */
    text-align: center;
    font-family: 'Inter', sans-serif;
}

/* Der Aktions-Button im Hinweis (wie der grüne Button im Bild) */
.cookie-hint button {
    background-color: #96834A;
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%; /* Volle Breite auf Mobile */
}

.cookie-hint button:hover {
    background-color: #B89C53;
    transform: translateY(-1px);
}

/* Modal Overlay (aus Version 2) */
.modal-overlay {
    position: fixed; 
    inset: 0; 
    background: rgba(0,0,0,0.5);
    display: flex; 
    align-items: center; 
    justify-content: center; 
    z-index: 2000;
}

.modal-content {
    width: 90%; 
    max-width: 500px; 
    height: 80vh; 
    display: flex; 
    flex-direction: column;
}

.messages-container {
    flex: 1; 
    overflow-y: auto; 
    padding: 1rem; 
    background: var(--bg-body);
}

/* Unread Badge (aus Version 2) */
.unread-badge {
    background-color: #dc3545; /* Ein kräftiges Rot */
    color: white;
    font-weight: bold;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    box-shadow: var(--shadow-sm);
}

.messages {
    flex:1 1 auto;
    overflow:auto;
    padding:0.5rem;
    border-radius:6px;
    background: linear-gradient(180deg, rgba(0,0,0,0.02), transparent);
    margin-bottom:0.6rem;
}

.message {
    margin-bottom:0.6rem;
    padding:0.5rem;
    border-radius:8px;
    max-width:85%;
}
.message.me { background: #e6f4ff; align-self:flex-end; }
.message.them { background: #f1f1f1; align-self:flex-start; }

.chat-input-row {
    display:flex;
    gap:0.5rem;
    align-items:center;
    margin-top:0.4rem;
}
.chat-input-row textarea {
    flex:1;
    min-height:64px;
    resize:vertical;
    padding:0.6rem;
    border-radius:6px;
    border:1px solid #ddd;
    font:inherit;
}

.reserve-btn {
    margin-top:0.75rem;
    width:100%;
}

.small-muted {
    font-size:0.85rem;
    color:var(--text-muted);
}



/*=========== PORFIL ==================*/
/* Profil-UI */
.nav-profile-container .profile-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  background: var(--primary);
  color: #fff;
  border: 2px solid rgba(255,255,255,0.2);
  box-shadow: 0 4px 10px rgba(26,106,255,0.2);
}
.profile-dropdown a { color: inherit; text-decoration: none; display:inline-block; }
.profile-dropdown a:hover { background: rgba(26,106,255,0.06); }
.profile-dropdown.hidden { display: none; }

/* ===== Page Header (buy/sell/login/detail) ===== */
.page-header {
    padding: 1.75rem 0 1.25rem;
    background: linear-gradient(135deg, #f4f7ff 0%, #eaf0ff 100%);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}
.page-header h1 {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.35rem;
}
.page-header h1 span {
    background: linear-gradient(135deg, var(--primary) 0%, #0099cc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.page-header p {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0;
}



/* ===== 11. Responsive Design ===== */

@media(max-width:760px){
    .navbar-links{ display: none; width: 100%; }

    .toggle-button{ display: flex; }
    
    nav{ flex-direction: column; align-items: flex-start; }
    
    .navbar-links ul{ flex-direction: column; width: 100%; }
    
    .navbar-links li{ text-align: center; padding: 12px; }
    
    .navbar-links.active { display: flex; }

    /* Cookie Banner Mobile (aus Version 2) */
    .cookie-consent-banner {
      width: calc(100% - 32px);
      left: 50%;
      transform: translateX(-50%);
      padding: 12px 16px;
      border-radius: 10px;
    }

    .cookie-consent-inner { flex-direction: column; align-items:stretch; gap:10px; }
    .cookie-actions { justify-content:flex-end; }

    .filter-bar { flex-direction: column; align-items: stretch; }
    
    .clear-filters-group { flex: 1 1 100%; display:flex; justify-content: center; }

    .form-row--2 { grid-template-columns: 1fr; }

    .form-actions { text-align: center; }

    .preis-verlauf { display: none;}

    .cookie-row { gap: 10px; }
    .cookie-row label { flex-direction: row; }
}

/* Responsive tweaks für Cookie Settings (aus Version 2) */
@media (max-width:520px) {
  .cookie-settings { padding:16px; border-radius:12px; }
  .cookie-text { font-size: 0.95rem; }
}

/* ===== Checkbox Fixes (aus Version 2) ===== */
/* Checkboxen dürfen nicht die globale input-width erben */
input[type="checkbox"] {
  width: auto !important;
  height: auto;
  display: inline-block;
  margin: 4px 10px 0 0;
  transform: scale(1.05);
  vertical-align: middle;
}

/* Dezenter, zugänglicher Fokus für Checkboxen (nur bei Tastaturfokus) */
input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(66,146,201,0.12);
  border-radius: 4px;
}

/* Stelle sicher, dass generische input:focus Styles Checkboxen nicht übermäßig beeinflussen */
.cookie-settings input[type="checkbox"] {
  border: none;
  box-shadow: none;
}


/* ===== 12. Mobile Fixes ===== */

/* FIX B – Generelle Abstände auf Handy stark reduzieren */
@media (max-width: 768px) {

    /* Sektionen */
    section {
        padding: 1rem 0;
    }
    .section--pt-8 {
        padding-top: 1rem;
    }

    /* Page Header (buy/sell/login) */
    .page-header {
        padding: 1rem 0 0.75rem;
        margin-bottom: 0;
    }

    /* Auth-Card */
    .auth-card {
        padding: 1.5rem 1.25rem;
        border-radius: 14px;
        margin-top: 0.75rem;
    }
    .auth-card--wide {
        padding: 1.5rem 1.25rem;
        border-radius: 14px;
        margin-top: 0.75rem;
    }

    /* Kartentitel weniger Abstand */
    .auth-card__title {
        margin-bottom: 0.85rem;
        padding-bottom: 0.6rem;
    }

    /* Formular-Gruppen enger */
    .form-group {
        margin-bottom: 0.75rem;
    }

    /* ISBN-Suchbereich (sell.html) */
    .isbn-search {
        margin-bottom: 0.75rem;
        padding: 0.85rem 0.85rem 0.4rem;
    }

    /* Zustand-Box */
    .condition-box {
        padding: 0.75rem;
    }

    /* Form-Aktionen */
    .form-actions {
        margin-top: 1rem;
    }

    /* Filter-Leiste (buy.html) – kompakter */
    .filter-bar {
        gap: 0.6rem;
        padding: 0.85rem 1rem;
        margin-bottom: 0.85rem;
    }

    /* Container */
    .container {
        width: 100%;
        padding: 0 0.9rem;
    }

    /* h1 Größe */
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
}

/* FIX C – Sehr kleine Handys (≤ 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }

    section {
        padding: 0.75rem 0;
    }

    .section--pt-8 {
        padding-top: 0.75rem;
    }

    .page-header {
        padding: 0.85rem 0 0.6rem;
    }

    .auth-card,
    .auth-card--wide {
        padding: 1.25rem 1rem;
        border-radius: 10px;
    }

    .form-group {
        margin-bottom: 0.6rem;
    }

    .isbn-search {
        padding: 0.75rem 0.75rem 0.35rem;
        margin-bottom: 0.6rem;
    }
}