/* ==========================================================================
   E-Bike Meta Suche – Design System
   Based on FOCUS Mobility CI: Sharp, editorial, Lato font
   ========================================================================== */

/* Self-hosted Lato (same as focus-mobility.de) – no Google Fonts dependency */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/lato/lato-latin-300-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/lato/lato-latin-300-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/lato/lato-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/lato/lato-latin-400-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/lato/lato-latin-700-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/lato/lato-latin-700-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('fonts/lato/lato-latin-900-normal.woff2') format('woff2');
}

:root {
  --bg: #ffffff;
  --bg-alt: #f9f9f9;
  --surface: #ffffff;
  --text: #0d292e;
  --text-muted: #587074;
  --text-light: #b7c2c4;
  --border: #e0e0e0;
  --border-light: #efefef;
  --accent: #dcfe70;
  --accent-dark: #c6e565;
  --accent-trans: hsla(74, 99%, 72%, 0.6);
  --secondary: #103339;
  --secondary-light: #28474d;
  --tertiary: #8de9de;
  --tertiary-dark: #7fd2c8;
  --cta-bg: #103339;
  --cta-text: #ffffff;
  --discount: #d7031c;
  --radius: 0px;
  --radius-sm: 0px;
  --radius-xs: 0px;
  --shadow: none;
  --shadow-lg: none;
  --font: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: 0.2s ease;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  background: var(--secondary);
  border-bottom: 2px solid var(--accent);
  padding: 3.5rem 1.5rem 2.5rem;
}

.hero__inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 900;
  letter-spacing: -0.01em;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.hero__subtitle {
  font-size: 1.05rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero__search {
  max-width: 520px;
  margin: 0 auto 1.25rem;
  position: relative;
  z-index: 999;
}

.search-input {
  width: 100%;
  padding: 0.875rem 1.25rem;
  font-size: 1rem;
  font-family: var(--font);
  border: 2px solid var(--accent);
  border-radius: 0;
  background: #ffffff;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-trans);
}

.search-input::placeholder {
  color: var(--text-light);
}

/* Search Results Backdrop & Dropdown */
.search-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(16, 51, 57, 0.3);
  z-index: 998;
}

.search-backdrop--visible {
  display: block;
}

.search-results {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: 0;
  box-shadow: none;
  max-height: 420px;
  overflow-y: auto;
  z-index: 1000;
  padding: 0.5rem 0;
}

.search-results--visible {
  display: block;
}

.search-results__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  cursor: pointer;
  transition: background var(--transition);
  text-align: left;
}

.search-results__item:hover,
.search-results__item:focus {
  background: var(--bg-alt);
}

.search-results__item-image {
  width: 48px;
  height: 48px;
  border-radius: 0;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-alt);
}

.search-results__item-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 0;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.search-results__item-info {
  flex: 1;
  min-width: 0;
}

.search-results__item-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-results__item-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.search-results__item-price {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--secondary);
  white-space: nowrap;
}

.search-results__empty {
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.search-results__loading {
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.search-results__footer {
  border-top: 1px solid var(--border);
  padding: 0.6rem 1rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--secondary);
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition);
}

.search-results__footer:hover {
  background: var(--bg-alt);
}

/* Category Chips */
.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}

.chip:hover, .chip:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  background: transparent;
}

.chip--active {
  background: var(--accent);
  color: var(--secondary);
  border-color: var(--accent);
}

.chip--active:hover, .chip--active:focus-visible {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: var(--secondary);
}

.chip__count {
  font-size: 0.7rem;
  opacity: 0.7;
}

/* ==========================================================================
   Main Layout
   ========================================================================== */

.main-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  max-width: 1440px;
  margin: 0 auto;
  min-height: calc(100vh - 200px);
}

@media (max-width: 960px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Filter Sidebar
   ========================================================================== */

.filter-sidebar {
  background: var(--bg-alt);
  border-right: 1px solid var(--border);
  padding: 1.5rem;
  overflow-y: auto;
  height: calc(100vh - 200px);
  position: sticky;
  top: 0;
}

.filter-sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.filter-sidebar__title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
}

.filter-sidebar__close {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
}

.filter-group {
  margin-bottom: 1.5rem;
}

.filter-group__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.filter-group__options {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 200px;
  overflow-y: auto;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0;
  font-size: 0.875rem;
  cursor: pointer;
}

.filter-option input[type="checkbox"] {
  accent-color: var(--secondary);
  width: 16px;
  height: 16px;
}

.filter-option__count {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-light);
}

.filter-option--disabled {
  opacity: 0.4;
  pointer-events: none;
  cursor: not-allowed;
}

.filter-range {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.filter-range input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--surface);
  outline: none;
}

.filter-range input:focus {
  border-color: var(--secondary);
}

.filter-range__sep {
  color: var(--text-light);
  font-size: 0.85rem;
}

@media (max-width: 960px) {
  .filter-sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100vh;
    z-index: 1000;
    transition: left 0.3s ease;
    border-right: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }

  .filter-sidebar--open {
    left: 0;
  }

  .filter-sidebar__close {
    display: block;
  }

  .filter-backdrop--visible::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(16, 51, 57, 0.5);
    z-index: 999;
    pointer-events: auto;
  }
}

/* ==========================================================================
   Results
   ========================================================================== */

.results {
  padding: 1.5rem;
  margin: 0 auto;
  max-width: 1280px;
}

.results__toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.filter-toggle {
  display: none;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  border: 2px solid var(--secondary);
  border-radius: 0;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
}

.filter-toggle:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--secondary);
}

@media (max-width: 960px) {
  .filter-toggle {
    display: inline-flex;
  }
}

.results__count {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.sort-select {
  margin-left: auto;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  outline: none;
  font-family: var(--font);
}

.sort-select:focus {
  border-color: var(--secondary);
}

/* ==========================================================================
   Bike Cards
   ========================================================================== */

.results__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  justify-content: center;
  margin: 0 auto;
  max-width: 1200px;
}

@media (max-width: 480px) {
  .results__grid {
    grid-template-columns: 1fr;
  }
}

.bike-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition);
  outline: none;
}

.bike-card:hover, .bike-card:focus-visible {
  border-color: var(--accent);
}

.bike-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.bike-card__image-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--bg-alt);
  overflow: hidden;
}

.bike-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--bg-alt);
}

/* Skeleton shimmer while image loads */
.bike-card__image:not([src]),
.bike-card__image[src=""] {
  background: linear-gradient(90deg, var(--bg-alt) 25%, var(--bg) 50%, var(--bg-alt) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.bike-card:hover .bike-card__image {
  /* No zoom on hover – keeps it editorial and flat */
}

.bike-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 3rem;
}

.bike-card__badges {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.badge {
  padding: 0.2rem 0.6rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 0;
}

.badge--category {
  background: var(--accent);
  color: var(--secondary);
  border: none;
}

.badge--source {
  background: var(--secondary);
  color: var(--cta-text);
}

.badge--discount {
  background: var(--discount);
  color: white;
}

.bike-card__body {
  padding: 1rem 1.25rem 1.25rem;
}

.bike-card__title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bike-card__meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.bike-card__price-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.bike-card__price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}

.bike-card__compare-price {
  font-size: 0.85rem;
  color: var(--text-light);
  text-decoration: line-through;
}

.bike-card__specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.bike-card__spec {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.results__pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
}

.page-btn:hover {
  border-color: var(--secondary);
  background: var(--tertiary);
  color: var(--secondary);
}

.page-btn--active {
  background: var(--secondary);
  color: white;
  border-color: var(--secondary);
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

/* ==========================================================================
   Skeletons & States
   ========================================================================== */

.hidden {
  display: none !important;
}

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.skeleton-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  height: 360px;
  animation: shimmer 1.5s infinite;
  background: linear-gradient(90deg, var(--surface) 25%, var(--bg-alt) 50%, var(--surface) 75%);
  background-size: 200% 100%;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.loading-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem 0;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--secondary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.empty-state__text {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  margin-bottom: 0.25rem;
}

.empty-state__hint {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
}

.results__error {
  text-align: center;
  padding: 2rem;
  color: var(--discount);
}

/* ==========================================================================
   Modal
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 51, 57, 0.6);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
}

.modal {
  background: var(--surface);
  border-radius: 0;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  border: 2px solid var(--accent);
}

.modal__close {
  position: sticky;
  top: 1rem;
  float: right;
  margin-right: 1rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  width: 36px;
  height: 36px;
  border-radius: 0;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all var(--transition);
}

.modal__close:hover {
  background: var(--border);
}

.modal__body {
  padding: 2rem;
}

.modal__gallery {
  margin-bottom: 1.5rem;
}

.modal__main-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--bg-alt);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal__main-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--bg-alt);
  animation: skeleton-shimmer 1.4s ease infinite;
}

.modal__main-image[complete],
.modal__main-image.loaded {
  animation: none;
  background: transparent;
}

.modal__main-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--text-muted);
}

.modal__thumbnails {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  flex-wrap: nowrap;
}

.modal__thumb-wrap {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
}

.modal__thumb-wrap:has(img[style*="display:none"]),
.modal__thumb-wrap:has(img[style*="display: none"]) {
  display: none;
}

.modal__thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 0;
  border: 2px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color var(--transition);
}

.modal__thumb--active, .modal__thumb:hover {
  border-color: var(--accent);
}

.modal__header {
  margin-bottom: 1.5rem;
}

.modal__source-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 0;
  background: var(--secondary);
  color: var(--cta-text);
  margin-bottom: 0.5rem;
}

.modal__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.modal__brand-model {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.modal__price-section {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.modal__price {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
}

.modal__compare-price {
  font-size: 1.1rem;
  color: var(--text-light);
  text-decoration: line-through;
}

.modal__discount {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--discount);
}

.modal__sections {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.modal__section {
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 1rem 1.25rem;
}

.modal__section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.modal__detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1.5rem;
}

@media (max-width: 600px) {
  .modal__detail-grid {
    grid-template-columns: 1fr;
  }
}

.modal__detail-item {
  display: flex;
  flex-direction: column;
}

.modal__detail-label {
  font-size: 0.75rem;
  color: var(--text-light);
}

.modal__detail-value {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.modal__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 700;
  background: var(--tertiary);
  color: var(--secondary);
  border: none;
  border-radius: 0;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition);
}

.modal__cta:hover {
  background: var(--tertiary-dark);
}

.modal__cta:disabled, .modal__cta--disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.modal__cta-source {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Specifications Section */
.specs {
  background: var(--bg-alt);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.specs__heading {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 1.25rem 0;
}

.specs__columns {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.specs__column {
  flex: 1;
  min-width: 220px;
}

.specs__section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.specs__divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin: 0.75rem 0;
}

.specs__group {
  margin-bottom: 1rem;
}

.specs__group-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.4rem 0;
}

.specs__item {
  font-size: 0.85rem;
  margin: 0 0 0.25rem 0;
  line-height: 1.5;
  color: var(--text-primary);
}

.specs__label {
  color: var(--text-muted);
  font-weight: 300;
}

/* Image placeholder in modal */
.modal__placeholder {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--bg-alt);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

/* ==========================================================================
   Mobile Responsive Enhancements
   ========================================================================== */

/* Tablet adjustments */
@media (max-width: 768px) {
  .hero {
    padding: 2.5rem 1rem 1.75rem;
  }

  .hero__subtitle {
    font-size: 0.95rem;
  }

  .results {
    padding: 1rem;
  }

  .results__grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
  }

  .skeleton-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
  }

  .modal__body {
    padding: 1.5rem;
  }

  .modal__title {
    font-size: 1.25rem;
  }

  .modal__price {
    font-size: 1.5rem;
  }
}

/* Small phones */
@media (max-width: 480px) {
  .hero {
    padding: 2rem 0.75rem 1.5rem;
  }

  .hero__title {
    font-size: 1.5rem;
  }

  .hero__subtitle {
    font-size: 0.85rem;
    margin-bottom: 1rem;
  }

  .search-input {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
  }

  .hero__chips {
    gap: 0.35rem;
  }

  .chip {
    padding: 0.3rem 0.65rem;
    font-size: 0.7rem;
  }

  .results {
    padding: 0.75rem;
  }

  .results__toolbar {
    gap: 0.5rem;
    margin-bottom: 1rem;
  }

  .filter-toggle {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
  }

  .sort-select {
    font-size: 0.8rem;
    padding: 0.4rem 0.5rem;
  }

  .results__grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .skeleton-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .bike-card__body {
    padding: 0.75rem 1rem 1rem;
  }

  .bike-card__title {
    font-size: 0.9rem;
  }

  .bike-card__price {
    font-size: 1.1rem;
  }

  .results__pagination {
    gap: 0.3rem;
    margin-top: 1.5rem;
  }

  .page-btn {
    min-width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }

  /* Modal fullscreen on mobile */
  .modal-overlay {
    padding: 0;
    align-items: stretch;
  }

  .modal {
    max-width: 100%;
    max-height: 100vh;
    height: 100vh;
    border: none;
    border-top: 2px solid var(--accent);
  }

  .modal__body {
    padding: 1rem;
  }

  .modal__title {
    font-size: 1.15rem;
  }

  .modal__price {
    font-size: 1.35rem;
  }

  .modal__compare-price {
    font-size: 0.95rem;
  }

  .modal__thumb {
    width: 52px;
    height: 52px;
  }

  .modal__cta {
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
  }

  .modal__detail-grid {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .modal__section {
    padding: 0.75rem 1rem;
  }

  .specs__columns {
    flex-direction: column;
    gap: 1.5rem;
  }

  .specs__column {
    min-width: unset;
  }

  .specs {
    padding: 1rem;
    margin: 1rem 0;
  }

  .specs__heading {
    font-size: 1.2rem;
  }
}

/* Prevent body scroll when modal/filter is open */
body.modal-open,
body.filter-open {
  overflow: hidden;
}

/* ==========================================================================
   Similar Bikes (in modal)
   ========================================================================== */
.modal__similar-section {
  border-top: 2px solid var(--border);
  margin-top: 1.5rem;
  padding-top: 1.5rem;
}

.similar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}

.similar-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem;
  cursor: pointer;
  transition: box-shadow 0.2s, border-color 0.2s;
  background: var(--bg);
}
.similar-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.similar-card__image-wrap {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: calc(var(--radius) - 2px);
  background: var(--bg-alt, #f9f9f9);
  display: flex;
  align-items: center;
  justify-content: center;
}
.similar-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.similar-card__placeholder {
  font-size: 2rem;
  opacity: 0.4;
}

.similar-card__info {
  padding: 0.4rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.similar-card__match {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(59, 130, 246, 0.1);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  width: fit-content;
}
.similar-card__title {
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.similar-card__price {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
}

.similar-card__compare-btn {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
}
.similar-card:hover .similar-card__compare-btn {
  opacity: 1;
}
.similar-card__compare-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Selected state for similar cards */
.similar-card--selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary);
}
.similar-card--selected .similar-card__compare-btn {
  opacity: 1;
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Similar section header with compare button */
.similar-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.25rem;
}
.similar-section__header .modal__section-title {
  margin-bottom: 0;
}
.similar-section__compare-btn {
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
}
.similar-section__compare-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.similar-section__compare-btn:not(:disabled):hover {
  opacity: 0.9;
}
.similar-section__hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem 0;
}

/* ==========================================================================
   Compare Bar (bottom sticky)
   ========================================================================== */
.compare-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg);
  border-top: 2px solid var(--primary);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 9000;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
}
.compare-bar.hidden { display: none; }

.compare-bar__items {
  display: flex;
  gap: 0.5rem;
  flex: 1;
}
.compare-bar__item {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.compare-bar__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.compare-bar__item span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 1.5rem;
}
.compare-bar__remove {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--discount, #dc2626);
  color: white;
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 0.7rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.compare-bar__action {
  padding: 0.6rem 1.2rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
}
.compare-bar__action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.compare-bar__action:not(:disabled):hover {
  opacity: 0.9;
}

.compare-bar__clear {
  padding: 0.6rem 0.8rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.compare-bar__clear:hover {
  border-color: var(--discount, #dc2626);
  color: var(--discount, #dc2626);
}

/* ==========================================================================
   Compare Overlay
   ========================================================================== */
.compare-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.compare-overlay.hidden { display: none; }

.compare-modal {
  background: var(--bg);
  border-radius: var(--radius);
  width: 100%;
  max-width: 1100px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.compare-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.compare-modal__header h2 {
  margin: 0;
  font-size: 1.2rem;
}
.compare-modal__close {
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
}

.compare-modal__body {
  overflow: auto;
  padding: 1rem;
}

/* Compare Table */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.compare-table th,
.compare-table td {
  padding: 0.6rem 0.8rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}
.compare-table th {
  position: relative;
  padding-top: 0.3rem;
}
.compare-table__label {
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  width: 120px;
  min-width: 120px;
}
.compare-table__cell {
  min-width: 180px;
}

.compare-cell__image {
  width: 100%;
  max-width: 200px;
  height: auto;
  border-radius: var(--radius);
  aspect-ratio: 4/3;
  object-fit: cover;
}
.compare-cell__placeholder {
  font-size: 3rem;
  opacity: 0.3;
}

.compare-table__remove {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 0.75rem;
  cursor: pointer;
  color: var(--text-muted);
}
.compare-table__remove:hover {
  border-color: var(--discount, #dc2626);
  color: var(--discount, #dc2626);
}

.compare-table__cta {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.8rem;
}
.compare-table__cta:hover {
  opacity: 0.9;
}

@media (max-width: 768px) {
  .similar-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .compare-bar {
    flex-wrap: wrap;
    padding: 0.5rem 1rem;
  }
  .compare-modal {
    max-width: 100%;
    max-height: 95vh;
    border-radius: 0;
  }
  .compare-table__label {
    width: 80px;
    min-width: 80px;
  }
}
