/* ================================================================
   Excellence Prime — Car Filter CSS v2.0
   Premium Blue / OEM Style — Responsive
   Replace: /wp-content/themes/woodmart-child/assets/car-filter.css
   ================================================================ */

:root {
  --exp-navy: #071A2D;
  --exp-navy-2: #0B2238;
  --exp-blue: #2F7FD3;
  --exp-blue-2: #1F6FBD;
  --exp-blue-soft: #EAF3FF;
  --exp-ink: #111827;
  --exp-text: #334155;
  --exp-muted: #64748B;
  --exp-line: #DDE6F0;
  --exp-line-2: #E7EDF5;
  --exp-bg: #F5F8FC;
  --exp-white: #FFFFFF;
  --exp-red: #C8362A;
  --exp-green: #0E8A5A;
  --exp-radius: 14px;
  --exp-radius-lg: 18px;
  --exp-shadow: 0 10px 30px rgba(7, 26, 45, .08);
  --exp-shadow-hover: 0 16px 42px rgba(47, 127, 211, .18);
}

.exp-cf {
  width: 100%;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--exp-ink);
}

/* Main filter box */
.exp-cf__form {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  padding: 22px;
  background:
    radial-gradient(circle at top left, rgba(47,127,211,.10), transparent 32%),
    linear-gradient(180deg, #FFFFFF 0%, #F8FBFF 100%);
  border: 1px solid var(--exp-line);
  border-radius: var(--exp-radius-lg);
  box-shadow: var(--exp-shadow);
}

.exp-cf__fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.exp-cf__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.exp-cf__label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 800;
  color: var(--exp-blue-2);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.exp-cf__label svg {
  color: var(--exp-blue);
  flex-shrink: 0;
}

.exp-cf__select-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.exp-cf__select {
  width: 100%;
  height: 54px;
  background: var(--exp-white);
  border: 1.5px solid var(--exp-line);
  border-radius: 13px;
  color: var(--exp-ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 650;
  padding: 0 44px 0 16px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease, transform .2s ease;
  box-shadow: 0 3px 12px rgba(15, 30, 46, .04);
}

.exp-cf__select option {
  background: #FFFFFF;
  color: #111827;
}

.exp-cf__select:focus {
  border-color: var(--exp-blue);
  background: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(47,127,211,.12);
}

.exp-cf__select:not(:disabled):hover {
  border-color: rgba(47,127,211,.55);
  transform: translateY(-1px);
}

.exp-cf__select:disabled {
  opacity: .55;
  cursor: not-allowed;
  background: #F2F6FA;
}

.exp-cf__select.has-value {
  border-color: var(--exp-blue);
  background: linear-gradient(180deg, #FFFFFF 0%, var(--exp-blue-soft) 100%);
  color: var(--exp-navy);
}

.exp-cf__chevron {
  position: absolute;
  right: 14px;
  color: var(--exp-blue);
  pointer-events: none;
  flex-shrink: 0;
  transition: transform .2s ease, color .2s ease;
}

.exp-cf__select:focus + .exp-cf__chevron {
  transform: rotate(180deg);
  color: var(--exp-navy);
}

.exp-cf__spinner {
  position: absolute;
  right: 14px;
  width: 17px;
  height: 17px;
  border: 2px solid rgba(47,127,211,.22);
  border-top-color: var(--exp-blue);
  border-radius: 50%;
  animation: cf-spin .7s linear infinite;
}

@keyframes cf-spin { to { transform: rotate(360deg); } }

.exp-cf__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 58px;
  width: 100%;
  background: linear-gradient(135deg, var(--exp-navy) 0%, var(--exp-navy-2) 55%, var(--exp-blue) 160%);
  color: #FFFFFF;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 850;
  letter-spacing: .055em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease, opacity .22s ease;
  box-shadow: 0 12px 26px rgba(7,26,45,.22);
}

.exp-cf__btn:not(:disabled):hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #061523 0%, #0B2741 55%, #2F7FD3 145%);
  box-shadow: 0 18px 36px rgba(47,127,211,.24);
}

.exp-cf__btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  box-shadow: none;
}

.exp-cf__btn.loading svg { animation: cf-spin .7s linear infinite; }

/* Results */
.exp-cf__results {
  margin-top: 28px;
  padding: 24px;
  background: #FFFFFF;
  border: 1px solid var(--exp-line);
  border-radius: var(--exp-radius-lg);
  box-shadow: var(--exp-shadow);
}

.exp-cf__results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.exp-cf__results-count {
  font-size: 15px;
  font-weight: 750;
  color: var(--exp-navy);
}

.exp-cf__results-count span {
  color: var(--exp-blue);
  font-weight: 900;
}

.exp-cf__results-label {
  font-size: 12px;
  color: var(--exp-blue-2);
  background: var(--exp-blue-soft);
  border: 1px solid rgba(47,127,211,.20);
  border-radius: 999px;
  padding: 6px 13px;
  font-weight: 700;
}

.exp-cf__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.exp-cf-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #FFFFFF;
  border: 1px solid var(--exp-line-2);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  transition: box-shadow .22s ease, transform .22s ease, border-color .22s ease;
  box-shadow: 0 2px 12px rgba(7,26,45,.05);
  animation: cf-fadein .3s ease both;
}

@keyframes cf-fadein {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.exp-cf-card:hover {
  transform: translateY(-4px);
  border-color: rgba(47,127,211,.45);
  box-shadow: var(--exp-shadow-hover);
}

.exp-cf-card__img {
  position: relative;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: linear-gradient(180deg, #FFFFFF 0%, #F3F7FC 100%);
  border-bottom: 1px solid #EEF3F8;
  overflow: hidden;
}

.exp-cf-card__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .3s ease;
}

.exp-cf-card:hover .exp-cf-card__img img { transform: scale(1.06); }

.exp-cf-card__badge {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 1;
  background: var(--exp-red);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 850;
  padding: 4px 8px;
  border-radius: 999px;
}

.exp-cf-card__stock {
  position: absolute;
  top: 11px;
  right: 11px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #94A3B8;
}

.exp-cf-card__stock.in { background: var(--exp-green); box-shadow: 0 0 0 4px rgba(14,138,90,.14); }
.exp-cf-card__stock.out { background: var(--exp-red); box-shadow: 0 0 0 4px rgba(200,54,42,.12); }

.exp-cf-card__body {
  padding: 13px 14px 15px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}

.exp-cf-card__part {
  font-size: 10px;
  font-weight: 850;
  color: var(--exp-blue);
  text-transform: uppercase;
  letter-spacing: .075em;
}

.exp-cf-card__name {
  font-size: 13px;
  font-weight: 750;
  color: var(--exp-navy);
  line-height: 1.42;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.exp-cf-card__position {
  font-size: 11px;
  color: var(--exp-muted);
  font-weight: 650;
  text-transform: capitalize;
}

.exp-cf-card__price-row {
  display: flex;
  align-items: baseline;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.exp-cf-card__price {
  font-size: 19px;
  font-weight: 900;
  color: var(--exp-navy);
  letter-spacing: -.025em;
}

.exp-cf-card__was {
  font-size: 12px;
  color: #94A3B8;
  text-decoration: line-through;
}

.exp-cf-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  margin-top: 5px;
  font-size: 11px;
  font-weight: 850;
  color: var(--exp-blue);
  transition: gap .18s ease, color .18s ease;
}

.exp-cf-card:hover .exp-cf-card__cta {
  gap: 9px;
  color: var(--exp-navy);
}

.exp-cf__load-more {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.exp-cf__load-more-btn {
  height: 50px;
  padding: 0 38px;
  background: #FFFFFF;
  border: 1.5px solid var(--exp-blue);
  border-radius: 13px;
  color: var(--exp-blue);
  font-family: inherit;
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
  transition: all .2s ease;
}

.exp-cf__load-more-btn:hover {
  background: var(--exp-navy);
  border-color: var(--exp-navy);
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(7,26,45,.18);
}

.exp-cf__load-more-btn.loading {
  opacity: .6;
  cursor: not-allowed;
}

.exp-cf__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
  padding: 48px 20px;
  text-align: center;
  color: var(--exp-muted);
  font-size: 14px;
  line-height: 1.7;
  background: #FFFFFF;
  border: 1px dashed var(--exp-line);
  border-radius: var(--exp-radius-lg);
}

.exp-cf-skeleton {
  background: linear-gradient(90deg, #EEF3F8 25%, #E3EAF3 50%, #EEF3F8 75%);
  background-size: 200% 100%;
  animation: cf-shimmer 1.3s infinite;
  border-radius: 16px;
  aspect-ratio: 3/4;
}

@keyframes cf-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Tablet */
@media (max-width: 1024px) {
  .exp-cf__form,
  .exp-cf__results {
    padding: 20px;
    border-radius: 16px;
  }

  .exp-cf__fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
  }

  .exp-cf__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Mobile */
@media (max-width: 640px) {
  .exp-cf__form {
    padding: 16px;
    gap: 15px;
    border-radius: 16px;
  }

  .exp-cf__fields {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .exp-cf__label {
    font-size: 10px;
  }

  .exp-cf__select {
    height: 52px;
    font-size: 14px;
    border-radius: 12px;
  }

  .exp-cf__btn {
    min-height: 54px;
    border-radius: 12px;
    font-size: 13px;
  }

  .exp-cf__results {
    margin-top: 20px;
    padding: 14px;
    border-radius: 16px;
  }

  .exp-cf__results-head {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 14px;
  }

  .exp-cf__results-label {
    max-width: 100%;
    white-space: normal;
    line-height: 1.45;
  }

  .exp-cf__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .exp-cf-card {
    border-radius: 13px;
  }

  .exp-cf-card__img {
    padding: 12px;
    aspect-ratio: 1 / 1;
  }

  .exp-cf-card__body {
    padding: 10px 10px 12px;
    gap: 5px;
  }

  .exp-cf-card__part {
    font-size: 9px;
  }

  .exp-cf-card__name {
    font-size: 11.5px;
    line-height: 1.35;
  }

  .exp-cf-card__position,
  .exp-cf-card__cta {
    font-size: 10px;
  }

  .exp-cf-card__price {
    font-size: 16px;
  }

  .exp-cf__load-more-btn {
    width: 100%;
  }
}

/* Very small phones */
@media (max-width: 380px) {
  .exp-cf__grid {
    grid-template-columns: 1fr;
  }
}
