:root {
  --bg: #faf7f3;
  --surface: #ffffff;
  --ink: #2b2723;
  --ink-soft: #6f675e;
  --line: #e8e1d8;
  --accent: #b3705a;
  --accent-dark: #96543f;
  --accent-soft: #f3e4dd;
  --ok: #4e7d5b;
  --danger: #b04a3a;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(43, 39, 35, .07);
  --font-body: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --font-logo: "Cormorant Garamond", serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.75;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 15px; }

.container { width: min(1080px, 100% - 40px); margin-inline: auto; }
@media (max-width: 640px) { .container { width: min(1080px, 100% - 32px); } }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 247, 243, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 18px;
  padding: 14px 0;
}
.logo {
  font-family: var(--font-logo);
  font-size: 26px; font-weight: 600; letter-spacing: .12em;
  color: var(--ink);
}
.logo span { color: var(--accent); }
.header-search { flex: 1; max-width: 340px; margin-left: auto; position: relative; }
.header-search input {
  width: 100%; padding: 9px 38px 9px 14px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); outline: none;
}
.header-search input:focus { border-color: var(--accent); }
.header-search button {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  background: none; border: none; padding: 6px; color: var(--ink-soft);
}
.header-icons { display: flex; gap: 4px; }
.icon-btn {
  position: relative; display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  color: var(--ink); transition: background .2s;
}
.icon-btn:hover { background: var(--accent-soft); }
.badge {
  position: absolute; top: 2px; right: 0;
  min-width: 17px; height: 17px; padding: 0 4px;
  background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 17px;
  border-radius: 999px; text-align: center;
}
.badge:empty { display: none; }

.gnav { border-top: 1px solid var(--line); overflow-x: auto; }
.gnav ul { display: flex; gap: 4px; list-style: none; padding: 0; white-space: nowrap; }
.gnav a {
  display: block; padding: 10px 14px;
  font-size: 13px; letter-spacing: .08em; color: var(--ink-soft);
}
.gnav a:hover, .gnav a.active { color: var(--accent); }

@media (max-width: 640px) {
  .header-inner { flex-wrap: wrap; gap: 10px; padding: 12px 0 10px; }
  .logo { font-size: 22px; }
  .header-search { order: 3; max-width: none; flex-basis: 100%; }
}

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(120deg, #f6ece4, #ecdfd6 55%, #e6d2c4);
  border-radius: 0 0 28px 28px;
}
.hero-inner { padding: 72px 0 84px; position: relative; }
.hero-kicker { font-size: 13px; letter-spacing: .3em; color: var(--accent-dark); margin-bottom: 14px; }
.hero h1 {
  font-family: var(--font-logo);
  font-size: clamp(34px, 6vw, 58px); font-weight: 500;
  letter-spacing: .06em; line-height: 1.25; margin-bottom: 18px;
}
.hero p { color: var(--ink-soft); max-width: 460px; margin-bottom: 30px; }
.hero-deco {
  position: absolute; right: -60px; top: -60px;
  width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(179, 112, 90, .18), transparent 65%);
}
@media (max-width: 640px) { .hero-inner { padding: 48px 0 56px; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 30px; border-radius: 999px;
  font-size: 14px; font-weight: 700; letter-spacing: .06em;
  border: 1px solid transparent; transition: all .2s;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); }
.btn-outline { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-sm { padding: 8px 18px; font-size: 13px; }

/* ---------- sections ---------- */
.section { padding: 56px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 26px; }
.section-title { font-family: var(--font-logo); font-size: 28px; font-weight: 600; letter-spacing: .1em; }
.section-title small { display: block; font-family: var(--font-body); font-size: 12px; color: var(--ink-soft); letter-spacing: .2em; margin-top: 2px; }
.section-link { font-size: 13px; color: var(--accent); letter-spacing: .05em; }

/* ---------- category tiles ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.cat-tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 10px 18px; text-align: center; transition: all .2s;
}
.cat-tile:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow); }
.cat-tile svg { width: 44px; height: 44px; margin: 0 auto 10px; color: var(--accent); }
.cat-tile span { font-size: 13px; letter-spacing: .05em; }
@media (max-width: 640px) { .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; } }

/* ---------- product grid ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px 18px; }
@media (max-width: 900px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .product-grid { grid-template-columns: repeat(2, 1fr); gap: 18px 12px; } }

.card { position: relative; }
.card-media {
  position: relative; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 3 / 4; background: #eee; margin-bottom: 10px;
}
.card-media svg { width: 100%; height: 100%; }
.card:hover .card-media { box-shadow: var(--shadow); }
.card-tag {
  position: absolute; top: 10px; left: 10px;
  font-size: 11px; font-weight: 700; letter-spacing: .1em;
  padding: 3px 10px; border-radius: 999px; background: var(--ink); color: #fff;
}
.card-tag.sale { background: var(--danger); }
.fav-btn {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.9); border: none;
  display: grid; place-items: center; color: #b8afa5; transition: color .2s;
}
.fav-btn.on { color: var(--danger); }
.card-name { font-size: 13.5px; margin-bottom: 2px; }
.card-cat { font-size: 11px; color: var(--ink-soft); letter-spacing: .08em; }
.card-price { font-size: 14px; font-weight: 700; margin-top: 2px; }
.card-price .old { font-weight: 400; color: var(--ink-soft); text-decoration: line-through; font-size: 12px; margin-right: 6px; }
.card-price .now.sale { color: var(--danger); }
.card-colors { display: flex; gap: 4px; margin-top: 6px; }
.card-colors i { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0,0,0,.12); }

/* ---------- features ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 22px;
}
.feature svg { width: 30px; height: 30px; color: var(--accent); margin-bottom: 12px; }
.feature h3 { font-size: 15px; margin-bottom: 6px; }
.feature p { font-size: 13px; color: var(--ink-soft); }
@media (max-width: 640px) { .feature-grid { grid-template-columns: 1fr; } }

/* ---------- page head ---------- */
.page-head { padding: 40px 0 8px; }
.page-title { font-family: var(--font-logo); font-size: 30px; font-weight: 600; letter-spacing: .1em; }
.page-title small { display: block; font-family: var(--font-body); font-size: 12px; color: var(--ink-soft); letter-spacing: .2em; }
.breadcrumb { font-size: 12px; color: var(--ink-soft); margin-top: 8px; }
.breadcrumb a:hover { color: var(--accent); }

/* ---------- products page ---------- */
.toolbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding: 18px 0 24px;
}
.chip {
  padding: 7px 16px; border-radius: 999px; font-size: 13px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft);
  transition: all .2s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.toolbar select {
  margin-left: auto; padding: 8px 12px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--surface); outline: none;
}
.result-note { font-size: 13px; color: var(--ink-soft); margin-bottom: 16px; }
.empty {
  text-align: center; padding: 70px 20px; color: var(--ink-soft);
  background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius);
}

/* ---------- product detail ---------- */
.detail { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; padding: 36px 0 60px; }
@media (max-width: 800px) { .detail { grid-template-columns: 1fr; gap: 24px; } }
.detail-media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 3 / 4; position: sticky; top: 120px; }
@media (max-width: 800px) { .detail-media { position: static; aspect-ratio: 4 / 4.2; } }
.detail-media svg { width: 100%; height: 100%; }
.detail-cat { font-size: 12px; letter-spacing: .15em; color: var(--accent); margin-bottom: 6px; }
.detail-name { font-size: 24px; font-weight: 700; line-height: 1.4; margin-bottom: 10px; }
.detail-price { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.detail-price .old { font-size: 15px; font-weight: 400; color: var(--ink-soft); text-decoration: line-through; margin-right: 8px; }
.detail-price .sale { color: var(--danger); }
.tax-note { font-size: 12px; color: var(--ink-soft); margin-bottom: 20px; }
.detail-desc { color: var(--ink-soft); font-size: 14px; margin-bottom: 26px; }
.opt-label { font-size: 13px; font-weight: 700; margin-bottom: 8px; letter-spacing: .05em; }
.opt-label span { color: var(--ink-soft); font-weight: 400; margin-left: 8px; }
.color-opts { display: flex; gap: 10px; margin-bottom: 20px; }
.color-opt {
  width: 34px; height: 34px; border-radius: 50%; border: 2px solid transparent;
  outline: 1px solid rgba(0,0,0,.1); outline-offset: -1px; padding: 0;
  transition: transform .15s;
}
.color-opt.active { border-color: var(--surface); outline: 2px solid var(--ink); transform: scale(1.1); }
.size-opts { display: flex; gap: 8px; margin-bottom: 8px; }
.size-opt {
  min-width: 52px; padding: 9px 0; text-align: center;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  font-size: 14px; font-weight: 600; transition: all .15s;
}
.size-opt.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.size-opt:disabled { opacity: .35; text-decoration: line-through; cursor: not-allowed; }
.stock-note { font-size: 12.5px; margin-bottom: 22px; min-height: 20px; }
.stock-note.ok { color: var(--ok); }
.stock-note.low { color: var(--danger); }
.qty-row { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.qty-ctl { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.qty-ctl button { width: 38px; height: 38px; border: none; background: none; font-size: 17px; color: var(--ink-soft); }
.qty-ctl span { min-width: 34px; text-align: center; font-weight: 700; }
.detail-actions { display: flex; gap: 10px; margin-bottom: 30px; }
.detail-actions .btn-primary { flex: 1; }
.fav-lg {
  width: 50px; height: 50px; border-radius: 50%; flex: none;
  border: 1px solid var(--line); background: var(--surface);
  display: grid; place-items: center; color: #b8afa5; transition: all .2s;
}
.fav-lg.on { color: var(--danger); border-color: var(--danger); background: #fdf1ee; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.spec-table th, .spec-table td { padding: 10px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.spec-table th { color: var(--ink-soft); font-weight: 400; width: 96px; }

/* ---------- cart / forms ---------- */
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px;
}
.cart-layout { display: grid; grid-template-columns: 1.8fr 1fr; gap: 24px; align-items: start; padding-bottom: 60px; }
@media (max-width: 800px) { .cart-layout { grid-template-columns: 1fr; } }
.cart-item { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-item:last-child { border-bottom: none; }
.cart-thumb { width: 84px; border-radius: 10px; overflow: hidden; flex: none; aspect-ratio: 3/4; }
.cart-thumb svg { width: 100%; height: 100%; }
.cart-info { flex: 1; min-width: 0; }
.cart-info .name { font-size: 14px; font-weight: 700; }
.cart-info .variant { font-size: 12px; color: var(--ink-soft); margin: 2px 0 8px; }
.cart-info .price { font-size: 14px; font-weight: 700; }
.cart-row-actions { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.link-danger { font-size: 12px; color: var(--danger); background: none; border: none; text-decoration: underline; }
.summary-row { display: flex; justify-content: space-between; font-size: 14px; padding: 7px 0; }
.summary-row.total { font-size: 17px; font-weight: 700; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; }
.summary-note { font-size: 12px; color: var(--ink-soft); margin: 8px 0 16px; }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.form-group label em { font-style: normal; color: var(--danger); font-size: 11px; margin-left: 6px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; outline: none; transition: border-color .2s;
}
.form-group input:focus, .form-group select:focus { border-color: var(--accent); }
.form-hint { font-size: 12px; color: var(--ink-soft); margin-top: 4px; }
.form-error { font-size: 12.5px; color: var(--danger); margin-top: 4px; min-height: 0; }
.form-split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.notice {
  background: var(--accent-soft); border-radius: 10px;
  padding: 12px 16px; font-size: 12.5px; color: var(--accent-dark); margin-bottom: 20px;
}
.auth-wrap { max-width: 440px; margin: 30px auto 70px; }
.auth-switch { text-align: center; font-size: 13px; margin-top: 18px; color: var(--ink-soft); }
.auth-switch a { color: var(--accent); text-decoration: underline; }
.tab-row { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.tab-btn {
  padding: 10px 18px; background: none; border: none; font-size: 14px; font-weight: 700;
  color: var(--ink-soft); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab-btn.active { color: var(--ink); border-bottom-color: var(--accent); }

/* ---------- orders / admin ---------- */
.order-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 16px; overflow: hidden; }
.order-head {
  display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center;
  padding: 13px 18px; background: #f5f0ea; font-size: 12.5px; color: var(--ink-soft);
}
.order-head b { color: var(--ink); }
.order-body { padding: 6px 18px; }
.status-pill { padding: 3px 12px; border-radius: 999px; font-size: 11.5px; font-weight: 700; margin-left: auto; }
.status-pill.paid { background: #e7f0e9; color: var(--ok); }
.status-pill.shipped { background: #e6ecf5; color: #3e5f8a; }
.status-pill.done { background: #eee9e2; color: var(--ink-soft); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
.admin-table th, .admin-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.admin-table th { background: #f5f0ea; font-size: 12px; letter-spacing: .05em; color: var(--ink-soft); white-space: nowrap; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table input[type="number"] { width: 76px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
.admin-table select { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
@media (max-width: 700px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.stat .label { font-size: 12px; color: var(--ink-soft); letter-spacing: .05em; }
.stat .value { font-size: 24px; font-weight: 700; margin-top: 4px; }
.stat .value small { font-size: 13px; font-weight: 400; }

/* ---------- toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 12px 24px; border-radius: 999px;
  font-size: 13.5px; opacity: 0; pointer-events: none; transition: all .3s; z-index: 100;
  max-width: calc(100vw - 40px); text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: #f3eee7; margin-top: 40px; }
.footer-inner { padding: 44px 0 30px; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 30px 60px; margin-bottom: 30px; }
.footer-brand .logo { font-size: 22px; }
.footer-brand p { font-size: 12.5px; color: var(--ink-soft); margin-top: 8px; max-width: 300px; }
.footer-col h4 { font-size: 12px; letter-spacing: .15em; color: var(--ink-soft); margin-bottom: 12px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { font-size: 13px; }
.footer-col a:hover { color: var(--accent); }
.copyright { font-size: 11.5px; color: var(--ink-soft); border-top: 1px solid var(--line); padding-top: 18px; letter-spacing: .05em; }

.mt-0 { margin-top: 0; } .mt-20 { margin-top: 20px; } .mb-60 { margin-bottom: 60px; }
.center { text-align: center; }
