/* ============================================
   Sandostore — design tokens
   A browse-only marketplace: the product introduces
   the shop, not a cart. Palette and type choices
   below all serve that "window shopping" premise.
   ============================================ */

:root {
  --paper: #faf9f6;
  --ink: #1c1c1e;
  --ink-soft: #4a4a48;
  --muted: #8b8578;
  --line: #e6e3da;
  --pine: #26543f;
  --pine-soft: #e9efe8;
  --clay: #b5502f;
  --radius: 3px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

h1, h2, h3, .display {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--pine);
  outline-offset: 2px;
}

.mono {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
}

/* ---------- layout shell ---------- */

.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.logo span { color: var(--pine); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
}

.nav-links a.pill {
  border: 1px solid var(--ink);
  padding: 8px 16px;
  border-radius: var(--radius);
  transition: background .15s ease, color .15s ease;
}
.nav-links a.pill:hover { background: var(--ink); color: var(--paper); }

.nav-links .seller-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 80px;
  padding: 32px 0;
  color: var(--muted);
  font-size: 13px;
}
.site-footer .shell { display: flex; justify-content: space-between; align-items: center; }

/* ---------- hero ---------- */

.hero {
  padding: 64px 0 40px;
  border-bottom: 1px solid var(--line);
}
.hero .eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--pine);
  margin-bottom: 14px;
}
.hero h1 {
  font-size: 44px;
  max-width: 720px;
  line-height: 1.08;
}
.hero p.lede {
  max-width: 560px;
  color: var(--ink-soft);
  font-size: 17px;
  margin-top: 16px;
}

/* ---------- filter bar ---------- */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.filter-bar input, .filter-bar select {
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
}
.filter-bar input[type="text"] { flex: 1; min-width: 200px; }
.filter-bar button {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  padding: 10px 18px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
}
.filter-bar .clear {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 14px;
}

/* ---------- product grid ---------- */

.grid-section { padding: 40px 0 60px; }
.result-count { color: var(--muted); font-size: 13px; margin-bottom: 20px; font-family: 'IBM Plex Mono', monospace; }

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

.product-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.product-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(28,28,30,0.08); }

.product-card .thumb {
  aspect-ratio: 4/3;
  background: var(--pine-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .thumb .placeholder { color: var(--pine); font-size: 12px; font-family: 'IBM Plex Mono', monospace; opacity: .6; }

.product-card .body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.product-card .category-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}
.product-card h3 { font-size: 17px; line-height: 1.3; }
.product-card .price { font-size: 14px; color: var(--ink-soft); margin-top: auto; }
.product-card .price .none { color: var(--muted); font-style: italic; font-weight: 400; }

.location-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--pine);
  border-top: 1px dashed var(--line);
  padding-top: 10px;
  margin-top: 6px;
}
.location-tag .pin { width: 10px; height: 10px; flex-shrink: 0; }

.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--muted);
}
.empty-state h3 { color: var(--ink); margin-bottom: 8px; }

/* ---------- product detail ---------- */

.product-detail {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  padding: 48px 0 72px;
}
@media (max-width: 820px) { .product-detail { grid-template-columns: 1fr; gap: 32px; } }

.product-image {
  aspect-ratio: 1/1;
  background: var(--pine-soft);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-image img { width: 100%; height: 100%; object-fit: cover; }
.product-image .placeholder { color: var(--pine); font-family: 'IBM Plex Mono', monospace; opacity: .6; }

.browse-only-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--clay);
  border: 1px solid var(--clay);
  padding: 5px 10px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.product-info .category-tag { font-family: 'IBM Plex Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.product-info h1 { font-size: 32px; margin-top: 8px; }
.product-info .price { font-size: 20px; color: var(--ink-soft); margin-top: 10px; }
.product-info .description { margin-top: 20px; color: var(--ink-soft); font-size: 15.5px; white-space: pre-line; }

.seller-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-top: 28px;
  background: #fff;
}
.seller-card .label { font-family: 'IBM Plex Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; }
.seller-card h3 { font-size: 19px; margin-bottom: 4px; }
.seller-card .owner { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.seller-card .addr {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: var(--pine);
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 12px;
  background: var(--pine-soft);
  border-radius: var(--radius);
}
.seller-card .bio { margin-top: 14px; color: var(--ink-soft); font-size: 14px; }
.seller-card .visit-link { display: inline-block; margin-top: 16px; font-size: 14px; color: var(--pine); border-bottom: 1px solid var(--pine); }

/* ---------- forms ---------- */

.form-page { max-width: 480px; margin: 0 auto; padding: 64px 0 80px; }
.form-page.wide { max-width: 640px; }
.form-page h1 { font-size: 28px; margin-bottom: 8px; }
.form-page .sub { color: var(--muted); font-size: 14px; margin-bottom: 32px; }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 14px;
  font-family: inherit;
  font-size: 15px;
  background: #fff;
  color: var(--ink);
}
.field textarea { resize: vertical; min-height: 100px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 500px) { .field-row { grid-template-columns: 1fr; } }

.field input[type="file"] { font-size: 13px; }

.btn {
  display: inline-block;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  padding: 12px 22px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 15px;
  cursor: pointer;
}
.btn:hover { background: #000; }
.btn.secondary { background: transparent; color: var(--ink); }
.btn.danger { background: transparent; border-color: var(--clay); color: var(--clay); }
.btn.danger:hover { background: var(--clay); color: #fff; }
.btn-row { display: flex; gap: 10px; margin-top: 24px; }

.error-banner {
  background: #fbeae5;
  border: 1px solid var(--clay);
  color: var(--clay);
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 22px;
}

.form-foot { margin-top: 22px; font-size: 14px; color: var(--muted); }
.form-foot a { color: var(--pine); border-bottom: 1px solid var(--pine); }

/* ---------- dashboard ---------- */

.dash-header { display: flex; justify-content: space-between; align-items: flex-end; padding: 48px 0 24px; border-bottom: 1px solid var(--line); }
.dash-header h1 { font-size: 28px; }
.dash-header .sub { color: var(--muted); font-size: 14px; margin-top: 6px; }

.dash-table { width: 100%; border-collapse: collapse; margin-top: 28px; }
.dash-table th {
  text-align: left;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.dash-table td { padding: 14px 12px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.dash-table .prod-thumb {
  width: 48px; height: 48px; border-radius: var(--radius); object-fit: cover; background: var(--pine-soft);
}
.dash-table .actions { display: flex; gap: 14px; }
.dash-table .actions a, .dash-table .actions button {
  font-size: 13px; background: none; border: none; cursor: pointer; color: var(--pine); font-family: inherit; padding: 0;
}
.dash-table .actions .del { color: var(--clay); }

/* ---------- seller profile page ---------- */

.seller-header { padding: 56px 0 32px; border-bottom: 1px solid var(--line); }
.seller-header .label { font-family: 'IBM Plex Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--pine); margin-bottom: 10px; }
.seller-header h1 { font-size: 36px; }
.seller-header .owner { color: var(--muted); font-size: 14px; margin-top: 6px; }
.seller-header .bio { max-width: 600px; color: var(--ink-soft); margin-top: 16px; }
.seller-header .addr { margin-top: 18px; }

/* ---------- misc ---------- */

.section-title { font-size: 20px; margin: 48px 0 20px; }
.tiny-note { font-size: 12.5px; color: var(--muted); margin-top: 10px; }

.four-oh-four { text-align: center; padding: 120px 20px; }
.four-oh-four .code { font-family: 'IBM Plex Mono', monospace; color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.four-oh-four h1 { font-size: 32px; margin-bottom: 16px; }
