
@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@500;600;700&display=swap');

:root {
  --bg: #f5f4ed;
  --surface: #faf9f5;
  --surface-alt: #e8e6dc;
  --fg: #141413;
  --fg-muted: #5e5d59;
  --fg-subtle: #87867f;
  --border: #e8e6dc;
  --border-light: #f0eee6;
  --accent: #c96442;
  --accent-light: #d97757;
  --accent-bg: rgba(201,100,66,0.08);
  --shadow-sm: 0 1px 2px rgba(20,20,19,0.05);
  --shadow-md: 0 4px 12px rgba(20,20,19,0.08);
  --shadow-lg: 0 8px 30px rgba(20,20,19,0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-display: 'Playfair Display', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, Menlo, monospace;
  --transition: 200ms ease;
}

[data-theme="dark"] {
  --bg: #0d0d0c;
  --surface: #1a1a18;
  --surface-alt: #252523;
  --fg: #f5f4ed;
  --fg-muted: #a8a7a0;
  --fg-subtle: #757470;
  --border: #2e2e2b;
  --border-light: #252523;
  --accent: #d97757;
  --accent-light: #e8966e;
  --accent-bg: rgba(217,119,87,0.12);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.5);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { display: block; max-width: 100%; }

.hero {
  position: relative;
  min-height: 380px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1a1a18 0%, #0d0d0c 40%, #141413 100%);
  z-index: 0;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(201,100,66,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 30%, rgba(217,119,87,0.08) 0%, transparent 50%);
}
.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image:
    linear-gradient(rgba(255,255,255,.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.1) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 48px 32px 56px;
  display: flex;
  align-items: flex-end;
  gap: 32px;
}
.hero-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.15);
  flex-shrink: 0;
}
.hero-text { flex: 1; }
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 600;
  color: #f5f4ed;
  line-height: 1.15;
  margin-bottom: 8px;
}
.hero-bio {
  color: rgba(245,244,237,0.6);
  font-size: 15px;
  max-width: 520px;
  line-height: 1.55;
}
.hero-stats {
  display: flex;
  gap: 24px;
  margin-top: 16px;
}
.hero-stat {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(245,244,237,0.45);
}
.hero-stat strong {
  color: rgba(245,244,237,0.8);
  font-weight: 700;
  margin-right: 4px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
  align-self: flex-end;
  margin-bottom: 4px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-light); transform: translateY(-1px); }
.btn-ghost {
  background: rgba(255,255,255,0.08);
  color: rgba(245,244,237,0.7);
  border: 1px solid rgba(255,255,255,0.1);
}
.btn-ghost:hover { background: rgba(255,255,255,0.12); color: #f5f4ed; }

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  transition: background var(--transition), border-color var(--transition);
}
.nav-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 32px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.nav-logo {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.nav-logo span { color: var(--accent); }
.nav-search {
  flex: 1;
  max-width: 400px;
  position: relative;
}
.nav-search input {
  width: 100%;
  padding: 8px 14px 8px 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--fg);
  font-size: 14px;
  font-family: var(--font-body);
  outline: none;
  transition: all var(--transition);
}
.nav-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
}
.nav-search input::placeholder { color: var(--fg-subtle); }
.nav-search svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--fg-subtle);
  pointer-events: none;
}
.nav-spacer { flex: 1; }
.nav-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-subtle);
  flex-shrink: 0;
}
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  transition: all var(--transition);
  flex-shrink: 0;
}
.theme-toggle:hover { background: var(--border); }
.theme-toggle svg { width: 16px; height: 16px; }

.main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 32px;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.filter-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-subtle);
  margin-right: 4px;
}
.filter-chip {
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg-muted);
  transition: all var(--transition);
  cursor: pointer;
}
.filter-chip:hover { border-color: var(--fg-subtle); color: var(--fg); }
.filter-chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.filter-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
  margin: 0 8px;
  align-self: center;
}
.results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.results-text {
  font-size: 14px;
  color: var(--fg-muted);
}
.results-text strong { color: var(--fg); font-weight: 600; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  display: block;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}
.card-image {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--surface-alt);
  position: relative;
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}
.card:hover .card-image img { transform: scale(1.05); }
.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 9px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(0,0,0,0.65);
  color: #fff;
  backdrop-filter: blur(4px);
}
.card-type-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 3px 8px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(0,0,0,0.6);
  color: #fff;
  backdrop-filter: blur(4px);
}
.card-body {
  padding: 12px 14px 14px;
}
.card-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--fg);
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-type {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-subtle);
  text-transform: capitalize;
  margin-bottom: 6px;
}
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card-price {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--fg);
}
.card-price .from {
  font-weight: 400;
  font-size: 10px;
  color: var(--fg-subtle);
}
.card-arrow {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-alt);
  transition: all var(--transition);
}
.card:hover .card-arrow {
  background: var(--accent);
  color: #fff;
}
.card-arrow svg { width: 12px; height: 12px; }

.load-more-wrap {
  text-align: center;
  padding: 40px 0;
}
.load-more {
  padding: 12px 32px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--fg-muted);
  transition: all var(--transition);
}
.load-more:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.empty-state {
  text-align: center;
  padding: 80px 32px;
  grid-column: 1 / -1;
}
.empty-state h3 {
  font-family: var(--font-display);
  font-size: 24px;
  margin-bottom: 8px;
}
.empty-state p { color: var(--fg-muted); font-size: 15px; }

.footer {
  max-width: 1320px;
  margin: 64px auto 0;
  padding: 32px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--fg-subtle);
  font-size: 13px;
  transition: border-color var(--transition);
}
.footer a {
  color: var(--accent);
  transition: color var(--transition);
}
.footer a:hover { color: var(--accent-light); }

.detail { display: none; max-width: 1320px; margin: 0 auto; padding: 32px; }
.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--fg-muted);
  margin-bottom: 24px;
  transition: color var(--transition);
}
.detail-back:hover { color: var(--fg); }
.detail-back svg { width: 16px; height: 16px; }
.detail-layout {
  display: grid;
  grid-template-columns: 55% 1fr;
  gap: 32px;
  align-items: start;
}
.detail-image {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-alt);
}
.detail-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}
.detail-info { display: flex; flex-direction: column; gap: 12px; }
.detail-collection {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
}
.detail-collection-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.detail-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 600;
  line-height: 1.2;
  color: var(--fg);
}
.detail-type {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-subtle);
}
.detail-price {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  color: var(--fg);
  margin-top: 4px;
}
.btn-shop {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  transition: all var(--transition);
  margin-top: 8px;
}
.btn-shop:hover { background: var(--accent-light); transform: translateY(-1px); color: #fff; }
.btn-shop svg { width: 16px; height: 16px; }
.detail-not-found {
  text-align: center;
  padding: 80px 32px;
}
.detail-not-found h3 {
  font-family: var(--font-display);
  font-size: 24px;
  margin-bottom: 8px;
}
.detail-not-found p { color: var(--fg-muted); font-size: 15px; margin-bottom: 16px; }
.detail-not-found a { color: var(--accent); }
.detail-not-found a:hover { color: var(--accent-light); }
.detail-related {
  border-top: 1px solid var(--border);
  padding: 32px 0 0;
  margin-top: 48px;
}
.detail-related h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
}
.detail-related-grid {
  display: flex;
  overflow-x: auto;
  gap: 16px;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}
.detail-related-grid::-webkit-scrollbar { height: 4px; }
.detail-related-grid::-webkit-scrollbar-track { background: var(--surface-alt); border-radius: 2px; }
.detail-related-grid::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.detail-related-grid .card {
  flex: 0 0 180px;
  scroll-snap-align: start;
}

@media (max-width: 768px) {
  .hero-content { flex-direction: column; align-items: flex-start; padding: 32px 20px 40px; gap: 20px; }
  .hero-avatar { width: 64px; height: 64px; }
  .hero-actions { align-self: flex-start; }
  .nav-inner { padding: 0 20px; }
  .nav-search { max-width: 100%; }
  .main { padding: 20px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .filter-divider { display: none; }
  .footer { flex-direction: column; gap: 12px; text-align: center; }
  .detail { padding: 20px; }
  .detail-layout { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 28px; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card-body { padding: 8px 10px 12px; }
  .card-title { font-size: 12px; }
  .detail-title { font-size: 22px; }
  .detail-price { font-size: 20px; }
  .btn-shop { width: 100%; justify-content: center; padding: 14px 20px; }
  .detail-related-grid .card { flex: 0 0 150px; }
}
