/* =============================================
   DISCOUNTER — Main Stylesheet
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap');

:root {
  --accent: #e8350a;
  --accent-light: #fff0ec;
  --accent-hover: #c42c07;
  --bg: #f5f4f1;
  --surface: #ffffff;
  --surface2: #f9f8f6;
  --border: rgba(0,0,0,0.08);
  --border-strong: rgba(0,0,0,0.14);
  --text: #1a1a18;
  --text2: #6b6b67;
  --text3: #a0a09c;
  --radius: 8px;
  --radius-lg: 12px;
  --sidebar-w: 340px;
  --panel-w: 450px;
  --nav-h: 52px;
  --font: 'DM Sans', sans-serif;
  --font-mono: 'DM Mono', monospace;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }

/* =============================================
   NAV
   ============================================= */

nav {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--nav-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 14px;
}

nav img.logo {
  height: 26px;
  width: auto;
}

#confirmBox {
  display: none;
}

nav .nav-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

nav .nav-spacer { flex: 1; }

nav a {
  font-size: 13px;
  font-weight: 400;
  color: var(--text2);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: background 0.15s, color 0.15s;
}

.loginlink {
    background: #e8350a;
    color: #fff !important;
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
}

.loginlink:hover {
  background: #c42d08;
}

nav a:hover {
  background: var(--surface2);
  color: var(--text);
}

nav a.active, .activelogout {
  color: var(--accent);
  background: var(--accent-light);
}

.savebtn:hover, .sharebtn:hover {
  cursor: pointer;
}
/* =============================================
   LAYOUT
   ============================================= */

.container {
  display: flex;
  height: calc(100vh - var(--nav-h));
  overflow: hidden;
}

/* =============================================
   SIDEBAR
   ============================================= */

#sidebar {
  width: var(--sidebar-w);
  min-width: 200px;
  max-width: 400px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
}

/* ---- FILTERS ---- */

#filters {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: -4px;
}

#filters label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text2);
}

#filters input[type="text"],
#filters input[type="number"] ,
#filters input[type="email"] {
  width: 100%;
  padding: 8px 10px;
  font-size: 13px;
  font-family: var(--font);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface2);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

#filters input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232,53,10,0.1);
  background: var(--surface);
}

#filters input::placeholder { color: var(--text3); }

/* Price range row */
.price-row {
  display: flex;
  gap: 8px;
}
.price-row label { flex: 1; }

/* Search Button */
#filters button,
button.compact {
  width: 100%;
  padding: 9px 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  letter-spacing: 0.01em;
}

#filters button:hover,
button.compact:hover { background: var(--accent-hover); }
#filters button:active,
button.compact:active { transform: scale(0.98); }

/* Mode toggle */
.mode-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
}

.toggle-label {
  font-size: 12px;
  color: var(--text2);
  flex: 1;
}

.toggle-label:last-child { text-align: right; }

.switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  inset: 0;
  background: var(--border-strong);
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s;
}

.slider::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

input:checked + .slider { background: var(--accent); }
input:checked + .slider::before { transform: translateX(16px); }

/* Stats */
#sidebar .stats,
#filters > span:last-of-type:not(#angebotcount) {
  font-size: 12px;
  color: var(--text3);
  text-align: center;
}

#storecount, #angebotcount {
  font-weight: 600;
  color: var(--text);
  font-family: var(--font-mono);
}

/* Save icon */
.oneemimg {
  width: 25px;
  height: 25px;
  cursor: pointer;
  transition: opacity 0.15s;
  display: block;
  margin: 0 auto;
}
a .oneemimg {
  background-color: #000;
  padding: 5px;
  border-radius: 50%;
}
.oneemimg:hover { opacity: 0.5; }

.input-euro {
    position: relative;
 }
 .input-euro.right input {
     padding-right:18px;
     text-align:end; 
 }

 .input-euro:before {
     position: absolute;
     top: 6px;
     content:"€";
 }
 .input-euro.right:before {
     right: 113px;
 }

/* Edit search links */
#filters a {
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
}
#filters a:hover { text-decoration: underline; }

hr {
  border: none;
  border-top: 1px solid var(--border);
}

/* ---- STORE LIST ---- */

#storeList {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.store-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.12s, border-color 0.12s;
  text-decoration: none;
  color: inherit;
}

.store-item:hover { background: var(--surface2); }

.store-item.active {
  background: var(--accent-light);
  border-color: rgba(232,53,10,0.15);
}

.store-logo {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  object-fit: contain;
  background: var(--surface2);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.store-info { flex: 1; min-width: 0; }

.store-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.store-meta {
  font-size: 11px;
  color: var(--text3);
  margin-top: 1px;
}

.store-count {
  font-size: 11px;
  font-weight: 500;
  font-family: var(--font-mono);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 8px;
  color: var(--text2);
  flex-shrink: 0;
}

.store-item.active .store-count {
  background: var(--accent-light);
  border-color: rgba(232,53,10,0.2);
  color: var(--accent);
}

/* =============================================
   RESIZER
   ============================================= */

.resizer {
  width: 5px;
  background: transparent;
  cursor: col-resize;
  flex-shrink: 0;
  transition: background 0.15s;
  position: relative;
}

.resizer::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 1px;
  background: var(--border);
  transition: background 0.15s, width 0.15s;
}

.resizer:hover::after {
  width: 2px;
  background: var(--accent);
}

/* =============================================
   MAP
   ============================================= */

#mapwrapper {
  flex: 1;
  position: relative;
  min-width: 200px;
  overflow: hidden;
}

#map {
  width: 100%;
  height: 100%;
}

/* Grayscale map tiles, colored markers */
.leaflet-tile-pane { filter: grayscale(100%) contrast(0.9); }

/* Leaflet UI cleanup */
.leaflet-control-zoom {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  overflow: hidden;
  box-shadow: var(--shadow) !important;
}

.leaflet-control-zoom a {
  background: var(--surface) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
  font-family: var(--font) !important;
  width: 28px !important;
  height: 28px !important;
  line-height: 28px !important;
  font-size: 16px !important;
}

.leaflet-control-zoom a:hover { background: var(--surface2) !important; }

.leaflet-control-attribution {
  font-size: 10px !important;
  color: var(--text3) !important;
  background: rgba(255,255,255,0.85) !important;
  backdrop-filter: blur(4px);
}

/* Cluster markers */
.marker-cluster {
  background: rgba(232,53,10,0.15) !important;
  border: 2px solid var(--accent) !important;
}
.marker-cluster div {
  background: var(--accent) !important;
  color: #fff !important;
  font-family: var(--font) !important;
  font-weight: 600 !important;
  font-size: 12px !important;
  width: 28px !important;
  height: 28px !important;
  margin-left: 4px !important;
  margin-top: 4px !important;
  border-radius: 50% !important;
  line-height: 28px !important;
}

/* Product popup on map */
#productDetailsPopup {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  font-size: 13px;
  max-width: 300px;
  min-width: 200px;
  box-shadow: var(--shadow);
  display: none;
  z-index: 1000;
}

/* =============================================
   PRODUCT PANEL
   ============================================= */

#productInfo {
  width: var(--panel-w);
  min-width: 200px;
  max-width: 480px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
}

#productInfo h2 {
  font-size: 13px;
  font-weight: 600;
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  letter-spacing: -0.01em;
}

#storename {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
}

#productList {
  overflow-y: auto;
  flex: 1;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.product-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.12s, border-color 0.12s;
}

.product-item:hover { background: var(--surface2); }

.product-item.active {
  background: var(--accent-light);
  border-color: rgba(232,53,10,0.15);
}

.product-img {
  width: 42px;
  height: 42px;
  border-radius: 7px;
  object-fit: contain;
  background: var(--surface2);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.product-text { flex: 1; min-width: 0; }

.product-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-sub {
  font-size: 11px;
  color: var(--text3);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-price {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.product-uvp {
  font-size: 11px;
  color: var(--text3);
  text-decoration: line-through;
  font-family: var(--font-mono);
  text-align: right;
  margin-top: 1px;
}

/* Product detail pane */
#productDetails {
  border-top: 1px solid var(--border);
  padding: 16px;
  font-size: 13px;
  color: var(--text2);
  min-height: 80px;
}

#productDetails .detail-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

#productDetails .detail-price {
  font-size: 22px;
  font-weight: 600;
  color: var(--accent);
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
  margin: 8px 0 4px;
}

#productDetails .detail-sub {
  font-size: 12px;
  color: var(--text3);
}

#productDetails .detail-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: var(--radius);
  background: var(--surface2);
  border: 1px solid var(--border);
  float: right;
  margin-left: 12px;
}

/* =============================================
   GENERIC UTILITY
   ============================================= */

.badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--surface2);
  color: var(--text2);
  border: 1px solid var(--border);
}

.badge.accent {
  background: var(--accent-light);
  color: var(--accent);
  border-color: rgba(232,53,10,0.2);
}

/* =============================================
   LOGIN PAGE
   ============================================= */

.login-wrapper {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--bg);
}

.login-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow);
}

.login-form h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.login-form p {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.5;
  margin-top: -6px;
}

.input-group {
  position: relative;
  display: flex;
  flex-direction: column;
}

.input-group input {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  font-family: var(--font);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface2);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.input-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232,53,10,0.1);
  background: var(--surface);
}

.input-group input::placeholder { color: var(--text3); }

.suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 50;
  overflow: hidden;
}

.suggestions:empty { display: none; }

.suggestion-item {
  padding: 9px 12px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  transition: background 0.1s;
}

.suggestion-item:hover { background: var(--surface2); }

.suggestion-item + .suggestion-item {
  border-top: 1px solid var(--border);
}

.login-form button[type="submit"] {
  width: 100%;
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  letter-spacing: 0.01em;
}
.store-marker {
    width: 100% !important;
    height: 100% !important;
    height: auto;
    display: block;
}
.login-form button[type="submit"]:hover { background: var(--accent-hover); }
.login-form button[type="submit"]:active { transform: scale(0.98); }

@media (max-width: 480px) {
  .login-form { padding: 24px 20px; }
}

/* =============================================
   TAB BAR (mobile only)
   ============================================= */

.tab-bar {
  display: none;
}
.nav-mobile, #mobileMenu { display: none; }

/* =============================================
   MOBILE
   ============================================= */

@media (max-width: 768px) {
  :root {
    --nav-h: 48px;
    --tab-bar-h: 56px;
  }

  nav {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0 14px;
    gap: 10px;
    z-index: 300;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .nav-desktop { display: none; }

  .nav-mobile {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 200;
    height: var(--nav-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
  }

  .hamburger {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text);
    padding: 6px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
  }

  .hamburger:hover { background: var(--surface2); }

  .mobile-menu {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    z-index: 199;
    flex-direction: column;
    padding: 8px;
    gap: 2px;
  }

  .mobile-menu.open { display: flex; }

  .mobile-menu a {
    padding: 10px 12px;
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--text);
    text-decoration: none;
  }

  .mobile-menu a:hover { background: var(--surface2); }

  .tab-bar button {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: none;
    background: transparent;
    color: var(--text3);
    font-family: var(--font);
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s;
    padding: 6px 0;
    border-radius: 0;
    width: auto;
    letter-spacing: 0.02em;
  }

  .tab-bar button svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
  }

  .tab-bar button.active {
    color: var(--accent);
  }

  .tab-bar button.active svg {
    stroke: var(--accent);
  }

  .tab-bar {
    display: flex;
    position: fixed;      /* ← war wahrscheinlich nicht gesetzt oder falsch */
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--tab-bar-h);
    background: var(--surface);
    border-top: 1px solid var(--border);
    z-index: 300;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .container {
    height: calc(100vh - var(--nav-h) - var(--tab-bar-h));
    overflow: hidden;
  }


  /* All panels fill 100% and stack, only active is visible */
  #sidebar,
  #mapwrapper,
  #productInfo {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 100%;
    border: none !important;
    flex-shrink: 0;
    display: none;
  }

  #sidebar.tab-active,
  #mapwrapper.tab-active,
  #productInfo.tab-active {
    display: flex;
  }

  #mapwrapper.tab-active {
    display: block;
  }

  .resizer { display: none; }

  /* Sidebar adjustments */
  #sidebar {
    flex-direction: column;
    overflow: hidden;
  }

  #storeList {
    flex: 1;
    max-height: none;
  }

  /* Product panel adjustments */
  #productInfo {
    flex-direction: column;
  }

  #productList {
    flex: 1;
  }

  #productDetails {
    border-top: 1px solid var(--border);
  }

  /* Price row stacks on very small screens */
  .price-row { flex-direction: column; gap: 6px; }
}


/* =============================================
   ADMIN PAGE
   ============================================= */

fieldset {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin: 24px !important;
  background: var(--surface);
}

.requeststorewrapper {
  padding: 20px 24px;
}

legend {
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0 8px;
}

fieldset label, .requeststorewrapper label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text2);
}

fieldset input[type="text"],
fieldset input[type="number"],
.requeststorewrapper input[type="text"],
.requeststorewrapper input[type="number"] {
  width: 100%;
  max-width: 360px;
  padding: 8px 10px;
  font-size: 13px;
  font-family: var(--font);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface2);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

fieldset input:focus, .requeststorewrapper input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232,53,10,0.1);
  background: var(--surface);
}

fieldset select, .requeststorewrapper select {
  padding: 8px 10px;
  font-size: 13px;
  font-family: var(--font);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface2);
  color: var(--text);
  outline: none;
  min-width: 180px;
  cursor: pointer;
}

fieldset select:focus, .requeststorewrapper select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232,53,10,0.1);
}

fieldset button[type="button"], .requeststorewrapper button[type="select"] {
  padding: 7px 14px;
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.15s;
  width: auto;
}

fieldset button[type="button"]:hover, .requeststorewrapper button[type="button"] {
  background: var(--border);
}

fieldset button[type="submit"], .requeststorewrapper button[type="submit"] {
  padding: 9px 20px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  width: auto;
  margin-top: 8px;
}

fieldset button[type="submit"]:hover, .requeststorewrapper button[type="submit"]:hover { background: var(--accent-hover); }
fieldset button[type="submit"]:active, .requeststorewrapper button[type="submit"]:active { transform: scale(0.98); }

/* Stats / DB info */
.admin-stats {
  margin: 16px 24px;
  font-size: 13px;
  color: var(--text2);
}

.admin-stats h2 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.admin-stats ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-stats ul li {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 12px;
  font-size: 12px;
  font-family: var(--font-mono);
}

#storeTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

#storeTable th {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 2px solid var(--border-strong);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text3);
}

#storeTable td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    vertical-align: middle;
}

#storeTable tr:hover td {
    background: var(--surface2);
}

#storeTable button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius);
    font-size: 15px;
    transition: background 0.15s;
    width: auto;
}

#storeTable button:hover { background: var(--surface2); }
#storeTable a { text-decoration: none; font-size: 15px; padding: 4px; border-radius: var(--radius); }
#storeTable a:hover { background: var(--surface2); }

.side.left {
  position: relative;
}

#closeangebotedetails {
  position: absolute;
  top: 0;
  right: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
  color: var(--text2);
  transition: background 0.15s, color 0.15s;
  z-index: 10;
}
.share-btn {
    flex: 1;
    text-align: center;
    text-decoration: none;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border-strong);
}

.share-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}
#closeangebotedetails:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.store-item.selected, .store-item.selected .store-info .store-name {
  background: var(--accent, #e8f0fe);
  color: #fff;
}
.marker-selected img.store-marker {
    outline: 3px solid var(--primary, #4a6cf7);
    outline-offset: 2px;
    border-radius: 4px;
    filter: drop-shadow(0 0 4px rgba(74, 108, 247, 0.8));
}
#productList table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

/* Spaltenbreiten via nth-child */
#productList table td:nth-child(1) { width: 5%; }
#productList table td:nth-child(2) { width: 45%; }
#productList table td:nth-child(3) { width: 20%; }
#productList table td:nth-child(4) { width: 10%; }
#productList table td:nth-child(5) { width: 10%; }
#productList table td:nth-child(6) { width: 10%; }

.saveangebot {
  height: 2.5em;
  padding: 5px;
  border-radius: 50%;
  background-color: inherit;
}
.saveangebot:hover, .saveangebot.selected {
  filter: invert(1);
  transition: filter 0.2s;
}
#productList table td {
  padding: 8px 0px;
  font-size: 13px;
  color: var(--text);
  vertical-align: middle;
  overflow: hidden;
  /* kein white-space: nowrap, kein overflow: hidden */
  word-wrap: break-word; /* langer Text bricht um statt rauszulaufen */
}

#productList table td:nth-child(4) {
  font-weight: 600;
  color: var(--accent);
  font-family: var(--font-mono);
  white-space: nowrap;
}

#productList table td:nth-child(5),
#productList table td:nth-child(6) {
  font-size: 11px;
  color: var(--text3);
  white-space: nowrap;
}

#productList table tr:hover td {
  background: var(--surface2);
}

#productList table tr.active td {
  background: var(--accent-light);
}
.redtr, .redtr td {
  color: red !important;
}
.price-range-wrap { padding: 0.5rem 0; }

.histogram {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 48px;
  margin-bottom: 8px;
}

.histogram-bar {
  flex: 1;
  border-radius: 2px 2px 0 0;
  transition: background 0.15s;
  min-width: 4px;
  background: var(--border-strong);
}

.histogram-bar.active { background: var(--accent); }

.slider-track-wrap {
  position: relative;
  height: 20px;
  margin: 0 0 12px;
}

.slider-track {
  position: absolute;
  top: 8px; left: 0; right: 0;
  height: 4px;
  border-radius: 2px;
  background: var(--border-strong);
  pointer-events: none;
}

.slider-range {
  position: absolute;
  top: 8px;
  height: 4px;
  background: var(--accent);
  pointer-events: none;
}

.slider-track-wrap input[type=range] {
  position: absolute;
  width: 100%; top: 0; margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  pointer-events: none;
}

.slider-track-wrap input[type=range]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
  cursor: pointer;
  pointer-events: all;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.slider-track-wrap input[type=range]::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
  cursor: pointer;
  pointer-events: all;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.price-boxes {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.price-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 8px;
}

.price-box label {
  font-size: 11px;
  color: var(--text3);
  font-weight: 500;
}

.price-box span {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  font-family: var(--font-mono);
}
.slider-track-wrap input[type=range] {
    outline: none;
}

.slider-track-wrap input[type=range]:focus {
    outline: none;
}

.slider-track-wrap input[type=range]:focus-visible {
    outline: none;
}

.price-box input[type="date"] {
    width: 100%;
    padding: 6px 8px;
    font-size: 13px;
    font-family: var(--font);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface2);
    color: var(--text);
    outline: none;
    cursor: pointer;
}

.price-box input[type="date"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(232,53,10,0.1);
    background: var(--surface);
}

.page { padding: 32px 24px; max-width: 960px; margin: 0 auto; }
.page-title { font-size: 18px; font-weight: 600; margin-bottom: 24px; }
.page-title span { color: var(--text3); font-weight: 400; font-family: var(--font-mono); font-size: 14px; margin-left: 8px; }
.layout { display: flex; gap: 16px; align-items: flex-start; }
.sidebar-col { flex: 0 0 200px; }
.main-col { flex: 1; min-width: 0; }
.sidebar-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--accent-light); border: 2px solid rgba(232,53,10,0.15); display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 600; color: var(--accent); }
.nav-link { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius); font-size: 13px; color: var(--text2); text-decoration: none; cursor: pointer; background: none; border: none; width: 100%; font-family: var(--font); }
.nav-link:hover { background: var(--surface2); color: var(--text); }
.nav-link.active { background: var(--accent-light); color: var(--accent); }
.main-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.card-header { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card-title { font-size: 13px; font-weight: 600; }
#savedsearches { width: 100%; border-collapse: collapse; table-layout: fixed; }
#savedsearches th { padding: 8px 12px; text-align: left; font-size: 10px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text3); border-bottom: 1px solid var(--border); background: var(--surface2); }
#savedsearches td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid var(--border); vertical-align: middle; }
#savedsearches tr:last-child td { border-bottom: none; padding-right: 16px; }
#savedsearches tr:hover td { background: var(--surface2); }
.action-btn { width: 28px; height: 28px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--text2); font-size: 13px; text-decoration: none; }
.action-btn.danger:hover { background: var(--accent-light); border-color: rgba(232,53,10,0.3); color: var(--accent); }

@media (max-width: 600px) {
    #promoBanner span { display: none; }
}

#savedAngeboteTable {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

#savedAngeboteTable th {
    padding: 8px 12px;
    text-align: left;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text3);
    border-bottom: 1px solid var(--border);
    background: var(--surface2);
}

#savedAngeboteTable td {
    padding: 10px 12px;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.brand-filter-wrap { position: relative; }
.brand-filter-toggle {
    width: 100%;
    background: var(--surface2) !important;
    border: 1px solid var(--border-strong) !important;
    border-radius: var(--radius);
    padding: 8px 10px;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    color: var(--text) !important;
}
#brandFilterDropdown {
    background: var(--surface2);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    margin-top: 4px;
    /*max-height: 200px;*/
    overflow-y: auto;
    padding: 6px 0;
}
.brand-filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
}
.brand-filter-item:hover { background: var(--surface2); }
.brand-filter-item img { width: 20px; height: 20px; object-fit: contain; }

#savedAngeboteTable tr:last-child td { border-bottom: none; }
#savedAngeboteTable tr:hover td { background: var(--surface2); }

#savedAngeboteTable td:nth-child(3) {
    font-weight: 600;
    color: var(--accent);
    font-family: var(--font-mono);
    white-space: nowrap;
}

#savedAngeboteTable td:nth-child(4) {
    font-size: 12px;
    white-space: nowrap;
}

.muted { color: var(--text3); font-style: italic; }