/* =========================================================
   search-modern.css – Leichtes Redesign der Suchseite
   Version: 2.0 (Lightweight)
   Einbindung: NACH modern.css und customizations.css laden
   Kompatibel mit bestehendem HTML von atauktion.at
   Markenfarbe: #198754 (AtAuktion Grün)
   
   REGELN:
   - Keine transition auf transform (verursacht Layout-Thrashing)
   - Keine position-Änderungen auf Mobile (bricht Klick-Events)
   - Keine overflow:hidden auf Karten (blockiert Links)
   - Kein pointer-events Manipulation
   - Nur Desktop-spezifische Hover-Effekte (min-width: 992px)
   ========================================================= */

/* ---------------------------------------------------------
   1) SUCHSEITEN-LAYOUT
   --------------------------------------------------------- */

body.browse {
  background: #f5f7fa !important;
}

body.browse main.otherpage {
  padding-top: 1.5rem;
  padding-bottom: 3rem;
}

/* ---------------------------------------------------------
   2) SIDEBAR – Filter-Bereich (nur Desktop)
   --------------------------------------------------------- */

@media (min-width: 992px) {
  .listings-browse > .sidebar {
    position: sticky;
    top: 1rem;
    align-self: flex-start;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(25, 135, 84, 0.2) transparent;
  }

  .listings-browse > .sidebar .sidebar-content {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  }

  /* Headline "Angebote durchsuchen" */
  .listings-browse > .sidebar h1.h5 {
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    color: #0f172a;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem !important;
    line-height: 1.3;
  }

  /* Produktanzahl */
  .listings-browse > .sidebar .sidebar-content > .d-block {
    padding-bottom: 1rem;
    margin-bottom: 1rem !important;
    border-bottom: 1px solid #e5e7eb;
  }

  /* Sidebar-Search Navigation */
  .sidebar-search.sidebar-menu {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  /* Filter-Gruppen */
  .sidebar-search ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .sidebar-search .nav-item.nav-dropdown {
    margin-bottom: 0.25rem;
  }

  /* Filter-Titel */
  .sidebar-search .nav-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #0f172a;
    background: #f8f9fb;
    border-radius: 10px;
    text-decoration: none !important;
    cursor: pointer;
    border: 1px solid transparent;
  }

  .sidebar-search .nav-dropdown-toggle:hover {
    background: #f0fdf6;
    color: #198754;
    border-color: rgba(25, 135, 84, 0.1);
  }

  /* Filter-Inhalt */
  .sidebar-search .collapse.show,
  .sidebar-search .collapsing {
    padding: 0.5rem 0.25rem 0.25rem;
  }

  /* Suchfeld im Sidebar */
  .sidebar-search .form-control,
  .sidebar-search .form-select {
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    padding: 0.55rem 0.85rem;
    font-size: 0.85rem;
    background: #ffffff;
  }

  .sidebar-search .form-control:focus,
  .sidebar-search .form-select:focus {
    border-color: #198754;
    box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.12);
    outline: none;
  }

  /* Checkboxen */
  .sidebar-search .form-check {
    padding: 0.35rem 0 0.35rem 1.75rem;
    margin-bottom: 0;
    border-radius: 8px;
  }

  .sidebar-search .form-check:hover {
    background: #f0fdf6;
  }

  .sidebar-search .form-check-input {
    width: 1.1em;
    height: 1.1em;
    border: 2px solid #d1d5db;
    border-radius: 5px !important;
    cursor: pointer;
  }

  .sidebar-search .form-check-input:checked {
    background-color: #198754;
    border-color: #198754;
  }

  .sidebar-search .form-check-label {
    font-size: 0.85rem;
    color: #475569;
    cursor: pointer;
    padding-left: 0.15rem;
  }

  .sidebar-search .form-check:hover .form-check-label {
    color: #0f172a;
  }

  /* Preis-Felder */
  .sidebar-search .input-tiny {
    display: inline-block;
    width: 70px !important;
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
    border-radius: 8px;
  }

  /* Kategorie-Links */
  .sidebar-search .nav-item div > a:not(.btn) {
    display: block;
    padding: 0.4rem 0.65rem;
    font-size: 0.85rem;
    color: #475569;
    text-decoration: none;
    border-radius: 8px;
    line-height: 1.4;
  }

  .sidebar-search .nav-item div > a:not(.btn):hover {
    background: #f0fdf6;
    color: #198754;
  }

  /* Suche-Button */
  .sidebar-search input[name="submit_search"] {
    border-radius: 12px !important;
    font-weight: 700 !important;
    font-size: 0.9rem !important;
    padding: 0.7rem 1.25rem !important;
    background: #198754 !important;
    border-color: #198754 !important;
    color: #fff !important;
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }

  .sidebar-search input[name="submit_search"]:hover {
    background: #146c43 !important;
    border-color: #146c43 !important;
  }

  /* Scrollbar */
  .listings-browse > .sidebar::-webkit-scrollbar {
    width: 4px;
  }

  .listings-browse > .sidebar::-webkit-scrollbar-track {
    background: transparent;
  }

  .listings-browse > .sidebar::-webkit-scrollbar-thumb {
    background: rgba(25, 135, 84, 0.15);
    border-radius: 9999px;
  }
}

/* ---------------------------------------------------------
   3) HAUPT-INHALTSBEREICH (Desktop + Mobile)
   --------------------------------------------------------- */

.listings-browse > .main .main-content {
  background: transparent;
  padding: 0;
}

/* Zurück-Button */
.listings-browse .backbutton {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0.5rem 1rem !important;
  margin-bottom: 1rem;
  display: inline-flex;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.listings-browse .backbutton a {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* ---------------------------------------------------------
   4) FILTER-LEISTE (Sortieren, Results)
   --------------------------------------------------------- */

.listings-browse .filter-results {
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 14px !important;
  padding: 0.75rem 1.25rem !important;
  margin-bottom: 1.25rem !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Results Text */
.listings-browse .filter-results .col-12.col-lg {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
}

.listings-browse .filter-results .col-12.col-lg strong {
  color: #0f172a;
  font-weight: 700;
}

/* Sortieren-Button */
.listings-browse .btn-sort-by {
  border-radius: 10px !important;
  border: 1px solid #e5e7eb !important;
  background: #f8f9fb !important;
  color: #0f172a !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
  padding: 0.45rem 1rem !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
}

/* Sort Dropdown */
.sort-by-dropdown-menu {
  border-radius: 14px !important;
  border: 1px solid #e5e7eb !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
  padding: 0.5rem !important;
  min-width: 200px;
}

.sort-by-dropdown-menu .dropdown-header {
  font-size: 0.7rem !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8 !important;
  font-weight: 700;
  padding: 0.5rem 0.85rem 0.25rem;
}

.sort-by-dropdown-menu .dropdown-item {
  border-radius: 8px !important;
  font-size: 0.85rem !important;
  padding: 0.5rem 0.85rem !important;
}

.sort-by-dropdown-menu .dropdown-item:hover {
  background: #f0fdf6 !important;
  color: #198754 !important;
}

/* Mobile Filter-Button */
.btn-basic-search {
  border-radius: 10px !important;
  border: 1px solid #e5e7eb !important;
  background: #ffffff !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  padding: 0.45rem 1rem !important;
}

/* ---------------------------------------------------------
   5) PRODUKT-KARTEN – Nur Desktop Hover
   --------------------------------------------------------- */

@media (min-width: 992px) {
  .listings-cards .listing-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 16px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    position: relative;
  }

  .listings-cards .listing-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
    border-color: #d1d5db !important;
  }

  /* Bild-Container */
  .listing-card .card-img {
    position: relative;
    background: #f8f9fb;
    border-radius: 16px 16px 0 0;
  }

  .listing-card .card-img .card-img-top {
    border-radius: 16px 16px 0 0 !important;
  }

  /* LIVE Badge */
  .listing-card .au-live-badge {
    background: #ef4444 !important;
    color: #fff !important;
    font-weight: 700;
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  /* Watch Button */
  .listing-card .au-watch-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Card Body */
  .listing-card .card-body {
    padding: 0.85rem !important;
  }

  /* Titel */
  .listing-card .card-title {
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    color: #0f172a !important;
    margin-bottom: 0.4rem !important;
  }

  .listing-card .card-title a.headline {
    color: #0f172a !important;
    text-decoration: none !important;
  }

  .listing-card .card-title a.headline:hover {
    color: #198754 !important;
  }

  /* Zustand & Verkäufertyp Badges */
  .listing-card .second-line {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
  }

  .listing-card .item-condition {
    font-size: 0.7rem !important;
    font-weight: 600;
    color: #198754;
    background: #d1f5e0;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
  }

  .listing-card .user-account-type {
    font-size: 0.7rem !important;
    font-weight: 500;
    color: #64748b;
    background: #f1f5f9;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
  }

  /* Preis */
  .listing-card .au-price {
    font-size: 1.2rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    letter-spacing: -0.02em;
    line-height: 1.2;
  }

  /* Versandkosten */
  .listing-card .card-postage {
    font-size: 0.75rem !important;
    color: #94a3b8 !important;
    font-weight: 500;
    margin-top: 0.15rem;
  }

  /* Gebote */
  .listing-card .au-bids {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
  }
}

/* ---------------------------------------------------------
   6) COUNTDOWN / TIMER – NICHT dunkel, sondern dezent
   --------------------------------------------------------- */

.listing-card .au-countdown {
  font-size: 0.72rem !important;
  font-weight: 600;
  background: #f1f5f9 !important;
  color: #475569 !important;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid #e5e7eb;
}

/* ---------------------------------------------------------
   7) PAGINATION
   --------------------------------------------------------- */

.listings-browse .pagination {
  gap: 0.3rem;
  justify-content: center;
  margin-top: 2rem;
}

.listings-browse .page-link {
  border-radius: 10px !important;
  border: 1px solid #e5e7eb;
  color: #475569;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.5rem 0.85rem;
  min-width: 40px;
  text-align: center;
}

.listings-browse .page-link:hover {
  background: #f0fdf6;
  border-color: #198754;
  color: #198754;
}

.listings-browse .page-item.active .page-link {
  background: #198754 !important;
  border-color: #198754 !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(25, 135, 84, 0.3);
}

.listings-browse .page-item.disabled .page-link {
  background: #f8fafc;
  color: #cbd5e1;
  border-color: #e5e7eb;
}

/* ---------------------------------------------------------
   8) NO-RESULTS / LEERE SUCHE
   --------------------------------------------------------- */

.listings-browse .no-results,
.listings-browse .alert {
  background: #f0fdf6 !important;
  border: 1px solid rgba(25, 135, 84, 0.15) !important;
  border-radius: 14px !important;
  padding: 2rem !important;
  text-align: center;
  color: #475569 !important;
  font-size: 0.9rem;
}

/* ---------------------------------------------------------
   9) MOBILE – Nur minimale, sichere Anpassungen
   Keine position, overflow, oder display Änderungen!
   --------------------------------------------------------- */

@media (max-width: 991.98px) {
  /* Filter-Leiste etwas kompakter */
  .listings-browse .filter-results {
    border-radius: 10px !important;
    padding: 0.6rem 1rem !important;
    margin-bottom: 0.75rem !important;
  }

  /* Karten: nur leichte visuelle Verbesserungen */
  .listings-cards .listing-card {
    border-radius: 12px !important;
    border: 1px solid #e5e7eb !important;
    margin-bottom: 0.75rem;
  }

  /* Titel */
  .listing-card .card-title {
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    color: #0f172a !important;
    margin-bottom: 0.3rem !important;
  }

  .listing-card .card-title a.headline {
    color: #0f172a !important;
    text-decoration: none !important;
  }

  /* Badges */
  .listing-card .item-condition {
    font-size: 0.65rem !important;
    font-weight: 600;
    color: #198754;
    background: #d1f5e0;
    padding: 0.1rem 0.45rem;
    border-radius: 5px;
    text-transform: uppercase;
  }

  .listing-card .user-account-type {
    font-size: 0.65rem !important;
    font-weight: 500;
    color: #64748b;
    background: #f1f5f9;
    padding: 0.1rem 0.45rem;
    border-radius: 5px;
  }

  /* Preis */
  .listing-card .au-price {
    font-size: 1.1rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
  }

  .listing-card .card-postage {
    font-size: 0.7rem !important;
    color: #94a3b8 !important;
  }
}

@media (max-width: 575.98px) {
  .listings-browse .filter-results {
    padding: 0.5rem 0.75rem !important;
  }

  .listings-browse .btn-sort-by {
    font-size: 0.78rem !important;
    padding: 0.4rem 0.75rem !important;
  }

  .btn-basic-search {
    font-size: 0.78rem !important;
    padding: 0.4rem 0.75rem !important;
  }

  .listing-card .card-title {
    font-size: 0.78rem !important;
  }

  .listing-card .au-price {
    font-size: 1rem !important;
  }

  .listing-card .card-postage {
    font-size: 0.65rem !important;
  }
}
