/* /find-parts page — fitment search specific styling.
   Base theme (cimarket) provides header/footer/grid; only extras below. */

#product-fitment { padding-top: 16px; padding-bottom: 32px; }
#product-fitment h1 { font-size: 24px; margin-bottom: 16px; }

/* Fitment search bar */
.rs-fitment-bar {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
}
.rs-fitment-bar-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.rs-make-select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
  min-width: 170px;
}
.rs-fitment-input {
  position: relative;
}
.rs-fitment-input input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  width: 190px;
}
.rs-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 6px 6px;
  z-index: 999;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 4px 8px rgba(0,0,0,.1);
  display: none;
}
.rs-suggestions div {
  padding: 8px 14px;
  cursor: pointer;
  font-size: 13px;
}
.rs-suggestions div:hover { background: #f5f5f5; }

.rs-btn-row { display: flex; gap: 8px; }
.rs-btn-find {
  padding: 8px 18px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  font-weight: 600;
}
.rs-btn-find:hover { background: #333; }
.rs-btn-reset {
  padding: 8px 12px;
  background: transparent;
  color: #888;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}
.rs-btn-reset:hover { color: #333; border-color: #aaa; }

/* Two-column layout: sidebar + content */
#rs-fitment-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
}

/* Category sidebar */
#rs-sidebar { min-width: 0; }
.rs-sidebar-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 12px;
  letter-spacing: .5px;
}
.rs-cat-list {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  overflow: hidden;
}
.rs-cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  border-bottom: 1px solid #f5f5f5;
  transition: background .15s;
}
.rs-cat-item:last-child { border-bottom: none; }
.rs-cat-item:hover { background: #f9f9f9; }
.rs-cat-item.active { background: #111; color: #fff; }
.rs-cat-item.active .rs-cat-count { background: rgba(255,255,255,.2); color: #fff; }
.rs-cat-count {
  background: #f0f0f0;
  color: #888;
  border-radius: 10px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
}
.rs-cat-parent {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: #444;
  border-bottom: 1px solid #f0f0f0;
  background: #fafafa;
  transition: background .15s;
  user-select: none;
}
.rs-cat-parent:hover { background: #f0f0f0; }
.rs-cat-parent .rs-parent-left { display: flex; align-items: center; gap: 8px; }
.rs-cat-parent .rs-parent-arrow {
  font-size: 10px;
  transition: transform .2s;
  color: #999;
}
.rs-cat-parent.open .rs-parent-arrow { transform: rotate(90deg); }
.rs-cat-parent .rs-cat-count { background: #e8e8e8; color: #666; }
.rs-cat-children { display: none; border-bottom: 1px solid #f0f0f0; }
.rs-cat-children.open { display: block; }
.rs-cat-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px 8px 30px;
  cursor: pointer;
  font-size: 13px;
  color: #555;
  border-bottom: 1px solid #f8f8f8;
  transition: background .15s;
}
.rs-cat-child:last-child { border-bottom: none; }
.rs-cat-child:hover { background: #f5f5f5; }
.rs-cat-child.active { background: #111; color: #fff; }
.rs-cat-child.active .rs-cat-count { background: rgba(255,255,255,.2); color: #fff; }

/* Vehicle badge + result title */
#rs-vehicle-badge .rs-vehicle-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #111;
  color: #fff;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
}
#rs-vehicle-badge .rs-vehicle-badge a {
  color: #aaa;
  text-decoration: none;
  margin-left: 4px;
  cursor: pointer;
}
.rs-results-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

/* Pagination */
.rs-pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap;
}
.rs-pagination a {
  padding: 8px 14px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  text-decoration: none;
  color: #222;
  font-size: 14px;
  cursor: pointer;
}
.rs-pagination a.active { background: #222; color: #fff; border-color: #222; }

/* Mobile */
@media (max-width: 768px) {
  #rs-fitment-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  #rs-sidebar { order: 1; }
  .rs-fitment-content { order: 2; }
  .rs-cat-list {
    max-height: 220px;
    overflow-y: auto;
  }
  .rs-fitment-bar-inner { flex-direction: column; align-items: stretch; }
  .rs-make-select, .rs-fitment-input, .rs-fitment-input input {
    width: 100%;
    font-size: 16px;
    padding: 12px 14px;
    min-width: unset;
  }
  .rs-btn-row { width: 100%; }
  .rs-btn-find { flex: 1; padding: 12px; font-size: 15px; }
  .rs-btn-reset { padding: 12px 16px; font-size: 15px; }
}
