/* Händler: Box im Maschinen-Reader, Profilseite, Händler-Liste. */

/* ========================= Händler-Box im Maschinen-Reader ========================= */
.mm_haendler_box {
  margin: 18px 0;
  border: 1px solid #e2e6ee;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.mm_haendler_box_head {
  padding: 8px 14px;
  background: #2d3c62;
  color: #fff;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.mm_haendler_box_body { display: flex; gap: 16px; padding: 16px; align-items: flex-start; }
.mm_haendler_logo { flex: 0 0 auto; }
.mm_haendler_logo img { display: block; width: 150px; height: auto; max-height: 70px; object-fit: contain; }
.mm_haendler_info { flex: 1 1 auto; min-width: 0; }
.mm_haendler_name { display: inline-block; font-size: 18px; font-weight: 700; color: #2d3c62; text-decoration: none; }
.mm_haendler_name:hover { color: #e85d26; }
.mm_haendler_zeile { font-size: 14px; color: #5a6478; margin-top: 3px; }
.mm_haendler_zeile a { color: #5a6478; text-decoration: none; }
.mm_haendler_zeile a:hover { color: #2d3c62; }
.mm_haendler_kontakte { margin-top: 12px; padding-top: 12px; border-top: 1px solid #eef0f5; }
.mm_haendler_kontakte_head { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #99a1b3; margin-bottom: 6px; }
.mm_haendler_kontakt { margin-bottom: 8px; font-size: 14px; }
.mm_haendler_kontakt_name { font-weight: 600; color: #2d3c62; }
.mm_haendler_kontakt_pos { color: #99a1b3; }
.mm_haendler_kontakt_pos::before { content: " · "; }
.mm_haendler_kontakt_zeile { display: block; color: #1f6feb; text-decoration: none; font-size: 13px; }
.mm_haendler_kontakt_zeile:hover { text-decoration: underline; }
/* Die Kontaktkarte bleibt in beiden Themes weiß. Ohne diese Regel greift
   `html.mm-dark a { color: inherit }` aus files/css/style.css (höhere
   Spezifität) und E-Mail/Telefon werden weiß auf weiß – also unlesbar. */
html.mm-dark .mm_haendler_kontakt_zeile { color: #1f6feb; }
html.mm-dark .mm_haendler_kontakt_zeile:hover { color: #0d5bd1; }
.mm_haendler_more {
  display: inline-block;
  margin-top: 12px;
  padding: 9px 16px;
  background: #e85d26;
  color: #2d3c62;
  font-weight: 500;
  font-size: 14px;
  border-radius: 5px;
  text-decoration: none;
}
.mm_haendler_more:hover { background: #ffbe41; }

/* ========================= Händler-Profilseite ========================= */
.mm_haendler_profil { max-width: 1200px; margin: 0 auto; }
.mm_haendler_profil_head {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
  padding-bottom: 20px;
  border-bottom: 2px solid #eef0f5;
}
.mm_haendler_profil_logo img { display: block; width: 240px; max-width: 100%; height: auto; max-height: 110px; object-fit: contain; }
.mm_haendler_profil_name { margin: 0 0 6px; color: #2d3c62; font-size: 30px; }
.mm_haendler_profil_adresse { color: #5a6478; font-size: 16px; }
.mm_haendler_profil_kontaktzeile { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.mm_haendler_profil_kontaktzeile a { color: #1f6feb; text-decoration: none; font-size: 15px; }
.mm_haendler_profil_kontaktzeile a:hover { text-decoration: underline; }
.mm_haendler_profil_text { margin: 20px 0; color: #3a4257; font-size: 16px; line-height: 1.6; }

.mm_haendler_h2 { color: #2d3c62; font-size: 22px; margin: 28px 0 14px; }
.mm_haendler_anzahl {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 10px;
  background: #2d3c62;
  color: #fff;
  border-radius: 11px;
  font-size: 14px;
  vertical-align: middle;
}

/* Kopfzeile der Maschinen-Sektion: Titel links, „Filtern"-Button rechts.
   Der Button fuehrt zur KI-Filter-Seite mit diesem Haendler vorausgewaehlt. */
.mm_haendler_maschinen_head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
  margin: 28px 0 14px;
}
.mm_haendler_maschinen_head .mm_haendler_h2 { margin: 0; }
.mm_haendler_filter_btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid #e85d26;
  border-radius: 10px;
  background: #fff;
  color: #e85d26;
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .15s, color .15s, border-color .15s;
}
.mm_haendler_filter_btn:hover { background: #e85d26; color: #fff; }
.mm_haendler_filter_ico { width: 18px; height: 18px; flex: 0 0 auto; }
html.mm-dark .mm_haendler_filter_btn { background: transparent; color: #ff8b5e; border-color: #ff8b5e; }
html.mm-dark .mm_haendler_filter_btn:hover { background: #e85d26; border-color: #e85d26; color: #fff; }

.mm_haendler_kontakt_grid { display: flex; flex-wrap: wrap; gap: 16px; }
.mm_haendler_kontakt_card {
  flex: 1 1 240px;
  max-width: 320px;
  padding: 14px 16px;
  border: 1px solid #e2e6ee;
  border-radius: 8px;
  background: #fff;
}
.mm_haendler_kontakt_card .mm_haendler_kontakt_name { font-size: 16px; }
.mm_haendler_kontakt_card .mm_haendler_kontakt_pos { display: block; color: #99a1b3; font-size: 13px; margin-bottom: 6px; }
.mm_haendler_kontakt_card .mm_haendler_kontakt_pos::before { content: none; }
.mm_haendler_mobil_tag { color: #99a1b3; font-size: 11px; }

/* Ansprechpartner-Foto (Profilseite): runder Avatar links, Text rechts. */
.mm_haendler_kontakt_card { display: flex; gap: 14px; align-items: flex-start; }
.mm_haendler_kontakt_foto {
  flex: 0 0 auto; width: 72px; height: 72px;
  border-radius: 50%; object-fit: cover;
  background: #eef0f5; border: 1px solid #e2e6ee;
}
.mm_haendler_kontakt_body { flex: 1 1 auto; min-width: 0; }

/* „Weitere Maschinen anzeigen" (blockweises Nachladen im Profil) */
.mm_haendler_mehr_wrap { margin: 26px 0 8px; text-align: center; }
.mm_haendler_mehr {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  min-height: 46px; padding: 0 26px; border-radius: 8px;
  border: 1px solid #e85d26; background: #e85d26; color: #fff;
  font-family: inherit; font-size: 15px; font-weight: 500;
}
.mm_haendler_mehr:hover:not([disabled]) { background: #c04b1e; border-color: #c04b1e; }
.mm_haendler_mehr[disabled] { opacity: .65; cursor: default; }
.mm_haendler_mehr_stand { margin: 10px 0 0; font-size: 13px; color: #8b93a5; }
html.mm-dark .mm_haendler_mehr_stand { color: rgba(255,255,255,.45); }

/* Neutrales Personen-Symbol für Kontakte ohne Foto (Rollen-Kontakte der echten
   Händler). Gleiche Regel liegt in maschinen_markt_reader.css für den Reader –
   die beiden Ansichten teilen kein Stylesheet. */
.mm_avatar_icon { position: relative; display: block; color: #a9b1c1; }
.mm_avatar_icon::before {
  content: ''; position: absolute; inset: 0; background-color: currentColor;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-size: 56%; mask-size: 56%;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}
/* KEIN Dark-Override: die Kontaktkarte der Profilseite bleibt in beiden Themes
   weiß (.mm_haendler_kontakt_card background: #fff), ein heller Icon-Ton wäre
   auf dem hellgrauen Kreis nicht mehr lesbar. */

/* Ansprechpartner-Foto (Maschinen-Reader-Box): kleiner Avatar. */
.mm_haendler_kontakt.has_foto { display: flex; gap: 10px; align-items: center; }
.mm_haendler_kontakt_avatar {
  flex: 0 0 auto; width: 44px; height: 44px;
  border-radius: 50%; object-fit: cover;
  background: #eef0f5; border: 1px solid #e2e6ee;
}
.mm_haendler_kontakt.has_foto .mm_haendler_kontakt_body { min-width: 0; }
.mm_haendler_leer { color: #99a1b3; padding: 16px 0; }

/* Maschinen-Karten des Händlers: identisches Karten-Design wie Filter/Merkliste
   (zentral in maschinen_markt_card.css). Hier nur das Spalten-Grid — WICHTIG:
   align-items:stretch, damit die Karten je Reihe gleich hoch sind (der Footer
   klebt via margin-top:auto unten). Die frueheren Overrides fuers ALTE Karten-
   Markup (feste Bildhoehe, .preis_title, .list_deteils, background:#fff) wurden
   entfernt — sie passten nicht mehr zum neuen Markup und verzerrten die Hoehe. */
.mm_haendler_maschinen #maschinen_markt_liste { display: flex; flex-wrap: wrap; gap: 16px; align-items: stretch; }
.mm_haendler_maschinen .maschinen_markt_liste_element {
  float: none !important;
  width: calc(33.333% - 11px) !important;
  margin: 0 !important;
  box-sizing: border-box;
}
.mm_haendler_maschinen .maschinen_markt_trennlinie { display: none !important; }

/* ========================= Händler-Liste (Übersicht) ========================= */
.mm_haendler_liste_wrap { max-width: 1200px; margin: 0 auto; }

/* Toolbar: Live-Suche + Sortierung + Trefferzähler. */
.mm_haendler_toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  margin: 0 0 18px;
}
.mm_haendler_searchwrap { position: relative; flex: 1 1 260px; min-width: 200px; }
.mm_haendler_search_ico {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: #99a1b3; pointer-events: none;
}
.mm_haendler_search {
  width: 100%; box-sizing: border-box;
  padding: 10px 14px 10px 38px;
  border: 1px solid #d7dbe6; border-radius: 24px;
  font-size: 15px; color: #2d3c62; background: #fff;
}
.mm_haendler_search:focus { outline: none; border-color: #e85d26; box-shadow: 0 0 0 3px rgba(232, 93, 38,.15); }
.mm_haendler_sortwrap { display: inline-flex; align-items: center; gap: 8px; }
.mm_haendler_sortlbl { font-size: 13px; color: #99a1b3; }
.mm_haendler_sort {
  padding: 9px 12px; border: 1px solid #d7dbe6; border-radius: 8px;
  font-size: 14px; color: #2d3c62; background: #fff; cursor: pointer;
}
.mm_haendler_sort:focus { outline: none; border-color: #e85d26; }
.mm_haendler_count { margin-left: auto; font-size: 14px; color: #5a6478; white-space: nowrap; }
.mm_haendler_noresult { text-align: center; color: #99a1b3; padding: 32px 0; }
.mm_haendler_noresult[hidden] { display: none; }

@media (max-width: 560px) {
  .mm_haendler_count { margin-left: 0; }
}

.mm_haendler_liste {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  max-width: 1200px;
  margin: 0 auto;
}
.mm_haendler_card {
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e6ee;
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
  overflow: hidden;
  transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease;
}
.mm_haendler_card:hover { box-shadow: 0 6px 18px rgba(45,60,98,.12); border-color: #e85d26; transform: translateY(-2px); }
.mm_haendler_card_logo {
  display: flex; align-items: center; justify-content: center;
  height: 120px; padding: 16px; background: #f7f8fa; border-bottom: 1px solid #eef0f5;
}
.mm_haendler_card_logo img { max-width: 100%; max-height: 88px; object-fit: contain; }
.mm_haendler_card_mono {
  width: 64px; height: 64px; border-radius: 14px; background: #2d3c62; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700;
}
.mm_haendler_card_body { padding: 14px 16px; }
.mm_haendler_card_name { font-size: 17px; font-weight: 700; color: #2d3c62; }
.mm_haendler_card_ort { font-size: 14px; color: #5a6478; margin-top: 3px; }
.mm_haendler_card_count { font-size: 13px; color: #e85d26; font-weight: 600; margin-top: 8px; }

@media (max-width: 900px) {
  .mm_haendler_maschinen .maschinen_markt_liste_element { width: calc(50% - 8px) !important; }
}
@media (max-width: 600px) {
  .mm_haendler_maschinen .maschinen_markt_liste_element { width: 100% !important; }
  .mm_haendler_box_body { flex-direction: column; }
}
