:root {
  --ink: #232120;
  --muted: #6f6a66;
  --line: #e4e1dd;
  --bg: #fff;
  --surface: #f2f2f2;
  --accent: #7a2e35;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { overflow-x: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 1px solid var(--ink); padding: 8px 14px; }
button:disabled { cursor: not-allowed; opacity: .45; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.3; }
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.header-inner { max-width: 1280px; margin: 0 auto; padding: 18px 24px; display: flex; align-items: center; gap: 24px; }
.wordmark { font-family: var(--serif); font-size: 26px; letter-spacing: .14em; text-decoration: none; white-space: nowrap; }
.collection-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-left: auto; }
.cat-btn { border: none; padding: 6px 2px; color: var(--muted); }
.cat-btn.active { color: var(--ink); border-bottom: 1px solid var(--ink); }
.cart-button { white-space: nowrap; }
.status { min-height: 1.6em; margin: 0; padding: 6px 24px; font-size: 14px; color: var(--accent); text-align: center; }
.hero { max-width: 1280px; margin: 0 auto; padding: 48px 24px 40px; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; min-height: 68vh; }
.hero-text { display: flex; flex-direction: column; justify-content: center; }
.hero-eyebrow { font-size: 14px; letter-spacing: .28em; color: var(--muted); margin: 0 0 16px; }
.hero-text h1 { font-size: 44px; margin: 0 0 16px; }
.hero-sub { font-size: 16px; color: var(--muted); margin: 0; }
.hero-figure { margin: 0; min-height: 0; }
.hero-figure img { width: 100%; height: 100%; object-fit: cover; background: var(--surface); }
.preview-notice { max-width: 1280px; margin: 0 auto; padding: 0 24px 24px; font-size: 14px; color: var(--muted); }
.toolbar { max-width: 1280px; margin: 0 auto; padding: 20px 24px; border-top: 1px solid var(--line); }
.toolbar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.toolbar-row label { font-size: 14px; color: var(--muted); }
.toolbar-row input[type="search"] { flex: 1 1 220px; min-width: 0; padding: 9px 12px; border: 1px solid var(--line); background: #fff; }
.toolbar-row select { padding: 9px 12px; border: 1px solid var(--line); background: #fff; }
.result-count { margin: 14px 0 0; font-size: 14px; color: var(--muted); }
#grid-section, #detail-section, .load-error { max-width: 1280px; margin: 0 auto; padding: 8px 24px 64px; }
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px 20px; list-style: none; margin: 0; padding: 0; }
.card { display: block; text-decoration: none; }
.card-img { display: block; aspect-ratio: 2 / 3; background: var(--surface); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-brand { display: block; margin-top: 12px; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.card-name { display: block; margin-top: 4px; font-size: 16px; }
.card-price { display: block; margin-top: 2px; font-size: 16px; }
.card-soldout { display: inline-block; margin-top: 6px; font-size: 14px; color: var(--accent); }
.empty-state { text-align: center; padding: 48px 0; }
.back-link { display: inline-block; margin-bottom: 24px; font-size: 14px; text-decoration: none; border-bottom: 1px solid var(--line); }
.detail-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.detail-img { width: 100%; aspect-ratio: 2 / 3; object-fit: contain; background: var(--surface); }
.detail-brand { font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.detail-name { font-size: 32px; margin: 0 0 12px; }
.detail-price { font-size: 20px; margin: 0 0 16px; }
.detail-desc { margin: 0 0 28px; white-space: pre-line; }
.field-label { display: block; font-size: 14px; color: var(--muted); margin: 20px 0 6px; }
#detail-option, #detail-qty { width: 100%; max-width: 320px; padding: 10px 12px; border: 1px solid var(--line); background: #fff; }
#detail-qty { max-width: 120px; }
.limit-note { font-size: 14px; color: var(--muted); margin: 10px 0 0; }
.line-price { font-size: 18px; margin: 20px 0; }
.add-btn { background: var(--ink); color: #fff; border-color: var(--ink); padding: 14px 28px; }
.soldout-note { color: var(--accent); }
dialog { width: min(580px, 94vw); max-height: 86vh; padding: 0; border: 1px solid var(--line); color: var(--ink); }
dialog::backdrop { background: rgba(0, 0, 0, .45); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 0; font-size: 24px; }
.cart-body { max-height: 52vh; overflow-y: auto; padding: 4px 20px; }
.cart-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-info { flex: 1 1 55%; min-width: 170px; }
.cart-info p { margin: 0; }
.cart-name { font-size: 16px; }
.cart-option, .cart-unit { font-size: 14px; color: var(--muted); }
.cart-qty { display: flex; align-items: center; gap: 8px; }
.qty-btn { width: 32px; height: 32px; padding: 0; text-align: center; }
.cart-qty-num { min-width: 20px; text-align: center; }
.cart-line { margin: 0; min-width: 84px; text-align: right; }
.cart-remove { border: none; padding: 4px 2px; color: var(--muted); text-decoration: underline; }
.cart-empty { padding: 32px 0; text-align: center; color: var(--muted); }
.dialog-foot { padding: 16px 20px 20px; border-top: 1px solid var(--line); }
.cart-total-line { margin: 0 0 8px; font-size: 16px; }
.checkout-note { margin: 0; font-size: 14px; color: var(--muted); }
.load-error { text-align: center; padding: 64px 24px; }
.load-error h2 { font-size: 28px; }
.hero { padding-top: 28px; grid-template-columns: .85fr 1fr 1fr; gap: 16px; min-height: 0; }
.hero-figure { aspect-ratio: 2 / 3; }
.hero-text { padding-right: 28px; }
.hero-text h1 { font-size: clamp(36px, 3vw, 44px); letter-spacing: -.06em; line-height: 1.4; word-break: keep-all; }
.hero-link { align-self: flex-start; margin-top: 34px; padding-bottom: 7px; font-size: 14px; text-decoration: none; border-bottom: 1px solid var(--ink); }
.hero-caption { margin-top: 60px; font-size: 14px; letter-spacing: .14em; color: var(--muted); }
.collection-heading { max-width: 1280px; margin: 36px auto 20px; padding: 0 24px; scroll-margin-top: 30px; }
.collection-heading p { font-size: 14px; letter-spacing: .2em; color: var(--accent); }
.collection-heading h2 { font-family: var(--sans); font-size: 28px; letter-spacing: -.04em; }
.detail-thumbs { display: flex; gap: 12px; margin-top: 12px; }
.detail-thumbs button { width: 72px; padding: 0; border: 1px solid var(--line); }
.detail-thumbs img { aspect-ratio: 2 / 3; object-fit: cover; }
.site-footer { border-top: 1px solid var(--line); padding: 48px max(24px, calc((100vw - 1232px) / 2)); }
.site-footer p, .site-footer span { font-size: 14px; color: var(--muted); }
.status:empty { display: none; }
.status:not(:empty) { position: sticky; top: 0; z-index: 3; background: #f6edef; }
select { appearance: none; padding-right: 34px !important; background-image: url("chevron.svg") !important; background-position: right 12px center !important; background-size: 12px !important; background-repeat: no-repeat !important; }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr 1fr; min-height: 0; gap: 12px; padding-top: 32px; }
  .hero-text { grid-column: 1 / -1; padding-bottom: 24px; }
  .hero-figure img { height: 100%; }
  .hero-caption { display: none; }
  .hero-link { margin-top: 20px; }
  .hero-text h1 { font-size: 34px; }
  .detail-wrap { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 720px) {
  .header-inner { flex-wrap: wrap; gap: 12px; padding: 14px 16px; }
  .collection-nav { order: 3; flex-basis: 100%; margin-left: 0; }
  .hero, .toolbar, #grid-section, #detail-section, .load-error { padding-left: 16px; padding-right: 16px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 24px 12px; }
  .cart-line { min-width: 0; }
}
