/* ============================================================
   LOT CULTURE — design system
   Reference: weber71.stores.jp (image-led, minimal, quiet)
   ============================================================ */

:root {
  --bg: #ffffff;
  --ink: #141414;
  --muted: #6b6b6b;
  --border: #e5e5e5;
  --sold: #9a9a9a;
  --accent: #141414;
  --font: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --maxw: 1280px;
  --pad: clamp(16px, 4vw, 48px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { opacity: 0.7; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}

.hidden { display: none !important; }

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 28px var(--pad) 20px;
  border-bottom: 1px solid var(--border);
}

.wordmark {
  font-size: clamp(18px, 2.4vw, 24px);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav { display: flex; gap: 20px; }
.nav-link {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav-link.active { color: var(--ink); }

/* ---------- Page / Grid ---------- */
.page {
  flex: 1;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px var(--pad) 64px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: clamp(16px, 2.5vw, 32px);
}

.card { display: block; }

.card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f4f4f4;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.card:hover .card-media img { transform: scale(1.03); }

.card-info { padding: 10px 0 0; }

.card-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-price { font-size: 13px; color: var(--muted); margin-top: 2px; }

.card-sold .card-title { color: var(--sold); }

.sold-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sold);
  margin-top: 2px;
}

/* ---------- Empty state ---------- */
.empty-state {
  padding: 96px 0;
  text-align: center;
}
.empty-title {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}
.empty-sub { font-size: 15px; color: var(--muted); }

/* ---------- Detail page ---------- */
.back-link {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 28px;
}

.detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}

.detail-gallery { min-width: 0; }

.detail-main-img {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f4f4f4;
}
.detail-main-img img { width: 100%; height: 100%; object-fit: cover; }

.detail-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  overflow-x: auto;
}
.thumb {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  border: 1px solid transparent;
  cursor: pointer;
  padding: 0;
  background: #f4f4f4;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.active { border-color: var(--ink); }

.detail-info { min-width: 0; }

.detail-title {
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 8px;
}

.detail-price { font-size: 17px; margin-bottom: 20px; }
.detail-price.sold { color: var(--sold); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; }

.detail-desc {
  font-size: 14.5px;
  color: #333;
  white-space: pre-wrap;
  word-break: break-word;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.detail-meta {
  font-size: 13px;
  color: var(--muted);
  display: grid;
  gap: 6px;
  margin-bottom: 28px;
}

.cta {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 15px 32px;
  border: none;
  cursor: pointer;
}
.cta:hover { opacity: 0.85; }
.cta:disabled { background: #dcdcdc; color: #9a9a9a; cursor: not-allowed; }
.cta-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
  margin-left: 10px;
}

.cta.added { background: #2e7d32; }

.detail-ctas { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; }

/* ---------- Cart badge ---------- */
.cart-badge {
  display: inline-block;
  min-width: 16px;
  padding: 0 5px;
  margin-left: 4px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  color: #fff;
  background: var(--ink);
  border-radius: 999px;
  line-height: 16px;
}

/* ---------- Cart page ---------- */
.page-title { font-size: clamp(20px, 3vw, 26px); font-weight: 600; margin-bottom: 24px; }

.cart-wrap { display: grid; gap: 24px; }
.cart-list { display: grid; }

.cart-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.cart-row img { width: 72px; height: 72px; object-fit: cover; background: #f4f4f4; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-title { font-size: 14px; font-weight: 500; }
.cart-item-price { font-size: 13px; color: var(--muted); margin-top: 2px; }
.cart-remove {
  border: none;
  background: none;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  padding: 6px;
}
.cart-remove:hover { color: var(--ink); text-decoration: underline; }

.cart-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
}
.cart-total { font-size: 16px; font-weight: 600; }
.cart-ctas { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px var(--pad) 40px;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: baseline;
  justify-content: space-between;
}
.footer-brand { font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; font-size: 13px; }
.footer-links { display: flex; gap: 18px; font-size: 13px; color: var(--muted); }
.footer-note { font-size: 12px; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .detail { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .card-title { font-size: 13px; }
  .card-price, .sold-tag { font-size: 12px; }
  .site-header { padding-top: 20px; }
  .nav { gap: 14px; }
  .cta { width: 100%; text-align: center; }
  .cta-ghost { margin-left: 0; margin-top: 10px; width: 100%; }
}
