/* =========================================
   SHARARA — Hero
   ========================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-height);
  overflow: hidden;
  background: var(--color-bg);
}

/* Ambient grid + glow background */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    radial-gradient(circle at 78% 38%, rgba(45, 212, 212, 0.16), transparent 45%),
    radial-gradient(circle at 15% 85%, rgba(45, 212, 212, 0.06), transparent 40%);
  pointer-events: none;
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent 75%);
}

.hero-lines {
  position: absolute;
  top: 0;
  right: 0;
  width: 55%;
  height: 60%;
  z-index: 1;
  opacity: 0.5;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: var(--space-6);
  width: 100%;
}

.hero-content {
  padding-right: var(--space-5);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: var(--space-5);
}

.hero-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 8px var(--color-accent);
  animation: pulse-dot 1.8s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero-title {
  font-size: clamp(48px, 7vw, 84px);
  line-height: 0.98;
  color: var(--color-text);
  margin-bottom: var(--space-5);
}

.hero-title .line {
  display: block;
  overflow: hidden;
}

.hero-title .line span {
  display: block;
  transform: translateY(110%);
  animation: title-rise 0.9s var(--ease-out) forwards;
}

.hero-title .line:nth-child(1) span { animation-delay: 0.15s; }
.hero-title .line:nth-child(2) span { animation-delay: 0.3s; color: var(--color-accent); }

@keyframes title-rise {
  to { transform: translateY(0); }
}

.hero-desc {
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-text-muted);
  max-width: 480px;
  margin-bottom: var(--space-6);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.hero-stat-num {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--color-text);
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.hero-stat-num .unit {
  font-size: 16px;
  color: var(--color-accent);
}

.hero-stat-label {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 2px;
  line-height: 1.4;
}

.hero-stat-divider {
  width: 1px;
  height: 40px;
  background: var(--color-border);
}

/* Car visual side */
.hero-visual {
  position: relative;
  height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-visual img {
  width: 100%;
  max-width: 620px;
  object-fit: contain;
  filter: drop-shadow(0 40px 60px rgba(0, 0, 0, 0.6));
  animation: car-enter 1.1s var(--ease-out) forwards, car-float 6s ease-in-out 1.1s infinite;
  opacity: 0;
  transform: translateX(60px) scale(0.92);
}

@keyframes car-enter {
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes car-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero-visual-ring {
  position: absolute;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  z-index: -1;
}

.hero-visual-ring::before {
  content: '';
  position: absolute;
  inset: -40px;
  border-radius: 50%;
  border: 1px dashed var(--color-border-soft);
}

/* Search bar (signature element) */
.search-panel {
  position: relative;
  z-index: 3;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-soft);
  margin-top: -10px;
}

.search-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.search-panel-title {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.search-panel-title svg {
  width: 18px;
  height: 18px;
  color: var(--color-accent);
}

.search-mode-toggle {
  display: flex;
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 2px;
}

.search-mode-toggle button {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--color-text-muted);
  transition: all var(--t-fast) var(--ease-out);
}

.search-mode-toggle button.is-active {
  background: var(--color-accent);
  color: #00201f;
  font-weight: 600;
}

.search-row {
  display: flex;
  gap: var(--space-3);
}

.search-field {
  flex: 1;
  position: relative;
}

.search-field input,
.search-field select {
  width: 100%;
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 14px;
  color: var(--color-text);
  transition: border-color var(--t-fast) var(--ease-out);
  appearance: none;
}

.search-field select {
  cursor: pointer;
}

.search-field input::placeholder {
  color: var(--color-text-faint);
}

.search-field input:focus,
.search-field select:focus {
  border-color: var(--color-accent-dim);
}

.search-field-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--color-text-faint);
  pointer-events: none;
}

.search-go {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--color-accent-bright), var(--color-accent));
  color: #00201f;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--t-fast) var(--ease-out);
}

.search-go:hover {
  transform: scale(1.05);
}

.search-go svg {
  width: 20px;
  height: 20px;
}

.search-row-fields {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-3);
  flex: 1;
}

.search-results-drop {
  margin-top: var(--space-4);
  display: none;
  flex-direction: column;
  gap: var(--space-2);
  max-height: 280px;
  overflow-y: auto;
}

.search-results-drop.is-open {
  display: flex;
  animation: drop-in 0.3s var(--ease-out);
}

@keyframes drop-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
  transition: border-color var(--t-fast) var(--ease-out);
  cursor: pointer;
}

.search-result-item:hover {
  border-color: var(--color-accent-dim);
}

.search-result-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
  flex-shrink: 0;
  overflow: hidden;
}

.search-result-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-result-info {
  flex: 1;
  min-width: 0;
}

.search-result-name {
  font-size: 14px;
  color: var(--color-text);
  margin-bottom: 2px;
}

.search-result-meta {
  font-size: 12px;
  color: var(--color-text-muted);
}

.search-result-price {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--color-accent);
}

.search-empty-state {
  text-align: center;
  padding: var(--space-5);
}

.search-empty-state p {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

/* Responsive */
@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }
  .hero-content {
    padding-right: 0;
    order: 1;
  }
  .hero-visual {
    order: 0;
    height: 320px;
  }
  .hero-visual img {
    max-width: 420px;
  }
  .hero-visual-ring {
    width: 300px;
    height: 300px;
  }
  .hero {
    padding-top: calc(var(--header-height-mobile) + var(--space-5));
    min-height: auto;
    padding-bottom: var(--space-7);
  }
  .hero-lines {
    display: none;
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: clamp(38px, 11vw, 56px);
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    margin-bottom: var(--space-6);
  }
  .hero-stats {
    flex-wrap: wrap;
    gap: var(--space-4);
  }
  .search-row {
    flex-direction: column;
  }
  .search-row-fields {
    grid-template-columns: 1fr;
  }
  .search-go {
    width: 100%;
    height: 48px;
  }
  .search-panel {
    padding: var(--space-4);
  }
}
