@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;1,500;1,600&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  --paper: #f3ede4;
  --paper-2: #ebe3d6;
  --card: #f8f4ee;
  --ink: #1f1a17;
  --ink-2: #5b524b;
  --ink-3: #8c8279;
  --clay: #b5532f;
  --clay-dark: #8f3e20;
  --moss: #4d5a3f;
  --line: rgba(31, 26, 23, .14);
  --display: 'Cormorant Garamond', Georgia, serif;
  --body: 'Manrope', system-ui, sans-serif;
  --wrap: 1280px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
/* Paper grain */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: .35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.45 0 0 0 0 0.38 0 0 0 0 0.3 0 0 0 .18 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
.icon { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------------------------------------------------------------- announce + header */
.announce {
  background: var(--ink); color: var(--paper);
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  text-align: center; padding: 9px 16px;
}
.announce b { color: #e9a07f; font-weight: 600; }

.header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 72px; }
.nav { display: flex; gap: 28px; font-size: 13px; font-weight: 500; letter-spacing: .04em; }
.nav a { position: relative; padding: 4px 0; color: var(--ink-2); transition: color .2s; }
.nav a:hover, .nav a.on { color: var(--ink); }
.nav a.on::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--clay); }
.logo { font-family: var(--display); font-size: 34px; font-weight: 600; letter-spacing: -.01em; line-height: 1; display: flex; align-items: baseline; gap: 2px; }
.logo i { color: var(--clay); font-style: italic; }
.tools { display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
.tool { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 999px; transition: background .2s; font-size: 13px; font-weight: 500; }
.tool:hover { background: var(--paper-2); }
.cart-count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--clay); color: #fff; font-size: 11px; font-weight: 700;
  display: inline-grid; place-items: center;
}
.cart-count.bump { animation: bump .45s var(--ease); }
@keyframes bump { 40% { transform: scale(1.35); } }
.menu-btn { display: none; }

/* ---------------------------------------------------------------- hero */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; padding-block: 64px 88px; }
.eyebrow { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--clay); font-weight: 600; display: flex; align-items: center; gap: 12px; }
.eyebrow::before { content: ''; width: 32px; height: 1px; background: currentColor; }
.hero h1 {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(52px, 7.4vw, 104px); line-height: .92; letter-spacing: -.025em;
  margin: 22px 0 26px;
}
.hero h1 em { color: var(--clay); font-style: italic; }
.hero p { max-width: 440px; color: var(--ink-2); font-size: 17px; }
.hero .cta { display: flex; gap: 14px; margin-top: 36px; flex-wrap: wrap; }
.hero-art { position: relative; }
.hero-art .frame { aspect-ratio: 4/5; border-radius: 240px 240px 6px 6px; overflow: hidden; background: var(--paper-2); }
.hero-art img { width: 100%; height: 100%; object-fit: cover; }
.hero-art .stamp {
  position: absolute; left: -44px; bottom: 64px;
  width: 132px; height: 132px; border-radius: 50%;
  background: var(--clay); color: var(--paper);
  display: grid; place-items: center; text-align: center;
  font-family: var(--display); font-style: italic; font-size: 21px; line-height: 1.05;
  transform: rotate(-10deg);
  box-shadow: 0 18px 40px -18px rgba(143, 62, 32, .7);
}
.hero-meta { display: flex; gap: 40px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); }
.hero-meta b { display: block; font-family: var(--display); font-size: 34px; font-weight: 500; line-height: 1; }
.hero-meta span { font-size: 12px; color: var(--ink-3); letter-spacing: .06em; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 28px; border-radius: 999px;
  font-size: 14px; font-weight: 600; letter-spacing: .02em;
  background: var(--ink); color: var(--paper);
  transition: background .2s, transform .2s var(--ease), opacity .2s;
}
.btn:hover { background: var(--clay); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn.block { width: 100%; }
.link { font-weight: 600; font-size: 13px; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.link:hover { color: var(--clay); }

/* ---------------------------------------------------------------- shop */
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 40px 0 28px; border-top: 1px solid var(--line); }
main > .wrap:first-child .section-head { border-top: 0; }
.section-head h2 { font-family: var(--display); font-weight: 500; font-size: clamp(36px, 4.2vw, 56px); line-height: 1; letter-spacing: -.02em; }
.section-head h2 em { font-style: italic; color: var(--clay); }
.section-head p { color: var(--ink-2); max-width: 360px; font-size: 14px; }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-bottom: 28px; flex-wrap: wrap; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  height: 38px; padding: 0 18px; border-radius: 999px;
  font-size: 13px; font-weight: 500;
  box-shadow: inset 0 0 0 1px var(--line);
  display: inline-flex; align-items: center; gap: 8px;
  transition: all .2s;
}
.chip:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.chip.on { background: var(--ink); color: var(--paper); box-shadow: none; }
.chip small { font-size: 11px; opacity: .55; }
.filters { display: flex; gap: 10px; align-items: center; }
.search { position: relative; }
.search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-3); }
.search input, .select {
  height: 38px; border-radius: 999px; border: 0; background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line); outline: none; font-size: 13px;
}
.search input { width: 220px; padding: 0 16px 0 38px; }
.search input:focus, .select:focus { box-shadow: inset 0 0 0 1px var(--ink); }
.select { padding: 0 34px 0 16px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%231f1a17' fill='none' stroke-width='1.4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 44px 24px; padding-bottom: 96px; }
.grid .card:nth-child(4n+2) { margin-top: 48px; }
.grid .card:nth-child(4n+4) { margin-top: 24px; }
.card { position: relative; opacity: 0; transform: translateY(18px); animation: rise .7s var(--ease) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
.card .media { position: relative; aspect-ratio: 4/5; overflow: hidden; border-radius: 4px; background: var(--paper-2); }
.card .media a { display: block; height: 100%; }
.card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.card:hover .media img { transform: scale(1.05); }
.badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: var(--paper); color: var(--ink);
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px;
}
.badge.sale { background: var(--clay); color: #fff; }
.badge.out { background: var(--ink); color: var(--paper); }
.quick {
  position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 2;
  height: 44px; border-radius: 999px; background: var(--paper); color: var(--ink);
  font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transform: translateY(calc(100% + 16px)); transition: transform .45s var(--ease), background .2s, color .2s;
}
.card:hover .quick, .quick:focus-visible { transform: none; }
.quick:hover { background: var(--ink); color: var(--paper); }
.card .info { display: flex; justify-content: space-between; gap: 12px; padding-top: 14px; }
.card .cat { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.card h3 { font-family: var(--display); font-weight: 600; font-size: 22px; line-height: 1.15; margin-top: 2px; }
.price { white-space: nowrap; font-weight: 600; font-size: 15px; text-align: right; }
.price s { display: block; color: var(--ink-3); font-weight: 400; font-size: 13px; }
.empty { grid-column: 1 / -1; text-align: center; padding: 80px 0; color: var(--ink-2); }
.empty b { display: block; font-family: var(--display); font-size: 32px; font-weight: 500; color: var(--ink); margin-bottom: 6px; }

/* ---------------------------------------------------------------- values strip */
.values { background: var(--moss); color: var(--paper); }
.values .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; padding: 56px 32px; }
.values h4 { font-family: var(--display); font-size: 26px; font-weight: 500; font-style: italic; margin: 14px 0 6px; }
.values p { font-size: 14px; opacity: .75; max-width: 300px; }
.values .icon { width: 28px; height: 28px; stroke-width: 1.3; }

/* ---------------------------------------------------------------- product page */
.crumbs { display: flex; gap: 10px; font-size: 12px; color: var(--ink-3); padding: 28px 0; letter-spacing: .04em; }
.crumbs a:hover { color: var(--ink); }
.pdp { display: grid; grid-template-columns: 1.1fr 1fr; gap: 72px; padding-bottom: 96px; align-items: start; }
.pdp .media { aspect-ratio: 4/5; border-radius: 4px; overflow: hidden; background: var(--paper-2); position: relative; }
.pdp .media img { width: 100%; height: 100%; object-fit: cover; animation: fadein .8s var(--ease); }
@keyframes fadein { from { opacity: 0; transform: scale(1.03); } }
.pdp .body { position: sticky; top: 104px; animation: rise .7s .1s var(--ease) both; }
.pdp h1 { font-family: var(--display); font-weight: 500; font-size: clamp(44px, 5vw, 68px); line-height: .95; letter-spacing: -.02em; margin: 14px 0 20px; }
.pdp .price { text-align: left; font-size: 24px; font-weight: 600; display: flex; align-items: baseline; gap: 12px; }
.pdp .price s { display: inline; font-size: 17px; }
.pdp .desc { color: var(--ink-2); font-size: 16px; margin: 24px 0 28px; max-width: 480px; }
.stock { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; margin-bottom: 20px; }
.stock::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #5b8a3c; }
.stock.low::before { background: #d08a2a; }
.stock.none::before { background: var(--clay); }
.buy { display: flex; gap: 12px; }
.qty { display: inline-flex; align-items: center; height: 52px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); }
.qty button { width: 44px; height: 100%; display: grid; place-items: center; border-radius: 999px; }
.qty button:hover { color: var(--clay); }
.qty span { min-width: 28px; text-align: center; font-weight: 600; }
.qty.sm { height: 34px; }
.qty.sm button { width: 32px; }
.qty.sm .icon { width: 14px; height: 14px; }
.buy .btn { flex: 1; }
.specs { margin-top: 36px; border-top: 1px solid var(--line); }
.specs li { list-style: none; display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.specs li::before { content: '—'; color: var(--clay); }
.perks { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; font-size: 13px; color: var(--ink-2); }
.perks div { display: flex; gap: 10px; align-items: center; }

.related { border-top: 1px solid var(--line); padding-top: 40px; }
.related h2 { font-family: var(--display); font-size: 40px; font-weight: 500; margin-bottom: 28px; }
.related h2 em { font-style: italic; color: var(--clay); }
.related .grid { grid-template-columns: repeat(4, 1fr); }
.related .grid .card { margin-top: 0 !important; }

/* ---------------------------------------------------------------- drawer */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(31, 26, 23, .4); opacity: 0; pointer-events: none; transition: opacity .35s; }
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 70;
  width: min(440px, 100vw); background: var(--paper);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform .5s var(--ease), visibility 0s .5s;
}
.drawer.open { transform: none; visibility: visible; transition: transform .5s var(--ease); box-shadow: -30px 0 60px -30px rgba(0, 0, 0, .3); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 22px 28px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { font-family: var(--display); font-size: 30px; font-weight: 500; }
.drawer-head h3 em { font-style: italic; color: var(--clay); font-size: 22px; margin-left: 6px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; transition: background .2s; }
.icon-btn:hover { background: var(--paper-2); }
.ship-bar { padding: 16px 28px; font-size: 13px; border-bottom: 1px solid var(--line); }
.ship-bar .track { height: 3px; background: var(--paper-2); border-radius: 2px; margin-top: 10px; overflow: hidden; }
.ship-bar .track i { display: block; height: 100%; background: var(--clay); transition: width .5s var(--ease); }
.drawer-items { flex: 1; overflow-y: auto; padding: 8px 28px; }
.line { display: grid; grid-template-columns: 76px 1fr auto; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: start; }
.line img { width: 76px; height: 95px; object-fit: cover; border-radius: 3px; background: var(--paper-2); }
.line h4 { font-family: var(--display); font-size: 19px; font-weight: 600; line-height: 1.15; margin-bottom: 4px; }
.line .unit { font-size: 12px; color: var(--ink-3); margin-bottom: 10px; }
.line .right { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; height: 100%; gap: 8px; font-weight: 600; }
.remove { font-size: 12px; color: var(--ink-3); text-decoration: underline; text-underline-offset: 3px; font-weight: 500; }
.remove:hover { color: var(--clay); }
.drawer-empty { text-align: center; padding: 72px 12px; color: var(--ink-2); }
.drawer-empty b { display: block; font-family: var(--display); font-size: 28px; font-weight: 500; color: var(--ink); margin-bottom: 8px; }
.drawer-empty .btn { margin-top: 24px; }
.drawer-foot { padding: 22px 28px 28px; border-top: 1px solid var(--line); background: var(--card); }
.row { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.row.total { font-size: 18px; font-weight: 700; padding: 12px 0 18px; }
.muted { color: var(--ink-3); }

/* ---------------------------------------------------------------- checkout */
.checkout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 64px; padding: 16px 0 96px; align-items: start; }
.checkout h1 { font-family: var(--display); font-size: clamp(44px, 5vw, 64px); font-weight: 500; line-height: 1; letter-spacing: -.02em; margin-bottom: 32px; }
.checkout h1 em { font-style: italic; color: var(--clay); }
.fieldset { margin-bottom: 36px; }
.fieldset h2 { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; margin-bottom: 18px; display: flex; align-items: center; gap: 12px; }
.fieldset h2 span { width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-size: 11px; letter-spacing: 0; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fields .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 6px; color: var(--ink-2); }
.field input, .field textarea {
  width: 100%; height: 50px; padding: 0 16px; border: 0; border-radius: 6px;
  background: var(--card); box-shadow: inset 0 0 0 1px var(--line); outline: none; transition: box-shadow .2s;
}
.field textarea { height: 90px; padding: 14px 16px; resize: vertical; }
.field input:focus, .field textarea:focus { box-shadow: inset 0 0 0 1.5px var(--ink); }
.field.err input, .field.err textarea { box-shadow: inset 0 0 0 1.5px var(--clay); }
.field .msg { font-size: 12px; color: var(--clay); margin-top: 4px; min-height: 0; }
.pay { display: grid; gap: 10px; }
.pay label {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 6px;
  background: var(--card); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; font-size: 14px;
}
.pay label:has(input:checked) { box-shadow: inset 0 0 0 1.5px var(--ink); }
.pay label.disabled { opacity: .5; cursor: not-allowed; }
.pay input { accent-color: var(--clay); width: 18px; height: 18px; }
.pay small { margin-left: auto; color: var(--ink-3); font-size: 12px; }
.summary { position: sticky; top: 104px; background: var(--card); border-radius: 6px; padding: 28px; box-shadow: inset 0 0 0 1px var(--line); }
.summary h3 { font-family: var(--display); font-size: 28px; font-weight: 500; margin-bottom: 8px; }
.summary .line { grid-template-columns: 60px 1fr auto; }
.summary .line img { width: 60px; height: 75px; }
.summary .line h4 { font-size: 17px; }
.summary .totals { padding-top: 14px; }
.form-error { background: #f6ddd2; color: var(--clay-dark); padding: 14px 16px; border-radius: 6px; font-size: 14px; margin-bottom: 16px; display: none; }
.form-error.show { display: block; }

.done { max-width: 640px; margin: 0 auto; text-align: center; padding: 72px 0 120px; animation: rise .7s var(--ease) both; }
.done .seal { width: 88px; height: 88px; border-radius: 50%; background: var(--moss); color: var(--paper); display: grid; place-items: center; margin: 0 auto 28px; }
.done .seal .icon { width: 36px; height: 36px; }
.done h1 { font-family: var(--display); font-weight: 500; font-size: clamp(44px, 6vw, 72px); line-height: 1; margin-bottom: 18px; }
.done h1 em { font-style: italic; color: var(--clay); }
.done p { color: var(--ink-2); font-size: 16px; }
.done .num { display: inline-block; margin: 24px 0 32px; padding: 10px 20px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font-weight: 700; letter-spacing: .08em; }

/* ---------------------------------------------------------------- admin */
.admin { padding-block: 40px 96px; width: 100%; }
.admin h1 { font-family: var(--display); font-size: 52px; font-weight: 500; line-height: 1; margin-bottom: 8px; }
.admin h1 em { font-style: italic; color: var(--clay); }
.login { max-width: 380px; margin: 80px auto; display: grid; gap: 14px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 28px 0 32px; }
.stat { background: var(--card); box-shadow: inset 0 0 0 1px var(--line); border-radius: 6px; padding: 20px; }
.stat span { font-size: 12px; color: var(--ink-3); letter-spacing: .08em; text-transform: uppercase; }
.stat b { display: block; font-family: var(--display); font-size: 40px; font-weight: 500; line-height: 1.1; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; padding: 12px; border-bottom: 1px solid var(--ink); }
.table td { padding: 16px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table td small { display: block; color: var(--ink-3); font-size: 12px; }
.table .select { height: 34px; }
.status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

/* ---------------------------------------------------------------- footer + toast */
.footer { background: var(--ink); color: var(--paper); margin-top: auto; }
.footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding: 64px 32px 40px; }
.footer .logo { font-size: 44px; }
.footer .logo i { color: #e9a07f; }
.footer p { font-size: 13px; opacity: .6; margin-top: 12px; max-width: 280px; }
.footer h5 { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; opacity: .5; margin-bottom: 14px; font-weight: 600; }
.footer li { list-style: none; font-size: 14px; padding: 4px 0; opacity: .85; }
.footer li a:hover { color: #e9a07f; }
.footer .legal { border-top: 1px solid rgba(243, 237, 228, .12); padding: 20px 32px; font-size: 12px; opacity: .5; max-width: var(--wrap); margin: 0 auto; display: flex; justify-content: space-between; }

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 80;
  transform: translate(-50%, calc(100% + 48px)); transition: transform .5s var(--ease);
  background: var(--ink); color: var(--paper); border-radius: 999px;
  padding: 12px 14px 12px 22px; font-size: 14px; display: flex; align-items: center; gap: 16px;
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .6);
}
.toast.show { transform: translate(-50%, 0); }
.toast button { background: var(--paper); color: var(--ink); border-radius: 999px; padding: 6px 14px; font-size: 12px; font-weight: 700; }

.skeleton { background: linear-gradient(90deg, var(--paper-2), var(--card), var(--paper-2)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 4px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1040px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .grid .card { margin-top: 0 !important; }
  .grid .card:nth-child(3n+2) { margin-top: 36px !important; }
  .related .grid .card:nth-child(4) { display: none; }
  .related .grid { grid-template-columns: repeat(3, 1fr); }
  .pdp, .checkout { gap: 40px; }
}
@media (max-width: 820px) {
  .wrap { padding: 0 20px; }
  .header .wrap { grid-template-columns: auto 1fr auto; height: 64px; }
  .menu-btn { display: inline-flex; }
  .nav {
    position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px 20px 16px; display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; font-size: 15px; border-bottom: 1px solid var(--line); }
  .nav a.on::after { display: none; }
  .logo { justify-self: center; font-size: 30px; }
  .tool .label { display: none; }
  .hero { grid-template-columns: 1fr; padding-block: 24px 56px; gap: 40px; }
  .hero-art { order: -1; max-width: 420px; margin: 0 auto; width: 100%; }
  .hero-art .stamp { left: -10px; width: 104px; height: 104px; font-size: 17px; }
  .hero-meta { gap: 24px; }
  .section-head { flex-direction: column; align-items: start; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -20px; padding: 0 20px; scrollbar-width: none; }
  .chip { flex: none; }
  .filters { width: 100%; }
  .search { flex: 1; }
  .search input { width: 100%; }
  .grid, .related .grid { grid-template-columns: repeat(2, 1fr); gap: 32px 14px; }
  .grid .card { margin-top: 0 !important; }
  .related .grid .card:nth-child(n+3) { display: none; }
  .quick { transform: none; height: 38px; left: 8px; right: 8px; bottom: 8px; font-size: 12px; }
  .card h3 { font-size: 18px; }
  .card .info { flex-direction: column; gap: 4px; }
  .price { text-align: left; }
  .price s { display: inline; margin-left: 6px; }
  .pdp, .checkout { grid-template-columns: 1fr; }
  .pdp .body, .summary { position: static; }
  .checkout .summary { order: -1; }
  .fields { grid-template-columns: 1fr; }
  .values .wrap { grid-template-columns: 1fr; gap: 28px; padding: 44px 20px; }
  .footer .wrap { grid-template-columns: 1fr 1fr; padding: 48px 20px 32px; }
  .footer .wrap > :first-child { grid-column: 1 / -1; }
  .footer .legal { flex-direction: column; gap: 6px; padding: 20px; }
  .stats { grid-template-columns: 1fr; }
  .table-wrap { overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------------------------------------------------------------- chat widget */
.chat-fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 55;
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: var(--clay); color: var(--paper); box-shadow: 0 10px 30px rgba(143, 62, 32, .35);
  transition: transform .25s var(--ease), background .2s;
}
.chat-fab:hover { background: var(--clay-dark); transform: translateY(-2px); }
.chat-fab .icon { width: 24px; height: 24px; }
.chat-badge {
  position: absolute; top: -2px; right: -2px; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 11px; font-weight: 700;
  display: none; place-items: center; box-shadow: 0 0 0 3px var(--paper);
}
.chat-badge.show { display: grid; }

.chat-panel {
  position: fixed; right: 24px; bottom: 96px; z-index: 56;
  width: 370px; height: min(540px, calc(100vh - 130px));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--paper); border-radius: 14px;
  box-shadow: 0 24px 60px rgba(31, 26, 23, .22), 0 0 0 1px var(--line);
  opacity: 0; visibility: hidden; transform: translateY(16px) scale(.98); transform-origin: bottom right;
  transition: opacity .25s, transform .3s var(--ease), visibility 0s .3s;
}
.chat-panel.open { opacity: 1; visibility: visible; transform: none; transition: opacity .25s, transform .3s var(--ease); }
.chat-panel > header, .thread > header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 14px 16px 20px; border-bottom: 1px solid var(--line); background: var(--card);
}
.chat-panel > header b, .thread > header b { font-family: var(--display); font-size: 22px; font-weight: 600; line-height: 1.1; display: block; }
.chat-panel > header small, .thread > header small { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
[data-chat-status]::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
[data-chat-status].online::before { background: #5f8a3c; box-shadow: 0 0 0 3px rgba(95, 138, 60, .18); }

.chat-body { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 8px; }
.chat-empty { margin: auto 0; text-align: center; padding: 0 12px; color: var(--ink-2); font-size: 14px; }
.chat-empty b { display: block; font-family: var(--display); font-size: 28px; font-weight: 500; color: var(--ink); margin-bottom: 6px; }
.msg { max-width: 80%; align-self: flex-start; }
.msg p {
  padding: 9px 14px; border-radius: 16px 16px 16px 4px; background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere;
}
.msg time { display: block; font-size: 10.5px; color: var(--ink-3); margin: 3px 6px 0; }
.msg.mine { align-self: flex-end; text-align: right; }
.msg.mine p { background: var(--ink); color: var(--paper); box-shadow: none; border-radius: 16px 16px 4px 16px; text-align: left; }
.chat-error { align-self: center; font-size: 12px; color: var(--clay-dark); padding: 4px 0; }
.chat-typing { font-size: 12px; color: var(--ink-3); font-style: italic; padding: 0 18px; height: 0; overflow: hidden; transition: height .2s; }
.chat-typing.show { height: 22px; }

.chat-compose { padding: 12px; border-top: 1px solid var(--line); display: grid; gap: 8px; background: var(--paper); }
.chat-compose input, .chat-compose textarea {
  width: 100%; font: inherit; font-size: 14px; color: var(--ink); border: 0; outline: none; resize: none;
  background: var(--card); box-shadow: inset 0 0 0 1px var(--line); border-radius: 12px; padding: 10px 14px;
  transition: box-shadow .2s;
}
.chat-compose input:focus, .chat-compose textarea:focus { box-shadow: inset 0 0 0 1.5px var(--ink); }
.chat-row { display: flex; gap: 8px; align-items: flex-end; }
.chat-row textarea { min-height: 42px; line-height: 1.45; }
.chat-send {
  flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--clay); color: var(--paper); font-size: 18px; transition: background .2s;
}
.chat-send:hover { background: var(--clay-dark); }
.chat-send:disabled { opacity: .5; }
.chat-send .icon { width: 18px; height: 18px; }

/* ---------------------------------------------------------------- admin tabs + inbox */
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 32px; }
.tabs { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.tabs button { padding: 8px 20px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--ink-2); display: inline-flex; align-items: center; gap: 8px; transition: background .2s, color .2s; }
.tabs button.active { background: var(--ink); color: var(--paper); }
.tab-badge { display: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--clay); color: var(--paper); font-size: 11px; place-items: center; }
.tab-badge.show { display: inline-grid; }

.inbox {
  display: grid; grid-template-columns: 320px 1fr; height: min(640px, calc(100vh - 220px)); min-height: 420px; margin-top: 28px;
  border-radius: 10px; overflow: hidden; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line);
}
.chat-list { overflow-y: auto; border-right: 1px solid var(--line); background: var(--card); }
.chat-item { width: 100%; display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); transition: background .15s; }
.chat-item:hover { background: var(--paper-2); }
.chat-item.active { background: var(--paper); box-shadow: inset 3px 0 0 var(--clay); }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--moss); color: var(--paper); font-family: var(--display); font-size: 20px; text-transform: uppercase; }
.who { min-width: 0; }
.who b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who small { display: block; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta { display: grid; justify-items: end; gap: 4px; font-size: 11px; color: var(--ink-3); }
.meta i { font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--clay); color: var(--paper); font-weight: 700; display: grid; place-items: center; }
.thread { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.thread > header { justify-content: flex-start; }
.thread .back { display: none; font-size: 20px; }
.thread-empty { margin: auto; padding: 32px; color: var(--ink-3); font-size: 14px; text-align: center; }

@media (max-width: 820px) {
  .chat-fab { right: 16px; bottom: 16px; }
  .chat-panel { inset: 0; width: auto; height: auto; border-radius: 0; transform: translateY(24px); }
  .inbox { grid-template-columns: 1fr; height: calc(100vh - 200px); }
  .inbox .thread { display: none; }
  .inbox.has-open .chat-list { display: none; }
  .inbox.has-open .thread { display: flex; }
  .thread .back { display: grid; }
}
