/* ============================================================
   DESIGN TOKENS — Redesigned (Impeccable v3 methodology)
   ============================================================ */
:root {
  /* ── Brand (Blue, OKLCH) ── */
  --clr-primary:       oklch(48% 0.18 255);
  --clr-primary-dark:  oklch(38% 0.16 255);
  --clr-primary-light: oklch(92% 0.03 255);

  /* ── Semantic ── */
  --clr-red:         oklch(52% 0.20 25);
  --clr-red-dark:    oklch(42% 0.18 25);
  --clr-green:       oklch(55% 0.16 145);
  --clr-amber:       oklch(62% 0.18 75);

  /* ── Neutrals (blue-tinted, chroma 0.008) ── */
  --clr-text:          oklch(18% 0.008 255);
  --clr-text-2:        oklch(40% 0.008 255);
  --clr-muted:         oklch(50% 0.008 255);
  --clr-border:        oklch(88% 0.008 255);
  --clr-bg:            oklch(96.5% 0.005 255);
  --clr-surface:       oklch(99.2% 0.003 255);
  --clr-surface-raised: oklch(100% 0.002 255);

  /* ── Backward compatibility aliases ── */
  --clr-blue:       var(--clr-primary);
  --clr-blue-dark:  var(--clr-primary-dark);

  /* ── Radii ── */
  --radius-sm:     6px;
  --radius-md:     10px;
  --radius-lg:     16px;
  --radius-full:   999px;

  /* ── Elevation (brand-tinted shadows) ── */
  --shadow-sm:   0 1px 3px oklch(18% 0.008 255 / 0.06),
                 0 1px 2px oklch(18% 0.008 255 / 0.04);
  --shadow-md:   0 4px 12px oklch(18% 0.008 255 / 0.08),
                 0 2px 4px oklch(18% 0.008 255 / 0.04);
  --shadow-lg:   0 12px 32px oklch(18% 0.008 255 / 0.12),
                 0 4px 8px oklch(18% 0.008 255 / 0.04);
  --shadow-card:   var(--shadow-sm);
  --shadow-hover:  var(--shadow-md);
  --shadow-header: 0 1px 4px oklch(18% 0.008 255 / 0.06);

  /* ── Type scale: Minor Third (1.2 ratio) ── */
  --text-xs:     0.694rem;
  --text-sm:     0.833rem;
  --text-base:   1rem;
  --text-lg:     1.2rem;
  --text-xl:     1.44rem;
  --text-2xl:    1.728rem;

  /* ── Weights ── */
  --weight-regular: 400;
  --weight-medium:  500;
  --weight-semi:    600;
  --weight-bold:    700;

  /* ── 4pt spacing scale ── */
  --space-1:   4px;
  --space-2:   8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* ── Semantic spacing ── */
  --page-gutter:   var(--space-6);
  --section-gap:   var(--space-10);
  --card-padding:  var(--space-4);
  --filter-gap:    var(--space-3);

  /* ── Motion ── */
  --ease-out:     cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out:  cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 150ms;
  --duration-base: 200ms;
  --duration-slow: 300ms;

  /* ── Z-index semantic scale (must match stacking in search.html) ── */
  --z-base:     1;
  --z-sticky:   10;
  --z-catbar:   90;
  --z-header:   100;
  --z-dropdown: 200;
  --z-backdrop: 89;
  --z-modal:    400;
  --z-toast:    500;
  --z-top:      999;

  /* ── Layout constants ── */
  --font:        'Inter', 'Inter Fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --header-h:    64px;
  --search-h:    64px;
  --sidebar-w:   272px;
  --transition:  var(--duration-base) var(--ease-out);
}

/* ── Font fallback with metrics adjusted to match Inter ── */
@font-face {
  font-family: 'Inter Fallback';
  src: local('BlinkMacSystemFont'), local('Segoe UI'), local('system-ui'), local('Helvetica Neue');
  size-adjust: 107%;
  ascent-override: 90%;
  descent-override: 22%;
  line-height-override: normal;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: 1.6;
  background: var(--clr-bg);
  color: var(--clr-text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-kerning: normal;
  font-optical-sizing: auto;
}
a { color: inherit; text-decoration: none; }
button, select, input { font-family: inherit; }
img { display: block; max-width: 100%; }
ul { list-style: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* ── Reserve icon space before Lucide replaces <i> with <svg> ── */
i[data-lucide] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  vertical-align: middle;
  flex-shrink: 0;
  /* Skeleton indicator until Lucide replaces with SVG */
  background: var(--clr-border);
  border-radius: 4px;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}
/* Remove skeleton once Lucide has replaced <i> with <svg> */
i[data-lucide]:empty {
  background: var(--clr-border);
}
svg[data-lucide],
i[data-lucide]:not(:empty) {
  background: none;
  animation: none;
}
.icon-btn i[data-lucide],
.hamburger-btn i[data-lucide],
.mobile-filter-toggle i[data-lucide] {
  width: 24px;
  height: 24px;
}
.search-enter-btn i[data-lucide] {
  width: 20px;
  height: 20px;
}
/* Attr-chip icons: smaller skeleton */
.attr-chip i[data-lucide] {
  width: 14px;
  height: 14px;
  border-radius: 3px;
}

/* ============================================================
   SKELETON LOADING SYSTEM
   Until JS adds .i18n-loaded to <html>, text in data-i18n
   elements is hidden and replaced with pulsing skeleton bars.
   ============================================================ */
@keyframes skeleton-pulse {
  0%, 100% { opacity: .5; }
  50%      { opacity: .2; }
}

/* Hide i18n text and show skeleton bar until JS loads */
html:not(.i18n-loaded) [data-i18n] {
  color: transparent !important;
  position: relative;
  user-select: none;
}
html:not(.i18n-loaded) [data-i18n]::after {
  content: '';
  position: absolute;
  inset: 15% 8% 15% 0;
  border-radius: 4px;
  background: var(--clr-border);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}
/* Skeleton bars inside the header navigation — lighter color */
html:not(.i18n-loaded) .nav-link[data-i18n]::after,
html:not(.i18n-loaded) .nav-icon-label[data-i18n]::after {
  background: oklch(88% 0.008 255 / 0.6);
}
/* Wider skeleton for longer text spans */
html:not(.i18n-loaded) [data-i18n]::after {
  min-width: 60px;
}
/* Attr-chip labels — constrain skeleton inside chip bounds */
html:not(.i18n-loaded) .attr-chip {
  overflow: hidden;
}
html:not(.i18n-loaded) .attr-chip [data-i18n]::after {
  min-width: 40px;
  max-width: 100%;
  inset: 20% 4px 20% 0;
}
/* H1 title skeleton — taller bar */
html:not(.i18n-loaded) .results-title [data-i18n]::after {
  min-width: 140px;
  inset: 10% 0 10% 0;
}
/* The count span (—) should also be transparent */
html:not(.i18n-loaded) .results-count {
  color: transparent !important;
  position: relative;
}
html:not(.i18n-loaded) .results-count::after {
  content: '';
  position: absolute;
  inset: 15% 0;
  width: 80px;
  border-radius: 4px;
  background: var(--clr-border);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}
/* Sort select skeleton */
html:not(.i18n-loaded) .sort-select option[data-i18n] {
  color: transparent;
}
/* Smooth reveal when loaded */
html.i18n-loaded [data-i18n] {
  animation: skeleton-reveal .3s ease;
}
@keyframes skeleton-reveal {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Category Bar Skeleton ── */
.cat-skeleton {
  width: 200px;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 12px;
  flex: 0 0 200px;
}
.cat-skeleton span {
  display: block;
  width: 75%;
  height: 14px;
  border-radius: 4px;
  background: rgba(255,255,255,.15);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}
/* Vary widths for realism */
.cat-skeleton:nth-child(2) span { width: 60%; }
.cat-skeleton:nth-child(3) span { width: 85%; }
.cat-skeleton:nth-child(4) span { width: 50%; }
.cat-skeleton:nth-child(5) span { width: 70%; }
.cat-skeleton:nth-child(6) span { width: 55%; }
@media (max-width: 900px) {
  .cat-skeleton { display: none; }
}

/* ── Sidebar Skeleton ── */
.sidebar-skeleton-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
}
.sidebar-skeleton-item .skel-check {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: var(--clr-border);
  flex-shrink: 0;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}
.sidebar-skeleton-item .skel-label {
  height: 12px;
  border-radius: 4px;
  background: var(--clr-border);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}
/* Vary widths */
.sidebar-skeleton-item:nth-child(1) .skel-label { width: 70%; }
.sidebar-skeleton-item:nth-child(2) .skel-label { width: 55%; }
.sidebar-skeleton-item:nth-child(3) .skel-label { width: 80%; }
.sidebar-skeleton-item:nth-child(4) .skel-label { width: 45%; }
.sidebar-skeleton-item:nth-child(5) .skel-label { width: 65%; }
.sidebar-skeleton-item:nth-child(6) .skel-label { width: 50%; }
.sidebar-skeleton-item:nth-child(7) .skel-label { width: 72%; }
.sidebar-skeleton-item:nth-child(8) .skel-label { width: 40%; }

/* ── Results Grid Skeleton Cards ── */
.skeleton-card {
  background: var(--clr-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.skeleton-card .skel-img {
  aspect-ratio: 4/3;
  background: var(--clr-border);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}
.skeleton-card .skel-body {
  padding: var(--card-padding);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.skeleton-card .skel-line {
  height: 12px;
  border-radius: 4px;
  background: var(--clr-border);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}
.skeleton-card .skel-line.skel-title {
  height: 16px;
  width: 85%;
}
.skeleton-card .skel-line.skel-meta {
  width: 60%;
}
.skeleton-card .skel-line.skel-cat {
  width: 45%;
}
.skeleton-card .skel-line.skel-btn {
  height: 32px;
  width: 100%;
  border-radius: var(--radius-sm);
  margin-top: 4px;
}
/* Stagger animation for skeleton cards */
.skeleton-card:nth-child(2) .skel-img,
.skeleton-card:nth-child(2) .skel-line { animation-delay: .15s; }
.skeleton-card:nth-child(3) .skel-img,
.skeleton-card:nth-child(3) .skel-line { animation-delay: .3s; }
.skeleton-card:nth-child(4) .skel-img,
.skeleton-card:nth-child(4) .skel-line { animation-delay: .45s; }
.skeleton-card:nth-child(5) .skel-img,
.skeleton-card:nth-child(5) .skel-line { animation-delay: .6s; }
.skeleton-card:nth-child(6) .skel-img,
.skeleton-card:nth-child(6) .skel-line { animation-delay: .75s; }
.skeleton-card:nth-child(7) .skel-img,
.skeleton-card:nth-child(7) .skel-line { animation-delay: .9s; }
.skeleton-card:nth-child(8) .skel-img,
.skeleton-card:nth-child(8) .skel-line { animation-delay: 1.05s; }

/* ── Facet Fallback (zero-result mode) ── */
.filter-check.facet-fallback .count {
  opacity: .45;
  font-style: italic;
}
.filter-check.facet-fallback {
  opacity: .8;
}
.filter-check.facet-fallback:hover {
  opacity: 1;
}

/* ── Focus ── */
:focus-visible {
  outline: 2px solid var(--clr-primary);
  outline-offset: 2px;
}
:focus:not(:focus-visible) {
  outline: none;
}

/* ── Typography polish ── */
h1, h2, h3 { text-wrap: balance; letter-spacing: -0.02em; line-height: 1.3; }
.results-count, .facet-count, .card-price,
.bookmark-header-count, .count { font-variant-numeric: tabular-nums; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--clr-surface);
  box-shadow: var(--shadow-header);
  border-bottom: 1px solid var(--clr-border);
}

.header-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  padding: var(--space-3) var(--page-gutter);
  max-width: 1440px;
  margin: 0 auto;
  box-sizing: border-box;
  width: 100%;
}

.logo-link { 
  order: 1; 
  flex-shrink: 0; 
}
.logo-svg { height: 40px; width: auto; }

.search-wrapper {
  order: 2;
  flex: 1;
  max-width: 600px;
  margin: 0 24px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-box {
  display: flex;
  align-items: center;
  width: 100%;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-box:focus-within {
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px oklch(48% 0.18 255 / 0.15);
}

.search-enter-btn {
  background: none;
  border: none;
  padding: 0 12px 0 0;
  color: var(--clr-muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.search-enter-btn:hover { color: var(--clr-text-2); }
.search-enter-btn svg { width: 20px; height: 20px; }

.search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 10px 12px;
  font-size: 16px; /* ≥16px prevents iOS auto-zoom on focus */
  color: var(--clr-text);
  background: transparent;
}
.search-input::placeholder { color: var(--clr-muted); }

.mobile-filter-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0 12px 0 0;
  color: var(--clr-muted);
  cursor: pointer;
  flex-shrink: 0;
}
.mobile-filter-toggle:hover { color: var(--clr-text-2); }
.mobile-filter-toggle svg { width: 24px; height: 24px; }

/* Hamburger Menu Toggle */
.hamburger-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--clr-text);
  padding: 4px;
}
.hamburger-btn svg { width: 28px; height: 28px; }

/* Main Nav Drawer Mobile Components (Hidden on Desktop) */
.mobile-nav-overlay, .mobile-menu-header, .nav-icon-label { display: none; }

/* Main Nav */
.main-nav {
  order: 3;
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-link {
  font-size: var(--text-sm);
  font-weight: var(--weight-semi);
  color: var(--clr-text-2);
  transition: color var(--transition);
}
.nav-link:hover { color: var(--clr-primary); }

.nav-divider {
  width: 1px;
  height: 24px;
  background: var(--clr-border);
  margin: 0 4px;
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--clr-muted);
  transition: color var(--transition);
  padding: 4px;
  position: relative;
}
.icon-btn svg { width: 24px; height: 24px; }
.icon-btn:hover { color: var(--clr-text-2); }

/* Bookmark badge — overlays top-right corner of the SVG icon */
.bookmark-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: var(--clr-red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
  pointer-events: none;
  z-index: 1;
}
.bookmark-badge:empty { display: none; }

.lang-select-wrapper {
  position: relative;
  display: flex; align-items: center;
}
.lang-select-wrapper .lang-btn {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--clr-text-2);
  display: flex; align-items: center; gap: 6px;
  cursor: pointer;
  transition: background var(--transition);
}
.lang-select-wrapper .lang-btn:hover { background: var(--clr-bg); }
.lang-select-wrapper .lang-btn span.fi { font-size: 16px; border-radius: 2px; }

.lang-select-hidden {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* ============================================================
   CATEGORY BAR — Mega-menu blue stripe below header
   ============================================================ */
.category-bar {
  background: var(--clr-primary);
  position: relative;
  z-index: var(--z-catbar);
}
.category-bar-wrap {
  display: flex;
  align-items: center;
  height: 42px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--page-gutter);
  box-sizing: border-box;
  width: 100%;
}
.category-bar-inner {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  height: 100%;
  overflow: hidden; /* prevent items from bleeding into More */
}
.cat-item {
  background: none;
  border: none;
  color: rgba(255,255,255,.9);
  font-size: .8125rem;
  font-weight: 500;
  font-family: inherit;
  padding: 0 12px;
  height: 100%;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s, color .15s;
  position: relative;
  display: flex;
  align-items: center;
  width: 200px;
  min-width: 200px;
  max-width: 200px;
  flex: 0 0 200px;
}
.cat-item:hover {
  background: rgba(255,255,255,.15);
  color: #fff;
}
.cat-item .cat-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.cat-item .cat-count {
  font-size: .6875rem;
  opacity: .7;
  margin-left: 4px;
  flex-shrink: 0;
  min-width: fit-content;
}

/* Subcategory mega-dropdown — full-width, below header+catbar */
.cat-dropdown {
  display: none;
  position: fixed;
  top: calc(var(--header-h) + 42px); /* header + catbar height */
  left: 0;
  width: 100vw;
  background: var(--clr-surface, #fff);
  border-top: 2px solid var(--clr-blue);
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
  z-index: 200;
  padding: 20px 0; /* vertical only — horizontal via inner container */
  min-height: 280px;
  max-height: 400px;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}
/* Inner container aligns with header/logo */
.cat-dropdown-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--page-gutter);
}
/* Dropdown open controlled by JS with 250ms hover delay */
.cat-item.cat-item-open > .cat-dropdown {
  display: block;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Title inside mega-dropdown */
.cat-dropdown-title {
  font-size: .8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--clr-text);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--clr-border);
  text-align: left;
}

/* Backdrop overlay when mega-dropdown is open */
.cat-dropdown-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,.25);
  backdrop-filter: blur(2px);
  z-index: 89; /* below cat-bar (90) and header (100) */
  pointer-events: none;
}

/* Grid layout for subcategories inside mega-dropdown */
.cat-dropdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 240px);
  gap: 4px 24px;
  justify-content: start;
}

.cat-dropdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 12px;
  font-size: .8125rem;
  color: var(--clr-text);
  cursor: pointer;
  transition: background .12s;
  text-decoration: none;
  gap: 8px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  text-align: left;
}
.cat-dropdown-item:hover { background: var(--clr-bg); }
.cat-dropdown-item span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.cat-dropdown-item .sub-count {
  font-size: .75rem;
  color: var(--clr-muted);
  font-weight: 600;
  background: var(--clr-bg);
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

/* "More ▾" overflow button — flush with last visible item */
.category-more-wrap {
  position: relative;
  flex-shrink: 0;
  height: 100%;
  display: flex;
  align-items: center;
  margin-left: 0;
}
.cat-more-btn {
  background: rgba(255,255,255,.12);
  border: none;
  color: rgba(255,255,255,.9);
  font-size: .8125rem;
  font-weight: 600;
  font-family: inherit;
  padding: 0 14px;
  height: 100%;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s;
  box-sizing: border-box;
}
.cat-more-btn:hover { background: rgba(255,255,255,.22); color: #fff; }

/* "More" now opens the same mega-dropdown */
.cat-more-dropdown {
  position: fixed;
  top: calc(var(--header-h) + 42px);
  left: 0;
  right: 0;            /* (a) viewport-safe full width: avoids 100vw scrollbar-gutter overflow on ~320px phones */
  width: auto;
  max-width: 100%;
  background: var(--clr-surface, #fff);
  border-top: 2px solid var(--clr-blue);
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
  z-index: 200;
  padding: 20px 24px;
  min-height: 280px;
  max-height: 400px;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
  visibility: hidden;
}
.category-more-wrap.cat-item-open .cat-more-dropdown {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.cat-more-dropdown .more-group {
  padding: 8px 16px;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--clr-text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background .12s;
}
.cat-more-dropdown .more-group:hover { background: var(--clr-bg); }
.cat-more-dropdown .more-group .more-count {
  font-size: .75rem;
  color: var(--clr-muted);
  font-weight: 600;
  background: var(--clr-bg);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Hide category bar when search wraps to second line (same breakpoint as header) */
@media (max-width: 900px) {
  .category-bar { display: none; }
  .category-bar-wrap { padding: 0 16px; }
}

/* RESPONSIVE HEADER */
@media (max-width: 900px) {
  .header-inner {
    padding: 12px 16px;
    gap: 12px;
    justify-content: space-between;
  }
  
  .main-nav { 
    order: 2;
    margin-left: auto;
  }
  
  .search-wrapper {
    order: 3;
    flex-basis: 100%;
    margin: 0;
    max-width: 100%;
  }
  
  .mobile-filter-toggle {
    display: flex; align-items: center; justify-content: center;
  }
}

@media (max-width: 600px) {
  .hamburger-btn {
    display: block;
    order: 2;
  }
  
  .mobile-nav-overlay {
    display: block;
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .mobile-nav-overlay.open {
    opacity: 1;
    pointer-events: auto;
  }
  
  .mobile-menu-header {
    display: flex; justify-content: space-between; align-items: center;
    width: 100%; border-bottom: 1px solid var(--clr-border);
    padding-bottom: 24px; margin-bottom: 8px;
  }
  .mobile-menu-title { font-weight: 700; font-size: 1.2rem; color: var(--clr-text); }
  .close-menu-btn { background: none; border: none; padding: 4px; color: var(--clr-text-2); cursor: pointer; }
  .nav-icon-label { display: block; font-weight: 600; font-size: 1rem; color: var(--clr-text-2); }

  .main-nav {
    position: fixed;
    top: 0; right: 0;
    height: 100vh; width: 280px;
    background: var(--clr-surface);
    display: flex; flex-direction: column; align-items: flex-start;
    padding: 24px; gap: 0;
    z-index: 1001;
    box-shadow: -4px 0 24px rgba(0,0,0,0.15);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .main-nav.open {
    transform: translateX(0);
  }

  .main-nav .nav-link, .main-nav .icon-btn {
    width: 100%; justify-content: flex-start;
    padding: 16px 0; border-bottom: 1px solid var(--clr-border);
    font-size: 1rem;
  }
  .main-nav .icon-btn { gap: 16px; border-radius: 0; }
  /* Bookmark badge in mobile nav: anchor to icon corner, not the row */
  .main-nav .bookmark-nav-btn {
    position: relative;
  }
  .main-nav .bookmark-nav-btn .bookmark-badge {
    position: absolute;
    top: 8px;
    left: 14px;
    right: auto;
  }
  .nav-divider { display: none; }
  .lang-select-wrapper { margin-top: 24px; width: 100%; }
  .lang-select-wrapper .lang-btn { width: 100%; justify-content: space-between; padding: 12px 16px; font-size: 1rem; border-color: var(--clr-border); }
}

/* ============================================================
   PAGE LAYOUT
   ============================================================ */
.page-main {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  gap: 0;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--page-gutter);
  min-height: calc(100vh - 120px);
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  background: var(--clr-surface);
  border-right: 1px solid var(--clr-border);
  padding: var(--space-6) var(--space-5);
  position: static;
  scrollbar-width: thin;
  scrollbar-color: var(--clr-border) transparent;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--clr-border); border-radius: 4px; }

/* Sidebar header: Filters title + Clear all */
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--clr-border);
}
.sidebar-title {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--clr-text);
}
.clear-all-link {
  font-size: var(--text-sm);
  color: var(--clr-muted);
  text-decoration: none;
  font-weight: var(--weight-medium);
  transition: color var(--transition);
}
.clear-all-link:hover {
  color: var(--clr-red);
}

.filter-group {
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--clr-border);
  animation: fadeSlide .25s ease;
}
.filter-group:last-of-type { border-bottom: none; }

.filter-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semi);
  color: var(--clr-text-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.filter-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  color: var(--clr-muted);
  transition: transform var(--transition), color var(--transition);
}
.filter-toggle svg { width: 16px; height: 16px; display: block; }
.filter-toggle.collapsed svg { transform: rotate(180deg); }
.filter-toggle:hover { color: var(--clr-blue); }

.filter-list { display: flex; flex-direction: column; gap: 8px; }

.filter-check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: .875rem;
  color: var(--clr-text-2);
  transition: color var(--transition);
  user-select: none;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
}
.filter-check:hover {
  color: var(--clr-text);
}
.filter-check .facet-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
  display: block;
}
/* Only animate labels that are actually truncated — JS adds .truncated class */
.filter-check:hover .facet-label.truncated {
  text-overflow: clip;
}
.filter-check:hover .facet-label.truncated .facet-text {
  display: inline-block;
  animation: facetScroll 4s linear .4s 1 forwards;
}
@keyframes facetScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(calc(-100% + 80px)); }
}
.filter-check input { display: none; }

.checkmark {
  width: 18px; height: 18px;
  border: 2px solid var(--clr-border);
  border-radius: 4px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: border-color var(--transition), background var(--transition);
}
.filter-check input:checked + .checkmark {
  background: var(--clr-blue);
  border-color: var(--clr-blue);
}
.filter-check input:checked + .checkmark::after {
  content: '';
  display: block;
  width: 5px; height: 9px;
  border: 2px solid #fff;
  border-top: none; border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
}
.filter-check.active { color: var(--clr-blue); font-weight: 500; }

.count {
  margin-left: auto;
  font-size: .8rem;
  color: var(--clr-muted);
  font-weight: 400;
}

/* From/To Range Inputs */
.range-inputs {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 8px;
}
.range-input-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.range-input-group label {
  font-size: .72rem;
  font-weight: 600;
  color: var(--clr-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.range-input-group input[type="number"] {
  width: 100%;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: .85rem; /* bumped to 16px on mobile — see Bug F */
  font-weight: 500;
  color: var(--clr-text);
  background: var(--clr-surface);
  outline: none;
  transition: border-color var(--transition);
}
.range-input-group input[type="number"]::-webkit-inner-spin-button,
.range-input-group input[type="number"]::-webkit-outer-spin-button {
  opacity: .5;
  cursor: pointer;
  height: 100%;
  margin: 0;
}
.range-input-group input[type="number"]:hover::-webkit-inner-spin-button,
.range-input-group input[type="number"]:hover::-webkit-outer-spin-button {
  opacity: 1;
}
.range-input-group input[type="number"]:focus {
  border-color: var(--clr-blue);
}
.range-sep {
  color: var(--clr-muted);
  font-weight: 600;
  font-size: .9rem;
  padding-bottom: 8px;
  flex-shrink: 0;
}

/* Price Histogram */
/* Price histogram — placeholder, hidden until populated */
.price-histogram {
  display: none;
}
.price-histogram .hist-bar {
  flex: 1;
  background: linear-gradient(180deg, var(--clr-blue), #6fa3ff);
  border-radius: 2px 2px 0 0;
  min-height: 2px;
  opacity: .5;
  transition: opacity .15s;
}
.price-histogram .hist-bar:hover {
  opacity: 1;
}

/* Facet search input */
.facet-search {
  width: 100%;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: .8rem;
  color: var(--clr-text);
  background: var(--clr-surface);
  outline: none;
  margin-bottom: 10px;
  transition: border-color var(--transition);
}
.facet-search:focus {
  border-color: var(--clr-blue);
}
.facet-search::placeholder {
  color: var(--clr-muted);
}

/* Year select dropdowns */
.year-select {
  width: 100%;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: .8rem; /* bumped to 16px on mobile — see Bug F */
  color: var(--clr-text);
  background: var(--clr-surface);
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition);
  font-family: inherit;
}
.year-select:focus { border-color: var(--clr-blue); }

/* Location */
.location-inputs { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.loc-input, .loc-select {
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: .875rem;
  outline: none;
  transition: border-color var(--transition);
  color: var(--clr-text);
  background: var(--clr-surface);
  width: 100%;
}
.loc-input:focus, .loc-select:focus { border-color: var(--clr-blue); }

.country-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chip {
  background: var(--clr-bg);
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-full);
  padding: 5px 10px;
  font-size: .78rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--clr-text-2);
  transition: all var(--transition);
}
.chip:hover { border-color: var(--clr-blue); color: var(--clr-blue); }
.chip.active { border-color: var(--clr-blue); background: #e8f0fe; color: var(--clr-blue); }

.apply-filters-btn {
  width: 100%;
  background: var(--clr-blue);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  margin-top: 8px;
}
.apply-filters-btn:hover { background: var(--clr-blue-dark); transform: translateY(-1px); }
.reset-filters-btn {
  width: 100%;
  background: none;
  color: var(--clr-muted);
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 10px;
  font-size: .85rem;
  cursor: pointer;
  margin-top: 8px;
  transition: all var(--transition);
}
.reset-filters-btn:hover { color: var(--clr-red); border-color: var(--clr-red); }

/* ============================================================
   RESULTS AREA
   ============================================================ */
.results-area {
  padding: 24px 28px;
  min-width: 0;
}

.results-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

/* Toolbar row: attributes (left) + sort/view controls (right), always one line */
.results-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  min-height: 34px;
}
.results-toolbar .attr-chips {
  margin-bottom: 0;
  flex-shrink: 0;
  flex-wrap: nowrap;
}
.results-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto; /* push to right */
  flex-shrink: 0;
}
/* (d) Visible, i18n-able label for the sort <select> (was sr-only + hardcoded English).
   nowrap + no-shrink so long translations don't squeeze the select/view-toggle. */
.sort-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--clr-muted);
  margin-right: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}
@media (max-width: 600px) { .sort-label { display: none; } }
/* ≤900px: hide toolbar attr-chips (shown in sidebar instead) */
@media (max-width: 900px) {
  .results-toolbar .attr-chips { display: none; }
}
.results-title {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--clr-text);
}
.results-count {
  color: var(--clr-red);
}
.results-sub {
  font-size: var(--text-base);
  color: var(--clr-muted);
  margin-top: 4px;
}
.results-sub strong {
  font-weight: var(--weight-bold);
  color: var(--clr-text-2);
}
/* When search query or filters are active: visual emphasis */
.results-header.active-search .results-count {
  color: var(--clr-text);
}
.search-highlight,
.results-sub .search-highlight {
  color: var(--clr-red) !important;
  font-weight: var(--weight-bold);
}
.results-timing {
  font-weight: var(--weight-regular);
  color: var(--clr-muted);
}


.sort-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-sm);
  padding: 0 34px 0 12px;
  height: 34px;
  font-size: .82rem;
  font-weight: 500;
  background: var(--clr-surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238b95a6' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  color: var(--clr-text);
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition);
}
.sort-select:focus { border-color: var(--clr-blue); }
.sort-select option:disabled {
  color: var(--clr-muted);
  font-style: italic;
}

.view-toggle {
  display: flex;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.view-btn {
  background: var(--clr-surface);
  border: none;
  cursor: pointer;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  color: var(--clr-muted);
  transition: all var(--transition);
}
.view-btn svg { width: 16px; height: 16px; }
.view-btn.active { background: var(--clr-blue); color: #fff; }
.view-btn:not(.active):hover { background: var(--clr-bg); color: var(--clr-text); }

/* Active Tags */
.active-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.tag-label { font-size: .8rem; color: var(--clr-muted); font-weight: 500; }
.active-tag {
  background: #e8f0fe;
  color: var(--clr-blue);
  border: 1.5px solid #c7d9fb;
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
@media (hover: hover) {
  .active-tag:hover { background: #d4e5fe; }
}

/* ============================================================
   PRODUCT GRID
   ============================================================ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

/* List view override — horizontal card layout
   Layout:  [IMAGE] | [Title / Meta / Category / Desc / Price+CTA]
   ───────────────────────────────────────────────────────────────── */
.product-grid.list-view {
  grid-template-columns: 1fr;
}
.product-grid.list-view .product-card {
  display: flex;
  flex-direction: row;
  align-items: stretch;
}
.product-grid.list-view .card-img-wrap {
  flex: 0 0 220px;
  height: auto;
  min-height: 160px;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}
.product-grid.list-view .card-img-wrap img {
  height: 100%;
  object-fit: cover;
}
/* In list view: show condition-bar as a vertical colored separator */
.product-grid.list-view .condition-bar {
  width: 3px;
  height: auto;
  border-radius: 0;
  align-self: stretch;
  flex-shrink: 0;
}
.product-grid.list-view .card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  gap: 2px;
}
.product-grid.list-view .card-body .card-title {
  font-size: 1.15rem;
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-grid.list-view .card-body .card-meta {
  font-size: .75rem;
  color: var(--clr-text-2);
  margin: 0 0 4px;
}
.product-grid.list-view .card-body .card-category {
  font-size: .78rem;
  color: var(--clr-muted);
  margin: 0;
}
.product-grid.list-view .card-body .card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: .8rem;
  line-height: 1.5;
  color: var(--clr-text-2);
  margin: 4px 0 0;
  flex: 1;
}
.product-grid.list-view .card-body .card-footer {
  margin-top: 6px;
}
/* Hide the separate desc-col in list view */
.product-grid.list-view .card-desc-col { display: none; }
/* View-details strip not needed in list */
.product-grid.list-view .view-details-strip { display: none; }
/* Card actions overlay — always visible in list view */
.product-grid.list-view .card-actions.card-actions-grid { display: none !important; }
.product-grid.list-view .card-actions.card-actions-list { display: flex !important; }

/* Grid view: show img-wrap bookmark, hide body bookmark */
.card-actions.card-actions-list { display: none; }
.card-actions.card-actions-grid { display: flex; }
/* Debug JSON: span full width in list view */
.product-grid.list-view .debug-json-wrap { grid-column: 1 / -1; }

/* Card */
.product-card {
  background: var(--clr-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out);
  cursor: pointer;
  border: 1px solid var(--clr-border);
  position: relative;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: oklch(48% 0.18 255 / 0.25);
}

/* Image Wrapper */
.card-img-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--clr-bg) 0%, var(--clr-border) 100%);
  overflow: hidden;
  flex-shrink: 0;
  touch-action: pan-y pinch-zoom; /* allow vertical scroll but enable horizontal swipe */
}
.card-img-wrap {
  overflow: hidden; /* Bug C: permanent overflow hidden, no JS toggle needed */
}
/* Take full touch control during active swipe to prevent browser interference */
.card-img-wrap.swiping {
  touch-action: none;
}
.card-img-wrap.swiping img {
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.card-img-wrap img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .4s var(--ease-out);
}
/* Bug D fix: Only zoom on devices with pointer hover (not touch) to prevent iOS two-tap issue */
@media (hover: hover) {
  .product-card:hover .card-img-wrap img { transform: scale(1.03); }
}

/* Badge */
.card-badge {
  position: absolute;
  top: 10px; left: 10px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  z-index: 1;
}
.badge-used    { background: #475569; color: #fff; }
.badge-new     { background: var(--clr-green); color: #fff; }
.badge-reserve { background: var(--clr-red); color: #fff; }


/* Card overlay actions — grid: in img-wrap, list: in card-body */
.card-actions {
  position: absolute;
  top: 12px; right: 12px;
  display: flex; gap: 6px;
  z-index: 2;
}
.card-action-btn {
  width: auto; height: auto;
  background: none;
  border: none;
  border-radius: 0;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--clr-text-2);
  transition: all var(--transition);
  filter: drop-shadow(0 1px 2px rgba(255,255,255,.9)) drop-shadow(0 0 3px rgba(255,255,255,.7));
}
.card-action-btn svg { width: 28px; height: 28px; fill: #fff; stroke: var(--clr-amber); }
.card-action-btn:hover { color: var(--clr-amber); transform: scale(1.15); background: none; }
.card-action-btn.saved svg { fill: var(--clr-amber); stroke: var(--clr-amber); }
.card-action-btn[aria-label="Save to watchlist"] { color: var(--clr-amber); }

/* Certified dealer badge */
.certified-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-green);
  cursor: pointer;
  filter: drop-shadow(0 1px 2px rgba(255,255,255,.9)) drop-shadow(0 0 3px rgba(255,255,255,.7));
  transition: transform var(--transition);
}
.certified-badge:hover {
  transform: scale(1.15);
}
.certified-badge svg { width: 28px; height: 28px; fill: #fff; }

.certified-popup {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  background: var(--clr-surface);
  color: var(--clr-text);
  font-size: 0.75rem;
  font-weight: var(--weight-medium);
  padding: 8px 12px;
  border-radius: 6px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--clr-border);
  width: max-content;
  max-width: 220px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-5px);
  transition: all var(--transition);
  z-index: 10;
  text-align: left;
}
.certified-badge.open .certified-popup {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* View details strip */
.view-details-strip {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(26,86,214,.82) 0%, transparent 100%);
  color: #fff;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 10px;
  font-size: .8rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity var(--transition);
}
/* Show strip only when hovering card-body areas ABOVE the footer */
.product-card:has(.card-body:hover):not(:has(.card-footer:hover)) .view-details-strip { opacity: 1; }
.view-details-strip svg { width: 14px; height: 14px; margin-left: 4px; }
/* View details strip color per card type */
.product-card.card-auction .view-details-strip {
  background: linear-gradient(to top, rgba(217, 119, 6, .85) 0%, transparent 100%);
}
.product-card.card-inspected .view-details-strip {
  background: linear-gradient(to top, rgba(21, 128, 61, .85) 0%, transparent 100%);
}


/* Card Body */
.card-body { 
  padding: 16px; 
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 4px;
  position: relative;
}

.card-title {
  font-size: var(--text-base);
  font-weight: var(--weight-semi);
  color: var(--clr-text);
  margin-bottom: 2px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-category {
  font-size: var(--text-xs);
  color: var(--clr-muted);
  margin: 0 0 var(--space-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: var(--weight-medium);
  letter-spacing: .02em;
}
.card-title .card-title-text {
  display: inline-block;
}
/* Scroll overflowing title on hover — same pattern as facet-text */
.product-card:hover .card-title.truncated {
  text-overflow: clip;
}
.product-card:hover .card-title.truncated .card-title-text {
  animation: facetScroll 4s linear .4s 1 forwards;
}
/* Auto-scroll for truncated titles in viewport center (added by IntersectionObserver) */
.card-title.auto-scrolling {
  text-overflow: clip;
}
.card-title.auto-scrolling .card-title-text {
  animation: titleAutoScroll 4s linear 0s 1 forwards;
}
@keyframes titleAutoScroll {
  0%   { transform: translateX(0); }
  80%  { transform: translateX(calc(-100% + 80px)); }
  85%  { transform: translateX(calc(-100% + 80px)); } /* pause at end */
  100% { transform: translateX(0); }
}
.card-meta {
  font-size: var(--text-xs);
  color: var(--clr-muted);
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-meta svg { width: 12px; height: 12px; flex-shrink: 0; }
.card-meta .fi { font-size: 14px; border-radius: 2px; }
.dot { color: var(--clr-border); }
/* Description snippet in grid cards */
.card-body > .card-desc {
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--clr-text-2);
  margin: 0 0 var(--space-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card Footer — consistent 2-row layout */
.card-footer {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
  /* Isolate footer from card-body hover/click events */
  position: relative;
  z-index: 1;
}

/* Row 1: meta (auction info) — fixed height for consistent cards */
.footer-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 20px;
}

.card-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--clr-text);
  white-space: nowrap;
}

/* Auction bid info — single line, never wrap */
.bid-info {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
}
.bid-label {
  font-size: .72rem;
  color: var(--clr-red-dark);
  display: flex; align-items: center; gap: 4px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bid-label svg { width: 12px; height: 12px; }
.bid-date {
  font-size: .78rem;
  font-weight: 700;
  color: #555;
}
.bid-expired { opacity: .7; }
.bid-expired .bid-date { color: #555; font-style: normal; font-size: .72rem; font-weight: 600; }

/* Row 2: price + CTA button side-by-side */
.footer-cta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.footer-cta .card-price {
  margin-right: auto;
}

/* Unified CTA button base */
.btn-contact, .btn-bid, .btn-auction-details, .btn-phone-mobile {
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
}
.btn-contact, .btn-bid {
  background: var(--clr-blue);
  color: #fff;
  border: none;
}
.btn-contact:hover, .btn-bid:hover { background: var(--clr-blue-dark); transform: translateY(-1px); }

.btn-auction-details {
  background: oklch(56% 0.025 255);
  border: 1px solid oklch(48% 0.025 255);
  color: #fff;
}
.btn-auction-details:hover {
  background: oklch(50% 0.025 255);
  transform: translateY(-1px);
}

.btn-phone-mobile {
  display: none;
  gap: 6px;
  width: 38px;
  padding: 8px 10px;
  background: var(--clr-surface);
  border: 1.5px solid oklch(76% 0.08 145);
  color: var(--clr-green);
}
.btn-phone-mobile svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-phone-mobile:hover:not(:disabled) {
  background: oklch(96% 0.035 145);
  border-color: var(--clr-green);
  transform: translateY(-1px);
}
.btn-phone-mobile.is-loading, .btn-phone-mobile:disabled {
  opacity: .7;
  cursor: wait;
  transform: none;
}
.btn-phone-mobile.is-revealed {
  width: auto;
  max-width: 132px;
  padding-inline: 10px;
  color: var(--clr-green);
}
.btn-phone-mobile.is-unavailable {
  width: auto;
  max-width: 132px;
  color: var(--clr-muted);
  border-color: var(--clr-border);
  background: var(--clr-surface);
}
.phone-number, .phone-feedback {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 92px;
}
.phone-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid oklch(82% 0.05 145);
  border-top-color: var(--clr-green);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@media (max-width: 900px) {
  .btn-phone-mobile { display: inline-flex; }
  .footer-cta { gap: 6px; }
}

/* btn-request-price inherits btn-contact base — all buttons are blue */

/* Auction cards — no background tint (condition-bar + details-strip provide distinction) */

/* Geprüft (inspected) dealer cards — no background tint */

/* Condition Bar */
.condition-bar {
  height: 3px;
  border-radius: 0 0 2px 2px;
  background: linear-gradient(90deg, var(--clr-blue) 0%, #6fa3ff 100%);
  margin: 0;
  opacity: .7;
}
/* Auction condition bar → amber */
.product-card.card-auction .condition-bar {
  background: linear-gradient(90deg, rgb(217, 119, 6) 0%, #f59e0b 100%);
}
/* Inspected condition bar → green */
.product-card.card-inspected .condition-bar {
  background: linear-gradient(90deg, var(--clr-green) 0%, #4ade80 100%);
}

body.resizing * {
  transition: none !important;
}

/* ============================================================
   LOAD MORE + PAGINATION
   ============================================================ */
.load-more-bar {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}
.load-more-btn {
  display: flex; align-items: center; gap: 8px;
  background: none;
  border: 2px solid var(--clr-border);
  border-radius: var(--radius-full);
  padding: 12px 28px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--clr-text-2);
  cursor: pointer;
  transition: all var(--transition);
}
.load-more-btn svg { width: 18px; height: 18px; transition: transform var(--transition); }
.load-more-btn:hover {
  border-color: var(--clr-blue);
  color: var(--clr-blue);
  background: #e8f0fe;
}
.load-more-btn:hover svg { transform: translateY(3px); }

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding-bottom: 32px;
}
.page-btn {
  min-width: 38px; height: 38px;
  border: 1.5px solid var(--clr-border);
  background: var(--clr-surface);
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 600;
  color: var(--clr-text-2);
  cursor: pointer;
  transition: all var(--transition);
  display: flex; align-items: center; justify-content: center;
  padding: 0 10px;
}
.page-btn:hover:not([disabled]) { border-color: var(--clr-blue); color: var(--clr-blue); }
.page-btn.active { background: var(--clr-blue); border-color: var(--clr-blue); color: #fff; }
.page-btn[disabled] { opacity: .4; cursor: not-allowed; }
.page-ellipsis { padding: 0 6px; color: var(--clr-muted); font-weight: 700; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #3a3f46; /* original: #1a1a2e */
  color: #cbd5e1;
  padding: 48px 24px 0; /* same 24px side padding as header-inner */
}

/* 4-column link grid (matching resale.de) */
.footer-columns {
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-10);
  padding: 0 var(--page-gutter) 36px;
  box-sizing: border-box;
}
.footer-heading {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: oklch(95% 0.003 255);
  margin-bottom: var(--space-4);
}
.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.footer-list li a {
  font-size: var(--text-sm);
  color: oklch(82% 0.006 255);
  text-decoration: none;
  transition: color var(--transition);
}
.footer-list li a:hover {
  color: oklch(95% 0.003 255);
}
.footer-logo {
  display: block;
  margin-top: 20px;
  height: 100px;
  width: 100px;
}

/* Keyword rows (Meistgesuchte Maschinen, Hersteller A-Z) */
.footer-keywords {
  max-width: 1440px;
  margin: 0 auto;
  padding: var(--space-3) var(--page-gutter);
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
}
.footer-kw-label {
  font-size: var(--text-xs);
  color: oklch(82% 0.006 255);
  font-weight: var(--weight-semi);
  margin-right: 4px;
  white-space: nowrap;
}
.footer-keywords a {
  font-size: var(--text-xs);
  color: oklch(62% 0.006 255);
  text-decoration: none;
  padding: 2px 5px;
  border-radius: 3px;
  transition: color var(--transition);
}
.footer-keywords a:hover {
  color: oklch(90% 0.006 255);
}

/* Bottom disclaimer bar */
.footer-bottom {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  text-align: center;
  padding: var(--space-5) var(--page-gutter);
  box-sizing: border-box;
  font-size: var(--text-xs);
  line-height: 1.5;
}
.footer-bottom a { color: oklch(82% 0.006 255); text-decoration: underline; transition: color var(--transition); }
.footer-bottom a:hover { color: oklch(95% 0.003 255); }
.footer-copy { color: oklch(62% 0.006 255); }
.footer-year { color: oklch(62% 0.006 255); font-weight: var(--weight-semi); }

@media (max-width: 900px) {
  .footer-columns {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}
@media (max-width: 540px) {
  .footer-columns {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  z-index: 999;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px);
  animation: fadeIn .2s ease;
}
.lightbox[hidden] { display: none; }
.lightbox-close {
  position: absolute;
  top: 20px; right: 24px;
  background: rgba(255,255,255,.15);
  border: none; border-radius: var(--radius-full);
  width: 40px; height: 40px;
  font-size: 1.1rem;
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.lightbox-close:hover { background: rgba(255,255,255,.3); }
.lightbox-img {
  max-width: 90vw;
  max-height: 82vh;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px rgba(0,0,0,.6);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.product-card {
  animation: fadeSlide .3s ease both;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .page-main { grid-template-columns: 1fr; }
  .sidebar {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 300px;
    height: 100vh;
    z-index: 500;
    overflow-y: auto;
    background: var(--clr-surface);
    box-shadow: 4px 0 24px rgba(0,0,0,.15);
    border-right: none;
    border-bottom: none;
    transform: translateX(-100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    padding-bottom: 300px; /* extra space so bottom inputs remain visible when keyboard opens */
  }
  .sidebar.open {
    display: block;
    transform: translateX(0);
  }
  /* Backdrop for mobile sidebar */
  .sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,.35);
    backdrop-filter: blur(2px);
    z-index: 499;
  }
  .sidebar-backdrop.open {
    display: block;
  }
}
@media (max-width: 640px) {
  .results-area { padding: 16px; }
  .product-grid { grid-template-columns: 1fr; }
  .results-header { flex-direction: column; align-items: flex-start; }
  .results-toolbar { width: 100%; }

  /* Sort select: full label on mobile (attr-chips moved to sidebar) */
  .sort-select option { color: var(--clr-text) !important; }
  .view-toggle { display: none !important; }
}

/* ============================================================
   DEV WARNING BANNER
   ============================================================ */
.dev-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #7c2d12;
  color: #fde8d8;
  font-size: .82rem;
  padding: 9px 20px;
  position: relative;
  z-index: 200;
}
.dev-banner svg { width: 16px; height: 16px; flex-shrink: 0; stroke: #fb923c; }
.dev-banner code { background: rgba(0,0,0,.25); border-radius: 3px; padding: 1px 5px; font-size: .8rem; }
.dev-banner strong { color: #fed7aa; }
.dev-banner-close {
  margin-left: auto;
  background: none;
  border: none;
  color: #fde8d8;
  cursor: pointer;
  font-size: 1rem;
  padding: 2px 6px;
  opacity: .7;
  transition: opacity var(--transition);
}
.dev-banner-close:hover { opacity: 1; }

/* ============================================================
   API STATUS PILL (header)
   ============================================================ */
.api-status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--clr-bg);
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: .75rem;
  font-weight: 600;
  color: var(--clr-muted);
  cursor: default;
  user-select: none;
}
.api-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--clr-muted);
  flex-shrink: 0;
  transition: background .4s ease;
}
.api-dot-ok      { background: var(--clr-green); box-shadow: 0 0 6px color-mix(in srgb, var(--clr-green) 53%, transparent); }
.api-dot-error   { background: var(--clr-red); box-shadow: 0 0 6px color-mix(in srgb, var(--clr-red) 53%, transparent); }
.api-dot-demo    { background: var(--clr-amber); box-shadow: 0 0 6px color-mix(in srgb, var(--clr-amber) 53%, transparent); }
.api-dot-unknown { background: var(--clr-muted); }

/* ============================================================
   SEARCH WRAPPER & AUTOCOMPLETE
   ============================================================ */
.search-wrapper {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
}

.suggest-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--clr-surface);
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  z-index: 300;
  overflow: hidden;
  animation: fadeSlide .15s ease;
}
.suggest-list[hidden] { display: none; }
.suggest-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--clr-text);
  cursor: pointer;
  transition: background var(--transition);
  list-style: none;
}
.suggest-item svg { width: 14px; height: 14px; color: var(--clr-muted); flex-shrink: 0; }
.suggest-item:hover, .suggest-item.focused { background: #e8f0fe; color: var(--clr-blue); }
.suggest-item:hover svg, .suggest-item.focused svg { color: var(--clr-blue); }

/* ============================================================
   API CONFIG PANEL (sidebar)
   ============================================================ */
.api-config-panel {
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  overflow: hidden;
}
.api-config-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  background: var(--clr-bg);
  border: none;
  padding: 10px 12px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--clr-text-2);
  cursor: pointer;
  text-align: left;
  transition: background var(--transition);
}
.api-config-toggle:hover { background: #e8f0fe; color: var(--clr-blue); }
.api-config-caret { width: 14px; height: 14px; margin-left: auto; transition: transform var(--transition); flex-shrink: 0; }
.api-config-toggle[aria-expanded="true"] .api-config-caret { transform: rotate(180deg); }

.api-config-status {
  margin-left: 4px;
  font-size: .72rem;
  font-weight: 500;
  color: var(--clr-muted);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-full);
  padding: 1px 7px;
  background: var(--clr-surface);
}
.api-config-status.set { color: var(--clr-green); border-color: #bbf7d0; background: #f0fdf4; }

.api-config-body {
  padding: 12px;
  background: var(--clr-surface);
  border-top: 1px solid var(--clr-border);
}
.api-config-body[hidden] { display: none; }

.api-label {
  display: block;
  font-size: .75rem;
  font-weight: 600;
  color: var(--clr-text-2);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 5px;
  margin-top: 10px;
}
.api-label:first-child { margin-top: 0; }
.api-label-note { font-weight: 400; text-transform: none; color: var(--clr-muted); letter-spacing: 0; }

.api-key-row { display: flex; gap: 6px; margin-bottom: 4px; }
.api-key-input {
  flex: 1;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: .82rem;
  outline: none;
  transition: border-color var(--transition);
  color: var(--clr-text);
  background: var(--clr-surface);
  width: 100%;
}
.api-key-input:focus { border-color: var(--clr-blue); }
.api-key-save {
  background: var(--clr-blue);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition);
}
.api-key-save:hover { background: var(--clr-blue-dark); }

.api-health-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--clr-text-2);
  cursor: pointer;
  transition: all var(--transition);
  width: 100%;
  justify-content: center;
  margin-top: 4px;
}
.api-health-btn:hover { border-color: var(--clr-green); color: var(--clr-green); }

.api-health-result {
  font-size: .75rem;
  margin-top: 6px;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  display: inline-block;
  word-break: break-all;
}
.api-health-result.ok  { background: #f0fdf4; color: #15803d; }
.api-health-result.err { background: #fef2f2; color: #dc2626; }

/* ============================================================
   ERROR BANNER (results area)
   ============================================================ */
.error-banner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: #fef2f2;
  border: 1.5px solid #fecaca;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: .875rem;
  color: #b91c1c;
}
.error-banner[hidden] { display: none; }
.error-banner svg { width: 18px; height: 18px; flex-shrink: 0; }
.error-retry {
  background: #dc2626;
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}
.error-retry:hover { background: #b91c1c; }
.error-fallback {
  background: none;
  color: #dc2626;
  border: 1.5px solid #fca5a5;
  border-radius: var(--radius-sm);
  padding: 5px 12px;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.error-fallback:hover { background: #fee2e2; }

/* ============================================================
   SKELETON LOADING CARDS
   ============================================================ */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}
.skeleton-card {
  pointer-events: none;
  animation: none !important;
  border: 1.5px solid var(--clr-border) !important;
}
.skeleton-base {
  background: linear-gradient(90deg, #e8ecf0 25%, #f4f6f9 50%, #e8ecf0 75%);
  background-size: 600px 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: var(--radius-sm);
}
.skeleton-img {
  height: 180px;
  background: linear-gradient(90deg, #e0e4ea 25%, #edf0f4 50%, #e0e4ea 75%);
  background-size: 600px 100%;
  animation: shimmer 1.4s infinite linear;
}
.skeleton-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.skeleton-line {
  height: 13px;
  border-radius: 4px;
  background: linear-gradient(90deg, #e0e4ea 25%, #edf0f4 50%, #e0e4ea 75%);
  background-size: 600px 100%;
  animation: shimmer 1.4s infinite linear;
}
.skeleton-line.w80 { width: 80%; }
.skeleton-line.w60 { width: 60%; }
.skeleton-line.w50 { width: 50%; }
.skeleton-line.w40 { width: 40%; height: 30px; border-radius: var(--radius-sm); margin-top: 4px; }

/* ============================================================
   NEW CARD ELEMENTS
   ============================================================ */
/* Card description (from API beschreibungde) */
.card-desc {
  font-size: .78rem;
  color: var(--clr-text-2);
  line-height: 1.5;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-desc mark {
  background: #fef9c3;
  color: var(--clr-text);
  border-radius: 2px;
  padding: 0 2px;
}

/* Card Category */
.card-category { font-size: .78rem; font-weight: 500; color: var(--clr-text-2); margin-bottom: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta-icon { width: 14px; height: 14px; display: inline-block; vertical-align: text-bottom; margin-right: 2px; }

/* Mini Carousel */
.carousel-nav {
  position: absolute; top: 50%; width: 28px; height: 28px;
  background: rgba(255,255,255,.9); border: none; border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 5px rgba(0,0,0,.2); cursor: pointer; color: var(--clr-text-2);
  z-index: 5; opacity: 0; transform: translateY(-50%); transition: all .2s;
}
@media (hover: hover) {
  .card-img-wrap:hover .carousel-nav { opacity: 1; }
}
.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }
.carousel-nav:hover { background: #fff; color: var(--clr-blue); }
.carousel-nav svg { width: 18px; height: 18px; }

.carousel-dots {
  position: absolute; top: 8px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 4px; z-index: 5;
}
.c-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,.5); transition: background .2s;
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.c-dot.active { background: #fff; transform: scale(1.1); box-shadow: 0 1px 3px rgba(0,0,0,.4); }

/* Price on request (API has no price field) */
.card-price-por {
  font-size: .82rem;
  font-weight: 600;
  color: var(--clr-muted);
  font-style: italic;
}

/* No-results state */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 0;
  color: var(--clr-muted);
}
.no-results svg {
  width: 48px; height: 48px;
  display: block;
  margin: 0 auto 16px;
  opacity: .4;
}
.no-results p { font-size: 1.05rem; font-weight: 600; margin-bottom: 16px; }
.no-results button {
  background: var(--clr-blue);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 24px;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
}

/* Facet loading placeholder */
.facet-loading {
  font-size: .82rem;
  color: var(--clr-muted);
  font-style: italic;
  padding: 4px 0;
}
.facet-hint {
  font-size: .78rem;
  color: var(--clr-muted);
  font-style: italic;
  padding: 6px 0;
  line-height: 1.4;
}

/* highlight mark tags from API */
mark {
  background: #fef9c3;
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}

/* ============================================================
   ADMIN SEARCH PAGE EXTENSIONS
   ============================================================ */

/* Attribute filter toggles (sidebar — checkbox style consistent with facets) */
.attr-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.attr-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--clr-surface);
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  height: 34px;
  font-size: .8rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--clr-text-2);
  transition: all var(--transition);
  font-family: inherit;
  box-sizing: border-box;
}
@media (hover: hover) {
  .attr-chip:hover { border-color: var(--clr-blue); color: var(--clr-blue); }
}
.attr-chip.active {
  border-color: var(--clr-blue);
  background: var(--clr-blue);
  color: #fff;
}
/* Auction attr chip — amber themed */
@media (hover: hover) {
  .attr-chip[data-attr="auc"]:hover { border-color: var(--clr-amber); color: var(--clr-amber); }
}
.attr-chip[data-attr="auc"].active {
  border-color: var(--clr-amber);
  background: var(--clr-amber);
  color: #fff;
}
/* Inspected attr chip — green themed */
@media (hover: hover) {
  .attr-chip[data-attr="appr"]:hover { border-color: var(--clr-green); color: var(--clr-green); }
}
.attr-chip[data-attr="appr"].active {
  border-color: var(--clr-green);
  background: var(--clr-green);
  color: #fff;
}
/* No-auctions attr chip — slate themed (TASK-136: exclude auctions) */
@media (hover: hover) {
  .attr-chip[data-attr="noauc"]:hover { border-color: #64748b; color: #475569; }
}
.attr-chip[data-attr="noauc"].active {
  border-color: #64748b;
  background: #64748b;
  color: #fff;
}
/* TASK-136: let the (normally one-line) toolbar chip row wrap on small laptops so the 5th chip never overflows */
@media (min-width: 901px) and (max-width: 1100px) {
  .results-toolbar .attr-chips { flex-wrap: wrap; }
}
.attr-chip .attr-icon {
  width: 14px; height: 14px;
  opacity: .7;
}
.attr-chip.active .attr-icon { opacity: 1; }

/* Sidebar attr-chips (mobile duplicate of toolbar chips) */
.sidebar-attr-chips-wrap { display: none; } /* hidden on desktop */
@media (max-width: 900px) {
  .sidebar-attr-chips-wrap { display: block; }
  .sidebar-attr-chips {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .sidebar-attr-chips .attr-chip {
    width: 100%;
    justify-content: flex-start;
    height: 40px;
    font-size: .85rem;
    border-radius: var(--radius-sm);
  }
  .sidebar-attr-chips .attr-label { display: inline; }
}

/* Non-Sticky results header */
.results-header {
  background: var(--clr-bg);
  padding-top: 16px;
  padding-bottom: 12px;
  margin-bottom: 4px;
}

/* Hide description in grid view, show in list view */
.product-grid:not(.list-view) .card-desc { display: none; }
.product-grid:not(.list-view) .card-desc-col { display: none; }

/* Loading more spinner */
.loading-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  color: var(--clr-muted);
  font-size: .875rem;
  font-weight: 500;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  width: 20px; height: 20px;
  border: 2.5px solid var(--clr-border);
  border-top-color: var(--clr-blue);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

/* End of results */
.end-of-results {
  text-align: center;
  padding: 24px;
  color: var(--clr-muted);
  font-size: .85rem;
  font-weight: 500;
  border-top: 1px solid var(--clr-border);
  margin-top: 4px;
}

/* Scroll limit message */
.scroll-limit-msg {
  text-align: center;
  padding: 32px 24px;
  margin-top: 16px;
  background: linear-gradient(135deg, #fef9c3 0%, #fef3c7 100%);
  border: 1.5px solid #fbbf24;
  border-radius: var(--radius-lg);
  color: var(--clr-text);
}
.scroll-limit-msg svg {
  width: 32px; height: 32px;
  display: block;
  margin: 0 auto 12px;
  color: var(--clr-amber);
}
.scroll-limit-msg h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.scroll-limit-msg p {
  font-size: .85rem;
  color: var(--clr-text-2);
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Debug score badge */
.debug-score {
  position: absolute;
  top: 10px; left: 10px;
  background: rgba(0,0,0,.78);
  color: #4ade80;
  font-size: .65rem;
  font-family: 'Courier New', monospace;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  z-index: 4;
  backdrop-filter: blur(4px);
  pointer-events: none;
}

/* Debug JSON drawer */
.debug-json-wrap {
  background: #0f1117;
  border-top: 1px solid #2d2d2d;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.debug-json-toggle {
  display: flex; align-items: center; gap: 8px;
  width: 100%; background: transparent; border: none;
  color: #4ade80; font-family: 'Courier New', monospace;
  font-size: .72rem; padding: 7px 14px; cursor: pointer;
  font-weight: bold; text-align: left;
}
.debug-json-toggle:hover { background: rgba(74,222,128,.08); }
.debug-json-body {
  max-height: 260px; overflow-y: auto; padding: 10px 14px;
  color: #86efac; font-size: .7rem;
  font-family: 'Courier New', monospace;
  white-space: pre-wrap; word-break: break-all; display: none;
}
.debug-json-body.open { display: block; }

/* Filter section count badge */
.filter-count {
  font-size: .72rem; font-weight: 600;
  color: var(--clr-muted);
  margin-left: 4px;
}

/* Chip count bubble */
.chip-count { font-size: .7rem; opacity: .7; margin-left: 3px; }

/* No-price toggle */
.no-price-toggle { margin-top: 12px; font-size: .82rem; }

/* Results area top padding */
.results-area { padding-top: 0; }

/* Lang select styled */
.lang-select {
  background: none; border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-full); padding: 5px 10px;
  font-size: .83rem; font-weight: 500; color: var(--clr-text-2);
  cursor: pointer; transition: border-color var(--transition);
  outline: none; font-family: inherit;
}
.lang-select:hover { border-color: var(--clr-blue); color: var(--clr-blue); }

/* Shown count in results header */
.shown-of {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .8rem; color: var(--clr-muted); margin-top: 2px;
}
.shown-of strong { color: var(--clr-text-2); font-weight: 600; }

/* Card ID (small monospace, list view) */
.card-id {
  font-family: 'Courier New', monospace;
  font-size: .72rem; color: var(--clr-muted);
  background: var(--clr-bg); border-radius: 4px;
  padding: 1px 5px; display: inline-block;
}

/* Location: country tld chips have flag + name */
.country-chips .chip { white-space: nowrap; }

/* Scroll-to-top floating button */
.scroll-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 400;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--clr-blue);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .25s ease, transform .25s ease, background .15s;
  pointer-events: none;
}
.scroll-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.scroll-to-top.fading {
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
}
.scroll-to-top:hover {
  background: var(--clr-blue-dark);
  box-shadow: 0 6px 20px rgba(0,0,0,.3);
}
.scroll-to-top svg { width: 20px; height: 20px; }

/* Body scroll lock — compensate for scrollbar removal to prevent layout shift */
html.scroll-locked {
  overflow: hidden !important;
  padding-right: var(--scrollbar-w, 0px) !important;
}
html.scroll-locked body {
  overflow: hidden;
}
html.scroll-locked .bookmark-dropdown,
html.scroll-locked .bookmark-backdrop,
html.scroll-locked .scroll-to-top {
  padding-right: var(--scrollbar-w, 0px);
}

/* Bookmark save pulse animation */
@keyframes bookmarkPulse {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.4); }
  60%  { transform: scale(0.9); }
  100% { transform: scale(1); }
}
.card-action-btn.pulse-save {
  animation: bookmarkPulse .45s cubic-bezier(.4,0,.2,1);
}
/* Hamburger badge flyout animation */
@keyframes badgePop {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.bookmark-badge.pop {
  animation: badgePop .35s cubic-bezier(.4,0,.2,1);
}

/* ============================================================
   BOOKMARK DROPDOWN — matches cat-more-dropdown shell
   ============================================================ */
.bookmark-dropdown-wrap {
  position: relative;
}
.bookmark-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90; /* Bug A: above content but below header (100) */
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.bookmark-dropdown-wrap.bookmark-open .bookmark-backdrop {
  display: block;
}
.bookmark-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--clr-text);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--clr-border);
  margin-bottom: 14px;
}
.bookmark-header-count {
  font-weight: 500;
  color: var(--clr-text-2);
  font-size: .85rem;
}
.bookmark-dropdown {
  position: fixed;
  top: calc(var(--header-h) + 42px);
  left: 0;
  width: 100vw;
  background: var(--clr-surface, #fff);
  border-top: 2px solid var(--clr-blue);
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
  z-index: 95; /* Bug A: below header (100) so header stays visible */
  padding: 20px 0;
  max-height: 400px;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
  visibility: hidden;
}
.bookmark-dropdown-wrap.bookmark-open .bookmark-dropdown {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.bookmark-dropdown-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--page-gutter);
}
.bookmark-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 8px;
  padding: 32px 16px;
  color: var(--clr-text-2);
  font-size: .9rem;
}
.bookmark-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
}
.bookmark-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.bookmark-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--clr-bg);
}
.bookmark-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bookmark-title {
  font-size: .72rem;
  font-weight: 600;
  color: var(--clr-text);
  text-align: center;
  line-height: 1.3;
  height: calc(2 * 1.3 * .72rem);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}
.bookmark-remove {
  background: none;
  border: none;
  color: var(--clr-text-2);
  font-size: .68rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: color .15s, background .15s;
}
.bookmark-remove:hover {
  color: var(--clr-red);
  background: rgba(230,43,30,.08);
}
/* bookmark-footer: see below with clear-all button support */
.bookmark-visit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--clr-text-2);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--clr-border);
  transition: background .15s, color .15s;
}
.bookmark-visit-btn:hover {
  background: var(--clr-bg);
  color: var(--clr-text);
}

/* Bug 1 fix: When category bar scrolls out, remove the 42px gap */
body.catbar-hidden .bookmark-dropdown {
  top: var(--header-h);
}

/* Bug 2: Clear all bookmarks button */
.bookmark-clear-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--clr-red, #dc2626);
  background: none;
  border: 1px solid var(--clr-red, #dc2626);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, color .15s;
}
.bookmark-clear-all-btn:hover {
  background: var(--clr-red, #dc2626);
  color: #fff;
}
.bookmark-confirm {
  display: none; /* toggled to flex by JS */
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px;
  margin: 8px 0;
  background: #fef2f2;
  border: 1.5px solid var(--clr-red, #dc2626);
  border-radius: var(--radius-sm);
  text-align: center;
}
.bookmark-confirm p {
  font-size: .85rem;
  font-weight: 600;
  color: var(--clr-text);
  margin: 0;
}
.bookmark-confirm-actions {
  display: flex;
  gap: 10px;
}
.bookmark-confirm-yes {
  background: var(--clr-red, #dc2626);
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
}
.bookmark-confirm-yes:hover { background: #b91c1c; }
.bookmark-confirm-no {
  background: var(--clr-surface, #fff);
  color: var(--clr-text-2);
  border: 1px solid var(--clr-border);
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
}
.bookmark-confirm-no:hover { background: var(--clr-bg); }
.bookmark-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--clr-border);
}

/* Bug 4: Multi-level category path on cards */
.card-category {
  font-size: .78rem;
  color: var(--clr-text-2);
  line-height: 1.4;
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cat-sep {
  color: var(--clr-muted);
  font-weight: 400;
}
.cat-level:first-child {
  font-weight: 600;
}
/* Grid view: wrap categories */
.product-grid:not(.list-view) .card-category {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   INQUIRY MODAL
   ============================================================ */
.inquiry-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity .25s ease;
}
.inquiry-overlay.inquiry-active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
.inquiry-dialog {
  position: relative;
  background: var(--clr-surface, #fff);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 28px 28px 24px;
  transform: scale(.95) translateY(10px);
  transition: transform .25s ease;
}
.inquiry-overlay.inquiry-active .inquiry-dialog {
  transform: scale(1) translateY(0);
}
.inquiry-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--clr-text-2);
  padding: 6px;
  border-radius: 50%;
  transition: background .15s;
}
.inquiry-close:hover {
  background: rgba(0,0,0,.06);
}
.inquiry-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--clr-border);
}
.inquiry-item-thumb {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.inquiry-item-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--clr-text);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.inquiry-item-id {
  font-size: .78rem;
  color: var(--clr-text-2);
}
.inquiry-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
/* Honeypot field — hidden from humans but bots auto-fill it.
   Using opacity+position instead of display:none (bots detect display:none). */
.inquiry-hp {
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  height: 0;
  width: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.inquiry-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0; /* prevent grid child overflow */
}
.inquiry-field-full {
  margin-bottom: 12px;
}
.inquiry-field label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--clr-text-2);
  display: flex;
  align-items: center;
  gap: 4px;
}
.inquiry-field input,
.inquiry-field textarea {
  font-family: inherit;
  font-size: 16px; /* ≥16px prevents iOS auto-zoom on focus */
  padding: 9px 12px;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-sm);
  background: var(--clr-bg);
  color: var(--clr-text);
  transition: border-color .15s;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}
.inquiry-field input:focus,
.inquiry-field textarea:focus {
  border-color: var(--clr-blue);
}
.inquiry-field input.inquiry-error,
.inquiry-field textarea.inquiry-error {
  border-color: var(--clr-red);
  background: #fef2f2;
}
.inquiry-field textarea {
  resize: vertical;
  min-height: 80px;
}
.inquiry-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-bottom: 12px;
}
.inquiry-check {
  font-size: .8rem;
  color: var(--clr-text-2);
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}
.inquiry-check input[type="checkbox"] {
  accent-color: var(--clr-blue);
}
.inquiry-privacy {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .75rem;
  color: var(--clr-text-2);
  margin-bottom: 16px;
}
.inquiry-privacy a {
  color: var(--clr-blue);
  text-decoration: none;
}
.inquiry-privacy a:hover { text-decoration: underline; }

/* Submit button — accent color follows card type */
.inquiry-submit {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--clr-blue);
  color: #fff;
  font-size: .92rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .15s, transform .15s;
}
.inquiry-submit:hover {
  background: var(--clr-blue-dark);
  transform: translateY(-1px);
}

/* Success state */
.inquiry-success {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 20px;
  color: var(--clr-green);
  text-align: center;
}
.inquiry-success.show { display: flex; }
.inquiry-success p {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}
.inquiry-form-body.hide { display: none; }

/* Mobile responsive */
@media (max-width: 600px) {
  .inquiry-row { grid-template-columns: 1fr; }
  .inquiry-dialog { padding: 20px 16px 16px; }

  /* Bookmark dropdown → right-side sliding panel on mobile */
  .bookmark-dropdown {
    position: fixed;
    top: 0 !important; /* override body.catbar-hidden rule */
    left: auto;
    right: 0;
    width: 280px;
    height: 100dvh; /* Bug E: dvh accounts for iOS browser chrome */
    max-height: 100dvh;
    border-top: none;
    border-left: 1px solid var(--clr-border);
    box-shadow: -4px 0 24px rgba(0,0,0,.15);
    z-index: 1001;
    padding: 12px 0 env(safe-area-inset-bottom, 12px); /* Bug E: reduced top gap, safe bottom */
    transform: translateX(100%);
    opacity: 1;
    transition: transform .3s cubic-bezier(.4,0,.2,1);
  }
  .bookmark-dropdown-wrap.bookmark-open .bookmark-dropdown {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }
  .bookmark-dropdown-inner {
    padding: 0 16px;
    height: 100%;
    display: flex;
    flex-direction: column;
  }
  .bookmark-grid {
    grid-template-columns: repeat(2, 1fr);
    flex: 1;
    overflow-y: auto;
    align-content: start;
  }
  .bookmark-footer {
    flex-direction: column;
    gap: 8px;
    border-top: none;
    margin-top: auto;
    padding-top: 12px;
    padding-bottom: 8px;
  }
  .bookmark-clear-all-btn,
  .bookmark-visit-btn {
    width: 100%;
    justify-content: center;
  }
  /* Bug E: close button in mobile sidebar header */
  .bookmark-close-btn {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--clr-text-2);
    padding: 4px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .bookmark-close-btn:active { background: var(--clr-bg); }
  /* Bug F: prevent iOS auto-zoom on focus — all focusable inputs ≥ 16px */
  .range-input-group input[type="number"],
  .year-select,
  .sidebar input[type="text"],
  .sidebar input[type="search"],
  .sidebar select {
    font-size: 16px !important;
  }
}

/* ============================================================
   REDESIGN ADDITIONS — Skeleton, Active Tags, Motion Polish
   ============================================================ */

/* Skeleton loading shimmer — CSS-only */
@keyframes skeleton-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton {
  background: linear-gradient(
    90deg,
    var(--clr-border) 25%,
    var(--clr-bg) 50%,
    var(--clr-border) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
.skeleton-card {
  background: var(--clr-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--clr-border);
  overflow: hidden;
}
.skeleton-card .skeleton-img {
  aspect-ratio: 4/3;
  background: linear-gradient(
    90deg,
    var(--clr-border) 25%,
    oklch(92% 0.005 255) 50%,
    var(--clr-border) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}
.skeleton-card .skeleton-body {
  padding: var(--card-padding);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.skeleton-card .skeleton-line {
  height: 14px;
  border-radius: var(--radius-sm);
  background: linear-gradient(
    90deg,
    var(--clr-border) 25%,
    oklch(92% 0.005 255) 50%,
    var(--clr-border) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}
.skeleton-card .skeleton-line:nth-child(1) { width: 85%; }
.skeleton-card .skeleton-line:nth-child(2) { width: 60%; height: 11px; }
.skeleton-card .skeleton-line:nth-child(3) { width: 40%; height: 18px; margin-top: var(--space-2); }

/* Active filter tags — refined with primary tint */
.active-tags .active-tag {
  background: var(--clr-primary-light);
  color: var(--clr-primary-dark);
  border: 1px solid oklch(48% 0.18 255 / 0.2);
  font-weight: var(--weight-medium);
  transition: background var(--duration-fast) ease-out;
}
@media (hover: hover) {
  .active-tags .active-tag:hover {
    background: oklch(48% 0.18 255 / 0.15);
  }
}

/* Card price — type scale token */
.card-price {
  font-weight: var(--weight-bold);
}
