/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-bg: #fafaf9;
  --color-surface: #ffffff;
  --color-text: #1a1a1a;
  --color-text-secondary: #6b6b6b;
  --color-accent: #2c2c2c;
  --color-accent-hover: #444444;
  --color-border: #e8e8e8;
  --color-sold-badge: #b91c1c;
  --color-success: #166534;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
  --radius: 8px;
  --max-width: 1100px;
  --nav-height: 64px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Navigation ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-inner {
  width: 100%;
  max-width: var(--max-width);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--color-text);
  white-space: nowrap;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: color 0.2s;
  cursor: pointer;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-text);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1.5px;
  background: var(--color-text);
}

.nav-contact {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
}

.nav-contact a {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-contact a:hover { color: var(--color-text); }

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  margin: 5px 0;
  transition: all 0.3s;
}

/* ── Main Content ── */
main { padding-top: var(--nav-height); }

.page {
  animation: fadeIn 0.3s ease;
}

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

/* ── Hero / Header Section ── */
.hero {
  text-align: center;
  padding: 64px 24px 48px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  line-height: 1.2;
}

.hero .tagline {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  font-weight: 300;
  margin-bottom: 20px;
}

.hero .contact-bar {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  flex-wrap: wrap;
}

.hero .contact-bar a {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.hero .contact-bar a:hover { color: var(--color-text); }

.divider {
  width: 48px;
  height: 1px;
  background: var(--color-border);
  margin: 0 auto 48px;
}

/* ── Section Label ── */
.section-label {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 24px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-secondary);
  font-weight: 500;
}

/* ── Cards Grid ── */
.cards-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 80px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s, transform 0.3s;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* ── Image Carousel ── */
.carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #f0f0f0;
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.carousel-track img {
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  object-fit: cover;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(4px);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s;
  z-index: 2;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.carousel:hover .carousel-btn { opacity: 1; }
.carousel-btn:hover { background: rgba(255,255,255,1); }

.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }

.carousel-btn svg {
  width: 16px;
  height: 16px;
  stroke: var(--color-text);
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Dots */
.carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}

.carousel-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.carousel-dots .dot.active {
  background: rgba(255,255,255,0.95);
  transform: scale(1.25);
}

/* Counter badge (e.g. "3 / 12") */
.carousel-counter {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0,0,0,0.5);
  color: white;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 100px;
  z-index: 2;
  letter-spacing: 0.03em;
}

/* Single image — no carousel controls */
.carousel.single .carousel-btn,
.carousel.single .carousel-dots,
.carousel.single .carousel-counter { display: none; }

.card-image-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #f5f5f4, #e7e5e4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  font-size: 0.85rem;
}

.card-body { padding: 20px; }

.card-brand {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-secondary);
  margin-bottom: 4px;
  font-weight: 500;
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 8px;
  line-height: 1.3;
}

.card-description {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
  line-height: 1.5;
}

.card-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.spec-tag {
  font-size: 0.75rem;
  padding: 4px 10px;
  background: var(--color-bg);
  border-radius: 100px;
  color: var(--color-text-secondary);
}

.card-price {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.card-cta {
  display: inline-block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s;
}

.card-cta:hover { color: var(--color-accent-hover); }

/* ── Sold Badge ── */
.card.sold { position: relative; }

.sold-badge {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: var(--color-sold-badge);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 12px;
  border-radius: 100px;
  z-index: 3;
}

/* ── Sell Page ── */
.sell-hero {
  text-align: center;
  padding: 64px 24px 16px;
  max-width: 640px;
  margin: 0 auto;
}

.sell-hero h1,
.sell-hero h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 500;
  margin-bottom: 16px;
}

.sell-hero p {
  color: var(--color-text-secondary);
  font-size: 1rem;
  line-height: 1.7;
}

.sell-content {
  max-width: 580px;
  margin: 40px auto 80px;
  padding: 0 24px;
}

.sell-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow-sm);
}

.sell-card h2,
.sell-card h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 12px;
}

.sell-card ul {
  list-style: none;
  margin-bottom: 20px;
}

.sell-card ul li {
  position: relative;
  padding-left: 20px;
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.8;
}

.sell-card ul li::before {
  content: '\2022';
  position: absolute;
  left: 0;
  color: var(--color-text-secondary);
}

.sell-card .closing {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
}

.sell-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
}

.sell-contact a {
  font-size: 0.95rem;
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.sell-contact a:hover { color: var(--color-accent-hover); }

.sell-contact .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-secondary);
  font-weight: 500;
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--color-text-secondary);
}
.empty-state p { font-size: 1rem; }

/* ── Footer ── */
footer {
  text-align: center;
  padding: 32px 24px;
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  border-top: 1px solid var(--color-border);
}

footer p { margin: 2px 0; }

/* ── Lightbox ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.92);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 92vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.lightbox-close:hover { opacity: 1; }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.lightbox-nav:hover { background: rgba(255,255,255,0.3); }
.lightbox-nav.prev { left: 16px; }
.lightbox-nav.next { right: 16px; }

.lightbox-nav svg {
  width: 22px;
  height: 22px;
  stroke: white;
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav-links, .nav-contact { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(12px);
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--color-border);
    animation: fadeIn 0.2s ease;
  }
  .nav-toggle { display: block; }
  .hero h1 { font-size: 1.8rem; }
  .hero .tagline { font-size: 0.95rem; }
  .cards-grid {
    grid-template-columns: 1fr;
    padding: 0 16px 60px;
  }
  .section-label { padding: 0 16px 20px; }
  .sell-hero h1,
  .sell-hero h2 { font-size: 1.6rem; }
  .sell-card { padding: 24px; }

  /* On mobile, always show carousel arrows */
  .carousel .carousel-btn { opacity: 1; }
}

@media (max-width: 400px) {
  .hero h1 { font-size: 1.5rem; }
  .hero { padding: 48px 16px 32px; }
}
