/* Parts marketplace — automotive parts e-commerce (distinct from Taxi/Chauffeur/Mechanics) */
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Sans+Condensed:wght@600;700&display=swap");

:root {
  --ph-ink: #1c1917;
  --ph-slate: #292524;
  --ph-accent: #b45309;
  --ph-accent-deep: #92400e;
  --ph-ok: #047857;
  --ph-surface: #f5f5f4;
  --ph-card: #ffffff;
  --ph-line: #d6d3d1;
  --ph-muted: #57534e;
}

body.parts-page {
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  background: var(--ph-surface);
  color: var(--ph-ink);
}

body.parts-page .svc-hero {
  background:
    linear-gradient(118deg, rgba(28, 25, 23, 0.94) 0%, rgba(68, 64, 60, 0.86) 50%, rgba(28, 25, 23, 0.78) 100%),
    url("/images/category-real/parts-car-engine.jpg") center/cover no-repeat !important;
  text-align: center;
}

body.parts-page .svc-hero-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

body.parts-page .svc-hero-title {
  font-family: "IBM Plex Sans Condensed", "IBM Plex Sans", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  text-align: center;
}

body.parts-page .svc-hero-search-stack {
  margin-left: auto;
  margin-right: auto;
  max-width: 560px;
}

.ph-hero-lead {
  max-width: 40rem;
  margin: 0.35rem 0 0.85rem;
  color: var(--ph-ink);
  font-size: 1rem;
  line-height: 1.45;
}

.ph-search-panel {
  margin-top: 0.75rem;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 16px 36px rgba(28, 25, 23, 0.28);
  color: var(--ph-ink);
}

.ph-search-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr 0.9fr 0.7fr auto;
  gap: 10px;
  align-items: end;
}

.ph-field label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ph-muted);
  margin-bottom: 4px;
}

.ph-field input,
.ph-field select {
  width: 100%;
  border: 1px solid var(--ph-line);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.92rem;
  color: var(--ph-ink);
  background: #fff;
}

.ph-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ph-btn-primary,
.ph-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 10px 14px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.ph-btn-primary {
  background: var(--ph-accent);
  color: #fff;
}

.ph-btn-primary:hover {
  background: var(--ph-accent-deep);
  color: #fff;
  text-decoration: none;
}

.ph-btn-secondary {
  background: var(--ph-slate);
  color: #fff;
}

.ph-btn-secondary:hover {
  background: var(--ph-ink);
  color: #fff;
  text-decoration: none;
}

.ph-catalog-note {
  margin: 10px 0 0;
  font-size: 0.78rem;
  color: var(--ph-muted);
}

.listings-section {
  padding: 36px 0 56px;
  background: var(--ph-surface);
}

.section-title {
  font-family: "IBM Plex Sans Condensed", "IBM Plex Sans", sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--ph-ink);
  text-align: left;
  margin: 0 0 6px;
}

.ph-listings-sub {
  color: var(--ph-muted);
  font-size: 0.92rem;
  margin: 0 0 16px;
}

.main-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 22px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.filter-panel {
  background: var(--ph-card);
  border: 1px solid var(--ph-line);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(28, 25, 23, 0.05);
  padding: 14px;
  height: fit-content;
  position: sticky;
  top: 100px;
}

.filter-panel .form-control,
.filter-panel select {
  color: var(--ph-ink) !important;
  background: #fff !important;
  border: 1px solid var(--ph-line);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 0.85rem;
}

.filter-section {
  border-bottom: 1px solid #e7e5e4;
  padding: 8px 0;
}

.filter-section:last-child {
  border-bottom: none;
}

.filter-title {
  font-weight: 700;
  color: var(--ph-ink);
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  list-style: none;
}

.filter-title::-webkit-details-marker {
  display: none;
}

.quick-filters-sidebar {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-panel .quick-filter-btn {
  background: #f5f5f4;
  border: 1px solid var(--ph-line);
  color: var(--ph-slate);
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  display: block;
}

.filter-panel .quick-filter-btn:hover,
.filter-panel .quick-filter-btn.active {
  background: var(--ph-accent);
  color: #fff;
  border-color: var(--ph-accent);
}

.btn-apply {
  width: 100%;
  background: var(--ph-slate);
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
}

.btn-apply:hover {
  background: var(--ph-ink);
}

.part-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.ph-card {
  display: block;
  background: var(--ph-card);
  border: 1px solid var(--ph-line);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 3px 12px rgba(28, 25, 23, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ph-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(28, 25, 23, 0.12);
  border-color: var(--ph-accent);
  text-decoration: none;
  color: inherit;
}

.ph-card-photo {
  position: relative;
  height: 150px;
  background: linear-gradient(135deg, #e7e5e4, #d6d3d1);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ph-card-photo img,
.ph-card-photo .csl-listing-photo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  background: #fff;
}

.ph-card-kind {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 1;
  background: rgba(28, 25, 23, 0.88);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 5px;
}

.ph-card-body {
  padding: 12px;
}

.ph-card-title {
  font-family: "IBM Plex Sans Condensed", "IBM Plex Sans", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ph-ink);
  line-height: 1.25;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.4em;
}

.ph-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}

.ph-badge {
  background: #f5f5f4;
  color: var(--ph-slate);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.65rem;
  font-weight: 700;
}

.ph-badge.verified {
  background: #d1fae5;
  color: var(--ph-ok);
}

.ph-badge.stock {
  background: #ecfdf5;
  color: #065f46;
}

.ph-badge.stock-out {
  background: #fef2f2;
  color: #991b1b;
}

.ph-badge.oem {
  background: #fff7ed;
  color: #9a3412;
}

.ph-card-pn {
  font-size: 0.72rem;
  color: #78716c;
  font-family: ui-monospace, "IBM Plex Sans", monospace;
  margin-bottom: 4px;
}

.ph-card-fitment {
  font-size: 0.78rem;
  color: #0f766e;
  font-weight: 600;
  margin-bottom: 4px;
}

.ph-card-meta {
  font-size: 0.78rem;
  color: var(--ph-muted);
  margin-bottom: 6px;
  line-height: 1.35;
}

.ph-card-price {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--ph-accent-deep);
  margin-bottom: 8px;
}

.ph-card-price.is-empty {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ph-muted);
}

.ph-card-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.ph-card-cta {
  display: inline-block;
  background: var(--ph-accent);
  color: #fff;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 0.74rem;
  font-weight: 700;
}

.ph-card-cta-secondary {
  display: inline-block;
  background: var(--ph-slate);
  color: #fff;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 0.74rem;
  font-weight: 700;
}

.loading-msg {
  text-align: center;
  padding: 48px 20px;
  color: var(--ph-muted);
  grid-column: 1 / -1;
}

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

  .filter-panel {
    position: static;
  }

  .ph-search-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ph-actions {
    grid-column: 1 / -1;
    width: 100%;
  }

  .ph-actions .ph-btn-primary,
  .ph-actions .ph-btn-secondary {
    flex: 1;
  }
}

@media (max-width: 560px) {
  .ph-search-grid {
    grid-template-columns: 1fr;
  }

  .ph-card-actions {
    flex-direction: column;
  }
}
