/* ============================================================
   MAISON MOTORS — common.css
   Shared: reset, typography, header, footer, buttons, cards, toast
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,800;1,400;1,600;1,700&family=Manrope:wght@300;400;500;600;700&display=swap');

:root {
  --bg: #FBFAF8;
  --bg-2: #F2EFEA;
  --ink: #0A0A0A;
  --ink-2: #5C5C5C;
  --muted: #999999;
  --line: #E5E5E5;
  --gold: #9E825E;
  --gold-hover: #836A49;
  --white: #FFFFFF;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; }
input, select, textarea { font-family: inherit; }

::selection { background: var(--ink); color: var(--bg); }

/* ---------- Typography helpers ---------- */
.font-display { font-family: 'Playfair Display', Georgia, serif; }
.italic-em { font-style: italic; font-weight: 400; }
.gold { color: var(--gold); }
.overline {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}
.overline::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: currentColor;
  flex-shrink: 0;
  opacity: 0.9;
}
.overline.muted { color: var(--ink-2); }
.overline.no-rule::before { display: none; }

/* ---------- Layout container ---------- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}
@media (min-width: 640px) { .container { padding: 0 40px; } }
@media (min-width: 1024px) { .container { padding: 0 48px; } }

main {
  padding-top: 80px;
  min-height: calc(100vh - 80px);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 32px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  border: 1px solid var(--ink);
  border-radius: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}
.btn-primary {
  background: var(--ink);
  color: #fff;
}
.btn-primary:hover {
  background: #1A1A1A;
  transform: translateY(-2px);
}
.btn-secondary {
  background: transparent;
  color: var(--ink);
}
.btn-secondary:hover {
  background: var(--ink);
  color: #fff;
}
.btn-ghost-light {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  border-bottom: 1px solid rgba(255,255,255,0.4);
  padding-bottom: 4px;
  color: #fff;
  transition: all 0.4s ease;
}
.btn-ghost-light:hover { border-color: var(--gold); color: var(--gold); }
.btn-ghost-dark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
  transition: all 0.4s ease;
}
.btn-ghost-dark:hover { color: var(--gold); border-color: var(--gold); }
.btn .icon { width: 14px; height: 14px; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: all 0.5s ease;
  background: transparent;
}
.site-header.scrolled {
  background: rgba(251, 250, 248, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
@media (min-width: 640px) { .header-inner { padding: 20px 40px; } }
@media (min-width: 1024px) { .header-inner { padding: 20px 48px; } }
.brand {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand .dot { font-style: italic; font-weight: 400; }
.nav {
  display: none;
  align-items: center;
  gap: 40px;
}
@media (min-width: 1024px) { .nav { display: flex; } }
.nav a {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink-2);
  transition: color 0.3s ease;
}
.nav a:hover, .nav a.active { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 16px; }
.header-cta {
  display: none;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  border: 1px solid var(--ink);
  padding: 10px 20px;
  color: var(--ink);
  transition: all 0.4s ease;
}
.header-cta:hover { background: var(--ink); color: #fff; }
@media (min-width: 768px) { .header-cta { display: inline-flex; } }
.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  color: var(--ink);
}
@media (min-width: 1024px) { .menu-toggle { display: none; } }
.menu-toggle svg { width: 22px; height: 22px; }

/* mobile drawer */
.mobile-drawer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
  background: var(--bg);
}
.mobile-drawer.open { max-height: 400px; border-top: 1px solid var(--line); }
.mobile-drawer .nav-mobile {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.mobile-drawer .nav-mobile a {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink-2);
}
.mobile-drawer .nav-mobile a.active { color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #fff;
  margin-top: 128px;
}
.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 80px 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}
@media (min-width: 640px) { .footer-grid { padding: 80px 40px; } }
@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 5fr 2fr 2fr 3fr;
    padding: 80px 48px;
    gap: 48px;
  }
}
.footer-brand h3 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(32px, 4vw, 48px);
  margin: 20px 0 0;
  line-height: 1.05;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.footer-brand p {
  color: rgba(255,255,255,0.6);
  margin: 24px 0 0;
  max-width: 360px;
  line-height: 1.7;
}
.socials { display: flex; gap: 16px; margin-top: 40px; }
.social {
  width: 44px; height: 44px;
  border: 1px solid rgba(255,255,255,0.2);
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.4s ease;
  color: #fff;
}
.social:hover { background: #fff; color: var(--ink); }
.social svg { width: 16px; height: 16px; }
.footer-col p.label {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.22em;
  color: rgba(255,255,255,0.4);
  margin: 0 0 20px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; font-size: 14px; color: rgba(255,255,255,0.8); }
.footer-col ul a:hover { color: var(--gold); }
.footer-concierge .number {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  margin: 20px 0 8px;
  font-weight: 400;
}
.footer-concierge .email { color: rgba(255,255,255,0.6); font-size: 14px; }
.footer-concierge .note { color: rgba(255,255,255,0.6); font-size: 14px; margin-top: 24px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
}
.footer-bottom .inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 24px;
  display: flex; flex-direction: column; align-items: center;
  gap: 12px;
  font-size: 12px; color: rgba(255,255,255,0.4);
}
@media (min-width: 768px) {
  .footer-bottom .inner { flex-direction: row; justify-content: space-between; padding: 24px 48px; }
}
.footer-bottom .upper { letter-spacing: 0.2em; text-transform: uppercase; }

/* ---------- Vehicle card (used on home + inventory + related) ---------- */
.v-card {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  transition: all 0.5s ease;
  color: var(--ink);
}
.v-card:hover { border-color: var(--ink); }
.v-card .img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--bg-2);
}
.v-card .img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.16,1,0.3,1);
}
.v-card:hover .img-wrap img { transform: scale(1.05); }
.v-card .tier-tag {
  position: absolute; top: 16px; left: 16px;
  background: rgba(251,250,248,0.9);
  backdrop-filter: blur(8px);
  padding: 4px 12px;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink);
}
.v-card .body { padding: 24px; }
@media (min-width: 640px) { .v-card .body { padding: 28px; } }
.v-card .top-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.v-card .name {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  margin: 8px 0 0;
  line-height: 1.15;
  font-weight: 400;
}
@media (min-width: 640px) { .v-card .name { font-size: 26px; } }
.v-card .arrow-btn {
  width: 36px; height: 36px;
  border: 1px solid var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 4px;
  transition: all 0.4s ease;
}
.v-card .arrow-btn svg { width: 16px; height: 16px; }
.v-card:hover .arrow-btn { background: var(--ink); color: #fff; }
.v-card .meta {
  margin-top: 24px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--ink-2);
}
.v-card .price-row {
  margin-top: 24px; padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex; align-items: baseline; justify-content: space-between;
}
.v-card .price-row .from {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold);
}
.v-card .price-row .price {
  font-family: 'Playfair Display', serif;
  font-size: 22px; color: var(--ink);
  font-weight: 400;
}

/* ---------- Toast (custom sonner-like) ---------- */
.toasts {
  position: fixed;
  right: 24px; bottom: 24px;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 12px;
  pointer-events: none;
}
.toast {
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
  padding: 16px 20px;
  font-size: 14px;
  letter-spacing: 0.02em;
  min-width: 280px;
  max-width: 380px;
  box-shadow: 0 18px 40px rgba(10,10,10,0.18);
  pointer-events: auto;
  animation: toastIn 0.45s cubic-bezier(0.16,1,0.3,1);
  display: flex; gap: 12px; align-items: flex-start;
}
.toast.error { background: #1A1A1A; border-color: #B23A3A; }
.toast .dot {
  width: 8px; height: 8px;
  background: var(--gold);
  margin-top: 7px;
  flex-shrink: 0;
}
.toast.error .dot { background: #E25656; }
.toast.leaving { animation: toastOut 0.35s ease forwards; }
@keyframes toastIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes toastOut { to { transform: translateY(20px); opacity: 0; } }

/* ---------- Animations ---------- */
.fade-up { animation: fadeUp 0.9s cubic-bezier(0.16,1,0.3,1) both; }
.fade-up.delay-1 { animation-delay: 0.15s; }
.fade-up.delay-2 { animation-delay: 0.3s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Form atoms ---------- */
.field { display: flex; flex-direction: column; gap: 4px; }
.field label {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 4px;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="date"],
.field select,
.field textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--line);
  border-radius: 0;
  padding: 0 0 14px;
  height: 56px;
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  outline: none;
  transition: border-color 0.3s ease;
  appearance: none;
  -webkit-appearance: none;
}
.field textarea { height: auto; min-height: 84px; resize: vertical; padding-top: 14px; }
.field input:focus,
.field select:focus,
.field textarea:focus { border-bottom-color: var(--ink); }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%230A0A0A' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 4px center;
  padding-right: 30px;
  cursor: pointer;
}

/* ---------- Marquee (used on home) ---------- */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(242,239,234,0.5);
  padding: 32px 0;
  overflow: hidden;
}
.marquee-track {
  display: flex;
  gap: 64px;
  animation: scroll 40s linear infinite;
  width: max-content;
}
.marquee-track span {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 28px;
  color: var(--ink);
  white-space: nowrap;
}
.marquee-track span .sep { color: var(--gold); margin-left: 16px; }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* utility */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
