/* ============================================================
   Bageswori Groups - Design System
   Premium light automotive marketplace theme
   ============================================================ */

:root {
  --bg-primary: #f9fafb;
  --bg-secondary: #e5e7eb;
  --surface: #ffffff;
  --border: #e5e7eb;
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --brand: #e11d2a; /* automotive red accent */
  --brand-dark: #b3141f;
  --brand-soft: #fde8e9;
  --success: #16a34a;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.05);
  --shadow-md: 0 4px 16px rgba(17, 24, 39, 0.08);
  --shadow-lg: 0 16px 40px rgba(17, 24, 39, 0.12);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5 {
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  color: var(--text-primary);
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(249, 250, 251, 0.75);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition:
    box-shadow 0.3s ease,
    border-color 0.3s ease,
    background 0.3s ease;
}
.navbar.scrolled {
  box-shadow: var(--shadow-md);
  border-color: var(--border);
  background: rgba(249, 250, 251, 0.9);
}
.nav-link {
  position: relative;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.2s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--brand);
  transition: width 0.25s ease;
}
.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  border-radius: 12px;
  padding: 0.65rem 1.25rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
  font-size: 0.95rem;
}
.btn:active {
  transform: scale(0.97);
}
.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 16px rgba(225, 29, 42, 0.25);
}
.btn-primary:hover {
  background: var(--brand-dark);
  box-shadow: 0 10px 22px rgba(225, 29, 42, 0.3);
  transform: translateY(-1px);
}
.btn-outline {
  background: var(--surface);
  color: var(--text-primary);
  border-color: var(--border);
}
.btn-outline:hover {
  border-color: var(--brand);
  color: var(--brand);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover {
  color: var(--text-primary);
}

/* ---------- Cards ---------- */
.bike-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}
.bike-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: #d1d5db;
}
.bike-card .img-wrap {
  overflow: hidden;
  background: var(--bg-primary);
}
.bike-card .img-wrap img {
  transition: transform 0.5s ease;
}
.bike-card:hover .img-wrap img {
  transform: scale(1.08);
}

.spec-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: 8px;
  padding: 0.25rem 0.55rem;
  font-size: 0.78rem;
}

/* ---------- Floating label inputs ---------- */
.field {
  position: relative;
  margin-top: 0.5rem;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 1.15rem 0.9rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.field textarea {
  min-height: 120px;
  resize: vertical;
}
.field label {
  position: absolute;
  left: 0.9rem;
  top: 0.9rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  pointer-events: none;
  transition: all 0.18s ease;
  background: transparent;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(225, 29, 42, 0.12);
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label,
.field select:focus + label,
.field select.filled + label {
  top: 0.35rem;
  font-size: 0.7rem;
  color: var(--brand);
}
.field .err {
  color: var(--brand);
  font-size: 0.72rem;
  margin: 0.25rem 0 0 0.2rem;
  display: none;
}
.field.invalid .err {
  display: block;
}
.field.invalid input,
.field.invalid select,
.field.invalid textarea {
  border-color: var(--brand);
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Animations ---------- */
@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-16px);
  }
}
.float-anim {
  animation: floaty 5s ease-in-out infinite;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.fade-up {
  animation: fadeUp 0.8s ease both;
}
.delay-1 {
  animation-delay: 0.12s;
}
.delay-2 {
  animation-delay: 0.24s;
}
.delay-3 {
  animation-delay: 0.36s;
}

/* ---------- Skeleton loading ---------- */
.skeleton {
  background: linear-gradient(100deg, #eceef1 30%, #f5f6f8 50%, #eceef1 70%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite linear;
  border-radius: 12px;
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

/* ---------- Toast ---------- */
#toast-wrap {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  color: var(--text-primary);
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  min-width: 240px;
  transform: translateX(120%);
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.toast.show {
  transform: translateX(0);
}
.toast.success {
  border-left-color: var(--success);
}

/* ---------- Favorite heart ---------- */
.fav-btn {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    background 0.2s ease;
  color: var(--text-muted);
}
.fav-btn:hover {
  transform: scale(1.1);
}
.fav-btn.active {
  color: var(--brand);
  background: var(--brand-soft);
  border-color: var(--brand-soft);
}

/* ---------- Mobile menu ---------- */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.mobile-menu.open {
  max-height: 420px;
}

/* ---------- Misc ---------- */
.section {
  padding: 4.5rem 0;
}
.container-px {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}
.divider {
  height: 1px;
  background: var(--border);
}

/* Range slider */
input[type="range"] {
  accent-color: var(--brand);
  width: 100%;
}

/* gallery thumb */
.thumb {
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 12px;
  overflow: hidden;
}
.thumb.active {
  border-color: var(--brand);
}
