:root {
  --ink: #111827;
  --muted: #5b6678;
  --line: #e4e9f2;
  --bg: #f5f7fb;
  --card: #ffffff;
  --accent: #f6c833;
  --accent-strong: #e8b900;
  --blue: #165dff;
  --green: #0f7a3b;
  --red: #b42318;
  --shadow: 0 16px 40px rgba(17, 32, 66, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}
a { color: inherit; }
.container {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  background: var(--ink);
  color: #e5e7eb;
  font-size: 0.95rem;
}
.topbar-inner {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.topbar-contact {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar-label { opacity: 0.72; }
.topbar a {
  color: #f9fafb;
  text-decoration: none;
  font-weight: 700;
}

.language-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px;
  padding: 5px 9px;
}
.language-icon { color: var(--accent); display: inline-flex; }
.language-box select {
  width: auto;
  max-width: 210px;
  margin: 0;
  padding: 6px 28px 6px 8px;
  border: 0;
  color: #fff;
  background: transparent;
  font: inherit;
  font-weight: 700;
  outline: none;
}
.language-box option { color: var(--ink); background: #fff; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  min-height: 82px;
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand-logo { height: 44px; width: auto; display: block; }
.nav nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
}
.nav nav a:hover {
  color: #000;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}

.hero {
  padding: 76px 0 58px;
  background:
    radial-gradient(circle at 80% 20%, rgba(246,200,51,0.20), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #eef3fb 100%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 34px;
  align-items: center;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
  color: #4c6385;
  font-weight: 800;
  margin: 0 0 10px;
}
h1 {
  font-size: clamp(2.15rem, 4vw, 3.65rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
}
h2 {
  margin: 0 0 12px;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
h3 { margin: 0 0 8px; }
.lead {
  font-size: 1.1rem;
  color: #384459;
  max-width: 780px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--accent);
  color: #111827;
  box-shadow: 0 10px 22px rgba(246,200,51,0.25);
}
.btn-secondary {
  background: #ffffff;
  color: var(--ink);
  border: 1px solid #d7dfeb;
}
.btn-dark {
  background: var(--ink);
  color: #fff;
  width: 100%;
}
.btn-small {
  padding: 11px 16px;
  min-width: 118px;
}

.hero-card, .card, .request-form, .market-search, .sell-box, .listing-offer-card, .catalog-note {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.hero-card, .card, .request-form, .market-search, .sell-box, .catalog-note { padding: 26px; }
.check-list { padding-left: 20px; }
.check-list li { margin: 8px 0; }

.search-section {
  margin-top: -30px;
  position: relative;
  z-index: 5;
}
.market-search {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.4fr 1fr 1fr 0.95fr;
  gap: 14px;
  align-items: end;
}
.search-title {
  grid-column: 1 / -1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}
.search-title h2 { margin-bottom: 0; }

.section { padding: 68px 0; }
.section-alt { background: #edf2f8; }
.section-head { margin-bottom: 30px; max-width: 820px; }
.section-head p { color: var(--muted); }
.split-head {
  max-width: none;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
}
.text-link {
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.text-link:hover { text-decoration: underline; }

.listing-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}
.filter-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 10px 15px;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
}
.filter-btn.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.listing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.listing-offer-card {
  overflow: hidden;
  display: grid;
  grid-template-columns: 190px 1fr;
}
.listing-visual {
  min-height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 20px;
  color: #fff;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  background:
    linear-gradient(135deg, rgba(17,24,39,.94), rgba(17,24,39,.65)),
    repeating-linear-gradient(90deg, rgba(255,255,255,.10) 0 1px, transparent 1px 14px);
}
.visual-machine { background-color: #111827; }
.visual-part { background-color: #334155; }
.visual-component { background-color: #1f2937; }
.listing-content { padding: 22px; }
.listing-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.listing-id {
  font-size: .82rem;
  color: var(--muted);
  font-weight: 800;
}
.listing-content p { color: var(--muted); margin-top: 0; }
.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 16px 0;
}
.spec-grid span {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: #fbfcff;
  font-size: .93rem;
}
.spec-grid strong {
  display: block;
  color: var(--muted);
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 2px;
}
.mini-list {
  padding-left: 18px;
  color: #384459;
  margin: 0 0 18px;
}
.mini-list li { margin: 4px 0; }
.listing-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.price-label {
  display: block;
  font-weight: 900;
  font-size: 1.05rem;
  color: var(--ink);
}
.status-label {
  display: block;
  color: var(--muted);
  font-weight: 700;
  font-size: .9rem;
}
.catalog-note {
  margin-top: 24px;
  color: var(--muted);
}
.catalog-note code {
  background: #eef2f7;
  color: var(--ink);
  padding: 2px 6px;
  border-radius: 6px;
}
.empty-state {
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 24px;
  color: var(--muted);
  font-weight: 800;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card p { color: var(--muted); }
.badge {
  display: inline-flex;
  border-radius: 999px;
  background: #fff6cf;
  color: #5f4a00;
  font-size: .78rem;
  font-weight: 800;
  padding: 5px 9px;
  margin-bottom: 14px;
}
.card-action {
  display: inline-flex;
  margin-top: 10px;
  font-weight: 800;
  color: var(--ink);
}

.sell-section { background: #111827; color: #fff; }
.sell-box {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02)),
    #111827;
  border-color: rgba(255,255,255,0.12);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.sell-box p { color: #d1d5db; max-width: 760px; }

.request-form { max-width: 940px; }
.offer-form { max-width: 1040px; }
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
label {
  display: block;
  font-weight: 700;
  margin-bottom: 16px;
}
input, select, textarea {
  width: 100%;
  margin-top: 8px;
  padding: 13px 14px;
  border: 1px solid #cfd8e6;
  border-radius: 12px;
  font: inherit;
  background: #fff;
}
textarea { resize: vertical; }
.form-message, .search-message {
  margin: 12px 0 0;
  font-weight: 700;
  white-space: pre-line;
}
.form-message.success, .search-message.success { color: var(--green); }
.form-message.error { color: var(--red); }

.site-footer {
  background: #0b1220;
  color: #eef2ff;
  padding: 46px 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 1.2fr;
  gap: 28px;
}
.footer-logo {
  height: 38px;
  width: auto;
  background: #fff;
  border-radius: 10px;
  padding: 6px 8px;
}
.site-footer h4 { margin: 0 0 10px; }
.site-footer a { color: #fff; font-weight: 800; text-decoration: none; }
.legal-note {
  font-size: .86rem;
  color: #aab4c5;
}

@media (max-width: 1050px) {
  .market-search { grid-template-columns: repeat(2, 1fr); }
  .listing-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .hero-grid, .cards, .footer-grid, .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }
  .nav {
    align-items: flex-start;
    padding: 16px 0;
    flex-direction: column;
  }
  .hero { padding-top: 48px; }
  .split-head, .sell-box {
    align-items: flex-start;
    flex-direction: column;
  }
  .text-link { white-space: normal; }
}
@media (max-width: 680px) {
  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 10px 0;
  }
  .topbar-contact { flex-wrap: wrap; }
  .language-box { width: 100%; justify-content: space-between; }
  .language-box select { max-width: 100%; flex: 1; }
  .market-search { grid-template-columns: 1fr; }
  .brand-logo { height: 38px; }
  .nav nav { gap: 12px; }
  .listing-offer-card { grid-template-columns: 1fr; }
  .listing-visual { min-height: 130px; }
  .spec-grid { grid-template-columns: 1fr; }
  .listing-bottom { align-items: flex-start; flex-direction: column; }
}


/* v5: dynamic offers + admin */
.listing-visual.has-image {
  background: #111827;
  min-height: 100%;
  padding: 0;
  overflow: hidden;
}
.listing-visual.has-image img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
}
.admin-page { background: #f5f7fb; }
.admin-header { background: #0b1220; color: #fff; padding: 24px 0; }
.admin-header .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.admin-header img { height: 42px; background: #fff; border-radius: 12px; padding: 7px 9px; }
.admin-header a { color: #fff; font-weight: 800; text-decoration: none; }
.admin-main { padding: 38px 0 70px; }
.admin-panel { background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 24px; margin-bottom: 22px; }
.admin-panel h1, .admin-panel h2 { margin-top: 0; }
.admin-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.admin-token-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: end; }
.admin-status { font-weight: 800; margin: 12px 0 0; white-space: pre-line; }
.admin-status.success { color: var(--green); }
.admin-status.error { color: var(--red); }
.admin-form .grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.checkbox-label { display: flex; align-items: center; gap: 10px; margin-top: 28px; }
.checkbox-label input { width: auto; margin: 0; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 900px; }
.admin-table th, .admin-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.admin-table th { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.admin-table .row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-muted { background: #eef2f7; color: var(--ink); }
.btn-danger { background: #fee4e2; color: #912018; }
.btn-outline { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.json-box { width: 100%; min-height: 180px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.admin-help { color: var(--muted); margin-top: 6px; }
@media (max-width: 900px) {
  .admin-token-row, .admin-form .grid-4 { grid-template-columns: 1fr; }
  .admin-header .container { align-items: flex-start; flex-direction: column; }
}


/* v6: kompaktere öffentliche Angebotskacheln */
.offers-section .section-head {
  margin-bottom: 22px;
}
.listing-toolbar {
  margin-bottom: 16px;
}
.listing-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.listing-offer-card {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
}
.listing-visual {
  min-height: 118px;
  padding: 14px;
  font-size: .82rem;
}
.listing-visual.has-image img {
  min-height: 145px;
  max-height: 165px;
}
.listing-content {
  padding: 15px;
}
.listing-meta-row {
  margin-bottom: 8px;
}
.badge {
  font-size: .72rem;
  padding: 4px 8px;
  margin-bottom: 10px;
}
.listing-id {
  font-size: .74rem;
}
.listing-content h3 {
  font-size: 1rem;
  line-height: 1.2;
  margin-bottom: 6px;
}
.listing-content p {
  font-size: .88rem;
  line-height: 1.42;
  margin-bottom: 10px;
}
.spec-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 10px 0;
}
.spec-grid span {
  border-radius: 10px;
  padding: 7px;
  font-size: .82rem;
}
.spec-grid strong {
  font-size: .66rem;
}
.mini-list {
  margin: 0 0 12px;
  padding-left: 16px;
  font-size: .84rem;
}
.mini-list li {
  margin: 2px 0;
}
.listing-bottom {
  gap: 10px;
  padding-top: 12px;
}
.price-label {
  font-size: .94rem;
}
.status-label {
  font-size: .78rem;
}
.btn-small {
  padding: 9px 12px;
  min-width: auto;
  font-size: .86rem;
}
.cards.info-cards .card,
.cards .card {
  padding: 20px;
}
.catalog-note {
  margin-top: 18px;
  padding: 18px;
}
.margin-preview {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcff;
  padding: 14px;
  margin: 4px 0 16px;
}
.margin-preview strong {
  display: block;
  margin-bottom: 4px;
}
.margin-preview .profit-good {
  color: var(--green);
  font-weight: 900;
}
.admin-table .money-cell {
  white-space: nowrap;
  font-weight: 800;
}
@media (max-width: 1050px) {
  .listing-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}
@media (max-width: 680px) {
  .listing-grid {
    grid-template-columns: 1fr;
  }
  .listing-visual {
    min-height: 105px;
  }
  .listing-visual.has-image img {
    min-height: 130px;
    max-height: 150px;
  }
}


/* V13 Angebot-Bilder im Admin */
.admin-image-section {
  margin: 18px 0;
}
.admin-image-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 10px 0 12px;
}
.file-upload-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid #d7dfeb;
  background: #ffffff;
  cursor: pointer;
  font-weight: 800;
  margin: 0;
}
.file-upload-label input {
  display: none;
}
.image-preview-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid #e6eaf1;
  border-radius: 14px;
  background: #f8fafc;
}
.image-preview-box[hidden] {
  display: none;
}
.image-preview-box img {
  width: 160px;
  height: 110px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}
.admin-thumb {
  width: 54px;
  height: 42px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}
.no-thumb {
  color: #9ca3af;
  font-weight: 700;
}
.listing-visual.has-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}



/* v15: mehrere Bilder pro Angebot */
.listing-thumbs {
  display: flex;
  gap: 7px;
  margin: 0 0 12px;
  overflow-x: auto;
  padding-bottom: 3px;
}

.listing-thumb {
  flex: 0 0 auto;
  width: 48px;
  height: 38px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 9px;
  overflow: hidden;
  cursor: pointer;
  background: #f8fafc;
}

.listing-thumb.active {
  border-color: #111827;
}

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

.image-preview-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  width: 100%;
}

.image-preview-item {
  border: 1px solid #e6eaf1;
  border-radius: 14px;
  background: #ffffff;
  padding: 8px;
}

.image-preview-item img {
  width: 100%;
  height: 105px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

.image-preview-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: .78rem;
}

.btn-mini {
  padding: 6px 8px;
  font-size: .72rem;
  border-radius: 8px;
}

.admin-thumb-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .76rem;
  color: #6b7280;
  font-weight: 800;
}

@media (max-width: 700px) {
  .image-preview-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* v16: öffentliche Angebotsbilder + klarere Admin-Uploads */
.prominent-upload {
  background: #ffd43b !important;
  border-color: #f5c400 !important;
  color: #111827 !important;
  box-shadow: 0 8px 20px rgba(245, 196, 0, 0.22);
}

.seller-image-section {
  margin: 18px 0 20px;
  padding: 16px;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  background: #f8fafc;
}

.seller-image-section .admin-help {
  margin: 8px 0 0;
}


/* v17: Admin-Preiseingabe sichtbar und robust */
.price-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: -2px 0 18px;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fffef4;
  color: #475569;
  font-size: .9rem;
}

.profit-warning {
  color: #b42318;
  font-weight: 900;
}



/* v18: ordentliche Angebotsansicht auf der Webseite */
.listing-offer-card-v18 {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  overflow: hidden;
}

.listing-media-panel {
  background: #f8fafc;
  border-right: 1px solid var(--line);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.listing-image-button {
  width: 100%;
  height: 150px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  cursor: zoom-in;
  display: block;
}

.listing-image-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
  display: block;
}

.listing-tile-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.listing-tile-thumb {
  height: 42px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 9px;
  background: #fff;
  overflow: hidden;
  cursor: zoom-in;
}

.listing-tile-thumb.active,
.listing-tile-thumb:hover {
  border-color: #111827;
}

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

.listing-description {
  color: var(--muted);
  margin: 0 0 16px;
  white-space: normal;
}

.spec-grid-v18 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.public-detail-list {
  margin-top: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0 0;
}

.tag-row span {
  display: inline-flex;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  font-size: .78rem;
  font-weight: 800;
  color: #475569;
}

.listing-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

body.modal-open {
  overflow: hidden;
}

.offer-modal[hidden] {
  display: none;
}

.offer-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.offer-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, .72);
  backdrop-filter: blur(4px);
}

.offer-modal-dialog {
  position: relative;
  width: min(1180px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  margin: 16px auto;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .32);
}

.offer-modal-close {
  position: sticky;
  top: 14px;
  float: right;
  margin: 14px 14px 0 0;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #111827;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.offer-modal-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(360px, 1fr);
  gap: 28px;
  padding: 30px;
  clear: both;
}

.offer-modal-gallery {
  min-width: 0;
}

.offer-modal-main-image {
  width: 100%;
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.offer-modal-main-image img {
  width: 100%;
  max-height: 560px;
  object-fit: contain;
  display: block;
  background: #fff;
}

.offer-modal-placeholder {
  color: var(--muted);
  font-weight: 800;
}

.offer-modal-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.offer-modal-thumb {
  height: 62px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
}

.offer-modal-thumb.active,
.offer-modal-thumb:hover {
  border-color: #111827;
}

.offer-modal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.offer-modal-content h2 {
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  line-height: 1.1;
  margin: 10px 0 14px;
}

.offer-modal-description {
  color: #334155;
  font-size: 1rem;
  line-height: 1.65;
  white-space: pre-line;
  margin-bottom: 20px;
}

.offer-modal-content h3 {
  margin: 20px 0 8px;
}

.modal-detail-list {
  margin: 8px 0 0;
  padding-left: 18px;
}

.modal-detail-list li {
  margin: 6px 0;
}

.offer-modal-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

@media (max-width: 980px) {
  .listing-offer-card-v18 {
    grid-template-columns: 1fr;
  }
  .listing-media-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .listing-image-button {
    height: 220px;
  }
  .spec-grid-v18 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .offer-modal-layout {
    grid-template-columns: 1fr;
    padding: 22px;
  }
  .offer-modal-main-image {
    min-height: 260px;
  }
}

@media (max-width: 620px) {
  .spec-grid-v18 {
    grid-template-columns: 1fr;
  }
  .listing-bottom,
  .offer-modal-bottom {
    align-items: stretch;
    flex-direction: column;
  }
  .listing-actions {
    justify-content: stretch;
  }
  .listing-actions .btn {
    width: 100%;
    text-align: center;
  }
  .offer-modal-dialog {
    width: calc(100vw - 16px);
    margin: 8px auto;
    border-radius: 18px;
  }
}



/* v19: Rechtliche Seiten, Footer-Links und Formularhinweise */
.footer-legal {
  border-top: 1px solid rgba(255,255,255,.12);
  margin-top: 30px;
  padding-top: 18px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: .92rem;
}

.footer-legal a {
  color: #eef2ff;
  font-weight: 800;
  text-decoration: none;
}

.footer-legal a:hover {
  text-decoration: underline;
}

.form-legal-note {
  margin: 4px 0 18px;
  color: #64748b;
  font-size: .9rem;
}

.form-legal-note a {
  color: #111827;
  font-weight: 900;
}

.legal-main {
  background: #f5f7fb;
  min-height: 60vh;
  padding: 46px 0 72px;
}

.legal-hero {
  background: #ffffff;
  border: 1px solid #e6eaf1;
  border-radius: 24px;
  padding: clamp(24px, 4vw, 46px);
  box-shadow: 0 18px 50px rgba(17, 32, 66, .06);
  margin-bottom: 22px;
}

.legal-hero h1 {
  margin-bottom: 12px;
}

.legal-warning {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff7d6;
  border: 1px solid #f5d35d;
  color: #4a3a00;
}

.legal-card {
  background: #ffffff;
  border: 1px solid #e6eaf1;
  border-radius: 24px;
  padding: clamp(24px, 4vw, 46px);
  box-shadow: 0 18px 50px rgba(17, 32, 66, .05);
}

.legal-card h2 {
  margin-top: 30px;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
}

.legal-card h2:first-child {
  margin-top: 0;
}

.legal-card p,
.legal-card li {
  color: #334155;
}

.legal-card ul {
  padding-left: 22px;
}

.legal-placeholder {
  padding: 16px 18px;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  background: #f8fafc;
  margin: 12px 0 18px;
}

.legal-placeholder p {
  margin: 4px 0;
}

@media (max-width: 760px) {
  .footer-legal {
    flex-direction: column;
    gap: 8px;
  }
}


/* v20: rechtliche Betreiberangaben finalisiert */
.legal-card .legal-placeholder {
  border-style: solid;
}



/* v22: dynamische intelligente Website-Suche */
.smart-search-section {
  margin-top: -34px;
}

.smart-search {
  grid-template-columns: 1.8fr .8fr .9fr .8fr .9fr .7fr .85fr;
  align-items: end;
}

.smart-search .search-title {
  align-items: flex-start;
}

.smart-search .search-title p {
  margin: 6px 0 0;
  color: var(--muted);
  max-width: 780px;
}

.ai-search-badge {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  background: #111827;
  color: #fff;
  border-radius: 999px;
  padding: 9px 13px;
  font-weight: 900;
  font-size: .82rem;
}

.smart-query-label {
  grid-column: span 2;
}

.smart-query-wrap {
  position: relative;
}

.smart-query-wrap input[type="search"] {
  padding-right: 44px;
}

.smart-clear-btn {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: #e5e7eb;
  color: #111827;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.smart-refresh-btn {
  width: 100%;
  border-color: #d7dfeb;
}

.smart-suggestions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.smart-suggestions button {
  border: 1px solid var(--line);
  background: #f8fafc;
  color: #111827;
  border-radius: 999px;
  padding: 8px 11px;
  font-weight: 800;
  cursor: pointer;
}

.smart-suggestions button:hover {
  background: #fff7d6;
  border-color: #f5d35d;
}

.smart-search-results {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
}

.smart-search-summary {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #e6eaf1;
  border-radius: 14px;
  background: #f8fafc;
}

.smart-search-summary strong {
  white-space: nowrap;
}

.smart-search-summary span {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.45;
}

.site-result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.site-result-card {
  display: block;
  padding: 14px;
  border: 1px solid #e6eaf1;
  border-radius: 16px;
  background: #ffffff;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(17, 32, 66, 0.04);
}

.site-result-card:hover {
  border-color: #f5d35d;
  transform: translateY(-1px);
}

.site-result-card span {
  display: inline-flex;
  margin-bottom: 7px;
  color: #4c6385;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 900;
}

.site-result-card strong {
  display: block;
  margin-bottom: 6px;
  color: #111827;
}

.site-result-card p {
  margin: 0;
  color: #5b6678;
  font-size: .9rem;
}

.smart-no-offer-note {
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff7d6;
  border: 1px solid #f5d35d;
  color: #4a3a00;
  font-weight: 800;
}

.match-score {
  display: inline-flex;
  align-items: center;
  background: #eef6ff;
  border: 1px solid #cfe4ff;
  color: #165dff;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: .76rem;
  font-weight: 900;
}

mark {
  background: #fff1a8;
  color: inherit;
  padding: 0 .08em;
  border-radius: 3px;
}

@media (max-width: 1120px) {
  .smart-search {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .smart-query-label,
  .smart-search-results,
  .smart-suggestions,
  .smart-search .search-title {
    grid-column: 1 / -1;
  }
  .site-result-grid {
    grid-template-columns: 1fr;
  }
  .smart-refresh-btn {
    width: auto;
  }
}

@media (max-width: 680px) {
  .smart-search {
    grid-template-columns: 1fr;
  }
  .smart-query-label {
    grid-column: 1;
  }
  .smart-search-summary {
    align-items: flex-start;
    flex-direction: column;
  }
  .ai-search-badge {
    margin-top: 8px;
  }
}



/* v23: kundenfreundliche Suchansicht ohne interne Hinweise */
#smartSearchRefresh,
.smart-refresh-btn {
  display: none !important;
}

.smart-search-summary span {
  color: #5b6678;
}

.ai-search-badge {
  background: #111827;
}



/* v24: Hero-Kachel "Sichtbar auf Anfrage" entfernt */
.hero-grid.hero-grid-solo {
  grid-template-columns: 1fr;
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

.hero-grid.hero-grid-solo .lead {
  max-width: 820px;
}



/* v25: Scroll-Ziel bleibt sichtbar unter Navigation auf Desktop, iOS und Android */
html {
  scroll-padding-top: 128px;
}

section[id],
main[id],
footer[id],
.legal-main,
.admin-panel {
  scroll-margin-top: 128px;
}

.target-highlight {
  animation: targetHighlightPulse 1.8s ease-out;
}

@keyframes targetHighlightPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 196, 0, 0.55);
    outline: 0 solid rgba(245, 196, 0, 0.0);
  }
  22% {
    box-shadow: 0 0 0 8px rgba(245, 196, 0, 0.18);
    outline: 2px solid rgba(245, 196, 0, 0.55);
    border-radius: 18px;
  }
  100% {
    box-shadow: 0 0 0 0 rgba(245, 196, 0, 0.0);
    outline: 0 solid rgba(245, 196, 0, 0.0);
  }
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 112px;
  }

  section[id],
  main[id],
  footer[id],
  .legal-main,
  .admin-panel {
    scroll-margin-top: 112px;
  }
}



/* v27: mobile Layout + lokale Übersetzung ohne Google Redirect */
html {
  -webkit-text-size-adjust: 100%;
}

.language-box select {
  max-width: 100%;
}

[dir="rtl"] body {
  direction: rtl;
}

[dir="rtl"] .nav,
[dir="rtl"] .topbar-inner,
[dir="rtl"] .hero-actions,
[dir="rtl"] .listing-actions {
  direction: rtl;
}

@media (max-width: 900px) {
  .topbar {
    position: relative;
  }

  .topbar-inner {
    gap: 10px;
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-contact,
  .language-box {
    width: 100%;
    justify-content: center;
  }

  .language-box {
    padding: 8px 12px;
  }

  .language-box select {
    width: 100%;
    min-height: 42px;
    font-size: 1rem;
  }

  .site-header {
    position: sticky;
    top: 0;
  }

  .nav {
    min-height: auto;
    padding: 12px 0;
    gap: 12px;
    align-items: center;
  }

  .header-logo {
    max-width: min(260px, 76vw);
    height: auto;
  }

  .nav nav {
    width: 100%;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .nav nav a {
    flex: 0 0 auto;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    font-size: .92rem;
  }

  .hero {
    padding: 42px 0 34px;
  }

  .hero-grid,
  .hero-grid.hero-grid-solo {
    width: min(100%, calc(100% - 24px));
    max-width: 100%;
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .lead {
    font-size: 1rem;
  }

  .hero-actions .btn {
    width: 100%;
    text-align: center;
  }

  .smart-search-section {
    margin-top: 0;
  }

  .market-search,
  .smart-search {
    width: min(100%, calc(100% - 24px));
    grid-template-columns: 1fr !important;
    padding: 18px;
  }

  .smart-query-label,
  .smart-search-results,
  .smart-suggestions,
  .smart-search .search-title {
    grid-column: 1 / -1 !important;
  }

  .market-search label,
  .market-search button,
  .market-search .btn {
    width: 100%;
  }

  .smart-suggestions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .smart-suggestions button {
    width: 100%;
    text-align: center;
  }

  .cards,
  .listing-grid,
  .footer-grid,
  .grid-2,
  .grid-3,
  .grid-4,
  .admin-form .grid-4 {
    grid-template-columns: 1fr !important;
  }

  .listing-offer-card,
  .listing-offer-card-v18 {
    grid-template-columns: 1fr !important;
  }

  .listing-media-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .listing-image-button {
    min-height: 210px;
  }

  .listing-tile-thumbs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .spec-grid,
  .spec-grid-v18 {
    grid-template-columns: 1fr !important;
  }

  .request-form,
  .admin-panel,
  .legal-card,
  .legal-hero {
    width: min(100%, calc(100% - 24px));
    padding: 18px;
    border-radius: 18px;
  }

  input,
  select,
  textarea,
  button {
    font-size: 16px;
  }

  .offer-modal-dialog {
    width: calc(100vw - 12px);
    max-height: calc(100vh - 12px);
    margin: 6px auto;
    border-radius: 16px;
  }

  .offer-modal-layout {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .offer-modal-main-image {
    min-height: 230px;
  }

  .offer-modal-bottom,
  .listing-bottom {
    flex-direction: column;
    align-items: stretch;
  }

  .listing-actions {
    justify-content: stretch;
  }

  .listing-actions .btn {
    width: 100%;
    text-align: center;
  }

  .site-result-grid {
    grid-template-columns: 1fr;
  }

  .smart-search-summary {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(100% - 22px, 1120px);
  }

  .smart-suggestions {
    grid-template-columns: 1fr;
  }

  .listing-tile-thumbs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-legal {
    flex-direction: column;
  }
}



/* v28: V3-Hintergrundbild auf der Hauptseite, ohne Bildschirm-Überlauf */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: clamp(500px, 62vh, 760px);
  padding: clamp(64px, 7vw, 104px) 0 clamp(54px, 6vw, 86px);
  background:
    linear-gradient(90deg,
      rgba(255,255,255,0.94) 0%,
      rgba(245,249,255,0.88) 39%,
      rgba(232,242,255,0.54) 67%,
      rgba(226,240,255,0.24) 100%),
    url("hero-background-v3.webp") center right / cover no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 22% 30%, rgba(255,255,255,0.52), transparent 36%),
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(238,243,251,0.30));
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-grid.hero-grid-solo {
  max-width: 1160px;
  width: min(1160px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.hero-grid.hero-grid-solo > div:first-child {
  max-width: 735px;
}

.hero h1,
.hero .lead,
.hero .eyebrow {
  text-shadow: 0 1px 0 rgba(255,255,255,0.44);
}

@media (max-width: 1100px) {
  .hero {
    min-height: auto;
    background:
      linear-gradient(90deg,
        rgba(255,255,255,0.96) 0%,
        rgba(245,249,255,0.90) 52%,
        rgba(232,242,255,0.58) 100%),
      url("hero-background-v3.webp") 62% center / cover no-repeat;
  }

  .hero-grid.hero-grid-solo > div:first-child {
    max-width: 680px;
  }
}

@media (max-width: 760px) {
  .hero {
    min-height: auto;
    padding: 42px 0 36px;
    background:
      linear-gradient(180deg,
        rgba(255,255,255,0.97) 0%,
        rgba(245,249,255,0.93) 46%,
        rgba(232,242,255,0.76) 100%),
      url("hero-background-v3-mobile.webp") center top / cover no-repeat;
  }

  .hero::after {
    background:
      linear-gradient(180deg, rgba(255,255,255,0.28), rgba(238,243,251,0.64));
  }

  .hero-grid.hero-grid-solo {
    width: min(100% - 24px, 1160px);
    max-width: 100%;
  }

  .hero-grid.hero-grid-solo > div:first-child {
    max-width: 100%;
  }
}

@media (max-width: 420px) {
  .hero {
    padding: 34px 0 30px;
    background-position: center top;
  }

  .hero h1 {
    max-width: 100%;
    overflow-wrap: anywhere;
  }
}


/* v28: global overflow safety */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

img,
svg,
video,
canvas {
  max-width: 100%;
}



/* v29: finales Handy-Layout – zentriert, einspaltig, ohne zu breite Spalten */
@media (max-width: 820px) {
  *,
  *::before,
  *::after {
    min-width: 0;
  }

  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    text-align: left;
  }

  .container {
    width: min(100% - 22px, 1160px) !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .topbar-inner {
    width: min(100% - 22px, 1160px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    align-items: center !important;
    text-align: center;
  }

  .topbar-contact {
    width: 100%;
    justify-content: center !important;
    text-align: center;
    overflow-wrap: anywhere;
  }

  .language-box {
    width: 100% !important;
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
    justify-content: center !important;
  }

  .language-box select {
    width: 100% !important;
    max-width: 100% !important;
    text-align: center;
  }

  .site-header {
    width: 100%;
    overflow-x: hidden;
  }

  .nav {
    width: min(100% - 22px, 1160px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    align-items: center !important;
    text-align: center;
  }

  .logo-link,
  .brand {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .header-logo,
  .brand-logo,
  .footer-logo {
    max-width: min(280px, 84vw) !important;
    height: auto !important;
  }

  .nav nav {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
    overflow: visible !important;
    padding: 4px 0 0 !important;
    justify-content: center !important;
  }

  .nav nav a {
    width: 100%;
    min-height: 42px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: normal !important;
    line-height: 1.15;
    padding: 9px 7px !important;
    border-radius: 14px !important;
  }

  .hero {
    width: 100%;
    overflow: hidden;
    text-align: center;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .hero-grid,
  .hero-grid.hero-grid-solo {
    width: min(100% - 22px, 1160px) !important;
    max-width: 100% !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    justify-items: center;
    text-align: center;
  }

  .hero-grid.hero-grid-solo > div:first-child,
  .hero-grid > div {
    width: 100% !important;
    max-width: 760px !important;
    margin-left: auto;
    margin-right: auto;
  }

  .hero h1,
  .hero .lead,
  .hero .eyebrow {
    max-width: 100%;
    text-align: center;
  }

  .hero h1 {
    font-size: clamp(1.85rem, 9.2vw, 3rem) !important;
    overflow-wrap: anywhere;
  }

  .hero .lead {
    font-size: clamp(.98rem, 3.9vw, 1.08rem);
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    width: 100%;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
  }

  .hero-actions .btn,
  .btn {
    max-width: 100%;
    white-space: normal;
  }

  .section,
  .search-section,
  .smart-search-section,
  .offers-section {
    width: 100%;
    overflow-x: hidden;
  }

  .section-head,
  .split-head {
    text-align: center;
    align-items: center !important;
  }

  .section-head p,
  .split-head p {
    margin-left: auto;
    margin-right: auto;
  }

  .market-search,
  .smart-search,
  .request-form,
  .sell-box,
  .catalog-note,
  .card,
  .listing-offer-card,
  .listing-offer-card-v18,
  .legal-card,
  .legal-hero,
  .admin-panel {
    width: min(100% - 22px, 1160px) !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .market-search,
  .smart-search,
  .cards,
  .listing-grid,
  .grid-2,
  .grid-3,
  .grid-4,
  .footer-grid,
  .spec-grid,
  .spec-grid-v18,
  .admin-token-row,
  .admin-form .grid-4,
  .offer-modal-layout,
  .site-result-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .smart-query-label,
  .smart-search-results,
  .smart-suggestions,
  .smart-search .search-title {
    grid-column: 1 / -1 !important;
  }

  .market-search label,
  .smart-search label,
  .request-form label,
  .offer-form label,
  .admin-form label {
    width: 100%;
    max-width: 100%;
  }

  input,
  select,
  textarea,
  button {
    max-width: 100%;
  }

  input,
  select,
  textarea {
    width: 100%;
    font-size: 16px !important;
  }

  .smart-suggestions {
    justify-content: center;
    overflow: visible !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px;
  }

  .smart-suggestions button {
    width: 100%;
    white-space: normal;
    text-align: center;
  }

  .smart-search-summary {
    text-align: left;
    width: 100%;
  }

  .listing-grid {
    justify-items: center;
  }

  .listing-offer-card,
  .listing-offer-card-v18 {
    overflow: hidden;
  }

  .listing-content,
  .listing-media-panel {
    width: 100%;
    max-width: 100%;
  }

  .listing-image-button {
    width: 100%;
    height: clamp(180px, 56vw, 260px) !important;
  }

  .listing-tile-thumbs {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    width: 100%;
  }

  .listing-bottom,
  .offer-modal-bottom {
    width: 100%;
    align-items: stretch !important;
    flex-direction: column !important;
    gap: 12px;
  }

  .listing-actions {
    width: 100%;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    justify-content: stretch !important;
  }

  .listing-actions .btn,
  .listing-bottom .btn,
  .offer-modal-bottom .btn {
    width: 100%;
  }

  .sell-box {
    align-items: stretch !important;
    text-align: center;
  }

  .admin-image-tools {
    justify-content: center;
  }

  .admin-table-wrap,
  .admin-table-scroll,
  .table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .admin-table {
    min-width: 780px;
  }

  .offer-modal-dialog {
    width: calc(100vw - 14px) !important;
    max-width: calc(100vw - 14px) !important;
    margin: 7px auto !important;
    overflow-x: hidden;
  }

  .offer-modal-layout {
    padding: 16px !important;
  }

  .offer-modal-main-image {
    width: 100%;
    min-height: clamp(210px, 60vw, 320px) !important;
  }

  .offer-modal-thumbs {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  .footer-grid {
    text-align: center;
    justify-items: center;
  }

  .footer-legal {
    width: min(100% - 22px, 1160px);
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container,
  .topbar-inner,
  .nav,
  .hero-grid,
  .hero-grid.hero-grid-solo,
  .market-search,
  .smart-search,
  .request-form,
  .sell-box,
  .catalog-note,
  .card,
  .listing-offer-card,
  .listing-offer-card-v18,
  .legal-card,
  .legal-hero,
  .admin-panel {
    width: min(100% - 16px, 1160px) !important;
  }

  .nav nav {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .nav nav a {
    font-size: .88rem;
    min-height: 40px;
    padding: 8px 6px !important;
  }

  .hero {
    padding-top: 30px !important;
    padding-bottom: 28px !important;
  }

  .hero h1 {
    font-size: clamp(1.72rem, 10.5vw, 2.4rem) !important;
  }

  .smart-suggestions {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .listing-tile-thumbs,
  .offer-modal-thumbs {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .request-form,
  .market-search,
  .smart-search,
  .legal-card,
  .legal-hero,
  .admin-panel {
    padding: 16px !important;
  }
}



/* v30: Handy-Suche korrigiert – Suchfeld wird nicht mehr verdeckt */
.smart-query-wrap {
  position: relative;
  width: 100%;
}

.smart-query-wrap input[type="search"] {
  -webkit-appearance: none;
  appearance: none;
}

.smart-query-wrap input[type="search"]::-webkit-search-cancel-button,
.smart-query-wrap input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.smart-query-wrap input[type="search"]:placeholder-shown + .smart-clear-btn {
  display: none;
}

button.smart-clear-btn,
.market-search button.smart-clear-btn,
.smart-search button.smart-clear-btn {
  position: absolute !important;
  right: 10px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 32px !important;
  max-width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  font-size: 18px !important;
  z-index: 3 !important;
}

.smart-query-wrap input[type="search"]:placeholder-shown + button.smart-clear-btn {
  display: none !important;
}

@media (max-width: 820px) {
  .smart-search {
    overflow: hidden;
  }

  .smart-search .search-title {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    text-align: left !important;
  }

  .smart-search .search-title > div {
    width: 100% !important;
    max-width: 100% !important;
  }

  .smart-search .search-title h2 {
    width: 100% !important;
    max-width: 100% !important;
    font-size: clamp(1.7rem, 8vw, 2.35rem) !important;
    line-height: 1.12 !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    hyphens: auto;
  }

  .smart-search .search-title p {
    width: 100% !important;
    max-width: 100% !important;
    font-size: clamp(1rem, 4.4vw, 1.12rem) !important;
    line-height: 1.55 !important;
  }

  .smart-search .ai-search-badge {
    position: static !important;
    align-self: flex-start !important;
    width: auto !important;
    max-width: 100% !important;
    white-space: normal !important;
    margin: 0 0 2px 0 !important;
    padding: 8px 11px !important;
    font-size: .76rem !important;
    line-height: 1.15 !important;
  }

  .smart-query-wrap {
    width: 100% !important;
  }

  .smart-query-wrap input[type="search"] {
    width: 100% !important;
    padding-right: 50px !important;
  }

  .market-search .smart-query-wrap button.smart-clear-btn,
  .smart-search .smart-query-wrap button.smart-clear-btn {
    width: 32px !important;
    max-width: 32px !important;
    min-width: 32px !important;
  }
}

@media (max-width: 430px) {
  .smart-search .ai-search-badge {
    display: none !important;
  }

  .smart-search .search-title h2 {
    font-size: clamp(1.55rem, 8.6vw, 2.1rem) !important;
  }

  .smart-search .search-title p {
    font-size: 1rem !important;
  }
}
