/*
Theme Name: SparePart Theme
Theme URI: https://example.com
Author: Custom
Description: Spare part search custom WordPress theme.
Version: 1.0
Text Domain: sparepart-theme
*/

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: #0f172a;
  background: #ffffff;
}

a { color: inherit; }

.sp-site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.sp-container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.sp-header {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.sp-header-inner {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sp-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 900;
  font-size: 22px;
  color: #0f172a;
}

.sp-logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #2563eb;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.sp-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.sp-nav a {
  text-decoration: none;
  color: #334155;
  font-weight: 700;
  font-size: 15px;
}

.sp-nav a:hover { color: #2563eb; }

.sp-header-quote {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  background: #2563eb;
  color: #ffffff !important;
  border-radius: 10px;
}

.sp-hero {
  position: relative;
  min-height: 720px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  padding: 96px 0 170px;
  background-image:
    linear-gradient(to bottom, rgba(15, 23, 42, 0.25), rgba(15, 23, 42, 0.9)),
    url("https://find.agroheavyparts.com/wp-content/uploads/2026/04/28adc4d3-703b-402b-a29b-a7d0364ee59b.png");
  background-size: cover;
  background-position: center;
}

.sp-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.sp-hero h1 {
  color: #ffffff;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  margin: 0 0 24px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.sp-hero p {
  color: rgba(255, 255, 255, 0.92);
  font-size: 18px;
  line-height: 1.5;
  max-width: 1100px;
  margin: 0 auto 44px;
}

.sp-search-wrap {
  max-width: 860px;
  margin: 0 auto;
  position: relative;
  z-index: 50;
}

.sp-search-form {
  display: flex;
  gap: 12px;
  position: relative;
  z-index: 20;
}

.sp-search-input-wrap {
  flex: 1;
  position: relative;
}

.sp-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 20px;
  pointer-events: none;
}

.sp-search-input {
  width: 100%;
  height: 58px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0 52px 0 52px;
  font-size: 18px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
  outline: none;
}

.sp-search-input:focus {
  border-color: #2563eb;
  box-shadow: 0 18px 50px rgba(37, 99, 235, 0.28);
}

.sp-clear-btn {
  display: none;
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}

.sp-search-button {
  height: 58px;
  padding: 0 34px;
  border: 0;
  border-radius: 12px;
  background: #2563eb;
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 18px 50px rgba(37, 99, 235, 0.28);
}

.sp-search-button:hover { background: #1d4ed8; }

.sp-results {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 16px);
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
  z-index: 9999;
  overflow: hidden;
  text-align: left;
}

.sp-results-inner {
  max-height: 60vh;
  overflow-y: auto;
  padding: 16px;
}

.sp-result-card {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  margin-bottom: 12px;
  transition: all 0.18s ease;
  background: #ffffff;
}

.sp-result-card:hover {
  border-color: rgba(37, 99, 235, 0.45);
  background: #f8fafc;
  transform: translateY(-1px);
}

.sp-result-title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 900;
  color: #0f172a;
}

.sp-result-number {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 900;
  color: #2563eb;
}

.sp-result-desc {
  margin: 0;
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
}

.sp-no-result {
  text-align: center;
  padding: 42px 16px;
  color: #64748b;
}

.sp-section { padding: 84px 0; }
.sp-white { background: #ffffff; }
.sp-muted { background: #f8fafc; }

.sp-section-title {
  text-align: center;
  margin-bottom: 52px;
}

.sp-section-title h2 {
  font-size: clamp(30px, 4vw, 44px);
  margin: 0 0 14px;
  color: #0f172a;
  letter-spacing: -0.03em;
}

.sp-section-title p {
  margin: 0 auto;
  max-width: 720px;
  color: #64748b;
  font-size: 18px;
  line-height: 1.6;
}

.sp-brands-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 18px;
}

.sp-brand-card {
  height: 96px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  transition: all 0.18s ease;
}

.sp-brand-card:hover {
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.1);
  transform: translateY(-2px);
}

.sp-brand-card span {
  font-size: 13px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: 0.04em;
}

.sp-features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 34px;
}

.sp-feature {
  display: flex;
  gap: 22px;
  align-items: flex-start;
}

.sp-feature-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: #2563eb;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 24px;
}

.sp-feature h3 {
  margin: 0 0 8px;
  font-size: 22px;
  color: #0f172a;
}

.sp-feature p {
  margin: 0;
  color: #64748b;
  line-height: 1.65;
  font-size: 16px;
}

.sp-quote {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}

.sp-quote h2 {
  font-size: clamp(30px, 4vw, 44px);
  margin: 0 0 18px;
  color: #0f172a;
}

.sp-quote p {
  margin: 0 0 30px;
  font-size: 18px;
  color: #64748b;
  line-height: 1.65;
}

.sp-quote-btn,
.sp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 32px;
  border-radius: 12px;
  background: #0f172a;
  color: #ffffff;
  text-decoration: none;
  font-weight: 900;
  border: none;
  cursor: pointer;
}

.sp-quote-btn:hover,
.sp-button:hover {
  background: #1e293b;
  color: #ffffff;
}

.sp-detail {
  padding: 72px 0;
}

.sp-detail-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  box-shadow: 0 20px 70px rgba(15, 23, 42, 0.08);
  padding: 42px;
}

.sp-back-link {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: #64748b;
  text-decoration: none;
  margin-bottom: 26px;
  font-weight: 700;
}

.sp-detail-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 42px;
  align-items: start;
}

.sp-badge {
  display: inline-flex;
  padding: 8px 14px;
  background: #eff6ff;
  color: #2563eb;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 20px;
}

.sp-detail h1 {
  font-size: clamp(36px, 5vw, 62px);
  margin: 0 0 18px;
  letter-spacing: -0.04em;
}

.sp-part-number {
  font-size: 23px;
  color: #64748b;
  margin: 0 0 32px;
}

.sp-part-number strong {
  color: #0f172a;
}

.sp-detail-image {
  width: 100%;
  min-height: 280px;
  border-radius: 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.sp-detail-image img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.sp-cross {
  padding: 60px 0 80px;
  border-top: 1px solid #e2e8f0;
}

.sp-cross h2 {
  font-size: 30px;
  margin: 0 0 24px;
}

.sp-cross-row {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 18px 22px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  margin-bottom: 12px;
}

.sp-cross-brand {
  min-width: 220px;
  font-weight: 900;
  color: #0f172a;
}

.sp-cross-number {
  color: #64748b;
  font-size: 18px;
}

.sp-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 36px 0;
  margin-top: auto;
}

.sp-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.sp-footer a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
}

@media (max-width: 1024px) {
  .sp-brands-grid { grid-template-columns: repeat(4, 1fr); }
  .sp-detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sp-header-inner {
    height: auto;
    padding: 18px 0;
    align-items: flex-start;
    gap: 16px;
    flex-direction: column;
  }

  .sp-nav {
    width: 100%;
    gap: 12px;
    flex-wrap: wrap;
  }

  .sp-header-quote { min-height: 38px; }

  .sp-hero {
    min-height: 620px;
    padding: 70px 0 150px;
  }

  .sp-hero p { font-size: 17px; }

  .sp-search-form { display: block; }
  .sp-search-button { display: none; }

  .sp-features-grid { grid-template-columns: 1fr; }
  .sp-brands-grid { grid-template-columns: repeat(2, 1fr); }
  .sp-section { padding: 64px 0; }

  .sp-detail-card { padding: 26px; }
  .sp-cross-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .sp-cross-brand { min-width: 0; }

  .sp-footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}
.sp-result-card,
.sp-result-card h3,
.sp-result-title {
  color: #0f172a !important;
}

.sp-result-number {
  color: #0f172a !important;
}

.sp-result-desc {
  color: #64748b !important;
}
.sp-logo-mark {
  width: 64px;
  height: 64px;
  border-radius: 0;
  background: transparent !important;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  padding: 0;
}

.sp-logo-mark-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
@media (max-width: 768px) {
  .sp-header-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .sp-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-wrap: nowrap;
  }

  .sp-logo-mark {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    overflow: hidden;
  }

  .sp-logo-mark-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
  }

  .sp-logo > span:last-child {
    font-size: 18px;
    line-height: 1.2;
    font-weight: 800;
  }

  .sp-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    width: 100%;
    align-items: center;
  }

  .sp-nav a {
    font-size: 15px;
  }

  .sp-header-quote {
    padding: 10px 16px;
    font-size: 15px;
  }
}