/* ============================================
   DirecTokunbo — Auction Layout Styles
   Copart-inspired redesign layer
   ============================================ */

/* ===== UTILITY TOP BAR ===== */

.topbar {
  background: #050505;
  border-bottom: 1px solid rgba(246, 203, 18, 0.12);
  height: 36px;
  display: flex;
  align-items: center;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.topbar-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.topbar-link svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.topbar-link:hover {
  color: var(--color-primary);
}

.topbar-live {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

.topbar-currency {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

/* Live pulsing dot */
.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}

.live-dot.pulse {
  animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); }
  50% { box-shadow: 0 0 0 5px rgba(34, 197, 94, 0); }
}

@media (max-width: 768px) {
  .topbar-left .topbar-link:last-child,
  .topbar-currency {
    display: none;
  }
}

/* ===== HEADER SEARCH ===== */

.header-search {
  flex: 1;
  max-width: 500px;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  overflow: hidden;
  transition: border-color var(--transition-base), background var(--transition-base);
  position: relative;
}

.header-search:focus-within {
  border-color: rgba(246, 203, 18, 0.4);
  background: rgba(255, 255, 255, 0.07);
}

.header-search-icon {
  width: 16px;
  height: 16px;
  color: var(--color-text-muted);
  margin-left: var(--space-md);
  flex-shrink: 0;
}

.header-search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  padding: 10px 12px;
  font-size: var(--font-size-sm);
  color: var(--color-text);
  font-family: var(--font-family);
}

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

.header-search-btn {
  background: var(--color-primary);
  color: #000;
  border: none;
  padding: 8px 18px;
  font-size: var(--font-size-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast);
  white-space: nowrap;
  height: 100%;
}

.header-search-btn:hover {
  background: var(--color-primary-hover);
}

@media (max-width: 900px) {
  .header-search {
    display: none;
  }
}

/* ===== CATEGORY BAR ===== */

.category-bar {
  background: var(--color-bg-elevated);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: var(--header-height);
  z-index: 90;
}

.category-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.cat-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 18px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--transition-fast), border-color var(--transition-fast);
  font-family: var(--font-family);
}

.cat-tab svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.cat-tab:hover {
  color: var(--color-text);
}

.cat-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

/* ===== HERO — COMPACT SPLIT LAYOUT ===== */

.hero {
  position: relative;
  background: var(--color-bg);
  min-height: 520px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 100% 50%, rgba(246, 203, 18, 0.04) 0%, transparent 70%),
    radial-gradient(ellipse 60% 80% at 0% 50%, rgba(246, 203, 18, 0.02) 0%, transparent 60%);
  pointer-events: none;
  z-index: 1;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 10, 10, 0.7) 0%, rgba(10, 10, 10, 0.2) 100%);
  z-index: 1;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: var(--space-3xl);
  align-items: center;
  padding: 40px 0;
}

/* Hero Copy */
.hero-copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.hero-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #4ade80;
  font-size: var(--font-size-sm);
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  width: fit-content;
}

.hero-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.hero-title-accent {
  color: var(--color-primary);
  display: block;
}

.hero-description {
  font-size: var(--font-size-base);
  color: var(--color-text-muted);
  line-height: 1.7;
  max-width: 520px;
}

.hero-trust-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero-trust-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.hero-trust-list li svg {
  width: 14px;
  height: 14px;
  color: var(--color-primary);
  flex-shrink: 0;
}

.hero-ctas {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--color-border-hover);
  color: var(--color-text);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--color-text);
}

.btn-lg {
  padding: 14px 28px;
  font-size: var(--font-size-base);
}

/* Hero Search Panel */
.hero-search-panel {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.search-panel-header h3 {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
}

.search-panel-header p {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.search-panel-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.sp-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sp-field label {
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sp-field select {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--color-text);
  font-size: var(--font-size-sm);
  font-family: var(--font-family);
  cursor: pointer;
  transition: border-color var(--transition-fast);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.sp-field select:focus {
  outline: none;
  border-color: rgba(246, 203, 18, 0.4);
}

.btn-search-full {
  width: 100%;
  justify-content: center;
  gap: 8px;
  margin-top: var(--space-xs);
}

.btn-search-full svg {
  width: 16px;
  height: 16px;
}

.search-popular {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.search-popular span {
  font-size: var(--font-size-xs);
  color: var(--color-text-subtle);
}

.search-popular a {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.search-popular a:hover {
  color: var(--color-primary);
  border-color: rgba(246, 203, 18, 0.3);
}

/* Hero responsive */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .hero-search-panel {
    max-width: 520px;
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: auto;
  }

  .hero-inner {
    padding: 40px 0;
  }

  .hero-ctas {
    flex-direction: column;
  }

  .hero-ctas .btn {
    text-align: center;
  }
}

/* ===== AUCTION TICKER ===== */

.auction-ticker {
  background: #0e0e0e;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  height: 40px;
  overflow: hidden;
}

.ticker-label {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 var(--space-md);
  font-size: 0.68rem;
  font-weight: 700;
  color: #ef4444;
  letter-spacing: 0.08em;
  white-space: nowrap;
  border-right: 1px solid var(--color-border);
  height: 100%;
  flex-shrink: 0;
}

.ticker-viewport {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.ticker-viewport::before,
.ticker-viewport::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40px;
  z-index: 2;
  pointer-events: none;
}

.ticker-viewport::before {
  left: 0;
  background: linear-gradient(to right, #0e0e0e, transparent);
}

.ticker-viewport::after {
  right: 0;
  background: linear-gradient(to left, #0e0e0e, transparent);
}

.ticker-track {
  display: flex;
  align-items: center;
  animation: tickerScroll 40s linear infinite;
  white-space: nowrap;
}

.ticker-track:hover {
  animation-play-state: paused;
}

.ticker-item {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  padding: 0 var(--space-xl);
  flex-shrink: 0;
}

.ticker-item::after {
  content: '•';
  margin-left: var(--space-xl);
  color: var(--color-border-hover);
}

.ticker-item strong {
  color: var(--color-text);
  font-weight: 600;
}

@keyframes tickerScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ===== INVENTORY SECTION HEADER ===== */

.inventory-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.inventory-section-header .section-title {
  margin-bottom: var(--space-xs);
}

.btn-view-all {
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .inventory-section-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ===== LISTING CARDS ===== */

.listings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.listing-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition-base), transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.listing-card:hover {
  border-color: rgba(246, 203, 18, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(246, 203, 18, 0.1);
}

.listing-card:active {
  transform: scale(0.98);
  transition-duration: 0.1s;
}

.listing-card-featured {
  border-color: rgba(246, 203, 18, 0.2);
}

/* Card Image */
.listing-img {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--color-bg-elevated);
}

.listing-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.listing-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 40%,
    rgba(0, 0, 0, 0.35) 100%
  );
  pointer-events: none;
  z-index: 1;
}

.listing-card:hover .listing-img img {
  transform: scale(1.04);
}

.listing-lot {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  color: var(--color-text-muted);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  z-index: 2;
}

.listing-badge {
  position: absolute;
  top: 10px;
  right: 42px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  z-index: 2;
}

.badge-hot {
  background: rgba(239, 68, 68, 0.85);
  color: #fff;
}

.badge-new {
  background: rgba(34, 197, 94, 0.85);
  color: #fff;
}

.badge-deal {
  background: var(--color-primary);
  color: #000;
}

.badge-sold {
  background: var(--color-text-subtle);
  color: white;
  opacity: 0.8;
}

.listing-watch {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  color: var(--color-text-muted);
  z-index: 2;
}

.listing-watch svg {
  width: 13px;
  height: 13px;
}

.listing-watch:hover,
.listing-watch.active {
  background: rgba(239, 68, 68, 0.7);
  color: #fff;
}

/* Card Body */
.listing-body {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  flex: 1;
}

.listing-grade {
  display: flex;
  align-items: center;
  gap: 8px;
}

.grade-stars {
  color: var(--color-primary);
  font-size: 0.75rem;
  letter-spacing: 1px;
}

.grade-empty {
  color: var(--color-border-hover);
}

.grade-label {
  font-size: 0.68rem;
  color: var(--color-text-subtle);
  font-weight: 600;
}

.listing-title {
  font-size: var(--font-size-base);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
  margin: 0;
}

.listing-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.listing-specs span {
  font-size: 0.68rem;
  color: var(--color-text-muted);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 500;
}

.listing-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.listing-origin {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.listing-origin svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
}

.condition-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.condition-clean {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.condition-minor {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.condition-damaged {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Pricing */
.listing-pricing {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  background: var(--color-bg-elevated);
  border-radius: var(--radius-sm);
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--color-border);
}

.price-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.price-block.price-cif {
  border-left: 1px solid var(--color-border);
  padding-left: var(--space-sm);
}

.price-label {
  font-size: 0.62rem;
  color: var(--color-text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.price-amount {
  font-size: var(--font-size-base);
  font-weight: 800;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.price-amount-muted {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

/* Timer */
.listing-timer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.listing-timer svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.auction-timer {
  font-weight: 700;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

.timer-label {
  color: var(--color-text-subtle);
}

.listing-timer-urgent .auction-timer {
  color: #f87171;
}

.listing-timer-urgent svg {
  color: #f87171;
  animation: timerPulse 1.5s ease-in-out infinite;
}

@keyframes timerPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Card Actions */
.listing-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xs);
  margin-top: auto;
  padding-top: var(--space-xs);
}

.listing-actions .btn {
  justify-content: center;
  text-align: center;
}

/* Inventory Footer */
.inventory-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border);
}

.inventory-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: var(--font-size-xs);
  color: var(--color-text-subtle);
  max-width: 500px;
  line-height: 1.5;
}

.inventory-note svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--color-text-muted);
}

@media (max-width: 1024px) {
  .listings-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .inventory-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ===== STATS (inherits from main style + minor overrides) ===== */

/* ===== HOW IT WORKS — STEPS ===== */

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
  position: relative;
}

/* Connecting line between steps */
.steps-grid::before {
  content: '';
  position: absolute;
  top: 32px;
  left: calc(12.5% + 20px);
  right: calc(12.5% + 20px);
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(246, 203, 18, 0.3), rgba(246, 203, 18, 0.3), transparent);
  pointer-events: none;
}

.step-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-md);
  padding: var(--space-xl);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  position: relative;
  transition: border-color var(--transition-base);
}

.step-card:hover {
  border-color: rgba(246, 203, 18, 0.25);
}

.step-number {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: #000;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-icon {
  width: 52px;
  height: 52px;
  background: rgba(246, 203, 18, 0.08);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
}

.step-icon svg {
  width: 26px;
  height: 26px;
}

.step-card h3 {
  font-size: var(--font-size-base);
  font-weight: 700;
  color: var(--color-text);
}

.step-card p {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

@media (max-width: 900px) {
  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps-grid::before {
    display: none;
  }
}

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

/* ===== WHY US — FEATURES GRID ===== */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-2xl);
}

.feature-card {
  padding: var(--space-xl);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  transition: border-color var(--transition-base), background var(--transition-base);
}

.feature-card:hover {
  border-color: rgba(246, 203, 18, 0.2);
  background: var(--color-bg-hover);
}

.feature-icon {
  width: 44px;
  height: 44px;
  background: rgba(246, 203, 18, 0.08);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
}

.feature-icon svg {
  width: 22px;
  height: 22px;
}

.feature-card h3 {
  font-size: var(--font-size-base);
  font-weight: 700;
  color: var(--color-text);
}

.feature-card p {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* ===== SECTION HEADER CENTERED ===== */

.section-header.centered {
  text-align: center;
}

.section-header.centered .section-badge,
.section-header.centered .section-title,
.section-header.centered .section-subtitle {
  margin-left: auto;
  margin-right: auto;
}

/* ===== FAQ OVERRIDES ===== */

.faq-accordion {
  max-width: 760px;
  margin: var(--space-2xl) auto 0;
}

/* ===== CTA BANNER ===== */

.cta-banner {
  background: linear-gradient(135deg, #111 0%, #1a1a0a 50%, #111 100%);
  border-top: 1px solid rgba(246, 203, 18, 0.15);
  border-bottom: 1px solid rgba(246, 203, 18, 0.15);
  padding: var(--space-3xl) 0;
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2xl);
}

.cta-text h2 {
  font-size: var(--font-size-3xl);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.cta-text p {
  font-size: var(--font-size-base);
  color: var(--color-text-muted);
}

.cta-actions {
  display: flex;
  gap: var(--space-sm);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .cta-inner {
    flex-direction: column;
    text-align: center;
  }

  .cta-actions {
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* ===== WATCH BUTTON ACTIVE STATE ===== */

.listing-watch-btn.active {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

/* ===== CATEGORY FILTER (JS-driven visibility) ===== */

.listing-card[data-cat] {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.listing-card.hidden {
  display: none;
}

/* ===== GSAP ANIMATION HELPERS ===== */

.hero-copy,
.hero-search-panel,
.listing-card,
.step-card,
.feature-card,
.testimonial-card,
.stat-item {
  will-change: transform;
}

/* Active Auctions cards always fully visible */
.listing-card {
  opacity: 1 !important;
}

/* ===== CRITICAL OVERRIDES ===== */

/* Override old style.css .hero padding (adds ~144px top padding we don't want) */
.hero {
  padding: 0;
}

/* Fix SVGs inside buttons — no explicit w/h defaults to 300px intrinsic */
.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  pointer-events: none;
}

/* Fix SVGs in contact info-float (style.css only targets .icon class, not bare svg) */
.info-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--color-primary);
}

/* ===== TICKER HOVER CARD ===== */

.ticker-item {
  position: relative;
  cursor: default;
}

.ticker-hover-card {
  position: fixed;
  z-index: 9999;
  width: 220px;
  background: var(--color-bg-elevated);
  border: 1px solid rgba(246, 203, 18, 0.3);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(246, 203, 18, 0.08);
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.ticker-hover-card.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.ticker-hover-img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: block;
}

.ticker-hover-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ticker-hover-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
}

.ticker-hover-price {
  font-size: 0.72rem;
  color: var(--color-primary);
  font-weight: 700;
}

.ticker-hover-link {
  display: block;
  text-align: center;
  background: var(--color-primary);
  color: #000;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  margin-top: 6px;
  transition: background var(--transition-fast);
}

.ticker-hover-link:hover {
  background: var(--color-primary-hover);
}

/* ===== INVENTORY PAGE — PAGE HERO ===== */

.page-hero {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-2xl) 0 var(--space-xl);
}

.page-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.15;
  margin-bottom: var(--space-sm);
}

.page-subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  max-width: 560px;
  margin-bottom: var(--space-lg);
}

.inventory-search-bar {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.inventory-search-bar select {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  padding-right: 32px;
  color: var(--color-text);
  font-size: var(--font-size-sm);
  font-family: var(--font-family);
  cursor: pointer;
  transition: border-color var(--transition-fast);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  min-width: 140px;
}

.inventory-search-bar select:focus {
  outline: none;
  border-color: rgba(246, 203, 18, 0.4);
}

@media (max-width: 640px) {
  .page-hero {
    padding: var(--space-xl) 0 var(--space-lg);
  }
  .inventory-search-bar {
    flex-direction: column;
  }
  .inventory-search-bar select {
    min-width: 100%;
  }
}

/* ===== INVENTORY PAGE — TOOLBAR ===== */

.inventory-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
}

.results-count {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.sort-wrapper {
  display: flex;
  align-items: center;
}

.sort-select {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  color: var(--color-text);
  font-size: var(--font-size-sm);
  font-family: var(--font-family);
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.sort-select:focus {
  outline: none;
  border-color: rgba(246, 203, 18, 0.3);
}

.view-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
}

.view-btn {
  width: 34px;
  height: 34px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.view-btn svg {
  width: 16px;
  height: 16px;
}

.view-btn.active,
.view-btn:hover {
  color: var(--color-primary);
  border-color: rgba(246, 203, 18, 0.3);
}

@media (max-width: 640px) {
  .inventory-toolbar {
    flex-wrap: wrap;
  }
}

/* ===== INVENTORY PAGE — GRID ===== */

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.inventory-grid.list-view {
  grid-template-columns: 1fr;
}

.inventory-grid.list-view .listing-card {
  flex-direction: row;
}

.inventory-grid.list-view .listing-img {
  width: 240px;
  flex-shrink: 0;
  aspect-ratio: unset;
  height: 200px;
}

@media (max-width: 1024px) {
  .inventory-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .inventory-grid.list-view .listing-card {
    flex-direction: column;
  }
  .inventory-grid.list-view .listing-img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/10;
  }
}

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

/* ===== PAGINATION ===== */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  margin-top: var(--space-3xl);
  flex-wrap: wrap;
}

.page-btn,
.page-num {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
  font-family: var(--font-family);
}

.page-btn svg {
  width: 14px;
  height: 14px;
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.page-num.active,
.page-num:hover:not(.active),
.page-btn:not(:disabled):hover {
  color: var(--color-primary);
  border-color: rgba(246, 203, 18, 0.3);
  background: rgba(246, 203, 18, 0.05);
}

.page-num.active {
  background: rgba(246, 203, 18, 0.1);
  font-weight: 700;
}

/* ===== MOBILE — HEADER ===== */

@media (max-width: 768px) {
  .header-inner {
    gap: var(--space-sm);
  }
}

/* ===== MOBILE — CONTACT GRID ===== */

@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr !important;
  }
  .contact-visual {
    display: none;
  }
}

/* ===== RESPONSIVE IMPROVEMENTS ===== */

/* Inventory search bar on mobile */
@media (max-width: 768px) {
  .inventory-search-bar {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .inventory-search-bar select,
  .inventory-search-bar .btn {
    width: 100%;
  }

  .page-hero {
    padding: var(--space-xl) 0;
  }

  .page-title {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }
}

/* Inventory grid responsiveness */
@media (max-width: 640px) {
  .inventory-grid {
    grid-template-columns: 1fr;
  }

  .inventory-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .toolbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .listing-card {
    max-width: 100%;
  }

  .hero-search-panel {
    width: 100%;
  }
}

/* Category bar scroll on mobile */
@media (max-width: 768px) {
  .category-bar .container {
    padding: 0;
  }

  .category-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 var(--space-md);
    scrollbar-width: none;
  }

  .category-tabs::-webkit-scrollbar {
    display: none;
  }

  .cat-tab {
    flex-shrink: 0;
  }
}

/* Topbar on very small screens */
@media (max-width: 480px) {
  .topbar-left .topbar-link:first-child {
    display: none;
  }
}

/* Listing card detail section */
.listing-detail-specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 12px;
  margin: var(--space-sm) 0;
  font-size: var(--font-size-xs);
}

.listing-detail-specs dt {
  color: var(--color-text-subtle);
  font-weight: 500;
}

.listing-detail-specs dd {
  color: var(--color-text-muted);
  font-weight: 600;
  margin: 0;
}

/* Car detail page card link */
.listing-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.listing-card-link:hover .listing-title {
  color: var(--color-primary);
}

.listing-img-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
