
:root{
  --yellow: #FBB900;
  --dark:#111;
  --muted:#666;
  --bg-gray: #f2f4f5;
  --radius:12px;
  --container:1150px;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}
*{box-sizing:border-box}

body { margin: 0; color: var(--dark); background: var(--bg-gray); overflow-x: hidden; grid-template-rows: auto 1fr auto; min-height: 100vh; }

.km-admin-notice-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(13, 17, 20, .68);
  backdrop-filter: blur(8px);
  animation: kmNoticeFade .18s ease-out;
}
.km-admin-notice {
  position: relative;
  width: min(520px, 100%);
  overflow: hidden;
  padding: 30px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 20px;
  background: #fff;
  color: #1f2933;
  box-shadow: 0 28px 80px rgba(0,0,0,.32);
  animation: kmNoticePop .22s ease-out;
}
.km-admin-notice-accent {
  position: absolute;
  inset: 0 0 auto;
  height: 7px;
  background: #FBB900;
}
.km-admin-notice-important .km-admin-notice-accent { background: #e04b3f; }
.km-admin-notice-success .km-admin-notice-accent { background: #198754; }
.km-admin-notice-eyebrow {
  margin-bottom: 10px;
  color: #8a6a00;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .14em;
}
.km-admin-notice h2 {
  margin: 0;
  color: inherit;
  font-size: clamp(22px, 4vw, 30px);
  line-height: 1.15;
}
.km-admin-notice-content {
  margin: 16px 0 0;
  color: #59656e;
  font-size: 15px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.km-admin-notice-content p { margin: 0 0 12px; white-space: pre-wrap; }
.km-admin-notice-content p:last-child { margin-bottom: 0; }
.km-admin-notice-content h2,
.km-admin-notice-content h3 { margin: 16px 0 8px; color: inherit; line-height: 1.25; }
.km-admin-notice-content h2 { font-size: 21px; }
.km-admin-notice-content h3 { font-size: 18px; }
.km-admin-notice-content ul,
.km-admin-notice-content ol { margin: 10px 0; padding-left: 24px; }
.km-admin-notice-content blockquote { margin: 14px 0; padding: 10px 13px; border-left: 4px solid #FBB900; background: rgba(251,185,0,.1); border-radius: 8px; }
.km-admin-notice-content img { display: block; width: auto; max-width: 100%; max-height: 340px; margin: 14px auto; border-radius: 12px; object-fit: contain; }
.km-admin-notice-content figure { margin: 14px auto; max-width: 100%; }
.km-admin-notice-content figcaption { margin-top: 6px; color: inherit; opacity: .7; font-size: 12px; text-align: center; }
.km-admin-notice-content a { color: #8a6500; font-weight: 850; }
.km-admin-notice-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.km-admin-notice-actions button {
  min-height: 44px;
  border-radius: 11px;
  padding: 0 18px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}
.km-admin-notice-close {
  border: 1px solid #d9e0e5;
  background: #f5f7f8;
  color: #263238;
}
.km-admin-notice-action {
  border: 1px solid #15191c;
  background: #FBB900;
  color: #111;
}
html[data-theme="dark"] .km-admin-notice {
  border-color: rgba(255,255,255,.14);
  background: #1b2024;
  color: #f5f7fa;
}
html[data-theme="dark"] .km-admin-notice-content { color: #b5c0c7; }
html[data-theme="dark"] .km-admin-notice-content a { color: #FBB900; }
html[data-theme="dark"] .km-admin-notice-close {
  border-color: rgba(255,255,255,.16);
  background: #2a3035;
  color: #f5f7fa;
}
@keyframes kmNoticeFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes kmNoticePop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 520px) {
  .km-admin-notice { padding: 25px 20px 20px; border-radius: 16px; }
  .km-admin-notice-actions { display: grid; grid-template-columns: 1fr; }
  .km-admin-notice-actions button { width: 100%; }
}

/* HEADER & NAV */
.site-header { background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,0.04); position: sticky; top: 0; z-index: 50; width: 100%; }
.container{max-width:var(--container);margin:0 auto;padding:15px 24px;}
main.container { width: 100%; min-height: 80vh; }
.header-inner{display:flex;align-items:center;gap:16px;justify-content:space-between;}
.logo{display:flex;align-items:center;gap:12px;cursor:pointer}
.logo-img { height: 100px; width: auto; display: block; } 
.logo-text{font-weight:800; font-size: 24px; letter-spacing: -1px; text-transform: uppercase;}
.main-nav{display:flex;gap:24px;align-items:center}
.nav-link{color:var(--dark);text-decoration:none;font-weight:600; font-size: 15px;}
.nav-link:hover{color: #000; text-decoration: underline;}
#header-cta { min-width:180px; text-align:right; display: flex; align-items: center; gap: 15px; position: relative; }

/* SVG ICONS BASE */
.icon-svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: 0.2s; }
.icon-svg.filled { fill: currentColor; }
.icon-svg-small { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; display: inline-block; vertical-align: middle; margin-left: 5px; }

/* NOTIFICATIONS & DROPDOWN */
.bell-wrapper { position: relative; cursor: pointer; margin-right: 10px; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; transition: 0.2s; }
.bell-wrapper:hover { background-color: #f0f0f0; }
.notif-badge { position: absolute; top: 5px; right: 5px; background: #d00; color: #fff; font-size: 10px; font-weight: bold; border-radius: 50%; width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; pointer-events: none; }

.notif-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    display: none;
    flex-direction: column;
    z-index: 1001;
    overflow: hidden;
    max-height: 400px;
    overflow-y: auto;
}
.notif-dropdown.show { display: flex; }
.notif-header { padding: 12px 16px; background: #f9f9f9; border-bottom: 1px solid #eee; font-weight: 700; font-size: 14px; text-align: left; }
.notif-item { padding: 12px 16px; border-bottom: 1px solid #eee; font-size: 13px; text-align: left; transition: 0.1s; }
.notif-item:hover { background: #fff8e1; }
.notif-item:last-child { border-bottom: none; }
.notif-date { display: block; font-size: 11px; color: #888; margin-top: 4px; }
.notif-empty { padding: 20px; text-align: center; color: #999; font-size: 13px; }

/* USER MENU */
.user-menu-container { position: relative; height: 100%; display: flex; align-items: center; }
.user-menu-container::after { content: ''; position: absolute; top: 100%; left: 0; width: 100%; height: 15px; background: transparent; }
.user-dropdown { position: absolute; top: calc(100% + 10px); right: 0; background: #fff; border: 1px solid #eee; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.15); width: 220px; display: none; flex-direction: column; z-index: 1000; overflow: hidden; }
.user-menu-container:hover .user-dropdown { display: flex; }
.user-dropdown-header { padding: 15px; background: #f9f9f9; border-bottom: 1px solid #eee; font-weight: bold; text-align: left; display:flex; align-items:center; gap:10px; }
.user-dropdown a, .user-dropdown button { padding: 12px 15px; text-align: left; background: #fff; border: none; border-bottom: 1px solid #eee; cursor: pointer; font-size: 14px; text-decoration: none; color: #333; display: flex; align-items: center; justify-content: space-between; width: 100%; }
.user-dropdown a:hover, .user-dropdown button:hover { background: #fff8e1; }
.user-avatar-small { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 1px solid #ddd; }

/* Compact account dropdown: one-line labels and evenly aligned icon column. */
#user-dropdown {
  width: 100% !important;
  min-width: 100% !important;
  box-sizing: border-box;
  transform-origin: top right;
  will-change: transform, opacity;
}
#user-dropdown[style*="display: block"] {
  animation: km-account-dropdown-in 180ms cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes km-account-dropdown-in {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
#user-dropdown > a {
  min-height: 36px;
  padding: 7px 8px !important;
  gap: 6px !important;
  font-family: inherit !important;
  font-size: 14px;
  line-height: 1.15;
}
#user-dropdown > a > span:last-child {
  min-width: 0;
  white-space: nowrap;
  font-weight: 600;
}
@media (prefers-reduced-motion: reduce) {
  #user-dropdown[style*="display: block"] {
    animation: none;
  }
}

/* Shared header/account component. Keep layout here instead of inline HTML. */
.km-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.km-header-auth-actions {
  gap: 10px;
}
.km-add-listing {
  gap: 5px;
  white-space: nowrap;
}
.km-add-listing > span:first-child {
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}
.km-user-menu {
  position: relative;
  display: inline-block;
}
.km-account-trigger {
  gap: 5px;
  max-width: 220px;
}
.km-account-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.km-account-arrow {
  flex: 0 0 auto;
  font-size: 10px;
  transition: transform 180ms ease;
}
.km-account-trigger[aria-expanded="true"] .km-account-arrow {
  transform: rotate(180deg);
}
.km-account-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 1000;
  overflow: visible;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .14);
}
.km-account-item {
  display: flex;
  align-items: center;
  min-height: 36px;
  width: 100%;
  padding: 7px 8px;
  gap: 6px;
  border-bottom: 1px solid #eee;
  color: #333;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.15;
  text-decoration: none;
}
.km-account-item:last-child {
  border-bottom: 0;
}
.km-account-icon {
  width: 24px;
  flex: 0 0 24px;
  text-align: center;
  line-height: 1;
}
.km-account-label {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  font-weight: 600;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.km-account-admin .km-account-label {
  font-weight: 800;
}
.km-account-logout {
  color: #c62828;
}
.km-header-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

/* BUTTONS */
.btn{border:none;border-radius:6px;cursor:pointer;font-weight:700;text-decoration:none;color:var(--dark);display:inline-flex;align-items:center;justify-content:center;transition:0.2s;height:42px;padding:0 20px;font-size:14px;}
.btn:hover { transform: translateY(-1px); box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.btn-yellow{ background:var(--yellow); border: 2px solid #000; color: #000; }
.btn-yellow *,
.card-badge,
.msg.mine,
.theme-toggle {
  color: #000 !important;
}

/* Mobile polish: header, homepage cards, add form and ads */
.logo,
.logo:focus,
.logo:focus-visible,
.logo-img,
.logo-img:focus,
.logo-img:focus-visible {
  outline: none !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.logo {
  -webkit-tap-highlight-color: transparent;
}

form#add-form .form-grid,
form#add-form .form-grid-2 {
  align-items: start;
}

form#add-form .form-group {
  min-width: 0;
}

form#add-form .form-group input:not([type="checkbox"]):not([type="radio"]),
form#add-form .form-group select {
  min-height: 44px;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  #header-cta {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    justify-content: center !important;
    padding: 0 8px !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }

  #header-cta > div {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .notification-wrapper {
    margin-right: 0 !important;
    flex: 0 0 38px !important;
  }

  .bell-icon {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
  }

  #header-cta .btn,
  #header-cta button {
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 10px !important;
    font-size: 13px !important;
    white-space: nowrap !important;
  }

  #header-cta .user-menu {
    min-width: 0 !important;
  }

  #header-cta .user-menu .btn,
  #header-cta .user-menu button {
    max-width: 116px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .new-announcements .list-view-container {
    gap: 15px !important;
  }

  .new-announcements .horizontal-card {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    flex-direction: column !important;
    border-radius: 10px !important;
    border: 1px solid #eee !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
    overflow: hidden !important;
  }

  .new-announcements .hc-image-wrapper {
    width: 100% !important;
    height: 200px !important;
    min-height: 200px !important;
  }

  .new-announcements .hc-content {
    padding: 15px 20px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
  }

  .new-announcements .hc-title {
    color: #2c3e50 !important;
    font-size: 18px !important;
    line-height: 1.3 !important;
  }

  .new-announcements .hc-details {
    margin: 15px 0 !important;
    gap: 10px !important;
  }

  .new-announcements .hc-footer,
  .new-announcements .hc-bottom {
    display: flex !important;
    align-items: flex-end !important;
    justify-content: space-between !important;
    gap: 12px !important;
    margin-top: auto !important;
  }

  .new-announcements .hc-price {
    font-size: 20px !important;
    white-space: nowrap !important;
  }

  .new-announcements .hc-location {
    color: #7f8c8d !important;
    font-size: 14px !important;
  }

  form#add-form {
    padding: 16px !important;
    box-sizing: border-box !important;
  }

  form#add-form .form-grid,
  form#add-form .form-grid-2 {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  form#add-form .form-group {
    display: flex !important;
    flex-direction: column !important;
    margin-bottom: 0 !important;
  }

  form#add-form .form-group label {
    min-height: 0 !important;
    line-height: 1.25 !important;
    margin-bottom: 6px !important;
  }

  form#add-form .form-group input:not([type="checkbox"]):not([type="radio"]),
  form#add-form .form-group select {
    width: 100% !important;
    height: 46px !important;
    min-height: 46px !important;
    padding: 0 12px !important;
    line-height: 46px !important;
  }

  form#add-form .form-group textarea {
    width: 100% !important;
    min-height: 120px !important;
    padding: 12px !important;
  }

  .ad-sidebar,
  .ad-left,
  .ad-right,
  .desktop-ad {
    display: none !important;
  }

  .mobile-ad {
    display: flex !important;
    width: calc(100% - 28px) !important;
    max-width: 520px !important;
    height: auto !important;
    margin: 12px auto !important;
    padding: 0 !important;
    background: transparent !important;
    overflow: hidden !important;
  }

  .mobile-ad img,
  img[src*="cam-mobile"],
  img[src*="pozR.png"] {
    width: 100% !important;
    height: 80px !important;
    max-height: 80px !important;
    object-fit: cover !important;
    border-radius: 12px !important;
  }

  img[src*="cam.png"] {
    max-width: 100% !important;
  }

  .listing-desktop-side-ad {
    display: none !important;
  }

  .listing-mobile-wide-ad {
    width: 100% !important;
    height: 80px !important;
    margin: 12px 0 !important;
    overflow: hidden !important;
  }

  .listing-mobile-wide-ad img {
    width: 100% !important;
    height: 80px !important;
    max-height: 80px !important;
    object-fit: cover !important;
    border-radius: 12px !important;
  }
}
.btn-outline{background:transparent;border:2px solid #ddd;} .btn-outline:hover { border-color: #000; }
.btn-danger{background: #d00; color: #fff; border: none;}
.btn-icon { width: 42px; padding: 0; font-size: 18px; }
.btn-sm{padding: 0 10px; height: 30px !important; font-size: 12px;}
.btn-link { background: none; border: none; color: #002f34; text-decoration: underline; font-size: 14px; cursor: pointer; padding: 0; }
.btn-link:hover { color: var(--yellow); }
.desc-toggle-btn { background: none; border: none; color: var(--yellow); cursor: pointer; font-weight: bold; font-size: 14px; padding: 0; margin-left: 5px; text-decoration: underline; margin-top: 10px; display: inline-block; }

/* LAYOUT */
.hero{padding:40px 0} .hero h1{font-size:42px;margin:0 0 30px 0; text-align:center;}
.form-card { background: #fff; padding: 24px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); margin-bottom: 24px; }
.form-card h3 { margin-top: 0; margin-bottom: 20px; font-size: 18px; border-bottom: 1px solid #eee; padding-bottom: 10px; color: #002f34; }
.form-card input:not([type="checkbox"]), .form-card select, .form-card textarea { width: 100%; padding: 0 12px; border-radius: 6px; border: 1px solid #ccc; background: #fff; font-size: 16px; height: 55px; transition: border-color 0.2s; }
.form-card textarea { height: auto; padding: 12px; }
.form-card input:focus, .form-card select:focus { border-color: var(--yellow); outline: none; }

.login-card-container { display: flex; justify-content: center; padding: 40px 0; }
.login-card { background: #fff; padding: 40px; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); width: 450px; max-width: 100%; text-align: center; }
.login-card h2 { margin-top: 0; margin-bottom: 24px; color: #002f34; font-size: 24px; }
.login-card label { text-align: left; display: block; margin-bottom: 15px; font-weight: 600; font-size: 14px; color: #444; }
.login-card input { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 4px; font-size: 16px; margin-top: 5px; }
.login-card .btn { width: 100%; margin-top: 20px; height: 48px; font-size: 16px; }

/* CHAT */
.chat-layout { display: grid; grid-template-columns: 300px 1fr; height: 70vh; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,0.05); margin-top: 20px; }
.chat-sidebar { background: #f9f9f9; border-right: 1px solid #eee; display: flex; flex-direction: column; }
.chat-tabs { display: flex; background: #eee; }
.chat-tab { flex: 1; padding: 15px; text-align: center; cursor: pointer; font-weight: 600; font-size: 14px; border-bottom: 3px solid transparent; }
.chat-tab.active { background: #fff; border-bottom-color: var(--yellow); }
.chat-list { flex: 1; overflow-y: auto; }
.chat-list-item { padding: 15px; border-bottom: 1px solid #eee; cursor: pointer; display: flex; align-items: center; gap: 10px; }
.chat-list-item:hover, .chat-list-item.active { background: #fff8e1; }
.chat-thumb { width: 50px; height: 50px; border-radius: 4px; object-fit: cover; flex-shrink: 0; border: 1px solid #ddd; }
.chat-info { flex: 1; overflow: hidden; }

.chat-window { display: flex; flex-direction: column; position: relative; background-color: #fff; overflow: hidden; }
.chat-window::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("LogoUp.png") center center / min(46%, 320px) no-repeat;
  opacity: 0.3;
  pointer-events: none;
  z-index: 1;
}
.chat-window > * { position: relative; z-index: 2; }
.chat-header { padding: 15px; border-bottom: 1px solid #eee; font-weight: 700; font-size: 16px; background: #fff; z-index: 2; }
.chat-messages { flex: 1; padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 15px; z-index: 2; background: transparent; }
.msg { padding: 12px 16px; border-radius: 18px; max-width: 75%; font-size: 14px; line-height: 1.5; word-wrap: break-word; position: relative; box-shadow: 0 1px 2px rgba(0,0,0,0.1); }
.msg.mine { background: var(--yellow); color: #000; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg.theirs { background: #e4e6eb; color: #000; align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-input-area { padding: 15px; border-top: 1px solid #eee; display: flex; gap: 10px; background: #fff; z-index: 2; }
.chat-input-area input { flex: 1; padding: 10px; border-radius: 20px; border: 1px solid #ccc; outline: none; }

/* FILTERS */
.filter-shortcuts { display: flex; justify-content: center; gap: 25px; margin-bottom: 35px; flex-wrap: wrap; }
.shortcut-item { display: flex; flex-direction: column; align-items: center; cursor: pointer; transition: transform 0.2s; min-width: 90px; }
.shortcut-item:hover { transform: translateY(-5px); }
.shortcut-icon { width: 70px; height: 70px; background: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 32px; margin-bottom: 10px; box-shadow: 0 4px 15px rgba(0,0,0,0.08); border: 2px solid transparent; background-repeat: no-repeat; background-position: center; background-size: 40px; }
.shortcut-item:hover .shortcut-icon { border-color: var(--yellow); }
.shortcut-label { font-weight: 600; font-size: 14px; text-align: center; color: #333; }

body[data-market="parts"] #market-shortcuts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  width: min(100%, 980px);
  margin-left: auto;
  margin-right: auto;
}

body[data-market="parts"] #market-shortcuts .shortcut-item {
  min-width: 0;
  width: 100%;
}

body[data-market="parts"] .filter-shortcuts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  width: min(100%, 980px);
  margin-left: auto;
  margin-right: auto;
}

body[data-market="parts"] #market-shortcuts .shortcut-item,
body[data-market="parts"] .filter-shortcuts .shortcut-item {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-width: 0;
  width: 100%;
  min-height: 132px;
  justify-content: center;
  padding: 15px 10px 13px;
  border: 1px solid #dfe4e7;
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% -35%, rgba(251,185,0,.23), transparent 58%),
    linear-gradient(155deg, #fff 0%, #f7f9fa 100%);
  box-shadow: 0 8px 22px rgba(23,32,38,.08);
  transform: none;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

body[data-market="parts"] #market-shortcuts .shortcut-item::after,
body[data-market="parts"] .filter-shortcuts .shortcut-item::after {
  content: "";
  position: absolute;
  inset: auto 18px 0;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: var(--yellow, #FBB900);
  opacity: 0;
  transform: scaleX(.45);
  transition: opacity .2s ease, transform .2s ease;
}

body[data-market="parts"] #market-shortcuts .shortcut-item:hover,
body[data-market="parts"] .filter-shortcuts .shortcut-item:hover,
body[data-market="parts"] .filter-shortcuts .shortcut-item.active {
  border-color: rgba(210,155,0,.75);
  background:
    radial-gradient(circle at 50% -30%, rgba(251,185,0,.32), transparent 60%),
    linear-gradient(155deg, #fff 0%, #fffaf0 100%);
  box-shadow: 0 13px 28px rgba(23,32,38,.13);
  transform: translateY(-4px);
}

body[data-market="parts"] #market-shortcuts .shortcut-item:hover::after,
body[data-market="parts"] .filter-shortcuts .shortcut-item:hover::after,
body[data-market="parts"] .filter-shortcuts .shortcut-item.active::after {
  opacity: 1;
  transform: scaleX(1);
}

body[data-market="parts"] #market-shortcuts .shortcut-icon,
body[data-market="parts"] .filter-shortcuts .shortcut-icon {
  width: 66px;
  height: 66px;
  margin-bottom: 10px;
  border: 1px solid rgba(251,185,0,.38);
  background-color: #fff;
  box-shadow:
    0 8px 18px rgba(94,72,8,.12),
    inset 0 0 0 7px rgba(251,185,0,.08);
  color: #20272c;
  font-size: 29px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

body[data-market="parts"] #market-shortcuts .shortcut-item:hover .shortcut-icon,
body[data-market="parts"] .filter-shortcuts .shortcut-item:hover .shortcut-icon,
body[data-market="parts"] .filter-shortcuts .shortcut-item.active .shortcut-icon {
  border-color: var(--yellow, #FBB900);
  box-shadow:
    0 10px 22px rgba(94,72,8,.17),
    inset 0 0 0 8px rgba(251,185,0,.13);
  transform: scale(1.06);
}

body[data-market="parts"] #market-shortcuts .shortcut-label,
body[data-market="parts"] .filter-shortcuts .shortcut-label {
  max-width: 100%;
  color: #27313a;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.25;
}

@media (max-width: 768px) {
  body[data-market="parts"] #market-shortcuts,
  body[data-market="parts"] .filter-shortcuts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px 6px;
  }

  body[data-market="parts"] #market-shortcuts .shortcut-icon,
  body[data-market="parts"] .filter-shortcuts .shortcut-icon {
    width: 58px;
    height: 58px;
    margin-bottom: 8px;
    font-size: 25px;
  }

  body[data-market="parts"] #market-shortcuts .shortcut-label,
  body[data-market="parts"] .filter-shortcuts .shortcut-label {
    font-size: 11px;
    line-height: 1.2;
  }
}

@media (max-width: 520px) {
  body[data-market="parts"] #market-shortcuts,
  body[data-market="parts"] .filter-shortcuts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  body[data-market="parts"] #market-shortcuts .shortcut-item,
  body[data-market="parts"] .filter-shortcuts .shortcut-item {
    min-height: 112px;
    padding: 12px 7px 10px;
    border-radius: 15px;
  }
}

html[data-theme="dark"] body[data-market="parts"] #market-shortcuts .shortcut-item,
html[data-theme="dark"] body[data-market="parts"] .filter-shortcuts .shortcut-item {
  border-color: rgba(255,255,255,.12);
  background:
    radial-gradient(circle at 50% -35%, rgba(251,185,0,.16), transparent 58%),
    linear-gradient(155deg, #2b3135 0%, #1b2023 100%);
  box-shadow: 0 9px 24px rgba(0,0,0,.28);
}

html[data-theme="dark"] body[data-market="parts"] #market-shortcuts .shortcut-item:hover,
html[data-theme="dark"] body[data-market="parts"] .filter-shortcuts .shortcut-item:hover,
html[data-theme="dark"] body[data-market="parts"] .filter-shortcuts .shortcut-item.active {
  border-color: rgba(251,185,0,.72);
  background:
    radial-gradient(circle at 50% -30%, rgba(251,185,0,.24), transparent 60%),
    linear-gradient(155deg, #30373c 0%, #202529 100%);
}

html[data-theme="dark"] body[data-market="parts"] #market-shortcuts .shortcut-icon,
html[data-theme="dark"] body[data-market="parts"] .filter-shortcuts .shortcut-icon {
  background-color: #242a2e;
  color: #f5f7fa;
  border-color: rgba(251,185,0,.32);
}

html[data-theme="dark"] body[data-market="parts"] #market-shortcuts .shortcut-label,
html[data-theme="dark"] body[data-market="parts"] .filter-shortcuts .shortcut-label {
  color: #f5f7fa;
}

/* Części i akcesoria: zachowujemy klasyczny wygląd okrągłych ikon,
   zmieniamy wyłącznie ich równy i spokojny układ. */
body[data-market="parts"] #market-shortcuts,
body[data-market="parts"] .filter-shortcuts {
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  align-items: start;
  justify-items: center;
  gap: 28px 18px;
  width: min(100%, 920px);
}

body[data-market="parts"] #market-shortcuts .shortcut-item,
body[data-market="parts"] .filter-shortcuts .shortcut-item,
html[data-theme="dark"] body[data-market="parts"] #market-shortcuts .shortcut-item,
html[data-theme="dark"] body[data-market="parts"] .filter-shortcuts .shortcut-item {
  min-height: 0;
  width: auto;
  min-width: 96px;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-market="parts"] #market-shortcuts .shortcut-item::after,
body[data-market="parts"] .filter-shortcuts .shortcut-item::after {
  display: none;
}

body[data-market="parts"] #market-shortcuts .shortcut-icon,
body[data-market="parts"] .filter-shortcuts .shortcut-icon,
html[data-theme="dark"] body[data-market="parts"] #market-shortcuts .shortcut-icon,
html[data-theme="dark"] body[data-market="parts"] .filter-shortcuts .shortcut-icon {
  width: 70px;
  height: 70px;
  margin-bottom: 10px;
  border: 2px solid transparent;
  border-radius: 50%;
  background-color: #fff;
  box-shadow: 0 4px 15px rgba(0,0,0,.08);
  color: #20272c;
  font-size: 32px;
  transform: none;
}

body[data-market="parts"] #market-shortcuts .shortcut-item:hover .shortcut-icon,
body[data-market="parts"] .filter-shortcuts .shortcut-item:hover .shortcut-icon,
body[data-market="parts"] .filter-shortcuts .shortcut-item.active .shortcut-icon {
  border-color: var(--yellow, #FBB900);
  box-shadow: 0 6px 17px rgba(0,0,0,.12);
  transform: none;
}

body[data-market="parts"] #market-shortcuts .shortcut-label,
body[data-market="parts"] .filter-shortcuts .shortcut-label {
  max-width: 112px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

@media (max-width: 520px) {
  body[data-market="parts"] #market-shortcuts,
  body[data-market="parts"] .filter-shortcuts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 12px;
  }
  body[data-market="parts"] #market-shortcuts .shortcut-icon,
  body[data-market="parts"] .filter-shortcuts .shortcut-icon {
    width: 62px;
    height: 62px;
    font-size: 28px;
  }
}

.icon-kamper { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='1' y='3' width='15' height='13' rx='2' /%3E%3Cpath d='M16 8h4l2 3v5h-6V8z' /%3E%3Ccircle cx='5.5' cy='18.5' r='2.5' /%3E%3Ccircle cx='18.5' cy='18.5' r='2.5' /%3E%3C/svg%3E"); }
.icon-przyczepa { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='5' width='16' height='11' rx='2' /%3E%3Cpath d='M18 13h4' /%3E%3Ccircle cx='10' cy='18' r='2' /%3E%3Cpath d='M4 10h4' /%3E%3C/svg%3E"); }
.icon-kampervan { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='12' rx='2' /%3E%3Ccircle cx='7' cy='18' r='2' /%3E%3Ccircle cx='17' cy='18' r='2' /%3E%3Cpath d='M2 12h20' /%3E%3C/svg%3E"); }
.icon-lekka { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 16h12l-1-6H5l-1 6z' /%3E%3Ccircle cx='10' cy='19' r='2' /%3E%3Cpath d='M16 16h6' /%3E%3C/svg%3E"); }
.icon-tiny { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z' /%3E%3Cpolyline points='9 22 9 12 15 12 15 22' /%3E%3C/svg%3E"); }
.icon-kapsula { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22a8 8 0 0 0 8-8c0-4.418-3.582-8-8-8s-8 3.582-8 8a8 8 0 0 0 8 8z' /%3E%3Cpath d='M2 14h20' /%3E%3C/svg%3E"); }
.icon-inne { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='5' cy='12' r='1' /%3E%3Ccircle cx='12' cy='12' r='1' /%3E%3Ccircle cx='19' cy='12' r='1' /%3E%3C/svg%3E"); }
.parts-category-icon {
  background-image: none !important;
  background-color: #fff;
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
}
.parts-subcategory-filter {
  display: none;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: -18px auto 28px;
  max-width: 980px;
}
.parts-subcategory-chip {
  border: 1px solid #d7dde2;
  background: #fff;
  color: #27313a;
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
  transition: .2s ease;
}
.parts-subcategory-chip:hover {
  border-color: var(--yellow);
  color: #111;
  transform: translateY(-1px);
}
.parts-subcategory-chip.active {
  background: var(--yellow);
  border-color: var(--yellow);
  color: #111;
}

.search-panel { background: #fff; padding: 24px; border-radius: 8px; display: block; max-width: 100%; box-shadow: 0 4px 20px rgba(0,0,0,0.05); }
.search-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.search-grid:last-child { margin-bottom: 0; }
.search-group { display: flex; flex-direction: column; }
.search-group label { font-size: 12px; font-weight: 700; margin-bottom: 6px; color: #555; text-transform: uppercase; }
.search-panel input, .search-panel select { width: 100%; padding: 0 12px; border-radius: 4px; border: 1px solid #ccc; background: #f9f9f9; font-size: 15px; height: 48px; }
.search-panel input:focus, .search-panel select:focus { border-color: var(--yellow); outline: none; background: #fff; }
.search-actions { display: flex; flex-direction: column; justify-content: flex-start; }
.search-actions::before { content: '\00a0'; font-size: 12px; margin-bottom: 6px; display: block; }
#search-btn { width: 100%; height: 48px; padding: 0; display: flex; align-items: center; justify-content: center; border-radius: 4px; font-size: 16px; letter-spacing: 1px; }
.multiselect { position: relative; width: 100%; }
.selectBox { position: relative; cursor: pointer; }
.selectBox select { width: 100%; font-weight: normal; height: 48px; border: 1px solid #ccc; border-radius: 4px; padding: 10px; background: #f9f9f9; }
.overSelect { position: absolute; left: 0; right: 0; top: 0; bottom: 0; }
#checkboxes { display: none; border: 1px solid #ccc; position: absolute; z-index: 100; background: #fff; width: 100%; border-radius: 4px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); max-height: 200px; overflow-y: auto; }
#checkboxes label { display: block; padding: 10px; cursor: pointer; border-bottom: 1px solid #eee; font-size: 14px; }
#checkboxes label:hover { background-color: var(--bg-gray); }
.advanced-link { margin-top: 12px; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; color: #002f34; text-align: center; border-bottom: 1px dashed #002f34; display: inline-block; align-self: center;}
.advanced-link:hover { color: var(--yellow); border-color: var(--yellow); }
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); display: none; align-items: center; justify-content: center; z-index: 1000; backdrop-filter: blur(2px); }
.modal-content { background: #fff; border-radius: 8px; width: 800px; max-width: 95%; height: 90vh; display:flex; flex-direction:column; position: relative; box-shadow: 0 10px 30px rgba(0,0,0,0.2); overflow:hidden; }
.modal-scroll-area { overflow-y: auto; padding: 30px; flex: 1; }
.modal-sticky-header { background: #fff; padding: 20px 30px; border-bottom: 2px solid var(--yellow); display: flex; justify-content: space-between; align-items: center; z-index: 10; position: sticky; top: 0; }
.modal-header-title { font-size: 24px; font-weight: 800; }
.close-modal { font-size: 32px; border:none; background:transparent; color: #999; cursor: pointer; }
.close-modal:hover { color: #000; }

.modal-content input, .modal-content select { width: 100%; padding: 10px; border-radius: 4px; border: 1px solid #ccc; background: #fff; font-size: 14px; height: 42px; margin-bottom: 5px; }
#invoice-dropdown-btn {
  width: 100% !important;
  min-height: 42px !important;
  padding: 10px 12px !important;
  border: 1px solid #ccc !important;
  border-radius: 4px !important;
  background: #fff !important;
  color: #111 !important;
  font-size: 14px !important;
  margin-bottom: 5px !important;
  box-sizing: border-box !important;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s !important;
}
#invoice-dropdown-btn:hover {
  border-color: var(--yellow) !important;
}
#invoice-selected-text {
  color: #555 !important;
  font-size: 14px !important;
}
#invoice-dropdown-list {
  background: #fff !important;
  border: 1px solid #ccc !important;
  border-top: none !important;
  border-radius: 0 0 4px 4px !important;
  box-shadow: 0 8px 18px rgba(0,0,0,0.12) !important;
}
#invoice-dropdown-list label {
  color: #333 !important;
  min-height: 28px !important;
  border-radius: 4px !important;
}
#invoice-dropdown-list label:hover {
  background: #fff8e1 !important;
}
.btn-apply-filters {
  width: 100%;
  height: 48px;
  font-size: 16px;
  font-weight: 700;
  margin-top: 20px;
  position: sticky;
  bottom: 0;
  z-index: 20;
  color: #000 !important;
  box-shadow: none;
}
#filter-map { height: 300px; width: 100%; border-radius: 4px; margin-bottom: 15px; border: 1px solid #ddd; z-index: 1; }
.map-controls { background: #f9f9f9; padding: 15px; border-radius: 4px; margin-bottom: 20px; border: 1px solid #eee; }
.range-slider-container { display: flex; align-items: center; gap: 15px; }
.range-slider-container input[type=range] { flex: 1; height: 6px; }
.adv-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.adv-section-title { grid-column: 1 / -1; font-weight: 800; margin-top: 10px; margin-bottom: 5px; color: #000; text-transform: uppercase; font-size: 12px; letter-spacing: 1px; border-bottom: 1px solid #eee; padding-bottom: 5px;}

/* CARDS */
.cards{display:flex;gap:20px;flex-wrap:wrap}
.card-base { background: #fff; border-radius: 4px; box-shadow: 0 2px 4px rgba(0,0,0,0.08); cursor: pointer; transition: box-shadow .2s; position: relative; overflow: hidden; border: none; }
.card-base:hover { box-shadow: 0 8px 16px rgba(0,0,0,0.15); }
.card-badge { position: absolute; top: 10px; left: 10px; background: var(--yellow); color: #000; padding: 4px 8px; font-size: 10px; font-weight: 800; text-transform: uppercase; border-radius: 2px; z-index: 10; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }

/* HEART SVG BUTTON */
.card-fav-btn { position: absolute; top: 10px; right: 10px; background: #fff; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 5px rgba(0,0,0,0.1); z-index: 30; cursor: pointer; border: none; transition: 0.2s; color: #333; }
.card-fav-btn:hover { transform: scale(1.1); }
.card-fav-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; transition: 0.2s; }
.card-fav-btn.active svg { fill: none !important; stroke: #d00; stroke-width: 2; }

.card-action-btn { position: absolute; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: none; cursor: pointer; z-index: 30; box-shadow: 0 2px 5px rgba(0,0,0,0.2); transition: transform 0.1s; }
.card-action-btn:hover { transform: scale(1.1); }
.btn-edit-card { top: 10px; right: 10px; background: #fff; color: #333; }
.btn-del-card { bottom: 10px; right: 10px; background: #fff; color: #d00; }
.card-nav-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.8); color: #000; border: none; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 16px; z-index: 20; opacity: 0; transition: opacity 0.2s; }
.card-base:hover .card-nav-btn { opacity: 1; }
.card-nav-prev { left: 8px; } .card-nav-next { right: 8px; }
.card-tile { display: flex; flex-direction: column; min-width: 260px; width: 260px; }
.card-tile .card-img-wrapper { width: 100%; height: 180px; position: relative; overflow: hidden; background: #eee; }
.card-tile .card-img-wrapper img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-tile .card-content { padding: 16px; }
.card-tile h3 { margin: 5px 0; font-size: 16px; font-weight: 600; color: #002f34; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-tile .price { font-weight: 700; font-size: 18px; margin: 8px 0 0 0; color: #000; }
.card-tile .meta { font-size: 12px; color: #666; margin-top: 4px; }
.featured-slider-container { position: relative; display: flex; align-items: center; margin-bottom: 40px;}
.featured-track { display: flex; gap: 20px; overflow-x: auto; scroll-behavior: smooth; padding: 10px 5px; width: 100%; scrollbar-width: none; }
.featured-track::-webkit-scrollbar { display: none; }
.slider-control-btn { background: #fff; border: none; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,0.15); z-index: 2; font-size: 18px; flex-shrink: 0; }
.slider-control-btn:hover { background: #f2f2f2; }
.cards-list-container { display: flex; flex-direction: column; gap: 16px; }
.card-list { width: 100%; display: flex; flex-direction: row; height: 200px; }
.card-list .card-img-wrapper { width: 300px; min-width: 300px; height: 100%; flex-shrink: 0; position: relative; overflow: hidden; background: #000; }
.card-list .card-img-wrapper img { width: 100%; height: 100%; object-fit: contain; display: block; }
.card-list .card-content { padding: 24px; flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.card-list h3 { margin: 0 0 8px 0; font-size: 20px; color: #002f34; font-weight: 600;}
.card-list .price { font-weight: 700; font-size: 24px; margin: 0; }
.card-list .meta { font-size: 14px; margin: 5px 0; display: flex; gap: 15px; color: #555;}
.card-list .meta span { display: flex; align-items: center; gap: 6px; }
.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; margin-top: 20px; }
.main-column { background: #fff; border-radius: 4px; padding: 0; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.side-column { display: flex; flex-direction: column; gap: 16px; }
.listing-desc-container { padding: 32px; }
.listing-desc-container h2 { font-size: 24px; color: #002f34; margin-top: 0; }
.listing-desc-container p { line-height: 1.6; color: #002f34; font-size: 16px; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }

/* SPECS GRID */
.specs-container {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    padding: 24px;
    margin: 0 20px 30px 20px; 
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.specs-header {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bg-gray);
    color: var(--dark);
    margin-top: 0;
}
.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 20px;
}
.spec-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.spec-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}
.spec-icon {
    width: 16px;
    height: 16px;
    color: var(--yellow);
    flex-shrink: 0;
}
.spec-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--dark);
    word-break: break-word;
}

.similar-tile { background: #fff; border-radius: 4px; padding: 24px 24px 10px 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); margin-top: 20px; }
.similar-tile h2 { font-size: 24px; color: #002f34; margin-top: 0; margin-bottom: 20px; border-left: 5px solid var(--yellow); padding-left: 10px; }
.similar-tile .card-tile { min-width: 220px; width: 220px; }
.similar-tile .card-img-wrapper { height: 140px; }
.similar-tile .card-content { padding: 12px; }
.similar-tile h3 { font-size: 14px; }
.similar-tile .price { font-size: 16px; margin: 5px 0 0 0; }

.map-tile { background: #fff; border-radius: 4px; padding: 15px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.map-tile-header { font-weight: 700; font-size: 14px; color: #333; margin-bottom: 10px; text-transform: uppercase; }
#listing-map { height: 140px; width: 100%; border-radius: 4px; border: 1px solid #eee; }
.sticky-wrapper { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 16px; }
.admin-icons-wrapper { position: absolute; top: 10px; right: 10px; display: flex; flex-direction: column; gap: 8px; z-index: 20; }
.admin-icon-btn { width: 32px; height: 32px; background: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; border: 1px solid #eee; box-shadow: 0 2px 5px rgba(0,0,0,0.1); font-size: 16px; transition: transform 0.2s; color: #333; }
.admin-icon-btn:hover { transform: scale(1.1); border-color: var(--yellow); }
.admin-icon-btn.icon-del { color: #d00; }

.sticky-box { background: #fff; border-radius: 4px; padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); position: relative; }
.price-box h1 { font-size: 32px; margin: 0 0 10px 0; font-weight: 800; color: #000; }
.price-box .title-sub { font-size: 14px; color: #666; font-weight: normal; margin-bottom: 20px; display: block; }
.seller-box { margin-top: 16px; }
.seller-label { font-size: 12px; text-transform: uppercase; color: #666; font-weight: 700; }
.seller-name { font-size: 20px; font-weight: 600; margin: 8px 0; }
.seller-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.seller-avatar-img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 1px solid #ddd; }

.gallery-display { width: 100%; height: 500px; background: #000; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.gallery-display img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.gallery-display iframe { width: 100%; height: 100%; border: none; }
.gallery-thumbs{display:flex; gap:10px; padding: 16px; overflow-x:auto; flex-wrap:nowrap;}
.thumb-wrapper { position: relative; cursor: pointer; flex-shrink: 0; }
.gallery-thumbs img { width: 100px; height: 75px; object-fit: cover; border-radius: 4px; border: 2px solid transparent; opacity: 0.7; transition: 0.2s; flex-shrink: 0; }
.gallery-thumbs img.active{border-color:var(--yellow); opacity:1;}
.img-manager-container { margin-top: 10px; border: 2px dashed #ddd; padding: 20px; border-radius: 12px; background: #fafafa; }
.img-grid { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 15px; }
.img-item { width: 120px; height: 150px; background: #fff; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); overflow: hidden; position: relative; border: 2px solid transparent; display: flex; flex-direction: column; }
.img-item.is-main { border-color: var(--yellow); transform: scale(1.05); }
.img-item.is-main::before { content: 'GŁÓWNE'; position: absolute; top: 0; left: 0; right: 0; background: var(--yellow); color: var(--dark); font-size: 10px; font-weight: 800; text-align: center; padding: 2px; z-index: 2; }
.img-preview { width: 100%; height: 110px; object-fit: cover; display: block; }
.img-actions { height: 40px; display: flex; justify-content: space-between; padding: 5px; background: #fff; border-top: 1px solid #eee; align-items: center; }
.img-btn { background: #f0f0f0; border: none; cursor: pointer; width: 24px; height: 24px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-weight: bold; color: #555; padding: 0; font-size: 12px; }
.img-btn:hover { background: #ddd; } .img-btn.del { background: #fee; color: red; }
.gallery-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.2); color: #fff; width: 40px; height: 40px; border: 1px solid rgba(255,255,255,0.5); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 24px; transition: 0.2s; user-select: none; z-index: 10; }
.gallery-arrow:hover { background: rgba(255,255,255,0.4); }
.g-prev { left: 10px; } .g-next { right: 10px; }


.ad-sidebar {--ad-side-width: min(280px, calc((100vw - var(--container)) / 2 - 32px)); padding: 0px; margin: 0px; position: fixed; top: 50%; transform: translateY(-50%); width: var(--ad-side-width); height: auto; aspect-ratio: 2 / 5; z-index: 40; display: flex; align-items: center; justify-content: center; }
.ad-sidebar img {padding: 0px; margin: 0px; width: 100%; height: 100%; object-fit: cover; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.ad-left { left: calc((100vw - var(--container)) / 4 - var(--ad-side-width) / 2); } .ad-right { right: calc((100vw - var(--container)) / 4 - var(--ad-side-width) / 2); }
@media (min-width: 1360px) and (max-width: 1700px) {
  :root {
    --container: min(1150px, calc(100vw - 500px));
  }
  .ad-sidebar {
    display: flex !important;
  }
}
@media (min-width: 1360px) and (max-width: 1499px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
  .logo-img {
    height: 78px;
  }
  .header-inner {
    gap: 10px;
  }
  .main-nav {
    gap: 12px;
  }
  .nav-link {
    font-size: 14px;
  }
  #header-cta {
    min-width: 150px;
    gap: 8px;
  }
}
@media (max-width: 1359px) { .ad-sidebar { display: none !important; } }

/* =========================================
   WERSJA MOBILNA (RWD) - V68 DODATEK
   ========================================= */
@media (max-width: 900px) {
  .ad-sidebar { display: none !important; }
  .container { padding: 20px 16px; width: 100%; }
  .header-inner { flex-direction: column; gap: 15px; text-align: center; }
  .main-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
  .nav-link { font-size: 14px; padding: 8px 12px; background: #f8f9fa; border-radius: 6px; }
  .cards-list-container, #all-listings, #fav-grid { grid-template-columns: 1fr !important; display: grid; gap: 20px; }
  .card-list { flex-direction: column; height: auto; } 
  .card-list .card-img-wrapper { width: 100%; height: 220px; } 
  .detail-grid { grid-template-columns: 1fr; }
  .specs-grid { grid-template-columns: repeat(2, 1fr); }
  .search-grid { grid-template-columns: 1fr; }
  .login-card, form#add-form, form#edit-form { width: 100% !important; min-width: 0; padding: 15px; }
  .gallery-display { height: 300px; }
  .sticky-wrapper { position: static; }
  .search-actions { margin-top: 10px; }
  #header-cta { justify-content: center; }
  .chat-layout { grid-template-columns: 1fr; height: auto; }
  .chat-sidebar { height: 300px; overflow-y: auto; }
  .chat-window { height: 400px; border-top: 2px solid #ddd; }
}


/* ============================================================
   POPRAWKI NAGŁÓWKA (AUTOMATYCZNE)
   ============================================================ */

/* 1. Blokada łamania tekstu w menu (np. "Strona główna" w jednej linii) */
.site-header .main-nav .nav-link {
    white-space: nowrap !important;
}

/* 2. Wyrównanie przycisków "Dodaj" i "Profil" (ikona + tekst w jednej linii) */
#header-cta .btn,
#header-cta .btn-outline,
#header-cta .btn-yellow {
    display: inline-flex !important; /* Traktuj jako elastyczny kontener */
    align-items: center !important;  /* Wyśrodkuj w pionie */
    justify-content: center;         /* Wyśrodkuj w poziomie */
    white-space: nowrap !important;  /* Nie przenoś tekstu niżej */
    gap: 8px;                        /* Odstęp między tekstem a ikoną/plusem */
    min-height: 40px;                /* Utrzymanie stałej wysokości */
}

/* Dodatkowe zabezpieczenie dla przycisku profilu, jeśli jest buttonem */
#header-cta button {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px;
}


/* ============================================================
   WYGLĄD KAFELKÓW NA STRONIE GŁÓWNEJ
   ============================================================ */

/* Kontener siatki (Grid) */
.cards-grid, .cards-list-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* Responsywne kolumny */
    gap: 25px;
    padding: 10px 0;
}

/* Pojedynczy kafelek */
.listing-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px; /* Zaokrąglone rogi */
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Efekt najechania myszką */
.listing-card:hover {
    transform: translateY(-5px); /* Lekkie uniesienie */
    box-shadow: 0 10px 20px rgba(0,0,0,0.1); /* Cień */
    border-color: #FBB900; /* Żółta ramka */
}

/* Zdjęcie w kafelku */
.card-img-container {
    width: 100%;
    height: 190px; /* Stała wysokość zdjęcia */
    background-color: #f0f0f0;
    position: relative;
    overflow: hidden;
}

.card-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Zdjęcie wypełnia obszar, nie rozciąga się */
    transition: transform 0.5s ease;
}

.listing-card:hover .card-img-container img {
    transform: scale(1.05); /* Lekki zoom zdjęcia przy najechaniu */
}

/* Treść kafelka */
.card-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

/* Cena */
.card-price {
    font-size: 20px;
    font-weight: 800;
    color: #333;
    margin-bottom: 2px;
}

/* Tytuł */
.card-title {
    font-size: 15px;
    font-weight: 500;
    color: #555;
    line-height: 1.4;

    /* Ucinanie zbyt długiego tytułu do 2 linii */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Szczegóły (Rok, Przebieg) */
.card-details {
    display: flex;
    gap: 10px;
    font-size: 13px;
    color: #777;
    margin-top: auto; /* Dopycha do dołu */
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Lokalizacja */
.card-location {
    font-size: 12px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 5px;
}

/* Badge (np. Wyróżnione) */
.card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #FBB900;
    color: #000;
    font-size: 11px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    z-index: 2;
}


/* ============================================================
   STRONA OGŁOSZENIA (LISTING PAGE)
   ============================================================ */

.listing-container {
    padding-top: 30px;
    padding-bottom: 60px;
}

.listing-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

@media (max-width: 900px) {
    .listing-grid { grid-template-columns: 1fr; }
}

/* GALERIA ZDJĘĆ */
.gallery-container {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.main-image-frame {
    width: 100%;
    height: 450px;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.main-image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Lub contain, jeśli wolisz widzieć całe zdjęcie bez przycinania */
}

.thumbs-row {
    display: flex;
    gap: 10px;
    padding: 15px;
    overflow-x: auto;
    background: #fafafa;
}

.thumb-item {
    width: 80px;
    height: 60px;
    flex-shrink: 0;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
    opacity: 0.7;
    transition: 0.2s;
    object-fit: cover;
}

.thumb-item:hover, .thumb-item.active {
    border-color: #FBB900;
    opacity: 1;
}

/* SIDEBAR Z CENĄ */
.listing-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.price-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    position: sticky;
    top: 20px;
}

.listing-price {
    font-size: 32px;
    font-weight: 800;
    color: #333;
    margin-bottom: 5px;
}

.listing-title {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 15px;
    color: #444;
}

.seller-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.contact-btn {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    margin-top: 15px;
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 10px;
}

/* SPECYFIKACJA */
.specs-section {
    margin-top: 30px;
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.spec-item {
    display: flex;
    flex-direction: column;
}

.spec-label { font-size: 13px; color: #888; text-transform: uppercase; letter-spacing: 0.5px; }
.spec-value { font-size: 16px; font-weight: 600; color: #333; }

.description-box {
    margin-top: 30px;
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    line-height: 1.6;
    font-size: 16px;
    color: #444;
    white-space: pre-line; /* Zachowuje akapity z bazy danych */
}


/* ==========================================
   POZIOME KAFELKI (Horizontal Cards)
   ========================================== */

.cards-grid {
    /* Zmieniamy Grid na jedną kolumnę, żeby kafelki były pod sobą */
    grid-template-columns: 1fr !important; 
    gap: 20px;
}

.listing-card-horizontal {
    display: flex;
    flex-direction: row;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    height: 220px; /* Stała wysokość */
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    position: relative;
}

.listing-card-horizontal:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    border-color: #FBB900;
}

/* Sekcja Zdjęcia (Lewa strona) */
.h-card-img {
    width: 35%; /* Szerokość zdjęcia */
    height: 100%;
    background: #f4f4f4;
    position: relative;
}

.h-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Sekcja Treści (Prawa strona) */
.h-card-content {
    width: 65%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.h-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.h-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.h-card-price {
    font-size: 22px;
    font-weight: 800;
    color: #333;
    white-space: nowrap;
}

.h-card-location {
    font-size: 14px;
    color: #777;
    margin-bottom: 10px;
}

.h-card-features {
    display: flex;
    gap: 15px;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    color: #555;
    font-size: 14px;
}

.feature-pill {
    background: #f9f9f9;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 13px;
}

/* Responsywność: Na telefonach wracamy do pionu */
@media (max-width: 768px) {
    .listing-card-horizontal {
        flex-direction: column;
        height: auto;
    }
    .h-card-img { width: 100%; height: 200px; }
    .h-card-content { width: 100%; }
}


/* --- STYLIZACJA AKCJI (Serduszko, Sprzedane) --- */

/* Przycisk Serduszka */
.like-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}
.like-btn:hover { transform: scale(1.1); }
.like-btn.liked { color: red; } /* Czerwone serce */
.like-btn.not-liked { color: #ccc; } /* Szare serce */

/* Efekt Sprzedanego Ogłoszenia */
.listing-card.sold-item, .listing-card-horizontal.sold-item {
    opacity: 0.6;
    filter: grayscale(100%);
    position: relative;
}
.listing-card.sold-item::after, .listing-card-horizontal.sold-item::after {
    content: "SPRZEDANE";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    font-size: 2rem;
    font-weight: bold;
    color: red;
    border: 3px solid red;
    padding: 10px 20px;
    z-index: 5;
    background: rgba(255,255,255,0.8);
}

/* Panel Zarządzania (Dla właściciela) */
.owner-actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    z-index: 20;
    position: relative;
}
.btn-small {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    color: white;
}
.btn-delete { background: #e74c3c; }
.btn-sold { background: #FBB900; }
.btn-edit { background: #3498db; }


/* ==========================================
   NOWY STYL: B&W OUTLINE (Czarno-Białe Kontury)
   ========================================== */

/* Kontener zdjęcia musi być relatywny, żeby pozycjonować elementy w rogach */
.listing-card .img-container, 
.listing-card-horizontal .h-card-img {
    position: relative;
    overflow: hidden;
}

/* --- SERDUSZKO (Prawy Górny Róg) --- */
.like-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent; /* Przezroczyste tło */
    border: none;
    padding: 0;
    width: 32px;
    height: 32px;
    cursor: pointer;
    z-index: 20;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.like-btn svg {
    width: 28px;
    height: 28px;
    stroke: white;       /* Biały obrys dla kontrastu na zdjęciu */
    stroke-width: 2;
    fill: rgba(0,0,0,0.5); /* Lekkie przyciemnienie w środku */
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); /* Cień żeby było widać na jasnym tle */
    transition: fill 0.3s, stroke 0.3s;
}

/* Aktywne serduszko (Polubione) */
.like-btn.liked svg {
    fill: #e74c3c; /* Czerwone wypełnienie */
    stroke: #e74c3c;
}

/* Hover effect */
.like-btn:hover {
    transform: scale(1.15);
}

/* --- CENA (Prawy Dolny Róg Zdjęcia) --- */
.price-tag-overlay {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: white;
    color: black;
    border: 1px solid black; /* Czarny kontur */
    padding: 4px 12px;
    font-weight: 700;
    font-size: 16px;
    border-radius: 4px;
    z-index: 15;
    box-shadow: 2px 2px 0px rgba(0,0,0,1); /* Styl "Brutalism" / Komiksowy */
}

/* --- IKONY (Wymuszenie czerni i bieli) --- */
/* Zamieniamy emoji na czarno-białe za pomocą filtra */
.icon-bw {
    filter: grayscale(100%) brightness(0%); /* Zrób czarne */
    font-style: normal;
    margin-right: 5px;
}


/* ==========================================
   POPRAWKA: ELEMENTY W ROGACH KARTY (NIE ZDJĘCIA)
   ========================================== */

/* Karta jest teraz punktem odniesienia */
.listing-card, .listing-card-horizontal {
    position: relative !important;
}

/* --- SERDUSZKO (Prawy Górny Róg Karty) --- */
.like-btn {
    position: absolute;
    top: 15px;      /* Odstęp od góry karty */
    right: 15px;    /* Odstęp od prawej krawędzi karty */
    background: #fff; /* Białe tło */
    border: 2px solid #000; /* Czarny kontur */
    border-radius: 50%;
    width: 40px;
    height: 40px;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 2px 0px #000; /* Cień w stylu komiksowym */
}

.like-btn svg {
    width: 20px;
    height: 20px;
    stroke: #000; /* Czarna linia */
    stroke-width: 2;
    fill: transparent;
    filter: none; /* Usuwamy cienie, bo jest na białym */
    transition: all 0.2s;
}

/* Gdy polubione - czerwone wypełnienie */
.like-btn.liked svg {
    fill: #000; /* Wypełniamy na czarno (styl B&W) lub #e74c3c jeśli wolisz */
    stroke: #000;
}

/* --- CENA (Prawy Dolny Róg Karty) --- */
.price-tag-overlay {
    position: absolute;
    bottom: 15px;   /* Odstęp od dołu karty */
    right: 15px;    /* Odstęp od prawej krawędzi karty */

    background: #fff;
    color: #000;
    border: 2px solid #000; /* Gruby czarny kontur */
    padding: 8px 15px;
    font-weight: 800;
    font-size: 18px;
    border-radius: 8px;
    z-index: 50;
    box-shadow: 3px 3px 0px #000; /* Cień w stylu komiksowym */
}

/* W ogłoszeniach poziomych musimy zrobić miejsce na cenę, żeby nie zasłaniała tekstu */
.listing-card-horizontal {
    padding-right: 10px; 
}
.listing-card-horizontal .h-card-content {
    padding-bottom: 50px; /* Miejsce na dole na cenę */
}


/* ==========================================
   POPRAWKA FINALNA: CZYSTY STYL (BRAK RAMEK)
   ========================================== */

/* --- SERDUSZKO (Czysta ikona bez ramki) --- */
.like-btn {
    background: transparent !important; /* Usuwamy białe tło */
    border: none !important;            /* Usuwamy czarną ramkę */
    box-shadow: none !important;        /* Usuwamy cień */
    top: 10px !important;               /* Lekka korekta pozycji */
    right: 10px !important;
}

.like-btn svg {
    width: 28px;
    height: 28px;
    stroke: #333 !important;    /* Ciemnoszary kontur */
    stroke-width: 2px;
    fill: transparent !important; /* Przezroczysty środek */
    /* Dodajemy cień samej ikonie, żeby była widoczna nawet na jasnym tle */
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
    transition: all 0.3s ease;
}

/* --- SERDUSZKO AKTYWNE (Po kliknięciu) --- */
.like-btn.liked svg {
    fill: #e74c3c !important;   /* Czerwone wypełnienie */
    stroke: #e74c3c !important; /* Czerwony obrys (żeby nie było widać czarnego) */
    transform: scale(1.1);      /* Lekki puls przy kliknięciu */
}

/* --- CENA (Żółte tło, bez ramki) --- */
.price-tag-overlay {
    background-color: #FBB900 !important; /* Twój żółty kolor */
    color: #000 !important;               /* Czarny tekst */
    border: none !important;              /* Usuwamy ramkę */
    box-shadow: none !important;          /* Usuwamy cień */
    border-radius: 6px;                   /* Ładne zaokrąglenie */
    font-weight: 700;
    font-size: 16px;
    padding: 6px 12px;

    /* Pozycjonowanie */
    bottom: 10px !important;
    right: 10px !important;
}


/* ==========================================
   PANEL WŁAŚCICIELA (Prawy Górny Róg)
   ========================================== */

.owner-floating-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 8px; /* Odstęp między przyciskami */
    z-index: 50;
}

.owner-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: transform 0.2s, background 0.2s;
}

.owner-btn:hover {
    transform: scale(1.1);
    background: #f0f0f0;
}

/* Kolory konkretnych akcji */
.btn-delete-icon { color: #e74c3c; } /* Czerwony kosz */
.btn-edit-icon { color: #3498db; }   /* Niebieski ołówek */
.btn-sold-icon { color: #27ae60; }   /* Zielony uścisk dłoni */

/* Gdy ogłoszenie jest sprzedane, przycisk jest ciemny */
.owner-btn.is-sold-state {
    background: #27ae60;
    color: white;
}


/* ==========================================
   IKONY WŁAŚCICIELA (KONTUROWE)
   ========================================== */

.owner-btn svg {
    width: 18px;
    height: 18px;
    stroke: #000;         /* Czarny kontur */
    stroke-width: 2px;
    fill: none;           /* Brak wypełnienia (przezroczyste) */
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: all 0.2s ease;
}

/* Hover: Lekka zmiana koloru konturu po najechaniu */
.owner-btn:hover svg {
    stroke: #555;
}

/* Specjalny styl dla 'Sprzedane' (gdy aktywne) */
.owner-btn.is-sold-state {
    background-color: #000; /* Czarne tło przycisku */
}
.owner-btn.is-sold-state svg {
    stroke: #fff; /* Biały kontur dolara na czarnym tle */
}

/* --- POWIADOMIENIA --- */
.notification-wrapper {
    position: relative;
    display: inline-block;
    margin-right: 15px; /* Odstęp od przycisku Dodaj */
    cursor: pointer;
}

.bell-icon {
    font-size: 24px;
    color: #333;

    top: 5px;
    transition: color 0.2s;
}

.bell-icon:hover {
    color: #FBB900;
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    border: 2px solid white;
}

/* Dropdown */
.notification-dropdown {
    display: none; /* Domyślnie ukryte */
    position: absolute;
    top: 100%;
    right: -10px; /* Lekkie przesunięcie */
    width: 300px;
    background: white;
    border: 1px solid #ddd;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    border-radius: 8px;
    z-index: 1000;
    overflow: hidden;
}

/* Pokazujemy dropdown po najechaniu na wrapper */
.notification-wrapper:hover .notification-dropdown {
    display: block;
}

.notif-header {
    background: #f9f9f9;
    padding: 10px;
    font-weight: bold;
    font-size: 13px;
    border-bottom: 1px solid #eee;
    color: #555;
}

.notif-list {
    max-height: 300px;
    overflow-y: auto;
}

.notif-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
}

.notif-listing-thumb {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 8px;
    object-fit: cover;
    background: #eef1f2;
    border: 1px solid rgba(0,0,0,.07);
}

.notif-item-content {
    min-width: 0;
    flex: 1;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

html[data-theme="dark"] .notif-listing-thumb {
    background: var(--km-surface-3, #242a2e);
    border-color: var(--km-border, #353c42);
}

.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: #fdfdfd; }
.notif-item.unread { background: #fff8e1; border-left: 3px solid #FBB900; }

.notif-empty { padding: 20px; text-align: center; color: #999; font-size: 13px; }

/* ========================================= */
/* --- SLIDER POLECANYCH (Wersja Docelowa) --- */
/* ========================================= */


.featured-title { font-size: 22px; color: #FBB900; margin-bottom: 15px; font-weight: bold; }

.featured-slider {
    display: flex; 
    overflow-x: auto; 
    gap: 20px; 
    padding-bottom: 15px; 
    scroll-snap-type: x mandatory;
}

/* Stylizacja paska przewijania (tylko dla slidera) */
.featured-slider::-webkit-scrollbar { height: 10px; }
.featured-slider::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 5px; }
.featured-slider::-webkit-scrollbar-thumb { background: #FBB900; border-radius: 5px; }
.featured-slider::-webkit-scrollbar-thumb:hover { background: #FBB900; }

/* Wygląd pojedynczej karty w sliderze (jak na screenie) */
.feat-card {
    flex: 0 0 260px; /* Szerokość karty */
    background: white; 
    border-radius: 8px; 
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08); 
    scroll-snap-align: start; 
    cursor: pointer; 
    transition: transform 0.2s, box-shadow 0.2s; 
    display: flex;
    flex-direction: column;
}

.feat-card:hover { 
    transform: translateY(-4px); 
    box-shadow: 0 8px 16px rgba(0,0,0,0.12); 
}

/* Kontener na zdjęcie ze znacznikiem */
.feat-img-container {
    position: relative;
    height: 170px;
    width: 100%;
}

.feat-img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    display: block; 
}

/* Znacznik POLECANE w lewym górnym rogu na zdjęciu (Tylko w sliderze) */
.feat-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: #FBB900; /* Żółty kolor */
    color: #111; 
    font-weight: 800;
    font-size: 11px;
    padding: 6px 12px;
    border-radius: 4px;
    text-transform: uppercase;
    z-index: 2;
}

/* Zawartość tekstowa karty w sliderze */
.feat-content { 
    padding: 16px; 
    display: flex;
    flex-direction: column;
    gap: 15px; /* Równe odstępy między rzędami */
}

.feat-title { 
    font-size: 18px; 
    font-weight: 700; 
    color: #001f3f; 
    margin: 0; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis;
}

.feat-price { 
    color: #c0392b; 
    font-weight: 800; 
    font-size: 22px; 
    margin: 0; 
}

.feat-details {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #7f8c8d; 
}

/* ========================================= */
/* --- ZNACZNIK POLECANE NA GŁÓWNEJ LIŚCIE --- */
/* ========================================= */

.main-listing-card {
    position: relative !important;
    border: 1px solid #eee;
    transition: transform 0.2s, box-shadow 0.2s;
}

.main-listing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.featured-badge-main {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #FBB900;
    color: #222;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 4px;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    letter-spacing: 0.5px;
}

.search-text-row {
    margin-bottom: 20px;
    width: 100%;
}

/* ========================================= */
/* --- USTAWIENIA / DASHBOARD UŻYTKOWNIKA --- */
/* ========================================= */

.dashboard-wrapper { display: flex; gap: 30px; margin-top: 20px; margin-bottom: 40px; flex-wrap: wrap; }

/* Lewy panel nawigacji */
.dashboard-sidebar { width: 280px; background: #fff; border-radius: 12px; box-shadow: 0 2px 15px rgba(0,0,0,0.04); overflow: hidden; height: fit-content; border: 1px solid #eee; }
.dash-user-info { padding: 25px 20px; text-align: center; border-bottom: 1px solid #eee; background: #fafafa; }
.dash-avatar { width: 80px; height: 80px; background: #FBB900; color: #fff; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 32px; font-weight: bold; margin-bottom: 10px; }
.dash-menu-item { display: block; padding: 16px 20px; color: #555; text-decoration: none; font-weight: 500; border-bottom: 1px solid #f9f9f9; transition: 0.2s; }
.dash-menu-item:hover { background: #fcfcfc; color: #111; padding-left: 25px; }
.dash-menu-item.active { background: #fffcf2; color: #FBB900; border-left: 4px solid #FBB900; font-weight: 600; }

/* Główny panel ustawień */
.dashboard-content { flex: 1; min-width: 300px; background: #fff; border-radius: 12px; box-shadow: 0 2px 15px rgba(0,0,0,0.04); padding: 35px; border: 1px solid #eee; }
.dashboard-content h2 { margin-top: 0; color: #2c3e50; border-bottom: 2px solid #FBB900; padding-bottom: 15px; margin-bottom: 30px; font-size: 22px; }

/* Pola formularza ustawień */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 768px) { .settings-grid { grid-template-columns: 1fr; } }
.settings-form-group { margin-bottom: 20px; }
.settings-form-group label { display: block; font-weight: 600; margin-bottom: 8px; color: #444; font-size: 14px; }
.settings-form-group input { width: 100%; padding: 15px; border: 1px solid #ddd; border-radius: 8px; font-size: 15px; outline: none; transition: all 0.2s; box-sizing: border-box; background: #fdfdfd; }
.settings-form-group input:focus { border-color: #FBB900; box-shadow: 0 0 0 3px rgba(251, 185, 0,0.15); background: #fff; }

/* ========================================= */
/* --- WIDOK POZIOMY OGŁOSZEŃ (STYL OLX) --- */
/* ========================================= */

/* Zmieniamy układ kontenera z siatki na listę pionową */
.list-view-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Główna karta ogłoszenia */
.horizontal-card {
    display: flex;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s;
    position: relative;
    border: 1px solid #eee;
}

.horizontal-card:hover {
    /* Używamy box-shadow do symulacji ramki, żeby nie psuć układu */
    box-shadow: 0 0 0 3px #FBB900; /* 3-pikselowa, twarda żółta ramka */
    transform: translateY(-3px); /* Lekkie uniesienie */
}

/* Lewa strona - Zdjęcie */
.hc-image-wrapper {
    width: 280px;
    min-height: 200px; /* To gwarantuje stałą wysokość karty */
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    border-radius: 10px 0 0 10px;
}

.password-input-wrap {
    position: relative;
    display: block;
    width: 100%;
}

.password-input-wrap > input {
    width: 100%;
    padding-right: 48px !important;
}

.password-eye {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    opacity: .62;
    line-height: 1;
}

.password-eye:hover,
.password-eye:focus-visible,
.password-eye.is-visible {
    opacity: 1;
    background: rgba(251, 185, 0, .18);
}

.hc-image-wrapper img {
    position: absolute; /* Odrywa zdjęcie od układu, by nie rozciągało karty */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Automatycznie kadruje i ucina nadmiar zdjęcia */
    display: block;
    border-radius: inherit;
}

/* Plakietka "Polecane" nad zdjęciem */
.hc-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #FBB900; /* NOWY KOLOR: Żółty */
    color: #222; /* NOWY KOLOR TEKSTU: Ciemny dla kontrastu */
    font-weight: 800;
    font-size: 11px;
    padding: 6px 12px;
    border-radius: 4px;
    text-transform: uppercase;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15); /* Delikatny cień dla lepszej czytelności na jasnych zdjęciach */
}

/* Prawa strona - Treść */
.hc-content {
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

/* Góra z tytułem i serduszkiem */
.hc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

.hc-title {
    margin: 0;
    font-size: 20px;
    color: #2c3e50;
    font-weight: 700;
    line-height: 1.3;
}

.hc-favorite {
    font-size: 28px; /* Nieco większe, bo to kontur */
    color: #111; /* Ciemny, prawie czarny kolor konturu */
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    line-height: 1;
    user-select: none; /* Zapobiega przypadkowemu zaznaczeniu tekstu */
}

.hc-favorite:hover, .hc-favorite.active {
    color: #e74c3c; /* Czerwone po najechaniu myszką lub polubieniu */
    transform: scale(1.15); /* Fajny, delikatny efekt powiększenia przy najechaniu */
}

/* Parametry (środek) */
.hc-details {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.hc-detail-tag {
    background: #f2f4f5;
    color: #555;
    font-size: 13px;
    padding: 5px 10px;
    border-radius: 6px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Dół z lokalizacją i ceną */
.hc-footer {
    display: inline-flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin-top: auto;
}

.hc-location {
    color: #7f8c8d;
    font-size: 14px;
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    align-self: flex-end;
    line-height: 1.35;
}

.hc-location-icon {
    color: var(--yellow, #FBB900);
    flex: 0 0 auto;
}

.hc-price {
    color: #c0392b;
    font-size: 24px;
    font-weight: 800;
    margin: 0;
}

.hc-price-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-left: auto;
    text-align: right;
}

.hc-price-stack .hc-rental-total {
    flex: 0 0 auto;
    width: auto !important;
    max-width: none;
    align-self: flex-start;
    text-align: right;
}

.hc-rental-total {
    flex: 1 0 100%;
    margin-top: 4px;
    color: #2d3436;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    text-align: right;
}

html[data-theme="dark"] .hc-rental-total {
    color: #f5f7fa !important;
}

/* Wersja mobilna */
@media (max-width: 768px) {
    .horizontal-card {
        flex-direction: column;
    }
    .hc-image-wrapper {
        width: 100%;
        height: 200px;
        border-radius: 10px 10px 0 0;
    }
    .hc-title {
        font-size: 18px;
    }
    .hc-price {
        font-size: 20px;
    }
}

/* =========================================
   MODAL WIADOMOŚCI
   ========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(17, 17, 17, 0.7); /* bazuje na Twoim --dark */
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background-color: #fff;
    width: 90%;
    max-width: 450px;
    border-radius: var(--radius); /* Używa Twojej zmiennej 12px */
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-box {
    transform: translateY(0) scale(1);
}

.modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--dark);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--muted);
    transition: color 0.2s;
    line-height: 1;
    padding: 0;
}

.close-btn:hover {
    color: var(--yellow, #FBB900);
}

.modal-body {
    padding: 24px;
    background-color: var(--bg-gray);
}

.modal-body textarea {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 14px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
    min-height: 120px;
}

.modal-body textarea:focus {
    border-color: var(--yellow, #FBB900);
}

.modal-footer {
    padding: 18px 24px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background-color: #fff;
}

.modal-btn-cancel {
    background-color: #fff;
    color: var(--dark);
    border: 1px solid #ddd;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}

.modal-btn-cancel:hover {
    background-color: var(--bg-gray);
}

/* =========================================
   MINI SLIDER ZDJĘĆ W KARTACH
   ========================================= */
.hc-image-wrapper {
    position: relative;
    overflow: hidden;
}

.card-slider {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease-in-out;
}

.card-slider img {
    min-width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Przyciski nawigacyjne (strzałki) */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.92);
    color: #111;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 900;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s, transform 0.2s, border-color 0.2s;
    z-index: 10;
    box-shadow: 0 8px 20px rgba(0,0,0,0.22);
}

/* Pokazujemy strzałki tylko, gdy najedziemy na zdjęcie */
.hc-image-wrapper:hover .slider-btn,
.feat-img-container:hover .slider-btn {
    opacity: 1;
}

.slider-btn:hover {
    background: var(--yellow);
    border-color: #111;
    transform: translateY(-50%) scale(1.06);
}

.slider-prev { left: 10px; }
.slider-next { right: 10px; }

/* Kropki na dole */
.slider-dots {
    position: absolute;
    bottom: 8px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 4px;
    z-index: 10;
}

.dot {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transition: background 0.2s;
}

.dot.active {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.2);
}

/* =========================================
   STYLE DLA STOPKI (FOOTER) - WERSJA ŻÓŁTA
   ========================================= */

.site-footer {
    background: var(--yellow); /* Główne żółte tło */
    color: #1a1a1a; /* Ciemny tekst dla idealnego kontrastu */
    padding: 60px 0 0 0; 
    font-family: inherit;
    margin-top: 20px; 
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1200px; 
    margin: 0 auto;
    padding: 0 20px;
    gap: 30px;
}

.footer-col {
    flex: 1;
    min-width: 220px; 
}

.footer-col h4 {
    color: #000000; /* Mocny, czarny nagłówek */
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
    font-weight: bold;
}

/* Ozdobna kreseczka pod nagłówkami kolumn */
.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    background-color: #1a1a1a; /* Ciemna kreseczka */
    height: 2px;
    width: 40px;
}

.footer-col p {
    font-size: 14px;
    line-height: 1.6;
    color: #333333; /* Ciemnoszary, czytelny tekst */
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: #333333; /* Ciemnoszare linki */
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease, font-weight 0.1s;
}

.footer-col ul li a:hover {
    color: #000000; /* Całkowicie czarne po najechaniu myszką */
    font-weight: 600; /* Lekkie pogrubienie po najechaniu */
}

/* --- PRZYCISK WESPRZYJ NAS --- */
.btn-support {
    display: inline-block;
    background-color: #1a1a1a; /* Czarny przycisk na żółtym tle wygląda premium */
    color: #ffffff !important; /* Biały tekst na przycisku */
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 10px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-support:hover {
    background-color: #444444; /* Nieco jaśniejszy po najechaniu */
    transform: translateY(-2px); 
}

.site-footer .btn-support,
.site-footer .btn-support:visited,
.site-footer .btn-support:hover,
.site-footer .btn-support:focus,
html[data-theme="dark"] .site-footer .btn-support,
html[data-theme="dark"] .site-footer .btn-support:visited,
html[data-theme="dark"] .site-footer .btn-support:hover,
html[data-theme="dark"] .site-footer .btn-support:focus {
    color: #ffffff !important;
}

.site-footer .feedback-footer-link,
.site-footer .feedback-footer-link:visited {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: max-content !important;
    min-width: 0 !important;
    max-width: max-content !important;
    box-sizing: border-box;
    margin-top: 12px;
    padding: 7px 9px !important;
    border: 0;
    border-radius: 6px;
    background: #1a1a1a;
    color: #fff !important;
    font-size: 13px;
    line-height: 1.25;
    font-weight: 750;
    white-space: nowrap;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.site-footer .feedback-footer-link:hover,
.site-footer .feedback-footer-link:focus {
    background: #444444;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, .14);
}

html[data-theme="dark"] .site-footer .feedback-footer-link,
html[data-theme="dark"] .site-footer .feedback-footer-link:visited {
    background: #1a1a1a;
    color: #fff !important;
}

html[data-theme="dark"] .site-footer .feedback-footer-link:hover,
html[data-theme="dark"] .site-footer .feedback-footer-link:focus {
    background: #444444;
    color: #fff !important;
}

@media (max-width: 768px) {
    .site-footer .feedback-footer-link {
        width: max-content !important;
        min-width: 0 !important;
        max-width: max-content !important;
        white-space: nowrap;
    }
}

/* --- OBRAZKI APLIKACJI (a.png, b.png) --- */
.app-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.app-badge {
    max-width: 150px; 
    height: auto;
    border-radius: 8px;
    transition: opacity 0.3s ease, transform 0.2s ease;
    display: block;
}

.app-badge:hover {
    opacity: 0.9;
    transform: scale(1.02); /* Lekkie powiększenie ikonek sklepów przy najechaniu */
}

/* --- PASEK DOLNY (COPYRIGHT) --- */
.footer-bottom {
    background-color: #111111; /* Zostawiamy ciemny pasek na samym dole - świetnie zamyka stronę odcinając ją od przeglądarki */
    text-align: center;
    padding: 15px 0;
    margin-top: 40px;
    font-size: 13px;
    color: #aaaaaa; /* Jasnoszary tekst na czarnym pasku */
}

/* --- RESPONSYWNOŚĆ (DLA TELEFONÓW) --- */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        gap: 40px;
    }
}

/* =========================================
   NAPRAWA RWD I POZIOMEGO SCROLLA (Wklej na sam dół)
   ========================================= */

/* 1. Globalna blokada: strona nigdy nie będzie szersza niż ekran urządzenia */
html, body {
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
}

/* 2. Zabezpieczenie kontenera ze sliderem (wymusza scroll wewnątrz, a nie na całej stronie) */
.featured-section {
    max-width: 100%;
    overflow-x: hidden; 
}

.featured-slider {
    width: 100%;
    box-sizing: border-box;
    padding-left: 15px;
    padding-right: 15px;
    /* Upewniamy się, że scroll pojawia się tylko tu */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* Płynne przewijanie na iOS */
}

/* 3. Globalny box-sizing (żeby paddingi nie powiększały szerokości kontenerów) */
*, *::before, *::after {
    box-sizing: border-box;
}

/* 4. Poprawki czysto pod telefony (ekrany do 768px) */
@media (max-width: 768px) {
    /* Zabezpieczenie głównych kontenerów na liście */
    .listing-container, 
    .list-view-container {
        padding-left: 15px;
        padding-right: 15px;
        width: 100%;
    }

    /* Modal (okienko wiadomości) na małym ekranie niech wypełnia więcej miejsca */
    .modal-box {
        width: 95%;
        margin: 0 auto;
    }

    /* Poprawka dla dashboardu (żeby panel i menu nie wychodziły za ekran) */
    .dashboard-wrapper {
        flex-direction: column;
        padding: 0 15px;
    }
    
    .dashboard-sidebar, 
    .dashboard-content {
        width: 100%;
        min-width: auto; /* Kasujemy sztywne min-width z desktopu */
    }
}

/* ========================================= */
/* --- NAPRAWIONY SLIDER POLECANYCH --- */
/* ========================================= */

.featured-section { 
    
    
    /* KLUCZOWE LINIJKI ZAPOBIEGAJĄCE ROZPYCHANIU: */
    width: 100%; 
    max-width: 100%; /* Nigdy nie przekraczaj szerokości rodzica */
    min-width: 0;    /* Magiczna funkcja CSS, która powstrzymuje Flexbox i Grid przed psuciem układu! */
    overflow-x: hidden; /* Odcinamy wszystko, co chce wypchnąć stronę */
    box-sizing: border-box;
}

.featured-slider {
    display: flex; 
    overflow-x: auto; /* Zezwalamy na scrollowanie TYLKO wewnątrz tego paska */
    gap: 20px; 
    padding-bottom: 15px; 
    scroll-snap-type: x mandatory;
    
    /* Zabezpieczenie szerokości samego paska */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch; /* Płynny scroll na iOS */
}

/* Karta zostaje bez zmian, bo to nie jej wina, tylko kontenera */
.feat-card {
    flex: 0 0 260px; 
    background: white; 
    border-radius: 8px; 
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08); 
    scroll-snap-align: start; 
    cursor: pointer; 
    transition: transform 0.2s, box-shadow 0.2s; 
    display: flex;
    flex-direction: column;
}
img.shortcut-icon {
    object-fit: contain; /* Sprawia, że obrazek zachowuje proporcje i nie ucina go */
    display: block;      /* Ustawia grafikę równo nad tekstem */
    margin: 0 auto;      /* Centruje grafikę w przycisku */
    /* Jeśli w starym CSS klasa .shortcut-icon nie miała podanych wymiarów, 
       dodaj je tutaj, np. width: 40px; height: 40px; */
}

/* --- BANER COOKIES --- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #1a1a1a; /* Ciemne tło, żeby ładnie kontrastowało z żółtym przyciskiem */
    color: #ffffff;
    padding: 15px 5%;
    display: flex; /* Będzie nadpisywane przez JS, domyślnie jest ukryte */
    justify-content: space-between;
    align-items: center;
    z-index: 9999;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.2);
}

.cookie-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.cookie-content a {
    color: #FBB900; /* Ten sam żółty kolor co Twoje przyciski */
    text-decoration: underline;
}

.cookie-content a:hover {
    text-decoration: none;
}

/* Wersja na telefony (żeby tekst i przycisk ułożyły się jedno pod drugim) */
@media (max-width: 768px) {
    .cookie-banner {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 20px;
    }
}

/* Domyślnie ukrywamy reklamy mobilne (dla komputerów) */
        .mobile-ad {
            display: none; 
        }

        /* --- ZMIANY TYLKO DLA EKRANÓW MOBILNYCH (poniżej 768px) --- */
        @media (max-width: 768px) {
            /* 1. Ukrywamy całkowicie boczne paski desktopowe */
            .desktop-ad {
                display: none !important;
            }

            /* 2. Pokazujemy i formatujemy płaskie banery mobilne */
            .mobile-ad {
                display: flex;
                justify-content: center;
                width: 90%;
                margin: 15px auto; /* Centruje i daje margines góra/dół */
            }

            .mobile-ad img {
                width: 100%;       /* Zajmie 100% z tych 90% szerokości ojca */
                height: 80px;      /* Ustaw niską wysokość (możesz zmienić, np. 100px) */
                object-fit: cover; /* Sprawia, że obrazek ładnie wypełni ramy bez rozciągania proporcji */
                border-radius: 8px;/* Lekko zaokrąglone rogi (opcjonalnie, ładniej wygląda) */
                box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            }
        }

        /* --- ZMIANY DLA TELEFONÓW (upewnij się, że to jest wewnątrz @media) --- */
        @media (max-width: 768px) {
            
            /* Sprawiamy, że DMC i Cena zajmują całą dostępną szerokość (wszystkie kolumny) */
            #group-dmc, 
            #group-price {
                grid-column: 1 / -1 !important;
            }

            /* Opcjonalnie: Przycisk "Szukaj" też warto rozciągnąć na maxa na telefonie */
            .search-actions {
                grid-column: 1 / -1 !important;
            }
            
            /* (Jeśli masz inne rzeczy w @media, to zostaw je tutaj) */
        }
        
        /* Styl dla aktywnego/klikniętego skrótu */
.shortcut-item.img.active {
    background-color: var(--yellow, #FBB900) !important; /* Tutaj podaj swój odcień żółtego, jeśli masz zmienną */
    color: #000 !important; /* Zmienia kolor tekstu/ikonki na czarny, żeby był czytelny na żółtym */
    border-color: var(--yellow, #FBB900) !important;
    transform: scale(1.05); /* Delikatne powiększenie (opcjonalnie) */
    transition: 0.3s ease;
}

/* Jeśli masz ikonki w tagu <i> lub <svg>, upewnij się, że też zmieniają kolor */
.shortcut-item.active i,
.shortcut-item.active svg {
    color: #000 !important;
    fill: #000 !important;
    border-radius: 10px;
}

/* --- NOWE STYLE PODŚWIETLANIA IKOŃ (index.html) --- */

        /* 1. Resetujemy domyślne tło karty skrótu, żeby nie reagowało na klasę active */
        .shortcut-item.active {
            background-color: transparent !important; /* Szare tło znika na aktywnym */
            border-color: transparent !important;
            transform: none !important; /* Zapobiegamy powiększaniu całej karty */
        }

        /* 2. Stylizujemy ikonkę/zdjęcie wewnątrz aktywnej karty */
        /* Ten selektor trafia zarówno w <img class="shortcut-icon"> jak i <div class="shortcut-icon icon-inne"> */
        .shortcut-item.active .shortcut-icon {
            border: 3px solid var(--yellow, #FBB900); /* Twój żółty/złoty kolor ringu */
            border-radius: 50%; /* Zakładam, że ikonki są okrągłe, to stworzy ring */
            box-shadow: 0 0 15px var(--yellow, rgba(251, 185, 0, 0.5)); /* Lekka poświata wokół ringu */
            transform: scale(1.1); /* Delikatne powiększenie samej ikonki */
            transition: all 0.3s ease;
            background-color: white; /* Upewnia się, że ikonka ma białe tło pod ringiem */
            box-sizing: border-box; /* Zabezpiecza przed skakaniem obrazka przy dodawaniu borderu */
        }

        /* 3. Aby uniknąć "skakania" obrazka, domyślna ikonka też musi mieć przezroczysty border */
        .shortcut-icon {
            border: 4px solid transparent; /* Margines na border, którego nie widać */
            border-radius: 50%;
            transition: all 0.3s ease;
            padding: 2px; /* Daje trochę oddechu między zdjęciem a ringiem */
        }

                .shortcut-item.active .shortcut-icon {
            border: 3px solid var(--yellow, #FBB900); /* Twój żółty/złoty kolor ringu */
            border-radius: 50%; /* Zakładam, że ikonki są okrągłe, to stworzy ring */
            box-shadow: 0 0 15px var(--yellow, rgba(251, 185, 0, 0.5)); /* Lekka poświata wokół ringu */
            transform: scale(1.1); /* Delikatne powiększenie samej ikonki */
            transition: all 0.3s ease;
            background-color: white; /* Upewnia się, że ikonka ma białe tło pod ringiem */
            box-sizing: border-box; /* Zabezpiecza przed skakaniem obrazka przy dodawaniu borderu */
        }

        .shortcut-item.active .shortcut-icon {
            border: 3px solid var(--yellow, #FBB900); /* Twój żółty/złoty kolor ringu */
            border-radius: 50%; /* Zakładam, że ikonki są okrągłe, to stworzy ring */
            box-shadow: 0 0 15px var(--yellow, rgba(251, 185, 0, 0.5)); /* Lekka poświata wokół ringu */
            transform: scale(1.1); /* Delikatne powiększenie samej ikonki */
            transition: all 0.3s ease;
            background-color: white; /* Upewnia się, że ikonka ma białe tło pod ringiem */
            box-sizing: border-box; /* Zabezpiecza przed skakaniem obrazka przy dodawaniu borderu */
        }

        /* --- STYLE PODŚWIETLANIA IKOŃ (listings.html) --- */

        /* 1. Resetujemy domyślne tło karty skrótu */
        .shortcut-item.active {
            background-color: transparent !important;
            border-color: transparent !important;
            transform: none !important; 
        }

        /* 2. Stylizujemy samą ikonkę/zdjęcie wewnątrz */
        .shortcut-item.active .shortcut-icon {
            border: 4px solid var(--yellow, #FBB900); 
            border-radius: 50%; 
            box-shadow: 0 0 15px var(--yellow, rgba(251, 185, 0, 0.5)); 
            transform: scale(1.1); 
            transition: all 0.3s ease;
            background-color: white; 
            box-sizing: border-box; 
        }

        /* 3. Przezroczysty border dla nieaktywnych, żeby obrazki nie "skakały" */
        .shortcut-icon {
            border: 4px solid transparent; 
            border-radius: 50%;
            transition: all 0.3s ease;
            padding: 2px; 
        }

@media (max-width: 768px){
    #group-sleep{
        grid-column: 1 / -1 !important;
    }
}

/* THEME */
.theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--dark);
  background: var(--yellow);
  color: #111;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2);
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
}

.theme-toggle svg {
  width: 21px;
  height: 21px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 768px) {
  .theme-toggle {
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
    font-size: 18px;
  }
}

.load-more-controls {
    display: flex;
    justify-content: center;
    margin: 28px 0 8px;
}

.load-more-btn {
    min-width: 240px;
    height: 50px;
    border: 2px solid #111;
    border-radius: 8px;
    background: var(--yellow);
    color: #000;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(0,0,0,0.18);
    background: #FBB900;
}

.pagination {
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 34px auto 48px;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.page-btn,
.page-number-btn {
    min-width: 42px;
    height: 42px;
    border: 1px solid #d7dde1;
    border-radius: 8px;
    background: #fff;
    color: #111;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.page-btn {
    padding: 0 18px;
}

.page-btn:hover:not(:disabled),
.page-number-btn:hover,
.page-number-btn.active {
    background: var(--yellow);
    border-color: #111;
    color: #000;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}

.page-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.page-info {
    width: 100%;
    text-align: center;
    color: #667078;
    font-size: 13px;
    font-weight: 700;
}

.page-dots {
    color: #667078;
    font-weight: 900;
    padding: 0 2px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --dark: #eaf0f2;
  --muted: #aeb8be;
  --bg-gray: #0f1214;
  --yellow: #FBB900;
}

html[data-theme="dark"] body,
html[data-theme="dark"] main,
html[data-theme="dark"] .chat-messages {
  background: #0f1214 !important;
  color: #eaf0f2 !important;
}

html[data-theme="dark"] .site-header,
html[data-theme="dark"] .form-card,
html[data-theme="dark"] .login-card,
html[data-theme="dark"] .search-panel,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .modal-sticky-header,
html[data-theme="dark"] .chat-layout,
html[data-theme="dark"] .chat-window,
html[data-theme="dark"] .chat-header,
html[data-theme="dark"] .chat-input-area,
html[data-theme="dark"] .card-base,
html[data-theme="dark"] .main-column,
html[data-theme="dark"] .specs-container,
html[data-theme="dark"] .side-column > div,
html[data-theme="dark"] .my-card,
html[data-theme="dark"] .notif-dropdown,
html[data-theme="dark"] .user-dropdown,
html[data-theme="dark"] .user-dropdown-header {
  background: #171b1e !important;
  color: #eaf0f2 !important;
  border-color: #353c42 !important;
  box-shadow: 0 8px 22px rgba(0,0,0,0.35) !important;
}

html[data-theme="dark"] .chat-messages {
  background: transparent !important;
}

html[data-theme="dark"] .shortcut-icon,
html[data-theme="dark"] .shortcut-item.active .shortcut-icon,
html[data-theme="dark"] .spec-item,
html[data-theme="dark"] .hc-detail-tag,
html[data-theme="dark"] .map-controls,
html[data-theme="dark"] .chat-sidebar,
html[data-theme="dark"] .chat-tab,
html[data-theme="dark"] .user-dropdown a,
html[data-theme="dark"] .user-dropdown button,
html[data-theme="dark"] .notif-header,
html[data-theme="dark"] .notif-item,
html[data-theme="dark"] #checkboxes,
html[data-theme="dark"] .selectBox select {
  background: #242a2e !important;
  color: #eaf0f2 !important;
  border-color: #353c42 !important;
}

html[data-theme="dark"] .shortcut-item.active .shortcut-icon {
  background: #FBB900 !important;
  border-color: #FBB900 !important;
  box-shadow: 0 0 0 2px #111, 0 0 18px rgba(251, 185, 0, 0.55) !important;
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .form-card input:not([type="checkbox"]),
html[data-theme="dark"] .form-card select,
html[data-theme="dark"] .form-card textarea,
html[data-theme="dark"] .search-panel input,
html[data-theme="dark"] .search-panel select,
html[data-theme="dark"] .modal-content input,
html[data-theme="dark"] .modal-content select {
  background: #20262a !important;
  color: #eaf0f2 !important;
  border-color: #465058 !important;
}

html[data-theme="dark"] #invoice-dropdown-btn,
html[data-theme="dark"] #invoice-dropdown-list {
  background: #20262a !important;
  color: #eaf0f2 !important;
  border-color: #465058 !important;
}

html[data-theme="dark"] #invoice-dropdown-btn:hover {
  border-color: var(--yellow) !important;
  box-shadow: 0 0 0 3px rgba(251, 185, 0, 0.16) !important;
}

html[data-theme="dark"] #invoice-selected-text,
html[data-theme="dark"] #invoice-dropdown-list label,
html[data-theme="dark"] #invoice-dropdown-list span {
  color: #eaf0f2 !important;
}

html[data-theme="dark"] #invoice-dropdown-list label:hover {
  background: #2b3237 !important;
}

html[data-theme="dark"] #invoice-dropdown-list input[type="checkbox"] {
  accent-color: var(--yellow);
}

html[data-theme="dark"] a,
html[data-theme="dark"] .nav-link,
html[data-theme="dark"] .btn-link,
html[data-theme="dark"] .advanced-link,
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] .card-title,
html[data-theme="dark"] .card-tile h3,
html[data-theme="dark"] .card-list h3,
html[data-theme="dark"] .listing-desc-container h2,
html[data-theme="dark"] .listing-desc-container p,
html[data-theme="dark"] .spec-value,
html[data-theme="dark"] .shortcut-label {
  color: #eaf0f2 !important;
}

html[data-theme="dark"] .card-price,
html[data-theme="dark"] .price,
html[data-theme="dark"] .card-list .price {
  color: #FBB900 !important;
}

html[data-theme="dark"] .btn-outline,
html[data-theme="dark"] .btn-edit,
html[data-theme="dark"] .btn-del,
html[data-theme="dark"] .card-fav-btn {
  background: #242a2e !important;
  color: #eaf0f2 !important;
  border-color: #465058 !important;
}

html[data-theme="dark"] .theme-toggle {
  border-color: #FBB900;
  background: #242a2e;
  color: #FBB900 !important;
}

/* Mobile storefront and add-listing refinements. */
@media (max-width: 768px) {
  /* Google Play remains visible; the unused iOS placeholder must not look
     like an extra black action beside it. */
  .site-footer .app-links .apple-app-coming-soon {
    display: none !important;
  }

  /* Rental already represents the complete rental catalogue on mobile. */
  body[data-market="rental"] #market-shortcuts .shortcut-all,
  body[data-market="rental"] .filter-shortcuts .shortcut-all {
    display: none !important;
  }

  /* Subcategory is an optional desktop refinement, not a separate mobile step. */
  form#add-form #subcategory-group {
    display: none !important;
  }

  form#add-form .form-section {
    margin-bottom: 34px !important;
  }

  form#add-form .form-section > .form-grid + .form-grid,
  form#add-form .form-section > .form-grid + .form-grid-2,
  form#add-form .form-section > .form-grid-2 + .form-grid,
  form#add-form .form-section > .form-grid-2 + .form-grid-2,
  form#add-form .form-section > .form-group + .form-grid,
  form#add-form .form-section > .form-group + .form-grid-2,
  form#add-form .form-section > .form-group + .form-group {
    margin-top: 18px !important;
  }

  form#add-form .market-type-group {
    margin-bottom: 4px !important;
  }

  form#add-form .market-mode-button {
    -webkit-tap-highlight-color: transparent;
  }

  form#add-form .market-mode-button.active,
  form#add-form .market-mode-button[aria-pressed="true"] {
    border-color: #d29b00 !important;
    border-bottom-color: #765600 !important;
    background: linear-gradient(155deg, #ffe16d 0%, #FBB900 68%, #eaaa00 100%) !important;
    color: #111 !important;
    box-shadow: 0 7px 15px rgba(110,80,0,.23) !important;
  }

  body[data-market="parts"] form#add-form #group-category {
    grid-column: 1 / -1 !important;
  }
}

@media (max-width: 640px) {
  form#add-form .form-grid,
  form#add-form .form-grid-2 {
    grid-template-columns: 1fr !important;
    gap: 17px !important;
  }

  form#add-form .market-mode-buttons {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 7px !important;
  }
}

html[data-theme="dark"] {
  --km-bg: #0f1214;
  --km-surface: #171b1e;
  --km-surface-2: #20262a;
  --km-surface-3: #242a2e;
  --km-border: #353c42;
  --km-border-strong: #465058;
  --km-text: #eaf0f2;
  --km-muted: #aeb8be;
  --km-accent: #FBB900;
}

html[data-theme="dark"] *,
html[data-theme="dark"] *::before,
html[data-theme="dark"] *::after {
  scrollbar-color: var(--km-accent) var(--km-surface-2);
}

html[data-theme="dark"] body {
  background: var(--km-bg) !important;
}

html[data-theme="dark"] .container,
html[data-theme="dark"] .listing-container,
html[data-theme="dark"] .featured-section,
html[data-theme="dark"] .new-announcements,
html[data-theme="dark"] .dashboard-wrapper {
  background: transparent !important;
  color: var(--km-text) !important;
}

html[data-theme="dark"] .listing-card,
html[data-theme="dark"] .listing-card-horizontal,
html[data-theme="dark"] .horizontal-card,
html[data-theme="dark"] .feat-card,
html[data-theme="dark"] .main-listing-card,
html[data-theme="dark"] .gallery-container,
html[data-theme="dark"] .price-card,
html[data-theme="dark"] .specs-section,
html[data-theme="dark"] .description-box,
html[data-theme="dark"] .similar-tile,
html[data-theme="dark"] .map-tile,
html[data-theme="dark"] .sticky-box,
html[data-theme="dark"] .dashboard-sidebar,
html[data-theme="dark"] .dashboard-content,
html[data-theme="dark"] .modal-box,
html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-footer,
html[data-theme="dark"] .img-item,
html[data-theme="dark"] .photo-card,
html[data-theme="dark"] form#add-form,
html[data-theme="dark"] form#edit-form,
html[data-theme="dark"] .form-container,
html[data-theme="dark"] .settings-panel,
html[data-theme="dark"] .dealer-card,
html[data-theme="dark"] .blog-card,
html[data-theme="dark"] .info-box {
  background: var(--km-surface) !important;
  color: var(--km-text) !important;
  border-color: var(--km-border) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35) !important;
}

html[data-theme="dark"] .card-img-container,
html[data-theme="dark"] .card-img-wrapper,
html[data-theme="dark"] .h-card-img,
html[data-theme="dark"] .hc-image-wrapper,
html[data-theme="dark"] .main-image-frame,
html[data-theme="dark"] .thumbs-row,
html[data-theme="dark"] .feat-img-container,
html[data-theme="dark"] .img-manager-container,
html[data-theme="dark"] .img-actions,
html[data-theme="dark"] .drop-zone,
html[data-theme="dark"] .checkbox-group,
html[data-theme="dark"] .custom-checkbox .checkmark,
html[data-theme="dark"] .feature-pill,
html[data-theme="dark"] .dash-user-info,
html[data-theme="dark"] .modal-body,
html[data-theme="dark"] .mobile-ad img,
html[data-theme="dark"] .photo-actions {
  background: var(--km-surface-2) !important;
  color: var(--km-text) !important;
  border-color: var(--km-border) !important;
}

html[data-theme="dark"] .h-card-features,
html[data-theme="dark"] .card-details,
html[data-theme="dark"] .seller-info,
html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-footer,
html[data-theme="dark"] .dash-user-info,
html[data-theme="dark"] .dash-menu-item,
html[data-theme="dark"] .form-card h3,
html[data-theme="dark"] .adv-section-title,
html[data-theme="dark"] .img-actions {
  border-color: var(--km-border) !important;
}

html[data-theme="dark"] .card-title,
html[data-theme="dark"] .card-tile h3,
html[data-theme="dark"] .card-list h3,
html[data-theme="dark"] .listing-title,
html[data-theme="dark"] .listing-desc-container,
html[data-theme="dark"] .description-box,
html[data-theme="dark"] .h-card-title,
html[data-theme="dark"] .hc-title,
html[data-theme="dark"] .feat-title,
html[data-theme="dark"] .dashboard-content h2,
html[data-theme="dark"] .modal-header h3,
html[data-theme="dark"] .settings-form-group label,
html[data-theme="dark"] .form-group label,
html[data-theme="dark"] .custom-checkbox,
html[data-theme="dark"] .checkbox-item,
html[data-theme="dark"] .seller-info,
html[data-theme="dark"] .listing-desc-container p,
html[data-theme="dark"] .detail-item,
html[data-theme="dark"] .hc-favorite {
  color: var(--km-text) !important;
}

html[data-theme="dark"] .card-details,
html[data-theme="dark"] .card-location,
html[data-theme="dark"] .card-tile .meta,
html[data-theme="dark"] .card-list .meta,
html[data-theme="dark"] .h-card-location,
html[data-theme="dark"] .h-card-features,
html[data-theme="dark"] .hc-location,
html[data-theme="dark"] .hc-detail-tag,
html[data-theme="dark"] .feat-details,
html[data-theme="dark"] .listing-title + span,
html[data-theme="dark"] .price-box .title-sub,
html[data-theme="dark"] .spec-label,
html[data-theme="dark"] .dash-menu-item,
html[data-theme="dark"] .modal-body,
html[data-theme="dark"] .close-btn,
html[data-theme="dark"] .search-group label {
  color: var(--km-muted) !important;
}

html[data-theme="dark"] .card-price,
html[data-theme="dark"] .listing-price,
html[data-theme="dark"] .h-card-price,
html[data-theme="dark"] .hc-price,
html[data-theme="dark"] .feat-price,
html[data-theme="dark"] .price-card h1,
html[data-theme="dark"] .featured-title,
html[data-theme="dark"] .section-title,
html[data-theme="dark"] .spec-value {
  color: var(--km-accent) !important;
}

html[data-theme="dark"] .hc-detail-tag,
html[data-theme="dark"] .feature-pill,
html[data-theme="dark"] .dash-menu-item:hover,
html[data-theme="dark"] .dash-menu-item.active,
html[data-theme="dark"] .chat-list-item:hover,
html[data-theme="dark"] .chat-list-item.active,
html[data-theme="dark"] .notif-item:hover,
html[data-theme="dark"] .notif-item.unread,
html[data-theme="dark"] .user-dropdown a:hover,
html[data-theme="dark"] .user-dropdown button:hover,
html[data-theme="dark"] .modal-btn-cancel,
html[data-theme="dark"] .btn-edit-card,
html[data-theme="dark"] .btn-del-card,
html[data-theme="dark"] .slider-control-btn,
html[data-theme="dark"] .card-nav-btn,
html[data-theme="dark"] .admin-icon-btn,
html[data-theme="dark"] .img-btn {
  background: var(--km-surface-3) !important;
  color: var(--km-text) !important;
  border-color: var(--km-border-strong) !important;
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .settings-form-group input,
html[data-theme="dark"] .modal-body textarea,
html[data-theme="dark"] .form-group input,
html[data-theme="dark"] .form-group select,
html[data-theme="dark"] .form-group textarea {
  background: var(--km-surface-2) !important;
  color: var(--km-text) !important;
  border-color: var(--km-border-strong) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #7f8b92 !important;
}

html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] .settings-form-group input:focus,
html[data-theme="dark"] .modal-body textarea:focus {
  border-color: var(--km-accent) !important;
  box-shadow: 0 0 0 3px rgba(251, 185, 0,0.16) !important;
}

html[data-theme="dark"] .site-footer,
html[data-theme="dark"] .footer-bottom {
  background: #0b0d0f !important;
  color: var(--km-muted) !important;
  border-color: var(--km-border) !important;
}

html[data-theme="dark"] .featured-slider::-webkit-scrollbar-track {
  background: var(--km-surface-2) !important;
}

html[data-theme="dark"] .featured-slider::-webkit-scrollbar-thumb {
  background: var(--km-accent) !important;
}

html[data-theme="dark"] .listing-card:hover,
html[data-theme="dark"] .listing-card-horizontal:hover,
html[data-theme="dark"] .horizontal-card:hover,
html[data-theme="dark"] .feat-card:hover,
html[data-theme="dark"] .main-listing-card:hover {
  border-color: var(--km-accent) !important;
  box-shadow: 0 0 0 2px rgba(251, 185, 0,0.6), 0 12px 26px rgba(0,0,0,0.35) !important;
}

/* DARK MODE PATCHES FOR INLINE / GENERATED UI */
html[data-theme="dark"] .site-header,
html[data-theme="dark"] .header-inner,
html[data-theme="dark"] .logo,
html[data-theme="dark"] .logo-img {
  background: var(--km-surface) !important;
}

html[data-theme="dark"] .logo-img {
  background: transparent !important;
  content: url("logoblack.png");
  filter: none !important;
  mix-blend-mode: normal;
}

html[data-theme="dark"] .logo {
  background: transparent !important;
}

html[data-theme="dark"] #mid-section,
html[data-theme="dark"] #company-fields,
html[data-theme="dark"] #dealer-showroom-section,
html[data-theme="dark"] #dealer-showroom-preview,
html[data-theme="dark"] #dealer-status-container,
html[data-theme="dark"] .filter-card,
html[data-theme="dark"] #lista-obserwowanych-filtrow > div,
html[data-theme="dark"] #lista-obserwowanych-filtrow > p,
html[data-theme="dark"] .admin-footer,
html[data-theme="dark"] .tab-content,
html[data-theme="dark"] .tab-btn,
html[data-theme="dark"] .swal2-popup {
  background: var(--km-surface) !important;
  color: var(--km-text) !important;
  border-color: var(--km-border) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.34) !important;
}

html[data-theme="dark"] #company-fields {
  border-top-color: var(--km-border) !important;
}

html[data-theme="dark"] #company-fields h3,
html[data-theme="dark"] #dealer-showroom-section p,
html[data-theme="dark"] #lista-obserwowanych-filtrow p,
html[data-theme="dark"] .filter-card p,
html[data-theme="dark"] .filter-card b,
html[data-theme="dark"] .swal2-title,
html[data-theme="dark"] .swal2-html-container {
  color: var(--km-text) !important;
}

html[data-theme="dark"] #user-dropdown,
html[data-theme="dark"] #user-dropdown[style],
html[data-theme="dark"] .user-dropdown,
html[data-theme="dark"] .notification-dropdown,
html[data-theme="dark"] .notif-dropdown {
  background: var(--km-surface) !important;
  color: var(--km-text) !important;
  border-color: var(--km-border) !important;
  box-shadow: 0 12px 30px rgba(0,0,0,0.45) !important;
}

html[data-theme="dark"] #user-dropdown a,
html[data-theme="dark"] #user-dropdown button,
html[data-theme="dark"] #user-dropdown a[style],
html[data-theme="dark"] .user-dropdown a,
html[data-theme="dark"] .user-dropdown button,
html[data-theme="dark"] .notification-dropdown a,
html[data-theme="dark"] .notification-dropdown button {
  background: var(--km-surface) !important;
  color: var(--km-text) !important;
  border-color: var(--km-border) !important;
}

html[data-theme="dark"] #user-dropdown a:hover,
html[data-theme="dark"] #user-dropdown button:hover,
html[data-theme="dark"] .user-dropdown a:hover,
html[data-theme="dark"] .user-dropdown button:hover {
  background: var(--km-surface-3) !important;
  color: var(--km-accent) !important;
}

html[data-theme="dark"] .btn-edit,
html[data-theme="dark"] .btn-del,
html[data-theme="dark"] .btn-sold,
html[data-theme="dark"] .owner-actions,
html[data-theme="dark"] .listing-actions,
html[data-theme="dark"] .card-actions,
html[data-theme="dark"] .admin-actions,
html[data-theme="dark"] .admin-footer button,
html[data-theme="dark"] .admin-footer a {
  background: var(--km-surface-3) !important;
  color: var(--km-text) !important;
  border-color: var(--km-border-strong) !important;
}

html[data-theme="dark"] #location-btn,
html[data-theme="dark"] .location-btn,
html[data-theme="dark"] button[id*="location"],
html[data-theme="dark"] .btn-location {
  background: var(--km-surface-3) !important;
  color: var(--km-text) !important;
  border-color: var(--km-border-strong) !important;
}

html[data-theme="dark"] #location-btn:hover,
html[data-theme="dark"] .location-btn:hover {
  background: rgba(251, 185, 0,0.18) !important;
  color: var(--km-accent) !important;
}

html[data-theme="dark"] .choices,
html[data-theme="dark"] .choices__inner,
html[data-theme="dark"] .choices__list--dropdown,
html[data-theme="dark"] .choices__list[aria-expanded],
html[data-theme="dark"] .choices__item,
html[data-theme="dark"] .choices__input,
html[data-theme="dark"] .choices[data-type*="select-multiple"] .choices__inner,
html[data-theme="dark"] .choices[data-type*="select-one"] .choices__inner {
  background: var(--km-surface-2) !important;
  color: var(--km-text) !important;
  border-color: var(--km-border-strong) !important;
}

html[data-theme="dark"] .choices__item--selectable,
html[data-theme="dark"] .choices__list--dropdown .choices__item--selectable {
  color: var(--km-text) !important;
}

html[data-theme="dark"] .choices__list--dropdown .choices__item--selectable.is-highlighted,
html[data-theme="dark"] .choices__list[aria-expanded] .choices__item--selectable.is-highlighted {
  background: var(--km-surface-3) !important;
  color: var(--km-accent) !important;
}

html[data-theme="dark"] .choices__item--choice,
html[data-theme="dark"] .choices__item--selectable {
  background: transparent !important;
}

html[data-theme="dark"] .choices__list--multiple .choices__item {
  background: var(--km-accent) !important;
  border-color: var(--km-accent) !important;
  color: #111 !important;
}

html[data-theme="dark"] .icon-inne {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23eaf0f2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='5' cy='12' r='1.7' /%3E%3Ccircle cx='12' cy='12' r='1.7' /%3E%3Ccircle cx='19' cy='12' r='1.7' /%3E%3C/svg%3E") !important;
  background-color: var(--km-surface-2) !important;
}

html[data-theme="dark"] .parts-category-icon {
  background-image: none !important;
  background-color: var(--km-surface-2) !important;
  color: var(--km-text) !important;
}

html[data-theme="dark"] .parts-subcategory-chip {
  background: var(--km-surface-2) !important;
  border-color: var(--km-border) !important;
  color: var(--km-text) !important;
}

html[data-theme="dark"] .parts-subcategory-chip:hover {
  border-color: var(--yellow) !important;
}

html[data-theme="dark"] .parts-subcategory-chip.active {
  background: var(--yellow) !important;
  border-color: var(--yellow) !important;
  color: #111 !important;
}

html[data-theme="dark"] .shortcut-item.active .icon-inne {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='5' cy='12' r='1.7' /%3E%3Ccircle cx='12' cy='12' r='1.7' /%3E%3Ccircle cx='19' cy='12' r='1.7' /%3E%3C/svg%3E") !important;
}

html[data-theme="dark"] .leaflet-control,
html[data-theme="dark"] .leaflet-control a {
  background: var(--km-surface-2) !important;
  color: var(--km-text) !important;
  border-color: var(--km-border) !important;
}

/* Footer stays in its original yellow design also in dark mode. */
html[data-theme="dark"] .site-footer {
  background: var(--yellow) !important;
  color: #1a1a1a !important;
  border-color: transparent !important;
}

html[data-theme="dark"] .footer-col h4 {
  color: #000 !important;
}

html[data-theme="dark"] .footer-col h4::after {
  background-color: #1a1a1a !important;
}

html[data-theme="dark"] .footer-col p,
html[data-theme="dark"] .footer-col ul li a {
  color: #333 !important;
}

html[data-theme="dark"] .footer-col ul li a:hover {
  color: #000 !important;
}

html[data-theme="dark"] .btn-support {
  background: #1a1a1a !important;
  color: #fff !important;
}

html[data-theme="dark"] .footer-bottom {
  background: #111 !important;
  color: #aaa !important;
}

/* Yellow surfaces should always keep black text/icons for contrast. */
.btn-yellow,
.btn-yellow *,
.btn-apply-filters,
.load-more-btn,
.load-more-btn *,
.card-badge,
.msg.mine,
.site-footer,
.site-footer :not(.footer-bottom):not(.footer-bottom *),
#save-search-btn,
#save-search-btn *,
.custom-checkbox input:checked ~ .checkmark,
.choices__list--multiple .choices__item {
  color: #000 !important;
}

html[data-theme="dark"] .page-btn,
html[data-theme="dark"] .page-number-btn {
  background: var(--km-surface-2) !important;
  color: var(--km-text) !important;
  border-color: var(--km-border-strong) !important;
}

html[data-theme="dark"] .page-btn:hover:not(:disabled),
html[data-theme="dark"] .page-number-btn:hover,
html[data-theme="dark"] .page-number-btn.active {
  background: var(--km-accent) !important;
  color: #000 !important;
  border-color: var(--km-accent) !important;
}

html[data-theme="dark"] .page-info,
html[data-theme="dark"] .page-dots {
  color: var(--km-muted) !important;
}

/* Mobile dark mode hardening: override inline/generated white surfaces. */
@media (max-width: 768px) {
  html[data-theme="dark"],
  html[data-theme="dark"] body {
    background: var(--km-bg) !important;
    color: var(--km-text) !important;
  }

  html[data-theme="dark"] .container {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  html[data-theme="dark"] .site-header {
    background: rgba(23, 27, 30, 0.98) !important;
    border-bottom: 1px solid var(--km-border) !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.42) !important;
  }

  html[data-theme="dark"] .header-inner {
    background: transparent !important;
    gap: 10px !important;
  }

  html[data-theme="dark"] .main-nav {
    gap: 8px !important;
  }

  html[data-theme="dark"] .nav-link {
    background: var(--km-surface-2) !important;
    color: var(--km-text) !important;
    border: 1px solid var(--km-border) !important;
  }

  html[data-theme="dark"] .nav-link:hover,
  html[data-theme="dark"] .nav-link:active {
    background: rgba(251, 185, 0,0.16) !important;
    color: var(--km-accent) !important;
    border-color: var(--km-accent) !important;
  }

  html[data-theme="dark"] .theme-toggle {
    top: 8px !important;
    right: 8px !important;
    background: var(--km-accent) !important;
    color: #111 !important;
    border-color: #111 !important;
    box-shadow: 0 8px 22px rgba(0,0,0,0.5) !important;
  }

  html[data-theme="dark"] .hero,
  html[data-theme="dark"] .featured-section,
  html[data-theme="dark"] .new-announcements,
  html[data-theme="dark"] section,
  html[data-theme="dark"] main {
    background: transparent !important;
  }

  html[data-theme="dark"] .search-panel,
  html[data-theme="dark"] .form-card,
  html[data-theme="dark"] .form-container,
  html[data-theme="dark"] .login-card,
  html[data-theme="dark"] .dashboard-sidebar,
  html[data-theme="dark"] .dashboard-content,
  html[data-theme="dark"] .settings-panel,
  html[data-theme="dark"] .filter-card,
  html[data-theme="dark"] .tab-content,
  html[data-theme="dark"] .modal-content,
  html[data-theme="dark"] .modal-box,
  html[data-theme="dark"] .swal2-popup,
  html[data-theme="dark"] .chat-layout,
  html[data-theme="dark"] .chat-window,
  html[data-theme="dark"] .chat-sidebar,
  html[data-theme="dark"] .my-card,
  html[data-theme="dark"] .listing-card,
  html[data-theme="dark"] .listing-card[style],
  html[data-theme="dark"] .listing-card-horizontal,
  html[data-theme="dark"] .horizontal-card,
  html[data-theme="dark"] .main-listing-card,
  html[data-theme="dark"] .feat-card,
  html[data-theme="dark"] .card-base,
  html[data-theme="dark"] .price-card,
  html[data-theme="dark"] .specs-section,
  html[data-theme="dark"] .description-box,
  html[data-theme="dark"] .seller-info,
  html[data-theme="dark"] .sticky-box,
  html[data-theme="dark"] .dealer-card,
  html[data-theme="dark"] .blog-card,
  html[data-theme="dark"] .info-box,
  html[data-theme="dark"] #company-fields,
  html[data-theme="dark"] #dealer-showroom-section,
  html[data-theme="dark"] #dealer-showroom-preview,
  html[data-theme="dark"] #dealer-status-container,
  html[data-theme="dark"] #lista-obserwowanych-filtrow > div,
  html[data-theme="dark"] #lista-obserwowanych-filtrow > p {
    background: var(--km-surface) !important;
    color: var(--km-text) !important;
    border-color: var(--km-border) !important;
    box-shadow: 0 8px 22px rgba(0,0,0,0.36) !important;
  }

  html[data-theme="dark"] .card-img-container,
  html[data-theme="dark"] .card-img-wrapper,
  html[data-theme="dark"] .h-card-img,
  html[data-theme="dark"] .hc-image-wrapper,
  html[data-theme="dark"] .main-image-frame,
  html[data-theme="dark"] .thumbs-row,
  html[data-theme="dark"] .drop-zone,
  html[data-theme="dark"] .checkbox-group,
  html[data-theme="dark"] .admin-footer,
  html[data-theme="dark"] .photo-actions,
  html[data-theme="dark"] .chat-header,
  html[data-theme="dark"] .chat-input,
  html[data-theme="dark"] .chat-input-area,
  html[data-theme="dark"] .chat-tabs,
  html[data-theme="dark"] .chat-tab,
  html[data-theme="dark"] .map-controls,
  html[data-theme="dark"] .feature-pill,
  html[data-theme="dark"] .hc-detail-tag,
  html[data-theme="dark"] .card-details,
  html[data-theme="dark"] .h-card-features,
  html[data-theme="dark"] [style*="background: #f9f9f9"],
  html[data-theme="dark"] [style*="background:#f9f9f9"],
  html[data-theme="dark"] [style*="background: white"],
  html[data-theme="dark"] [style*="background:white"],
  html[data-theme="dark"] [style*="background: #fff"],
  html[data-theme="dark"] [style*="background:#fff"] {
    background: var(--km-surface-2) !important;
    color: var(--km-text) !important;
    border-color: var(--km-border) !important;
  }

  html[data-theme="dark"] input,
  html[data-theme="dark"] select,
  html[data-theme="dark"] textarea,
  html[data-theme="dark"] button:not(.btn-yellow):not(.theme-toggle):not(.btn-submit),
  html[data-theme="dark"] .settings-form-group input,
  html[data-theme="dark"] .login-card input,
  html[data-theme="dark"] .search-panel input,
  html[data-theme="dark"] .search-panel select,
  html[data-theme="dark"] .modal-content input,
  html[data-theme="dark"] .modal-content select,
  html[data-theme="dark"] .modal-body textarea,
  html[data-theme="dark"] #invoice-dropdown-btn,
  html[data-theme="dark"] #invoice-dropdown-list,
  html[data-theme="dark"] .selectBox select,
  html[data-theme="dark"] #checkboxes {
    background: var(--km-surface-2) !important;
    color: var(--km-text) !important;
    border-color: var(--km-border-strong) !important;
  }

  html[data-theme="dark"] input[type="checkbox"],
  html[data-theme="dark"] input[type="radio"] {
    accent-color: var(--km-accent);
  }

  html[data-theme="dark"] label,
  html[data-theme="dark"] p,
  html[data-theme="dark"] span,
  html[data-theme="dark"] small,
  html[data-theme="dark"] li,
  html[data-theme="dark"] .card-title,
  html[data-theme="dark"] .h-card-title,
  html[data-theme="dark"] .hc-title,
  html[data-theme="dark"] .listing-title,
  html[data-theme="dark"] .settings-form-group label,
  html[data-theme="dark"] .form-group label,
  html[data-theme="dark"] .custom-checkbox,
  html[data-theme="dark"] .checkbox-item,
  html[data-theme="dark"] #invoice-selected-text,
  html[data-theme="dark"] #invoice-dropdown-list label {
    color: var(--km-text) !important;
  }

  html[data-theme="dark"] .card-location,
  html[data-theme="dark"] .h-card-location,
  html[data-theme="dark"] .hc-location,
  html[data-theme="dark"] .card-meta,
  html[data-theme="dark"] .card-details,
  html[data-theme="dark"] .feat-details,
  html[data-theme="dark"] .spec-label,
  html[data-theme="dark"] .notif-date,
  html[data-theme="dark"] .page-info {
    color: var(--km-muted) !important;
  }

  html[data-theme="dark"] .card-price,
  html[data-theme="dark"] .h-card-price,
  html[data-theme="dark"] .hc-price,
  html[data-theme="dark"] .listing-price,
  html[data-theme="dark"] .price,
  html[data-theme="dark"] .spec-value {
    color: var(--km-accent) !important;
  }

  html[data-theme="dark"] .btn-yellow,
  html[data-theme="dark"] .btn-yellow *,
  html[data-theme="dark"] .btn-submit,
  html[data-theme="dark"] .btn-apply-filters,
  html[data-theme="dark"] #search-btn,
  html[data-theme="dark"] #save-search-btn,
  html[data-theme="dark"] .card-badge,
  html[data-theme="dark"] .page-number-btn.active {
    background: var(--km-accent) !important;
    color: #111 !important;
    border-color: #111 !important;
  }

  html[data-theme="dark"] .btn-outline,
  html[data-theme="dark"] .btn-edit,
  html[data-theme="dark"] .btn-del,
  html[data-theme="dark"] .btn-renew,
  html[data-theme="dark"] .btn-active,
  html[data-theme="dark"] .card-fav-btn,
  html[data-theme="dark"] .page-btn,
  html[data-theme="dark"] .page-number-btn,
  html[data-theme="dark"] .modal-btn-cancel {
    background: var(--km-surface-3) !important;
    color: var(--km-text) !important;
    border-color: var(--km-border-strong) !important;
  }

  html[data-theme="dark"] .notif-dropdown,
  html[data-theme="dark"] .user-dropdown,
  html[data-theme="dark"] #user-dropdown,
  html[data-theme="dark"] #user-dropdown[style] {
    position: absolute;
    right: 0 !important;
    max-width: calc(100vw - 28px) !important;
    background: var(--km-surface) !important;
    border-color: var(--km-border) !important;
  }

  html[data-theme="dark"] .notif-item:hover,
  html[data-theme="dark"] .chat-list-item:hover,
  html[data-theme="dark"] .chat-list-item.active,
  html[data-theme="dark"] .user-dropdown a:hover,
  html[data-theme="dark"] .user-dropdown button:hover,
  html[data-theme="dark"] #user-dropdown a:hover {
    background: rgba(251, 185, 0,0.14) !important;
    color: var(--km-accent) !important;
  }

  html[data-theme="dark"] .msg-other,
  html[data-theme="dark"] .msg.theirs {
    background: var(--km-surface-3) !important;
    color: var(--km-text) !important;
  }

  html[data-theme="dark"] .msg-me,
  html[data-theme="dark"] .msg.mine {
    background: var(--km-accent) !important;
    color: #111 !important;
  }

  html[data-theme="dark"] .modal,
  html[data-theme="dark"] .modal-overlay,
  html[data-theme="dark"] #verify-modal {
    background: rgba(0,0,0,0.72) !important;
  }

  html[data-theme="dark"] .modal-scroll-area,
  html[data-theme="dark"] .modal-body {
    background: var(--km-surface) !important;
    color: var(--km-text) !important;
  }

  html[data-theme="dark"] .leaflet-container {
    background: var(--km-surface-2) !important;
  }

  html[data-theme="dark"] .mobile-ad,
  html[data-theme="dark"] .mobile-ad img {
    background: transparent !important;
    box-shadow: none !important;
  }

  html[data-theme="dark"] .site-footer {
    background: var(--yellow) !important;
    color: #111 !important;
  }

  html[data-theme="dark"] .footer-bottom {
    background: #111 !important;
    color: #aaa !important;
  }

  html[data-theme="dark"] .chat-layout,
  html[data-theme="dark"] .chat-window {
    min-height: 420px;
  }

  html[data-theme="dark"] .listing-card,
  html[data-theme="dark"] .listing-card-horizontal,
  html[data-theme="dark"] .horizontal-card,
  html[data-theme="dark"] .my-card {
    overflow: hidden;
  }
}

/* Dark mode fixes for listing details and the refreshed messages view */
html[data-theme="dark"] .chat-container,
html[data-theme="dark"] .chat-window,
html[data-theme="dark"] .chat-sidebar,
html[data-theme="dark"] .chat-input {
  background: var(--km-surface) !important;
  color: var(--km-text) !important;
  border-color: var(--km-border) !important;
}

html[data-theme="dark"] .chat-header,
html[data-theme="dark"] .chat-tabs,
html[data-theme="dark"] .chat-tab,
html[data-theme="dark"] .conv-list,
html[data-theme="dark"] .conv-item {
  background: var(--km-surface-2) !important;
  color: var(--km-text) !important;
  border-color: var(--km-border) !important;
}

html[data-theme="dark"] .chat-tab.active,
html[data-theme="dark"] .conv-item:hover,
html[data-theme="dark"] .conv-item.active {
  background: rgba(251, 185, 0, 0.12) !important;
  color: var(--km-accent) !important;
}

html[data-theme="dark"] .conv-title,
html[data-theme="dark"] .chat-header h3,
html[data-theme="dark"] .msg-text {
  color: var(--km-text) !important;
}

html[data-theme="dark"] .conv-lastmsg,
html[data-theme="dark"] .no-chat-selected,
html[data-theme="dark"] .msg-time {
  color: var(--km-muted) !important;
}

html[data-theme="dark"] .msg-other {
  background: var(--km-surface-3) !important;
  color: var(--km-text) !important;
}

html[data-theme="dark"] .msg-me,
html[data-theme="dark"] .chat-input button {
  background: var(--km-accent) !important;
  color: #111 !important;
}

html[data-theme="dark"] .msg-me .msg-text,
html[data-theme="dark"] .msg-me .msg-time {
  color: #111 !important;
}

html[data-theme="dark"] .left-col > div[style*="background: white"],
html[data-theme="dark"] .left-col > div[style*="background:white"],
html[data-theme="dark"] #thumbs-container {
  background: var(--km-surface) !important;
  color: var(--km-text) !important;
  border-color: var(--km-border) !important;
}

html[data-theme="dark"] #main-img,
html[data-theme="dark"] #main-video {
  background: #000 !important;
}

html[data-theme="dark"] #listing-desc,
html[data-theme="dark"] #equipment-section,
html[data-theme="dark"] #equipment-section summary,
html[data-theme="dark"] #equipment-section summary span,
html[data-theme="dark"] #equipment-list,
html[data-theme="dark"] #seller-name,
html[data-theme="dark"] #seller-type,
html[data-theme="dark"] #listing-location,
html[data-theme="dark"] #bc-title {
  color: var(--km-text) !important;
}

html[data-theme="dark"] #equipment-list span {
  background: var(--km-surface-3) !important;
  color: var(--km-text) !important;
  border-color: var(--km-border-strong) !important;
}

html[data-theme="dark"] #equipment-list span span {
  background: transparent !important;
  color: #47d16c !important;
  border-color: transparent !important;
}

html[data-theme="dark"] #invoice-info,
html[data-theme="dark"] #map-container {
  background: var(--km-surface-2) !important;
  color: var(--km-text) !important;
  border-color: var(--km-accent) !important;
}

html[data-theme="dark"] .btn-call,
html[data-theme="dark"] #phone-btn {
  background: var(--km-surface-3) !important;
  color: var(--km-text) !important;
  border-color: var(--km-border-strong) !important;
}

html[data-theme="dark"] .btn-call:hover,
html[data-theme="dark"] #phone-btn:hover {
  border-color: var(--km-accent) !important;
  box-shadow: 0 0 0 3px rgba(251, 185, 0, 0.14) !important;
}

/* KamperMarket 2026 advertising set */
.listing-desktop-side-ad {
  width: 100%;
  max-width: 375px;
  margin-inline: auto;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.14);
}

.listing-desktop-side-ad img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 656 / 1118;
  object-fit: cover;
}

.listing-mobile-wide-ad {
  display: none;
}

@media (max-width: 768px) {
  .mobile-ad picture,
  .listing-mobile-wide-ad picture {
    display: block;
    width: 100%;
  }

  .mobile-ad img {
    display: block;
    width: 100% !important;
    height: 80px !important;
    max-height: none !important;
    object-fit: cover !important;
  }

  .listing-mobile-wide-ad {
    display: block !important;
    width: 100% !important;
    height: clamp(80px, 15.36vw, 118px) !important;
    margin: 14px 0 !important;
    overflow: hidden !important;
    border-radius: 12px;
  }

  .listing-mobile-wide-ad img {
    display: block;
    width: 100% !important;
    height: clamp(80px, 15.36vw, 118px) !important;
    max-height: none !important;
    object-fit: cover !important;
    border-radius: 12px !important;
  }
}

/* Keep the narrow-phone form override last so older two-column QA rules
   cannot squeeze unrelated fields together again. */
@media (max-width: 640px) {
  form#add-form .form-grid,
  form#add-form .form-grid-2 {
    grid-template-columns: 1fr !important;
    gap: 17px !important;
  }

  form#add-form .market-mode-buttons {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 7px !important;
  }
}

/* Części i akcesoria: wszystkie szybkie kategorie w jednym rzędzie. */
body[data-market="parts"] #market-shortcuts,
body[data-market="parts"] .filter-shortcuts {
  display: flex !important;
  grid-template-columns: none !important;
  flex-wrap: nowrap !important;
  align-items: flex-start;
  justify-content: center;
  gap: 14px;
  width: min(100%, 1120px);
  max-width: 100%;
  padding: 4px 4px 14px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
}

body[data-market="parts"] #market-shortcuts .shortcut-item,
body[data-market="parts"] .filter-shortcuts .shortcut-item {
  flex: 1 1 0;
  min-width: 0;
  max-width: 126px;
  scroll-snap-align: start;
}

@media (max-width: 900px) {
  body[data-market="parts"] #market-shortcuts,
  body[data-market="parts"] .filter-shortcuts {
    justify-content: flex-start;
    gap: 12px;
    padding-inline: 10px;
  }

  body[data-market="parts"] #market-shortcuts .shortcut-item,
  body[data-market="parts"] .filter-shortcuts .shortcut-item {
    flex: 0 0 96px;
    min-width: 96px;
  }
}

.btn-support.is-disabled,
.app-links .is-disabled {
  cursor: pointer;
  opacity: 1;
  filter: none;
  pointer-events: auto;
  user-select: none;
}

.app-links .is-disabled {
  display: inline-flex;
}

.site-footer button.btn-support,
.site-footer button.app-coming-soon {
  appearance: none;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.site-footer button.btn-support {
  text-align: center;
}

.site-footer button.app-coming-soon {
  display: inline-flex;
  padding: 0;
  background: transparent;
}

.footer-contact {
  color: inherit;
  line-height: 1.55;
}

.footer-contact span {
  font-weight: 700;
}

.shortcut-item:focus-visible,
.horizontal-card:focus-visible,
.listing-card:focus-visible,
.hc-card:focus-visible {
  outline: 3px solid var(--yellow, #FBB900);
  outline-offset: 4px;
}

/* Rental service fee remains visible while the "no fee" option disables it. */
#group-service-fee input[name="service_fee"]:disabled {
  background: #e5e7eb !important;
  color: #6b7280 !important;
  -webkit-text-fill-color: #6b7280 !important;
  border-color: #c4c9d0 !important;
  cursor: not-allowed !important;
  opacity: 1 !important;
  box-shadow: none !important;
}

#group-service-fee.service-fee-disabled > label:first-child {
  color: #7a8088 !important;
}

html[data-theme="dark"] #group-service-fee input[name="service_fee"]:disabled {
  background: #2a2f34 !important;
  color: #8f969d !important;
  -webkit-text-fill-color: #8f969d !important;
  border-color: #42484e !important;
}

html[data-theme="dark"] #group-service-fee.service-fee-disabled > label:first-child {
  color: #8f969d !important;
}

/* Real photo upload progress used by add/edit listing forms. */
.photo-upload-progress {
  --upload-color: #FBB900;
  display: none;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(251, 185, 0, 0.5);
  border-radius: 12px;
  background: rgba(251, 185, 0, 0.08);
  color: #20262b;
}

.photo-upload-progress.is-visible {
  display: block;
}

.photo-upload-progress.is-success {
  --upload-color: #239b56;
  border-color: rgba(35, 155, 86, 0.45);
  background: rgba(35, 155, 86, 0.08);
}

.photo-upload-progress.is-error {
  --upload-color: #d64541;
  border-color: rgba(214, 69, 65, 0.45);
  background: rgba(214, 69, 65, 0.08);
}

.photo-upload-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.photo-upload-head strong {
  color: var(--upload-color);
}

.photo-upload-head span {
  min-width: 48px;
  color: var(--upload-color);
  font-weight: 900;
  text-align: right;
}

.photo-upload-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(30, 38, 44, 0.13);
}

.photo-upload-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--upload-color);
  transition: width 0.16s ease;
}

.photo-upload-details {
  margin-top: 8px;
  color: #66727b;
  font-size: 13px;
  font-weight: 700;
}

.drop-zone.is-uploading {
  cursor: wait !important;
  opacity: 0.62;
  pointer-events: none;
}

.btn-submit:disabled {
  cursor: wait !important;
  opacity: 0.58;
  transform: none !important;
}

html[data-theme="dark"] .photo-upload-progress {
  color: var(--km-text);
  background: rgba(251, 185, 0, 0.1);
}

html[data-theme="dark"] .photo-upload-details {
  color: var(--km-muted);
}

html[data-theme="dark"] .photo-upload-track {
  background: rgba(255, 255, 255, 0.14);
}

/* Mobile/UI QA fixes */
.hc-favorite,
.like-btn,
.fav-btn {
  font-family: "Segoe UI Symbol", "Arial Unicode MS", Arial, sans-serif !important;
  line-height: 1 !important;
  font-stretch: normal !important;
  transform: none;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
  aspect-ratio: 1 / 1;
}

.mobile-bottom-nav .km-nav-icon {
  width: 23px;
  height: 23px;
  display: inline-block;
  background-color: currentColor;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  font-size: 0 !important;
  line-height: 0 !important;
}

.mobile-bottom-nav .km-nav-heart {
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 21s-7.4-4.7-9.7-9.4C.6 8.1 2.7 4 6.6 4c2.1 0 3.7 1.1 4.6 2.5C12.1 5.1 13.7 4 15.8 4c3.9 0 6 4.1 4.3 7.6C17.8 16.3 12 21 12 21Z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 21s-7.4-4.7-9.7-9.4C.6 8.1 2.7 4 6.6 4c2.1 0 3.7 1.1 4.6 2.5C12.1 5.1 13.7 4 15.8 4c3.9 0 6 4.1 4.3 7.6C17.8 16.3 12 21 12 21Z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.mobile-bottom-nav .km-nav-mail {
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='3' y='5' width='18' height='14' rx='2.5' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='m4.5 7 7.5 6 7.5-6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='3' y='5' width='18' height='14' rx='2.5' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='m4.5 7 7.5 6 7.5-6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.auth-required-open {
  overflow: hidden !important;
}

.auth-required-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(5px);
}

.auth-required-modal {
  width: min(410px, 100%);
  background: #fff;
  color: #1d252b;
  text-align: center;
  border-radius: 18px;
  padding: 30px 24px 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

.auth-required-icon {
  width: 62px;
  height: 62px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #FBB900, #ff8a00);
  color: #111;
  font-size: 38px;
  font-weight: 1000;
  box-shadow: 0 10px 22px rgba(251, 185, 0, 0.32);
}

.login-modal > div:first-child {
  width: 62px !important;
  height: 62px !important;
  margin: 0 auto 16px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: linear-gradient(135deg, #FBB900, #ff8a00) !important;
  color: #111 !important;
  font-size: 38px !important;
  font-weight: 1000 !important;
  box-shadow: 0 10px 22px rgba(251, 185, 0, 0.32) !important;
}

.auth-required-modal h2 {
  margin: 0 0 10px;
  color: #172025;
  font-size: 24px;
}

.auth-required-modal p {
  margin: 0 0 20px;
  color: #5f6b73;
  line-height: 1.45;
}

.auth-required-login-btn {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 13px 16px;
  background: #FBB900;
  color: #111;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}

html[data-theme="dark"] .auth-required-modal {
  background: #1d2124;
  color: #f5f7fa;
  border: 1px solid rgba(255,255,255,.1);
}

html[data-theme="dark"] .auth-required-modal h2 {
  color: #f5f7fa;
}

html[data-theme="dark"] .auth-required-modal p {
  color: #b7c0c8;
}

.dealer-status-card {
  border-radius: 12px !important;
  padding: 20px !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
}

.dealer-status-card.is-verified {
  background: #edf8f1 !important;
  border: 1px solid #9bd6b3 !important;
  color: #145a32 !important;
}

.dealer-status-card.is-promo {
  background: linear-gradient(135deg, #2c3e50, #34495e) !important;
  color: #fff !important;
}

.dealer-status-card h3,
.dealer-status-card p,
.dealer-status-card span {
  color: inherit !important;
}

.dealer-status-card.is-verified h3 {
  color: #145a32 !important;
}

.dealer-status-card.is-promo h3 {
  color: #FBB900 !important;
}

html[data-theme="dark"] .dealer-status-card.is-verified {
  background: linear-gradient(135deg, rgba(39,174,96,.105), rgba(39,174,96,.045)) !important;
  border-color: rgba(91,207,139,.28) !important;
  color: #d4e9dc !important;
}

html[data-theme="dark"] .dealer-status-card.is-verified h3,
html[data-theme="dark"] .dealer-status-card.is-verified a {
  color: #a9dcbc !important;
}

html[data-theme="dark"] .dealer-status-card.is-promo {
  background: linear-gradient(135deg, #171b1e, #252b30) !important;
  border: 1px solid rgba(251,185,0,.35) !important;
}

.company-status-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 12px;
}

.company-status-actions a {
  display: inline-flex;
  padding: 9px 11px;
  border: 1px solid rgba(20,90,50,.2);
  border-radius: 8px;
  color: #145a32;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.company-status-actions a.is-primary {
  border-color: #d5a000;
  background: #FBB900;
  color: #111 !important;
}

.company-status-metric {
  min-width: 122px;
  padding: 11px 18px;
  border: 1px solid rgba(20,90,50,.12);
  border-radius: 10px;
  background: rgba(255,255,255,.7);
  text-align: center;
}

html[data-theme="dark"] .company-status-actions a {
  border-color: rgba(169,220,188,.22);
  background: rgba(255,255,255,.035);
  color: #b9dbc5 !important;
}

html[data-theme="dark"] .company-status-actions a.is-primary {
  border-color: rgba(251,185,0,.65);
  background: rgba(251,185,0,.88);
  color: #111 !important;
}

html[data-theme="dark"] .company-status-metric {
  border-color: rgba(255,255,255,.1);
  background: rgba(0,0,0,.18);
}

#delete-account-section {
  margin-top: 28px;
  padding: 22px;
  border: 1px solid #efb4b4;
  border-radius: 14px;
  background: #fff7f7;
}

#delete-account-section h3 {
  margin: 0 0 8px;
  color: #9f1d1d;
}

#delete-account-section > p {
  margin: 0 0 16px;
  color: #6f3535;
  line-height: 1.55;
}

html[data-theme="dark"] #delete-account-section {
  border-color: rgba(236,107,107,.28);
  background: rgba(180,35,35,.075);
}

html[data-theme="dark"] #delete-account-section h3 {
  color: #f0a2a2;
}

html[data-theme="dark"] #delete-account-section > p,
html[data-theme="dark"] #delete-account-section label,
html[data-theme="dark"] #delete-account-section span {
  color: #d2b9b9;
}

html[data-theme="dark"] #delete-account-section .form-input {
  border-color: rgba(236,107,107,.2) !important;
  background: #15191c !important;
  color: var(--km-text, #f5f7f8) !important;
}

@media (max-width: 768px) {
  form#add-form .form-grid,
  form#add-form .form-grid-2,
  form#add-form .rental-season-panel,
  form#add-form #history-details-grid,
  form#add-form .settings-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .form-container {
    padding: 22px 14px !important;
    margin: 16px auto !important;
    border-radius: 14px !important;
  }

  form#add-form .form-group {
    margin-bottom: 0 !important;
  }

  body:has(#market-page-title) .search-panel .search-grid,
  body:has(#market-page-title) .adv-grid,
  body:has(#market-page-title) #main-filters-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  body:has(#market-page-title) .search-panel input,
  body:has(#market-page-title) .search-panel select,
  body:has(#market-page-title) .search-panel button:not(.shortcut-item),
  body:has(#market-page-title) .modal-content input,
  body:has(#market-page-title) .modal-content select {
    min-height: 48px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  body:has(#market-page-title) .search-panel [style*="display: flex"] {
    flex-wrap: wrap !important;
  }

  body:has(#market-page-title) #location-btn {
    flex: 1 0 100% !important;
  }
}

/* Final mobile heart fix: draw listing hearts as SVG masks, not phone-font glyphs. */
.hc-favorite {
  font-size: 0 !important;
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  min-height: 38px !important;
  padding: 0 !important;
  line-height: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: inherit;
}

.hc-favorite::before {
  content: "";
  width: 25px;
  height: 25px;
  display: block;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 21s-7.4-4.7-9.7-9.4C.6 8.1 2.7 4 6.6 4c2.1 0 3.7 1.1 4.6 2.5C12.1 5.1 13.7 4 15.8 4c3.9 0 6 4.1 4.3 7.6C17.8 16.3 12 21 12 21Z' fill='none' stroke='black' stroke-width='2.25' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 21s-7.4-4.7-9.7-9.4C.6 8.1 2.7 4 6.6 4c2.1 0 3.7 1.1 4.6 2.5C12.1 5.1 13.7 4 15.8 4c3.9 0 6 4.1 4.3 7.6C17.8 16.3 12 21 12 21Z' fill='none' stroke='black' stroke-width='2.25' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.hc-favorite.active::before,
.hc-favorite[style*="e74c3c"]::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 21s-7.4-4.7-9.7-9.4C.6 8.1 2.7 4 6.6 4c2.1 0 3.7 1.1 4.6 2.5C12.1 5.1 13.7 4 15.8 4c3.9 0 6 4.1 4.3 7.6C17.8 16.3 12 21 12 21Z' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 21s-7.4-4.7-9.7-9.4C.6 8.1 2.7 4 6.6 4c2.1 0 3.7 1.1 4.6 2.5C12.1 5.1 13.7 4 15.8 4c3.9 0 6 4.1 4.3 7.6C17.8 16.3 12 21 12 21Z' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
}

#save-search-btn,
.btn-save-search {
  float: none !important;
  width: max-content !important;
  min-height: 34px !important;
  margin: 0 0 12px auto !important;
  padding: 7px 12px !important;
  border-radius: 999px !important;
  background: #1f2529 !important;
  color: #fff !important;
  border: 1px solid rgba(251, 185, 0, .55) !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  letter-spacing: .01em !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .12) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
}

#save-search-btn:hover,
.btn-save-search:hover {
  background: #FBB900 !important;
  color: #111 !important;
  transform: translateY(-1px);
}

html[data-theme="dark"] #save-search-btn,
html[data-theme="dark"] .btn-save-search {
  background: #252b30 !important;
  color: #fff !important;
  border-color: rgba(251, 185, 0, .7) !important;
}

/* Ostateczne wymuszenie kontrastu małego przycisku zgłoszeń w żółtej stopce. */
.site-footer a.feedback-footer-link,
.site-footer a.feedback-footer-link *,
.site-footer a.feedback-footer-link:visited,
.site-footer a.feedback-footer-link:hover,
.site-footer a.feedback-footer-link:focus,
html[data-theme="dark"] .site-footer a.feedback-footer-link,
html[data-theme="dark"] .site-footer a.feedback-footer-link *,
html[data-theme="dark"] .site-footer a.feedback-footer-link:visited,
html[data-theme="dark"] .site-footer a.feedback-footer-link:hover,
html[data-theme="dark"] .site-footer a.feedback-footer-link:focus {
  color: #fff !important;
}

/* Wyższa specyficzność niż globalne `.site-footer :not(...)` wymuszające czerń. */
.site-footer .footer-col a.feedback-footer-link.feedback-footer-link,
.site-footer .footer-col a.feedback-footer-link.feedback-footer-link:link,
.site-footer .footer-col a.feedback-footer-link.feedback-footer-link:visited,
.site-footer .footer-col a.feedback-footer-link.feedback-footer-link span,
html[data-theme="dark"] .site-footer .footer-col a.feedback-footer-link.feedback-footer-link,
html[data-theme="dark"] .site-footer .footer-col a.feedback-footer-link.feedback-footer-link:link,
html[data-theme="dark"] .site-footer .footer-col a.feedback-footer-link.feedback-footer-link:visited,
html[data-theme="dark"] .site-footer .footer-col a.feedback-footer-link.feedback-footer-link span {
  color: #ffffff !important;
}

html:not([data-theme="dark"]) .btn-support,
html:not([data-theme="dark"]) .btn-support *,
html:not([data-theme="dark"]) .site-footer .btn-support,
html:not([data-theme="dark"]) .site-footer .btn-support *,
html:not([data-theme="dark"]) .site-footer a.btn-support,
html:not([data-theme="dark"]) .site-footer a.btn-support:visited,
html:not([data-theme="dark"]) .site-footer a.btn-support:hover,
html:not([data-theme="dark"]) .site-footer a.btn-support:focus {
  color: #fff !important;
}

@media (max-width: 768px) {
  body[data-market="vehicle"] #market-shortcuts .shortcut-item[data-type=""],
  body[data-market="parts"] #market-shortcuts .shortcut-item[data-type=""],
  body[data-market="vehicle"] .filter-shortcuts .shortcut-item[data-type=""],
  body[data-market="parts"] .filter-shortcuts .shortcut-item[data-type=""] {
    display: none !important;
  }
}

/* Global mobile app-style navigation. */
.auth-required-notice {
  max-width: 980px;
  margin: 16px auto;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(251, 185, 0, 0.55);
  background: #fff8df;
  color: #20272b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.auth-required-notice strong {
  font-size: 15px;
}

.auth-required-notice span {
  flex: 1;
  color: #4c555c;
}

.auth-required-notice a {
  color: #111;
  background: #FBB900;
  border: 1px solid #111;
  border-radius: 8px;
  padding: 9px 12px;
  text-decoration: none;
  font-weight: 900;
  white-space: nowrap;
}

html[data-theme="dark"] .auth-required-notice {
  background: rgba(251, 185, 0, 0.12);
  color: var(--km-text, #eaf0f2);
  border-color: rgba(251, 185, 0, 0.38);
  box-shadow: none;
}

html[data-theme="dark"] .auth-required-notice span {
  color: var(--km-muted, #aeb8be);
}

.mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  body {
    padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .auth-required-notice {
    margin: 10px 12px;
    padding: 12px;
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 1200 !important;
    background: var(--km-header-bg, #fff) !important;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08) !important;
  }

  .site-header .header-inner,
  header.site-header .header-inner {
    min-height: 70px !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0 !important;
    padding: 6px 12px !important;
    text-align: center !important;
  }

  .site-header .main-nav,
  .site-header #header-cta,
  header.site-header .main-nav,
  header.site-header #header-cta {
    display: none !important;
  }

  .site-header .logo,
  header.site-header .logo {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    cursor: pointer;
  }

  .site-header .logo-img,
  header.site-header .logo-img {
    height: 58px !important;
    max-height: 58px !important;
    width: auto !important;
    max-width: min(76vw, 250px) !important;
    object-fit: contain !important;
    display: block !important;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1400;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: calc(66px + env(safe-area-inset-bottom, 0px));
    padding: 7px 6px calc(7px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    border-top: 1px solid #d8dee3;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.14);
  }

  .mobile-bottom-nav a {
    min-width: 0;
    min-height: 52px;
    border-radius: 14px;
    color: #6c747b;
    text-decoration: none;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
  }

  .mobile-bottom-nav .mobile-nav-icon {
    font-size: 22px;
    line-height: 1;
  }

  .mobile-bottom-nav a.active {
    background: #FBB900;
    color: #111;
  }

  html[data-theme="dark"] .site-header {
    background: var(--km-surface-2, #20262a) !important;
    border-bottom: 1px solid var(--km-border, #353c42) !important;
  }

  html[data-theme="dark"] .mobile-bottom-nav {
    background: var(--km-surface-2, #20262a);
    border-top-color: var(--km-border, #353c42);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.42);
  }

  html[data-theme="dark"] .mobile-bottom-nav a {
    color: var(--km-muted, #aeb8be);
  }

  html[data-theme="dark"] .mobile-bottom-nav a.active {
    background: #FBB900;
    color: #111;
  }
}

.site-footer .btn-support,
.site-footer .btn-support *,
.site-footer .btn-support:visited,
.site-footer .btn-support:hover,
.site-footer .btn-support:focus,
html[data-theme="dark"] .site-footer .btn-support,
html[data-theme="dark"] .site-footer .btn-support *,
html[data-theme="dark"] .site-footer .btn-support:visited,
html[data-theme="dark"] .site-footer .btn-support:hover,
html[data-theme="dark"] .site-footer .btn-support:focus {
  color: #fff !important;
}

html[data-theme="dark"] .login-card label,
html[data-theme="dark"] .login-card label[style],
html[data-theme="dark"] .login-card label span,
html[data-theme="dark"] .login-card .login-card-footer,
html[data-theme="dark"] .company-account-toggle,
html[data-theme="dark"] .company-account-toggle span,
html[data-theme="dark"] #terms_company_container,
html[data-theme="dark"] #terms_company_container span {
  color: var(--km-text, #f5f7fa) !important;
}

html[data-theme="dark"] .login-card input,
html[data-theme="dark"] .login-card input[style],
html[data-theme="dark"] #company-fields input {
  background: var(--km-surface-2, #1d2124) !important;
  color: var(--km-text, #f5f7fa) !important;
  border-color: var(--km-border-strong, #3a444b) !important;
}

html[data-theme="dark"] .blog-empty {
  background: var(--km-surface-2, #1d2124) !important;
  border-color: var(--km-border-strong, #3a444b) !important;
  color: var(--km-text, #f5f7fa) !important;
}

.schedule-action.yellow,
.schedule-action.yellow *,
html[data-theme="dark"] .schedule-action.yellow,
html[data-theme="dark"] .schedule-action.yellow * {
  color: #111 !important;
}

/* Finalne wymuszenie kontrastu przycisku stopki */
.site-footer a.btn-support,
.site-footer a.btn-support:visited,
.site-footer a.btn-support:hover,
.site-footer a.btn-support:focus,
html[data-theme="dark"] .site-footer a.btn-support,
html[data-theme="dark"] .site-footer a.btn-support:visited,
html[data-theme="dark"] .site-footer a.btn-support:hover,
html[data-theme="dark"] .site-footer a.btn-support:focus {
  color: #fff !important;
}


/* Register page dark-mode polish */
html[data-theme="dark"] .company-account-toggle,
html[data-theme="dark"] .company-account-toggle[style] {
  background: var(--km-surface-2) !important;
  color: var(--km-text) !important;
  border-color: var(--km-border-strong) !important;
}

html[data-theme="dark"] .company-account-toggle:hover,
html[data-theme="dark"] .company-account-toggle:has(input:checked) {
  border-color: var(--km-accent) !important;
  box-shadow: 0 0 0 3px rgba(251, 185, 0, 0.12) !important;
}

html[data-theme="dark"] #verify-modal .verify-modal-card,
html[data-theme="dark"] #login-2fa-modal .verify-modal-card,
html[data-theme="dark"] #verify-modal .verify-modal-card[style] {
  background: var(--km-surface) !important;
  color: var(--km-text) !important;
  border: 1px solid var(--km-border-strong) !important;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.58) !important;
}

html[data-theme="dark"] #verify-modal h3,
html[data-theme="dark"] #verify-modal p,
html[data-theme="dark"] #verify-modal .verify-modal-card p[style],
html[data-theme="dark"] #login-2fa-modal h3,
html[data-theme="dark"] #login-2fa-modal p,
html[data-theme="dark"] #login-2fa-modal .verify-modal-card p[style] {
  color: var(--km-text) !important;
}

html[data-theme="dark"] #verify-modal #verify-code,
html[data-theme="dark"] #verify-modal #verify-code[style],
html[data-theme="dark"] #login-2fa-modal #login-2fa-code,
html[data-theme="dark"] #login-2fa-modal #login-2fa-code[style] {
  background: var(--km-surface-2) !important;
  color: var(--km-text) !important;
  border-color: var(--km-border-strong) !important;
}

html[data-theme="dark"] #verify-modal #verify-code::placeholder,
html[data-theme="dark"] #login-2fa-modal #login-2fa-code::placeholder {
  color: var(--km-muted) !important;
}

html[data-theme="dark"] #verify-modal button:not(.btn-yellow),
html[data-theme="dark"] #verify-modal button:not(.btn-yellow)[style],
html[data-theme="dark"] #login-2fa-modal button:not(.btn-yellow),
html[data-theme="dark"] #login-2fa-modal button:not(.btn-yellow)[style] {
  color: var(--km-muted) !important;
}

html[data-theme="dark"] .two-factor-settings,
html[data-theme="dark"] .two-factor-settings[style] {
  background: var(--km-surface-2) !important;
  color: var(--km-text) !important;
  border: 1px solid var(--km-border) !important;
  border-radius: 8px !important;
  padding: 14px !important;
}

html[data-theme="dark"] .two-factor-settings small {
  color: var(--km-muted) !important;
}

.header-controls a[href="add.html"].btn,
html[data-theme="dark"] .header-controls a[href="add.html"].btn,
html[data-theme="dark"] .header-controls a[href="add.html"].btn[style] {
  color: #111 !important;
}

.similar-listing-card {
  border-radius: 8px !important;
  overflow: hidden !important;
  background: #fff;
  transform-origin: center;
  will-change: transform;
}

.similar-listing-card > div:first-child {
  border-radius: 8px 8px 0 0 !important;
  overflow: hidden !important;
}

.similar-listing-card:hover {
  border-radius: 8px !important;
  overflow: hidden !important;
}

.dealer-profile-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #111;
  color: #fff !important;
  border: 1px solid #111;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  box-sizing: border-box;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.dealer-profile-btn:hover {
  transform: translateY(-1px);
  background: var(--yellow, #FBB900);
  color: #111 !important;
  border-color: #111;
}

html[data-theme="dark"] .similar-listing-card {
  background: var(--km-surface-2) !important;
  border-color: var(--km-border) !important;
}

html[data-theme="dark"] .similar-listing-card > div:first-child {
  background-color: var(--km-surface-3) !important;
}

html[data-theme="dark"] .similar-listing-title {
  color: var(--km-text) !important;
}

html[data-theme="dark"] .similar-listing-price {
  color: var(--km-accent) !important;
}

html[data-theme="dark"] .dealer-profile-btn {
  background: var(--km-accent) !important;
  color: #111 !important;
  border-color: #111 !important;
}

/* Dark mode category circles: highlight the ring, not the fill */
html[data-theme="dark"] .shortcut-icon,
html[data-theme="dark"] .shortcut-item.active .shortcut-icon {
  background-color: var(--km-surface-2) !important;
  border: 4px solid transparent !important;
  box-shadow: 0 8px 20px rgba(0,0,0,0.28) !important;
}

html[data-theme="dark"] .shortcut-item:hover .shortcut-icon,
html[data-theme="dark"] .shortcut-item.active .shortcut-icon,
html[data-theme="dark"] .shortcut-item.active:hover .shortcut-icon {
  background-color: var(--km-surface-2) !important;
  border-color: var(--km-accent) !important;
  box-shadow: 0 0 0 2px rgba(251, 185, 0,0.18), 0 0 18px rgba(251, 185, 0,0.38) !important;
}

html[data-theme="dark"] .shortcut-item.active,
html[data-theme="dark"] .shortcut-item:hover {
  background: transparent !important;
}

/* Add form and header CTA dark-mode fixes */
html[data-theme="dark"] #header-cta .btn-yellow,
html[data-theme="dark"] #header-cta .btn-yellow *,
html[data-theme="dark"] #header-cta a[href="add.html"].btn-yellow,
html[data-theme="dark"] #header-cta a[href="register.html"].btn-yellow {
  background: var(--km-accent) !important;
  color: #111 !important;
  border-color: #111 !important;
}

html[data-theme="dark"] #group-equipment,
html[data-theme="dark"] #toggle-equipment-btn,
html[data-theme="dark"] #group-equipment #equipment-list,
html[data-theme="dark"] form#add-form div[style*="background: #fef9e7"],
html[data-theme="dark"] form#add-form div[style*="background:#fef9e7"] {
  background: var(--km-surface-2) !important;
  color: var(--km-text) !important;
  border-color: var(--km-border) !important;
}

html[data-theme="dark"] #toggle-equipment-btn,
html[data-theme="dark"] #toggle-equipment-btn *,
html[data-theme="dark"] #toggle-equipment-icon,
html[data-theme="dark"] #group-equipment .custom-checkbox,
html[data-theme="dark"] #group-equipment .label-text,
html[data-theme="dark"] form#add-form div[style*="background: #fef9e7"] label,
html[data-theme="dark"] form#add-form div[style*="background: #fef9e7"] p,
html[data-theme="dark"] form#add-form div[style*="background: #fef9e7"] strong,
html[data-theme="dark"] form#add-form div[style*="background: #fef9e7"] span {
  color: var(--km-text) !important;
}

html[data-theme="dark"] #group-equipment .custom-checkbox {
  background: var(--km-surface-3) !important;
  border: 1px solid var(--km-border) !important;
  border-radius: 8px !important;
  padding: 10px 12px !important;
}

html[data-theme="dark"] #group-equipment .checkmark {
  background: var(--km-surface) !important;
  border-color: var(--km-border-strong) !important;
}

html[data-theme="dark"] #group-equipment .custom-checkbox input:checked ~ .checkmark {
  background: var(--km-accent) !important;
  border-color: var(--km-accent) !important;
}

html[data-theme="dark"] form#add-form div[style*="background: #fef9e7"] {
  box-shadow: 0 8px 24px rgba(0,0,0,0.28) !important;
}

html[data-theme="dark"] form#add-form div[style*="background: #fef9e7"] input[type="checkbox"] {
  accent-color: var(--km-accent) !important;
}

html[data-theme="dark"] .spec-item {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
  padding: 0 !important;
}

html[data-theme="dark"] .spec-label {
  color: var(--km-muted) !important;
}

html[data-theme="dark"] .spec-value {
  color: var(--km-text) !important;
}

html[data-theme="dark"] #seller-profile-card > div:first-child,
html[data-theme="dark"] #seller-avatar {
  flex: 0 0 50px !important;
  width: 50px !important;
  height: 50px !important;
  min-width: 50px !important;
  min-height: 50px !important;
  max-width: 50px !important;
  max-height: 50px !important;
  border-radius: 50% !important;
  aspect-ratio: 1 / 1 !important;
}

html[data-theme="dark"] #seller-avatar {
  object-fit: cover !important;
}

html[data-theme="dark"] .btn-submit,
html[data-theme="dark"] .btn-submit *,
html[data-theme="dark"] .btn-apply-filters,
html[data-theme="dark"] .btn-apply-filters *,
html[data-theme="dark"] #search-btn,
html[data-theme="dark"] #search-btn * {
  color: #111 !important;
}

html[data-theme="dark"] .adv-section-title,
html[data-theme="dark"] #advanced-modal .adv-section-title,
html[data-theme="dark"] #advanced-modal .search-group label,
html[data-theme="dark"] #advanced-modal label {
  color: var(--km-text) !important;
  border-color: var(--km-border) !important;
}

html[data-theme="dark"] .btn-support,
html[data-theme="dark"] .btn-support *,
html[data-theme="dark"] .site-footer .btn-support,
html[data-theme="dark"] .site-footer .btn-support * {
  color: #fff !important;
}

html[data-theme="dark"] #fav-btn,
html[data-theme="dark"] .hc-favorite,
html[data-theme="dark"] .card-fav-btn,
html[data-theme="dark"] .card-fav-btn svg,
html[data-theme="dark"] [onclick*="toggleFavorite"] {
  color: #e74c3c !important;
  stroke: #e74c3c !important;
}

html[data-theme="dark"] .card-fav-btn svg,
html[data-theme="dark"] .card-fav-btn.active svg {
  fill: none !important;
  stroke: #e74c3c !important;
}

/* Absolute final dark-mode polish */
html[data-theme="dark"] .spec-item {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
  padding: 0 !important;
}

html[data-theme="dark"] .spec-label {
  color: var(--km-muted) !important;
}

html[data-theme="dark"] .spec-value {
  color: var(--km-text) !important;
}

html[data-theme="dark"] #seller-profile-card > div:first-child,
html[data-theme="dark"] #seller-avatar {
  flex: 0 0 50px !important;
  width: 50px !important;
  height: 50px !important;
  min-width: 50px !important;
  min-height: 50px !important;
  max-width: 50px !important;
  max-height: 50px !important;
  border-radius: 50% !important;
  aspect-ratio: 1 / 1 !important;
}

html[data-theme="dark"] #seller-avatar {
  object-fit: cover !important;
}

html[data-theme="dark"] .btn-submit,
html[data-theme="dark"] .btn-submit *,
html[data-theme="dark"] .btn-apply-filters,
html[data-theme="dark"] .btn-apply-filters *,
html[data-theme="dark"] #search-btn,
html[data-theme="dark"] #search-btn * {
  color: #111 !important;
}

html[data-theme="dark"] .adv-section-title,
html[data-theme="dark"] #advanced-modal .adv-section-title,
html[data-theme="dark"] #advanced-modal .search-group label,
html[data-theme="dark"] #advanced-modal label {
  color: var(--km-text) !important;
  border-color: var(--km-border) !important;
}

html[data-theme="dark"] .btn-support,
html[data-theme="dark"] .btn-support *,
html[data-theme="dark"] .site-footer .btn-support,
html[data-theme="dark"] .site-footer .btn-support * {
  color: #fff !important;
}

html[data-theme="dark"] #fav-btn,
html[data-theme="dark"] .hc-favorite,
html[data-theme="dark"] .card-fav-btn,
html[data-theme="dark"] .card-fav-btn svg,
html[data-theme="dark"] [onclick*="toggleFavorite"] {
  color: #e74c3c !important;
  stroke: #e74c3c !important;
}

html[data-theme="dark"] .card-fav-btn svg,
html[data-theme="dark"] .card-fav-btn.active svg {
  fill: none !important;
  stroke: #e74c3c !important;
}

/* Final polish for dark mode readability */
html[data-theme="dark"] .spec-item {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
  padding: 0 !important;
}

html[data-theme="dark"] .specs-divider {
  background: var(--km-border) !important;
}

html[data-theme="dark"] .spec-label {
  color: var(--km-muted) !important;
}

html[data-theme="dark"] .spec-value {
  color: var(--km-text) !important;
}

html[data-theme="dark"] #seller-profile-card > div:first-child {
  flex: 0 0 50px !important;
  width: 50px !important;
  height: 50px !important;
  min-width: 50px !important;
  min-height: 50px !important;
  max-width: 50px !important;
  max-height: 50px !important;
  border-radius: 50% !important;
}

html[data-theme="dark"] #seller-avatar {
  width: 50px !important;
  height: 50px !important;
  min-width: 50px !important;
  min-height: 50px !important;
  max-width: 50px !important;
  max-height: 50px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  aspect-ratio: 1 / 1 !important;
}

html[data-theme="dark"] .btn-submit,
html[data-theme="dark"] .btn-submit *,
html[data-theme="dark"] .btn-apply-filters,
html[data-theme="dark"] .btn-apply-filters *,
html[data-theme="dark"] #search-btn,
html[data-theme="dark"] #search-btn * {
  color: #111 !important;
}

html[data-theme="dark"] .adv-section-title,
html[data-theme="dark"] .modal-content .adv-section-title,
html[data-theme="dark"] #advanced-modal .adv-section-title,
html[data-theme="dark"] #advanced-modal .search-group label,
html[data-theme="dark"] #advanced-modal label {
  color: var(--km-text) !important;
  border-color: var(--km-border) !important;
}

html[data-theme="dark"] .btn-support,
html[data-theme="dark"] .btn-support *,
html[data-theme="dark"] .site-footer .btn-support,
html[data-theme="dark"] .site-footer .btn-support * {
  color: #fff !important;
}

html[data-theme="dark"] #fav-btn,
html[data-theme="dark"] .hc-favorite,
html[data-theme="dark"] .card-fav-btn,
html[data-theme="dark"] .card-fav-btn svg,
html[data-theme="dark"] [onclick*="toggleFavorite"] {
  color: #e74c3c !important;
  stroke: #e74c3c !important;
}

html[data-theme="dark"] .card-fav-btn svg,
html[data-theme="dark"] .card-fav-btn.active svg {
  fill: none !important;
  stroke: #e74c3c !important;
}

/* Final mobile overrides for homepage/header/forms/ads */
.logo,
.logo:focus,
.logo:focus-visible,
.logo-img,
.logo-img:focus,
.logo-img:focus-visible {
  outline: none !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.logo {
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 768px) {
  #header-cta {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    justify-content: center !important;
    padding: 0 8px !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }

  #header-cta > div {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .notification-wrapper {
    margin-right: 0 !important;
    flex: 0 0 38px !important;
  }

  .bell-icon {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
  }

  #header-cta .btn,
  #header-cta button {
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 10px !important;
    font-size: 13px !important;
    white-space: nowrap !important;
  }

  #header-cta .user-menu {
    min-width: 0 !important;
  }

  #header-cta .user-menu .btn,
  #header-cta .user-menu button {
    max-width: 116px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .new-announcements .list-view-container {
    gap: 15px !important;
  }

  .new-announcements .horizontal-card {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    flex-direction: column !important;
    border-radius: 10px !important;
    border: 1px solid #eee !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
    overflow: hidden !important;
  }

  .new-announcements .hc-image-wrapper {
    width: 100% !important;
    height: 200px !important;
    min-height: 200px !important;
  }

  .new-announcements .hc-content {
    padding: 15px 20px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
  }

  .new-announcements .hc-title {
    color: #2c3e50 !important;
    font-size: 18px !important;
    line-height: 1.3 !important;
  }

  .new-announcements .hc-details {
    margin: 15px 0 !important;
    gap: 10px !important;
  }

  .new-announcements .hc-footer,
  .new-announcements .hc-bottom {
    display: flex !important;
    align-items: flex-end !important;
    justify-content: space-between !important;
    gap: 12px !important;
    margin-top: auto !important;
  }

  .new-announcements .hc-price {
    font-size: 20px !important;
    white-space: nowrap !important;
  }

  .new-announcements .hc-location {
    color: #7f8c8d !important;
    font-size: 14px !important;
  }

  form#add-form {
    padding: 16px !important;
    box-sizing: border-box !important;
  }

  form#add-form .form-grid,
  form#add-form .form-grid-2 {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    align-items: start !important;
  }

  form#add-form .form-group {
    display: flex !important;
    flex-direction: column !important;
    margin-bottom: 0 !important;
    min-width: 0 !important;
  }

  form#add-form .form-group label {
    min-height: 0 !important;
    line-height: 1.25 !important;
    margin-bottom: 6px !important;
  }

  form#add-form .form-group input:not([type="checkbox"]):not([type="radio"]),
  form#add-form .form-group select {
    width: 100% !important;
    height: 46px !important;
    min-height: 46px !important;
    padding: 0 12px !important;
    line-height: 46px !important;
    box-sizing: border-box !important;
  }

  form#add-form .form-group textarea {
    width: 100% !important;
    min-height: 120px !important;
    padding: 12px !important;
    box-sizing: border-box !important;
  }

  .ad-sidebar,
  .ad-left,
  .ad-right,
  .desktop-ad {
    display: none !important;
  }

  .mobile-ad {
    display: flex !important;
    width: calc(100% - 28px) !important;
    max-width: 520px !important;
    height: auto !important;
    margin: 12px auto !important;
    padding: 0 !important;
    background: transparent !important;
    overflow: hidden !important;
  }

  .mobile-ad img,
  img[src*="cam-mobile"],
  img[src*="pozR.png"] {
    width: 100% !important;
    height: 80px !important;
    max-height: 80px !important;
    object-fit: cover !important;
    border-radius: 12px !important;
  }

  img[src*="cam.png"] {
    max-width: 100% !important;
  }
}

@media (max-width: 768px) {
  .listing-desktop-side-ad {
    display: none !important;
  }

  .listing-mobile-wide-ad {
    width: 100% !important;
    height: 80px !important;
    margin: 12px 0 !important;
    overflow: hidden !important;
  }

  .listing-mobile-wide-ad img {
    width: 100% !important;
    height: 80px !important;
    max-height: 80px !important;
    object-fit: cover !important;
    border-radius: 12px !important;
  }
}

/* Corrections after mobile QA */
@media (max-width: 768px) {
  .hero .search-panel {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    align-items: stretch !important;
    width: 100% !important;
    overflow: hidden !important;
  }

  .hero .search-panel .search-group,
  .hero .search-panel .search-actions {
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .hero .search-panel #filter-text,
  .hero .search-panel #search-btn {
    width: 100% !important;
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    margin: 0 !important;
    padding: 0 14px !important;
    line-height: normal !important;
    box-sizing: border-box !important;
    appearance: none !important;
    -webkit-appearance: none !important;
  }

  .hero .search-panel #filter-text {
    display: block !important;
    border-radius: 8px 8px 0 0 !important;
    border: 1px solid #ccc !important;
    border-bottom: 0 !important;
  }

  .hero .search-panel #search-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 0 0 8px 8px !important;
    border-width: 1px !important;
  }

  #header-cta .btn,
  #header-cta button,
  #header-cta .user-menu .btn,
  #header-cta .user-menu button {
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    padding: 0 12px !important;
    font-size: 13px !important;
    max-width: none !important;
  }

  #header-cta .user-menu {
    flex: 0 0 auto !important;
  }

  form#add-form .form-grid,
  form#add-form .form-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }
}

/* Mobile polish pass: keep notification panel inside the phone viewport and clean up the home search border. */
@media (max-width: 768px) {
  .notification-wrapper {
    position: relative !important;
    overflow: visible !important;
  }

  .notification-dropdown {
    position: fixed !important;
    top: 58px !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: none !important;
    max-height: min(420px, calc(100vh - 82px)) !important;
    z-index: 9999 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28) !important;
  }

  .notification-wrapper:hover .notification-dropdown,
  .notification-wrapper:focus-within .notification-dropdown,
  .notification-wrapper.is-open .notification-dropdown {
    display: block !important;
  }

  .notification-dropdown .notif-list {
    max-height: min(350px, calc(100vh - 142px)) !important;
    overflow-y: auto !important;
  }

  .hero .search-panel {
    border: 1px solid #d8dee3 !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
    overflow: hidden !important;
  }

  .hero .search-panel #filter-text,
  .hero .search-panel #search-btn {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
  }

  .hero .search-panel #filter-text {
    border-radius: 0 !important;
    border-bottom: 1px solid #d8dee3 !important;
    background: #fff !important;
  }

  .hero .search-panel #search-btn {
    border-radius: 0 !important;
  }

  html[data-theme="dark"] .hero .search-panel {
    background: #1d2124 !important;
    border-color: #353b40 !important;
    box-shadow: none !important;
  }

  html[data-theme="dark"] .hero .search-panel #filter-text {
    background: #1d2124 !important;
    border-bottom-color: #353b40 !important;
  }
}

@media (max-width: 360px) {
  form#add-form .form-grid,
  form#add-form .form-grid-2 {
    grid-template-columns: 1fr !important;
  }
}

/* Final dark-mode overrides for inline styles on details/messages pages */

/* Market switch: explicit dark and selected states on both listing screens. */
html[data-theme="dark"] .market-mode-btn:not(.active),
html[data-theme="dark"] [data-market-switch]:not(.is-active) {
  background: linear-gradient(145deg, #252b2f 0%, #171b1e 100%) !important;
  color: #fff !important;
  border-color: #3b4349 !important;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28) !important;
}

html[data-theme="dark"] .market-mode-btn:not(.active):hover,
html[data-theme="dark"] [data-market-switch]:not(.is-active):hover {
  background: #1d2124 !important;
  color: #fff !important;
  border-color: #FBB900 !important;
}

html[data-theme="dark"] .market-mode-btn.active,
html[data-theme="dark"] [data-market-switch].is-active {
  background: linear-gradient(145deg, #ffd84f 0%, #FBB900 72%) !important;
  color: #111 !important;
  border-color: #d29b00 !important;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.42) !important;
}

html[data-theme="dark"] .chat-container,
html[data-theme="dark"] .chat-window,
html[data-theme="dark"] .chat-sidebar,
html[data-theme="dark"] .chat-input,
html[data-theme="dark"] .chat-header,
html[data-theme="dark"] .chat-tabs,
html[data-theme="dark"] .chat-tab,
html[data-theme="dark"] .conv-list,
html[data-theme="dark"] .conv-item,
html[data-theme="dark"] .left-col > div[style*="background: white"],
html[data-theme="dark"] .left-col > div[style*="background:white"],
html[data-theme="dark"] #thumbs-container,
html[data-theme="dark"] #invoice-info,
html[data-theme="dark"] #map-container {
  background: var(--km-surface-2) !important;
  color: var(--km-text) !important;
  border-color: var(--km-border) !important;
}

html[data-theme="dark"] .chat-container,
html[data-theme="dark"] .chat-window,
html[data-theme="dark"] .chat-sidebar,
html[data-theme="dark"] .info-box,
html[data-theme="dark"] .specs-container {
  background: var(--km-surface) !important;
}

html[data-theme="dark"] .chat-tab.active,
html[data-theme="dark"] .conv-item:hover,
html[data-theme="dark"] .conv-item.active {
  background: rgba(251, 185, 0, 0.12) !important;
  color: var(--km-accent) !important;
}

html[data-theme="dark"] .conv-title,
html[data-theme="dark"] .chat-header h3,
html[data-theme="dark"] .msg-text,
html[data-theme="dark"] #listing-desc,
html[data-theme="dark"] #listing-title,
html[data-theme="dark"] #seller-name,
html[data-theme="dark"] #seller-type,
html[data-theme="dark"] #listing-location,
html[data-theme="dark"] #bc-title,
html[data-theme="dark"] .specs-title,
html[data-theme="dark"] .section-title,
html[data-theme="dark"] #equipment-section summary,
html[data-theme="dark"] #equipment-section summary span,
html[data-theme="dark"] .info-box [style*="color: #222"],
html[data-theme="dark"] .info-box [style*="color:#222"],
html[data-theme="dark"] .info-box [style*="color: #444"],
html[data-theme="dark"] .info-box [style*="color:#444"],
html[data-theme="dark"] .info-box [style*="color: #555"],
html[data-theme="dark"] .info-box [style*="color:#555"] {
  color: var(--km-text) !important;
}

html[data-theme="dark"] .conv-lastmsg,
html[data-theme="dark"] .no-chat-selected,
html[data-theme="dark"] .msg-time,
html[data-theme="dark"] .info-box [style*="color: #666"],
html[data-theme="dark"] .info-box [style*="color:#666"],
html[data-theme="dark"] .info-box [style*="color: #888"],
html[data-theme="dark"] .info-box [style*="color:#888"] {
  color: var(--km-muted) !important;
}

html[data-theme="dark"] .msg-other {
  background: var(--km-surface-3) !important;
  color: var(--km-text) !important;
}

html[data-theme="dark"] .msg-me,
html[data-theme="dark"] .chat-input button {
  background: var(--km-accent) !important;
  color: #111 !important;
}

html[data-theme="dark"] .msg-me .msg-text,
html[data-theme="dark"] .msg-me .msg-time {
  color: #111 !important;
}

html[data-theme="dark"] #equipment-list span {
  background: var(--km-surface-3) !important;
  color: var(--km-text) !important;
  border-color: var(--km-border-strong) !important;
}

html[data-theme="dark"] #equipment-list span span {
  background: transparent !important;
  color: #47d16c !important;
  border-color: transparent !important;
}

html[data-theme="dark"] .btn-call,
html[data-theme="dark"] #phone-btn {
  background: var(--km-surface-3) !important;
  color: var(--km-text) !important;
  border-color: var(--km-border-strong) !important;
}

html[data-theme="dark"] .btn-call:hover,
html[data-theme="dark"] #phone-btn:hover {
  border-color: var(--km-accent) !important;
  box-shadow: 0 0 0 3px rgba(251, 185, 0, 0.14) !important;
}
.hc-verified-company {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 5px;
  width: fit-content;
  margin: -2px 0 8px;
  padding: 4px 8px;
  border: 1px solid rgba(180, 129, 0, .24);
  border-radius: 999px;
  background: rgba(251, 185, 0, .12);
  color: #6f5200;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .01em;
  white-space: nowrap;
}

.hc-verified-company span {
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #FBB900;
  color: #111;
  font-size: 10px;
}

html[data-theme="dark"] .hc-verified-company {
  border-color: rgba(251, 185, 0, .32);
  background: rgba(251, 185, 0, .13);
  color: #ffd762;
}

/* Parts shortcuts use the same active state as vehicle and rental shortcuts:
   only the circular icon is highlighted, never the whole tile. */
body[data-market="parts"] #market-shortcuts .shortcut-item.active,
body[data-market="parts"] .filter-shortcuts .shortcut-item.active {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

/* In parts forms the main category always comes before its subcategory.
   Brand and model form the second row on wider screens. */
@media (min-width: 641px) {
  body[data-market="parts"] form#add-form #classification-row,
  body[data-market="parts"] form#edit-form #classification-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

body[data-market="parts"] #market-shortcuts .shortcut-item:focus-visible,
body[data-market="parts"] .filter-shortcuts .shortcut-item:focus-visible {
  outline: none !important;
}

body[data-market="parts"] #market-shortcuts .shortcut-item.active .shortcut-icon,
body[data-market="parts"] .filter-shortcuts .shortcut-item.active .shortcut-icon {
  box-sizing: border-box;
  background-color: #fff !important;
  border: 4px solid var(--yellow, #FBB900) !important;
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(251, 185, 0, .5) !important;
  transform: scale(1.1) !important;
}

html[data-theme="dark"] body[data-market="parts"] #market-shortcuts .shortcut-item.active .shortcut-icon,
html[data-theme="dark"] body[data-market="parts"] .filter-shortcuts .shortcut-item.active .shortcut-icon {
  background-color: var(--km-surface-2) !important;
  border-color: var(--km-accent, #FBB900) !important;
  box-shadow: 0 0 0 2px rgba(251, 185, 0, .18), 0 0 18px rgba(251, 185, 0, .38) !important;
}
