/* =========================================================
   TAUSCHGARAGE – GLOBAL THEME (LUX: Beige + Gold + Dark)
   Datei: tauschgarage.css
   ========================================================= */

/* ---------- Design Tokens ---------- */
:root{
  --tg-bg: #F3EFE8;                 /* Lux Beige */
  --tg-ink: #1E1E1E;                /* Text dunkel */
  --tg-ink2:#3A3A3A;                /* Secondary Text */
  --tg-gold:#C8A24A;                /* Gold */
  --tg-card:#FFFFFF;                /* Card */
  --tg-line: rgba(30,30,30,.12);    /* Linie */
  --tg-shadow: 0 18px 40px rgba(0,0,0,.10);
  --tg-shadow-soft: 0 10px 24px rgba(0,0,0,.08);
  --tg-radius: 18px;
  --tg-max: 1160px;
}

/* ---------- Helpers ---------- */
.tg-bg{ background: var(--tg-bg); }
.tg-wrap{ padding: 44px 16px; }
.tg-container{ max-width: var(--tg-max); margin: 0 auto; }

/* ---------- Head / Title row ---------- */
.tg-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:16px;
  margin-bottom: 18px;
}
.tg-h2{
  margin:0;
  font-size: clamp(22px, 2.4vw, 30px);
  color: var(--tg-ink);
}
.tg-link{
  color: var(--tg-ink2);
  text-decoration:none;
  border-bottom:1px solid var(--tg-line);
  padding-bottom:2px;
}
.tg-link:hover{ color: var(--tg-ink); }

/* =========================================================
   SUCHBEREICH (Kernfix: sauber auf Desktop + Mobile)
   ========================================================= */

.tg-searchbar{
  background: rgba(255,255,255,.72);
  border: 1px solid var(--tg-line);
  border-radius: calc(var(--tg-radius) + 2px);
  box-shadow: var(--tg-shadow);
  padding: 18px;
  margin-bottom: 18px;
  backdrop-filter: blur(8px);
}

/* Wichtig: Diese Klasse muss am Wrapper sitzen:
   <div class="tauschgarage-search"> ... </div>
*/
.tauschgarage-search .tg-searchgrid{
  display: grid;
  grid-template-columns:
    2fr   /* Suche */
    1fr   /* Rubrik */
    1fr   /* Typ */
    1fr   /* Marke */
    1fr   /* Baujahr min */
    1fr   /* Baujahr max */
    auto  /* Suchen */
    auto; /* Reset */
  gap: 14px;
  align-items: center;
}

/* Inputs / Selects gleich hoch, gut sichtbar */
.tauschgarage-search .tg-input,
.tauschgarage-search .tg-select{
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(0,0,0,.18);
  border-radius: 14px;
  background: #fff;
  color: var(--tg-ink);
  outline: none;
  box-shadow: var(--tg-shadow-soft);
  font-size: 14px;
  line-height: 48px;
}

.tauschgarage-search .tg-input::placeholder{
  color: rgba(0,0,0,0.45);
}

/* Focus Gold */
.tauschgarage-search .tg-input:focus,
.tauschgarage-search .tg-select:focus{
  border-color: rgba(200,162,74,.95);
  box-shadow: 0 0 0 4px rgba(200,162,74,.18), var(--tg-shadow-soft);
}

/* Select-Pfeil sichtbar (einheitlich) */
.tauschgarage-search .tg-select{
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 42px;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(0,0,0,0.7) 50%),
    linear-gradient(135deg, rgba(0,0,0,0.7) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

/* Buttons */
.tauschgarage-search .tg-btn{
  height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid var(--tg-line);
  cursor:pointer;
  font-weight: 800;
  white-space: nowrap;
  line-height: 48px;
}

.tauschgarage-search .tg-btn-gold{
  background: var(--tg-gold);
  border-color: rgba(0,0,0,.05);
  color: #111;
}
.tauschgarage-search .tg-btn-gold:hover{ filter: brightness(1.03); }

.tauschgarage-search .tg-btn-ghost{
  background: #fff;
  color: var(--tg-ink2);
  border: 1px solid rgba(0,0,0,.15);
}
.tauschgarage-search .tg-btn-ghost:hover{ filter: brightness(1.02); }

/* Tablet: 3 Spalten */
@media (max-width: 1100px){
  .tauschgarage-search .tg-searchgrid{
    grid-template-columns: repeat(3, minmax(0,1fr));
  }
  .tauschgarage-search .tg-btn{
    width: 100%;
    justify-self: stretch;
  }
}

/* Mobile: 1 Spalte (alles untereinander, perfekt lesbar) */
@media (max-width: 650px){
  .tg-searchbar{ padding: 16px; }
  .tauschgarage-search .tg-searchgrid{
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .tauschgarage-search .tg-btn{
    width: 100%;
  }
}

/* =========================================================
   KARTEN / LISTE
   ========================================================= */

.tg-grid-cards{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 16px;
}
@media (max-width: 980px){
  .tg-grid-cards{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 620px){
  .tg-grid-cards{ grid-template-columns: 1fr; }
}

.tg-card{
  background: var(--tg-card);
  border: 1px solid var(--tg-line);
  border-radius: var(--tg-radius);
  box-shadow: var(--tg-shadow);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  min-height: 100%;
}

.tg-thumb{
  width:100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  display:block;
}

.tg-body{
  padding: 14px 14px 16px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.tg-title{
  margin:0;
  font-size: 18px;
  color: var(--tg-ink);
  line-height: 1.2;
}

.tg-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  color: var(--tg-ink2);
  font-size: 13px;
}

.tg-pill{
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--tg-line);
  background: rgba(243,239,232,.75);
}

.tg-excerpt{
  margin:0;
  color: var(--tg-ink2);
  font-size: 14px;
  line-height: 1.45;
}

.tg-actions{
  margin-top:auto;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}

.tg-open{
  text-decoration:none;
  font-weight:900;
  color:#111;
  background: var(--tg-gold);
  padding: 10px 12px;
  border-radius: 14px;
  display:inline-block;
}
.tg-open:hover{ filter: brightness(1.03); }

.tg-cta{
  display:flex;
  justify-content:center;
  padding: 16px 0;
}

/* Pager */
.tg-pager{
  margin-top: 16px;
  display:flex;
  justify-content:center;
  align-items:center;
  gap: 10px;
}
.tg-pagerinfo{
  font-weight:800;
  color: var(--tg-ink2);
}

/* =========================================================
   KONTAKTBLOCK / MESSAGE
   ========================================================= */

.tg-contact{
  margin-top: 24px;
  padding: 18px;
  background: rgba(255,255,255,.70);
  border: 1px solid var(--tg-line);
  border-radius: var(--tg-radius);
  box-shadow: var(--tg-shadow);
}

.tg-contact h3{ margin:0 0 10px; color: var(--tg-ink); }

.tg-msg{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top: 10px;
}

.tg-msg textarea{
  width:100%;
  min-height: 120px;
  padding: 12px 12px;
  border: 1px solid var(--tg-line);
  border-radius: 14px;
  background: #fff;
  color: var(--tg-ink);
  outline: none;
  box-shadow: var(--tg-shadow-soft);
}

.tg-msg textarea:focus{
  border-color: rgba(200,162,74,.95);
  box-shadow: 0 0 0 4px rgba(200,162,74,.18), var(--tg-shadow-soft);
}

.tg-msg-status{
  font-weight:800;
  color: var(--tg-ink2);
}

.tg-locked p{
  margin: 0 0 10px;
  color: var(--tg-ink2);
}

/* =========================================================
   OPTIONAL: NUR falls du den Elementor-Container so markierst:
   Advanced -> CSS Classes:  tauschgarage-search
   dann greift alles NUR dort.
   ========================================================= */