/* 山石集 / Mountain Specimens — storefront styles */
:root {
  --bg: #f7f5f1;
  --bg-soft: #efece6;
  --paper: #ffffff;
  --ink: #1c1b19;
  --ink-muted: #6b6560;
  --line: #e2ddd4;
  --accent: #3d4a3a;
  --accent-soft: #5a6b55;
  --sold: #9a6b5c;
  --self: #4a6b5c;
  --curated: #8a6a3f;
  --value: #3f6a7a;
  --radius: 12px;
  --shadow: 0 8px 28px rgba(28, 27, 25, 0.06);
  --font-sans: "Noto Sans TC", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-serif: "Noto Serif TC", "Iowan Old Style", Georgia, serif;
  --max: 1120px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.25;
  margin: 0 0 0.5em;
}
p { margin: 0 0 1em; }
.muted { color: var(--ink-muted); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(247, 245, 241, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
}
.brand {
  display: flex; flex-direction: column; gap: 0;
  min-width: 0;
}
.brand-zh { font-family: var(--font-serif); font-size: 1.15rem; letter-spacing: 0.08em; }
.brand-en { font-size: 0.7rem; color: var(--ink-muted); letter-spacing: 0.04em; }
.nav {
  display: flex; flex-wrap: wrap; gap: 0.35rem 1rem;
  align-items: center;
  font-size: 0.9rem;
}
.nav a { color: var(--ink-muted); transition: color .15s; }
.nav a:hover, .nav a.active { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 0.6rem; }
.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--paper);
}
.lang-switch button {
  border: 0; background: transparent;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  color: var(--ink-muted);
  font-size: 0.78rem;
}
.lang-switch button.active {
  background: var(--accent);
  color: #fff;
}
.cart-link {
  position: relative;
  font-size: 0.9rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
}
.cart-count {
  display: inline-flex;
  min-width: 1.2em;
  justify-content: center;
  margin-left: 0.25em;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
}
.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
}

/* Layout */
.container { max-width: var(--max); margin: 0 auto; padding: 2rem 1.25rem 4rem; }
.section { margin-bottom: 3.5rem; }
.section-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem; margin-bottom: 1.25rem;
}
.section-head h2 { margin: 0; font-size: 1.55rem; }
.link-more { font-size: 0.9rem; color: var(--accent-soft); border-bottom: 1px solid transparent; }
.link-more:hover { border-color: var(--accent-soft); }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
  padding: 2.5rem 0 1rem;
}
.hero-copy h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 0.6em;
}
.hero-copy .lede { font-size: 1.05rem; color: var(--ink-muted); max-width: 32ch; }
.hero-visual {
  aspect-ratio: 4/5;
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  background: linear-gradient(145deg, #d9d3c8, #b8c0b4 45%, #8a9588);
  box-shadow: var(--shadow);
  position: relative;
}
.hero-visual::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,.35), transparent 45%),
    radial-gradient(circle at 70% 70%, rgba(40,50,35,.2), transparent 50%);
}
.hero-visual .label {
  position: absolute; left: 1rem; bottom: 1rem; z-index: 1;
  background: rgba(255,255,255,.85);
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, opacity .15s;
  font-size: 0.92rem;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: #2f3a2d; }
.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover:not(:disabled) { border-color: var(--ink-muted); }
.btn-danger { background: #fff; border-color: #e0c4bc; color: var(--sold); }

/* Cards / grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
  display: flex; flex-direction: column;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-media {
  aspect-ratio: 1;
  background: var(--bg-soft);
  position: relative;
  overflow: hidden;
}
.card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.ph-mineral {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,.5), transparent 40%),
    linear-gradient(160deg, #cfc8bc, #9aa391 55%, #6f7a6c);
  color: rgba(255,255,255,.85);
  font-family: var(--font-serif);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}
.badge {
  position: absolute; top: 0.7rem; left: 0.7rem;
  font-size: 0.7rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  letter-spacing: 0.04em;
}
.badge-sold { color: var(--sold); }
.badge-self { color: var(--self); }
.badge-curated { color: var(--curated); }
.badge-value { color: var(--value); }
.card-body { padding: 1rem 1.05rem 1.2rem; flex: 1; display: flex; flex-direction: column; gap: 0.35rem; }
.card-title { font-family: var(--font-serif); font-size: 1.05rem; margin: 0; }
.card-meta { font-size: 0.82rem; color: var(--ink-muted); }
.card-price { margin-top: auto; font-weight: 600; font-size: 0.95rem; padding-top: 0.5rem; }
.price-usd { font-weight: 400; font-size: 0.8rem; color: var(--ink-muted); margin-left: 0.35rem; }
.price-sold { color: var(--sold); font-weight: 500; }
.price-sold s { color: var(--ink-muted); font-weight: 400; margin-right: 0.35rem; }
.badge-inline { font-size: 0.78rem; letter-spacing: 0.04em; }
.card-sold { opacity: 0.92; }
.card-media .badge + .badge { top: 2.35rem; }

/* Highlight band */
.highlight {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: 2rem;
  align-items: center;
}
.highlight-visual {
  aspect-ratio: 5/4;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #a8b5a4, #d6d0c4 60%, #ece7df);
}

/* Type chips */
.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chip {
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 0.88rem;
  color: var(--ink-muted);
  transition: all .15s;
}
.chip:hover, .chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Filters */
.filters {
  display: flex; flex-wrap: wrap; gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.filters label {
  display: flex; flex-direction: column; gap: 0.25rem;
  font-size: 0.75rem; color: var(--ink-muted);
}
.filters select, .filters input[type="search"] {
  min-width: 140px;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}
.result-count { font-size: 0.85rem; color: var(--ink-muted); margin-bottom: 1rem; }

/* Product detail */
.product-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: start;
}
.gallery-main {
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs {
  display: flex; gap: 0.5rem; margin-top: 0.75rem; flex-wrap: wrap;
}
.gallery-thumbs button {
  width: 64px; height: 64px; padding: 0;
  border: 2px solid transparent;
  border-radius: 8px; overflow: hidden;
  cursor: pointer; background: var(--bg-soft);
}
.gallery-thumbs button.active { border-color: var(--accent); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
  margin: 1.25rem 0;
  padding: 1rem;
  background: var(--bg-soft);
  border-radius: var(--radius);
  font-size: 0.9rem;
}
.specs dt { color: var(--ink-muted); font-size: 0.75rem; }
.specs dd { margin: 0.1rem 0 0; }
.product-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }
.sold-banner {
  display: inline-block;
  margin: 0.5rem 0 1rem;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  background: #f3e6e1;
  color: var(--sold);
  font-size: 0.88rem;
}

/* Cart */
.cart-table { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.cart-table th, .cart-table td { padding: 0.9rem 1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cart-table th { font-size: 0.75rem; color: var(--ink-muted); font-weight: 500; background: var(--bg-soft); }
.cart-item-info { display: flex; gap: 0.85rem; align-items: center; }
.cart-item-info .thumb {
  width: 56px; height: 56px; border-radius: 8px; overflow: hidden; background: var(--bg-soft); flex-shrink: 0;
}
.cart-item-info .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-summary {
  margin-top: 1.5rem;
  max-width: 360px;
  margin-left: auto;
  padding: 1.25rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.cart-summary .row { display: flex; justify-content: space-between; margin-bottom: 0.5rem; }
.checkout-form {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 0.85rem;
  max-width: 520px;
}
.checkout-form label { display: grid; gap: 0.3rem; font-size: 0.85rem; color: var(--ink-muted); }
.checkout-form input, .checkout-form textarea, .checkout-form select {
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
}
.toast {
  position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%) translateY(120%);
  background: var(--ink); color: #fff;
  padding: 0.75rem 1.25rem; border-radius: 999px;
  font-size: 0.9rem; z-index: 100;
  transition: transform .25s ease;
  box-shadow: var(--shadow);
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* Field notes */
.note-list { display: grid; gap: 1.25rem; }
.note-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.note-card time { font-size: 0.8rem; color: var(--ink-muted); }
.note-card h3 { margin: 0.35rem 0 0.75rem; font-size: 1.25rem; }

/* About */
.prose { max-width: 62ch; }
.prose h2 { margin-top: 2rem; }
.prose .panel {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  white-space: pre-line;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 1.25rem;
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.85rem;
}
.site-footer a { text-decoration: underline; text-underline-offset: 2px; }

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--ink-muted);
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* Admin listing guide (storefront mock page) */
.steps { counter-reset: step; display: grid; gap: 1rem; }
.step {
  counter-increment: step;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  padding: 1.15rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.step::before {
  content: counter(step);
  width: 2rem; height: 2rem;
  border-radius: 50%;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  font-size: 0.85rem;
}
.admin-form-mock {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 0.85rem;
  opacity: 0.92;
  pointer-events: none;
}
.admin-form-mock label { display: grid; gap: 0.3rem; font-size: 0.85rem; color: var(--ink-muted); }
.admin-form-mock input, .admin-form-mock textarea, .admin-form-mock select {
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.callout {
  padding: 1rem 1.15rem;
  background: #eef2ec;
  border-radius: var(--radius);
  border: 1px solid #d5ddd2;
  margin: 1rem 0 1.5rem;
}
.callout a { color: var(--accent); text-decoration: underline; }

@media (max-width: 860px) {
  .hero, .highlight, .product-layout { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 1rem 1.25rem;
    flex-direction: column;
    align-items: flex-start;
  }
  .nav.open { display: flex; }
  .header-inner { position: relative; }
  .specs { grid-template-columns: 1fr; }
  .form-row-2 { grid-template-columns: 1fr; }
  .cart-table thead { display: none; }
  .cart-table tr { display: block; padding: 0.75rem 0; }
  .cart-table td { display: block; border: 0; padding: 0.25rem 1rem; }
}

/* Curated highlight */
.highlight-curated .highlight-visual {
  background: linear-gradient(135deg, #c9b38f, #e3d8c6 60%, #f1ece3);
}
.highlight h2 small.jp-accent {
  font-size: 0.8rem; font-weight: 400; color: var(--ink-muted);
  margin-left: 0.6rem; letter-spacing: 0.12em; vertical-align: middle;
}
.hl-actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-top: 1rem; }
.jp-eyebrow { font-size: 0.8rem; letter-spacing: 0.2em; color: var(--ink-muted); margin: 0 0 0.4rem; }
.site-footer .jp-accent { opacity: 0.7; }
/* Japanese accents: zh UI only */
html[data-lang="en"] .jp-accent { display: none; }
