/* ============================================
   Umzugsverkauf Berlin-Mitte
   Clean, honest, Berlin.
   ============================================ */

/* --- Custom Properties --- */
:root {
  /* Warm palette via oklch */
  --bg: oklch(0.985 0.006 75);
  --bg-surface: oklch(0.965 0.008 75);
  --bg-elevated: oklch(0.95 0.012 75);
  --text-primary: oklch(0.22 0.02 55);
  --text-secondary: oklch(0.45 0.015 55);
  --text-muted: oklch(0.6 0.01 55);
  --accent: oklch(0.58 0.16 38);
  --accent-light: oklch(0.92 0.04 38);
  --accent-dark: oklch(0.45 0.14 38);
  --sage: oklch(0.65 0.05 160);
  --sage-light: oklch(0.92 0.025 160);
  --whatsapp: oklch(0.58 0.17 155);
  --whatsapp-hover: oklch(0.52 0.17 155);
  --sold-overlay: oklch(0.3 0.02 55 / 0.7);
  --border: oklch(0.88 0.01 75);
  --border-light: oklch(0.93 0.008 75);

  /* Typography */
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;

  /* Spacing scale */
  --space-xs: clamp(0.25rem, 0.5vw, 0.5rem);
  --space-s: clamp(0.5rem, 1vw, 0.75rem);
  --space-m: clamp(0.75rem, 2vw, 1.25rem);
  --space-l: clamp(1.25rem, 3vw, 2rem);
  --space-xl: clamp(2rem, 5vw, 3.5rem);
  --space-2xl: clamp(3rem, 7vw, 5rem);

  /* Radius */
  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 16px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration: 0.35s;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

/* --- Header --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: oklch(0.985 0.006 75 / 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-s) var(--space-l);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: baseline;
  gap: 0;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}
.logo-mark {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--accent);
}
.logo-text { color: var(--text-primary); }

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 100px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
}
.lang-option {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.45;
  transition: opacity 0.2s, transform 0.2s var(--ease-out);
  background: none;
  border: none;
}
.lang-option svg {
  display: block;
  border-radius: 2px;
  box-shadow: 0 0 0 0.5px oklch(0 0 0 / 0.15);
}
.lang-option:hover { opacity: 0.8; }
.lang-option.active {
  opacity: 1;
  transform: scale(1.08);
}

/* --- Hero --- */
.hero {
  position: relative;
  padding: calc(80px + var(--space-2xl)) var(--space-l) var(--space-xl);
  max-width: 100%;
  margin: 0 auto;
  background: url('images/berlin/01.webp') center / cover no-repeat;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    oklch(0.98 0.008 75 / 0.92) 0%,
    oklch(0.97 0.01 75 / 0.85) 50%,
    oklch(0.96 0.012 75 / 0.75) 100%
  );
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
}
.hero-eyebrow {
  font-size: clamp(0.75rem, 1.2vw, 0.875rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-s);
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 400;
  margin-bottom: var(--space-l);
}
.hero-title-accent {
  font-style: italic;
  color: var(--accent);
}
.hero-body {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 540px;
  margin-bottom: var(--space-l);
}
.hero-meta {
  display: flex;
  gap: var(--space-l);
  flex-wrap: wrap;
}
.hero-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hero-meta-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.hero-meta-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-style: italic;
  color: var(--text-primary);
}

/* --- How it works --- */
.how-it-works {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-l) var(--space-l) var(--space-xl);
}
.steps {
  display: flex;
  align-items: center;
  gap: var(--space-m);
  padding: var(--space-m) var(--space-l);
  background: var(--bg-surface);
  border-radius: var(--radius-l);
  border: 1px solid var(--border-light);
  flex-wrap: wrap;
  justify-content: center;
}
.step {
  display: flex;
  align-items: center;
  gap: var(--space-s);
}
.step-num {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: oklch(0.98 0 0);
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}
.step-text {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.step-arrow {
  color: var(--text-muted);
  font-size: 1.2rem;
}

/* --- Category Nav --- */
.category-nav {
  position: sticky;
  top: 52px;
  z-index: 90;
  background: oklch(0.985 0.006 75 / 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
}
.category-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-s) var(--space-l);
  display: flex;
  gap: var(--space-xs);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.category-nav-inner::-webkit-scrollbar { display: none; }

.cat-btn {
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.25s var(--ease-out);
}
.cat-btn:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
}
.cat-btn.active {
  background: var(--text-primary);
  color: var(--bg);
  border-color: var(--text-primary);
}
.cat-btn .cat-count {
  display: inline-block;
  margin-left: 4px;
  font-size: 0.7rem;
  font-weight: 500;
  opacity: 0.6;
}

/* --- Items Container --- */
.items-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-l) var(--space-l) var(--space-2xl);
}

/* --- Category Section --- */
.category-section {
  margin-bottom: var(--space-2xl);
}
.category-section-header {
  display: flex;
  align-items: baseline;
  gap: var(--space-s);
  margin-bottom: var(--space-l);
  padding-bottom: var(--space-s);
  border-bottom: 2px solid var(--text-primary);
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.section-count {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* --- Item Grid --- */
.item-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-l);
}

@media (min-width: 900px) {
  .item-grid { grid-template-columns: repeat(3, 1fr); }
}

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

/* --- Item Card --- */
.item-card {
  container-type: inline-size;
  position: relative;
  border-radius: var(--radius-l);
  overflow: hidden;
  background: oklch(1 0 0);
  border: 1px solid var(--border-light);
  transition: transform var(--duration) var(--ease-out), box-shadow var(--duration) var(--ease-out);
}
@media (hover: hover) {
  .item-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px oklch(0.3 0.02 55 / 0.08);
  }
}

/* Sold overlay */
.item-card.sold { pointer-events: none; }
.item-card.sold::after {
  content: '';
  position: absolute;
  inset: 0;
  background: oklch(0.96 0.005 75 / 0.85);
  z-index: 5;
  border-radius: var(--radius-l);
}
.item-card.sold .sold-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-12deg);
  z-index: 6;
  font-family: var(--font-display);
  font-size: 2rem;
  font-style: italic;
  color: var(--accent-dark);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* Image */
.item-image-wrap {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: oklch(1 0 0);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-m);
  min-height: 180px;
  border-bottom: 1px solid var(--border-light);
}
.item-image-wrap img {
  max-width: 100%;
  max-height: 280px;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.5s var(--ease-out);
}
@media (min-width: 900px) {
  .item-image-wrap img { max-height: 320px; }
}
@media (hover: hover) {
  .item-card:hover .item-image-wrap img {
    transform: scale(1.04);
  }
}

/* Photo count badge */
.photo-count {
  position: absolute;
  bottom: var(--space-s);
  right: var(--space-s);
  padding: 4px 10px;
  border-radius: 100px;
  background: oklch(0.15 0 0 / 0.65);
  backdrop-filter: blur(4px);
  color: oklch(0.95 0 0);
  font-size: 0.7rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}
.photo-count svg { opacity: 0.8; }

/* Discount badge */
.discount-badge {
  position: absolute;
  top: var(--space-s);
  left: var(--space-s);
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--accent);
  color: oklch(0.98 0 0);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Available from badge */
.available-badge {
  position: absolute;
  top: var(--space-s);
  right: var(--space-s);
  padding: 4px 10px;
  border-radius: 100px;
  background: oklch(0.15 0 0 / 0.6);
  backdrop-filter: blur(4px);
  color: oklch(0.95 0 0);
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Card body */
.item-body {
  padding: var(--space-m);
}
.item-brand {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.item-name {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5cqi, 1.4rem);
  line-height: 1.25;
  margin-bottom: var(--space-xs);
}
.item-details {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-s);
}
.item-detail {
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 3px 8px;
  background: var(--bg-surface);
  border-radius: var(--radius-s);
  line-height: 1.4;
}

/* Condition text */
.item-condition {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: var(--space-s);
}

/* Price row */
.item-price-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-s);
  margin-bottom: var(--space-m);
}
.item-price-new {
  font-size: clamp(1.3rem, 3cqi, 1.7rem);
  font-weight: 700;
  color: var(--accent-dark);
  font-variant-numeric: tabular-nums;
}
.item-price-original {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: line-through;
  font-variant-numeric: tabular-nums;
}

/* WhatsApp item button */
.item-wa-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px;
  border-radius: var(--radius-m);
  background: var(--whatsapp);
  color: oklch(0.98 0 0);
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.2s;
  text-align: center;
}
.item-wa-btn:hover { background: var(--whatsapp-hover); }
.item-wa-btn svg { flex-shrink: 0; }

/* IKEA link */
.item-source-link {
  display: block;
  text-align: center;
  margin-top: var(--space-xs);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}
.item-source-link:hover { color: var(--text-secondary); }

/* --- Map Section --- */
.map-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-l) var(--space-2xl);
}
.map-header {
  margin-bottom: var(--space-l);
}
.map-note {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: var(--space-xs);
}
.map-wrapper {
  width: 100%;
  height: 360px;
  border-radius: var(--radius-l);
  overflow: hidden;
  border: 1px solid var(--border);
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-l);
  text-align: center;
}
.footer-note {
  font-size: 0.85rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto var(--space-s);
  line-height: 1.6;
}
.footer-note-highlight {
  color: var(--accent-dark);
  font-weight: 500;
  margin-bottom: var(--space-m);
}
.footer-copy {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --- WhatsApp FAB --- */
.whatsapp-fab {
  position: fixed;
  bottom: var(--space-l);
  right: var(--space-l);
  z-index: 80;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--whatsapp);
  color: oklch(0.98 0 0);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px oklch(0.3 0.1 155 / 0.3);
  transition: transform 0.3s var(--ease-out), background 0.2s;
}
.whatsapp-fab:hover {
  transform: scale(1.08);
  background: var(--whatsapp-hover);
}

/* --- Lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: oklch(0.08 0.01 55 / 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.lightbox[hidden] { display: flex; }
.lightbox.open {
  opacity: 1;
  visibility: visible;
}
.lightbox-img-wrap {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-m);
  transition: opacity 0.25s;
}
.lightbox-close {
  position: absolute;
  top: var(--space-m);
  right: var(--space-m);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: oklch(0.85 0 0);
  border-radius: 50%;
  background: oklch(1 0 0 / 0.1);
  transition: background 0.2s;
}
.lightbox-close:hover { background: oklch(1 0 0 / 0.2); }

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: oklch(0.85 0 0);
  border-radius: 50%;
  background: oklch(1 0 0 / 0.1);
  transition: background 0.2s;
}
.lightbox-prev { left: var(--space-m); }
.lightbox-next { right: var(--space-m); }
.lightbox-prev:hover,
.lightbox-next:hover { background: oklch(1 0 0 / 0.2); }

.lightbox-counter {
  position: absolute;
  bottom: var(--space-l);
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.85rem;
  color: oklch(0.7 0 0);
  font-variant-numeric: tabular-nums;
}

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.item-card {
  animation: fadeInUp 0.5s var(--ease-out) both;
}
.item-card:nth-child(1) { animation-delay: 0s; }
.item-card:nth-child(2) { animation-delay: 0.06s; }
.item-card:nth-child(3) { animation-delay: 0.12s; }
.item-card:nth-child(4) { animation-delay: 0.18s; }
.item-card:nth-child(5) { animation-delay: 0.24s; }
.item-card:nth-child(6) { animation-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  .item-card { animation: none; }
  .item-card:hover { transform: none; }
  .item-card:hover .item-image-wrap img { transform: none; }
}

/* --- Responsive --- */
@media (max-width: 639px) {
  .item-grid {
    grid-template-columns: 1fr;
    gap: var(--space-m);
  }
  .hero-title { font-size: clamp(2rem, 8vw, 3rem); }
  .hero-meta { gap: var(--space-m); }
  .hero-body { max-width: 100%; }
  .steps { flex-direction: column; gap: var(--space-s); padding: var(--space-m); }
  .step-arrow { transform: rotate(90deg); }
  .lightbox-prev,
  .lightbox-next { width: 40px; height: 40px; font-size: 1.5rem; }
  .lightbox-prev { left: var(--space-xs); }
  .lightbox-next { right: var(--space-xs); }
  .whatsapp-fab { bottom: var(--space-m); right: var(--space-m); }
  .site-footer { padding-bottom: 80px; }
  .category-nav-inner { padding: var(--space-xs) var(--space-m); }
  .item-body { padding: var(--space-s) var(--space-m) var(--space-m); }
  .map-wrapper { height: 280px; }
}

/* Leaflet overrides */
.leaflet-control-attribution { font-size: 0.65rem !important; }
