
:root {
  --bg: oklch(0.98 0 0);
  --surface: oklch(0.995 0 0);
  --surface-2: oklch(0.97 0 0);
  --hero-bg: oklch(0.94 0 0);
  --text: oklch(0.2 0 0);
  --text-muted: oklch(0.45 0 0);
  --text-faint: oklch(0.5 0 0);
  --border: oklch(0.9 0 0);
  --border-soft: oklch(0.92 0 0);
  --border-input: oklch(0.88 0 0);
  --accent: oklch(0.5 0.16 250);
  --accent-bright: oklch(0.6 0.19 250);
  --accent-ink: oklch(0.55 0.18 250);
  --navy: oklch(0.22 0.06 250);
  --navy-tab: oklch(0.35 0.08 250);
  --danger: oklch(0.5 0.18 25);
  --ok: oklch(0.45 0.14 145);
  --warn: oklch(0.55 0.15 70);
  --font-sans: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", "Source Serif Pro", serif;
}

* { box-sizing: border-box; min-width: 0; }
html, body { margin: 0; background: var(--bg); overflow-x: hidden; max-width: 100vw; }
body { font-family: var(--font-sans); color: var(--text); min-height: 100vh; line-height: 1.5; }
img { max-width: 100%; display: block; }
a { color: inherit; }
a:hover { opacity: 0.75; }
button { font-family: inherit; }
::placeholder { color: oklch(0.55 0 0); }

@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(12px) scale(0.988); filter: blur(5px); }
  55%  { opacity: 1; }
  to   { opacity: 1; transform: none; filter: blur(0); }
}
.page-fade {
  animation: pageFadeIn 0.44s cubic-bezier(0.22, 1, 0.36, 1) both;
  transform-origin: center top;
  will-change: opacity, transform, filter;
}
@media (prefers-reduced-motion: reduce) {
  .page-fade { animation: none; }
}

.wrap { max-width: 1200px; margin: 0 auto; }
.section-pad { padding: 64px 48px; }
.section-pad-x { padding-left: 48px; padding-right: 48px; }
.serif { font-family: var(--font-serif); font-weight: 600; }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.crumbs { padding: 20px 48px 0; font-size: 13px; color: var(--text-faint); }
.crumbs a { text-decoration: none; color: var(--text-faint); }

.btn {
  cursor: pointer; border: none; border-radius: 8px; font-weight: 600;
  font-size: 15px; padding: 14px 28px; text-decoration: none; display: inline-block;
  background: var(--accent); color: oklch(0.98 0 0); text-align: center;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-sm { padding: 8px 16px; font-size: 13px; border-radius: 6px; }
.btn-block { display: block; width: 100%; }
.btn-dark { background: var(--text); }
.btn-ghost { background: transparent; color: var(--text); border: 1.5px solid var(--text); }
.btn-outline { background: none; border: 1px solid oklch(0.8 0 0); color: var(--text-muted); font-weight: 600; padding: 9px 16px; border-radius: 8px; font-size: 13px; cursor: pointer; }
.btn-danger-outline { background: none; border: 1px solid oklch(0.6 0.15 25); color: var(--danger); }
.link { color: var(--accent); text-decoration: none; cursor: pointer; background: none; border: none; padding: 0; font: inherit; font-weight: 600; }
.link:hover { text-decoration: underline; }
.icon-btn { background: none; border: none; cursor: pointer; color: var(--text-faint); font-size: 18px; line-height: 1; padding: 4px; }

input, textarea, select {
  font-family: inherit; font-size: 14px; padding: 12px 16px; border-radius: 8px;
  border: 1px solid var(--border-input); background: var(--surface-2); color: var(--text);
  width: 100%;
}
input[type="radio"], input[type="checkbox"] {
  width: auto; padding: 0; border-radius: 0; accent-color: var(--accent); flex: none;
}
input[type="radio"] { border: none; background: none; }
textarea { resize: vertical; }
select { background: var(--surface); }
input:focus, textarea:focus, select:focus, .btn:focus-visible, a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; color: var(--text-faint); }
.form-error { color: var(--danger); font-size: 12.5px; margin: 0; }

.topbar {
  display: flex; flex-wrap: wrap; row-gap: 4px; justify-content: space-between; align-items: center;
  background: var(--navy); color: oklch(0.96 0 0); font-size: 13px; padding: 8px 48px;
}
.topbar a { color: oklch(0.96 0 0); text-decoration: underline; cursor: pointer; }
.topbar .secondary { display: flex; gap: 20px; white-space: nowrap; }

.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 48px; background: var(--surface); border-bottom: 1px solid var(--border);
  position: relative;
}
.header-left { display: flex; align-items: center; gap: 40px; flex: 1; }
.logo { font-family: var(--font-serif); font-weight: 600; font-size: 26px; color: var(--text); white-space: nowrap; text-decoration: none; cursor: pointer; }
.logo .dot { color: var(--accent-ink); }
.main-nav { display: flex; gap: 28px; font-size: 15px; font-weight: 500; }
.main-nav a { text-decoration: none; cursor: pointer; }
.header-right { display: flex; align-items: center; gap: 16px; flex-shrink: 0; position: relative; }
.header-right .auth-link { font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.balance-tag { color: var(--accent-ink); }

.search-box { position: relative; }
.search-box input { width: 320px; max-width: 320px; }
.search-dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; width: 320px; max-width: 90vw;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 12px 28px oklch(0 0 0 / 0.12); z-index: 40; overflow: hidden;
}
.search-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--border-soft); cursor: pointer; text-align: left; background: none; border-left: none; border-right: none; border-top: none; width: 100%; }
.search-row:last-child { border-bottom: none; }
.search-row:hover { background: var(--surface-2); }
.search-thumb { width: 34px; height: 34px; flex-shrink: 0; border-radius: 6px; }
.search-empty { padding: 16px; font-size: 13px; color: var(--text-faint); text-align: center; }

.header-dropdown {
  display: flex; flex-direction: column; position: absolute; top: 100%; right: 0; margin-top: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 24px oklch(0.2 0 0 / 0.12); min-width: 190px; z-index: 20; overflow: hidden;
}
.header-dropdown a { padding: 12px 16px; font-size: 13.5px; text-decoration: none; cursor: pointer; }
.header-dropdown a + a { border-top: 1px solid var(--border-soft); }
.header-dropdown .signout { color: var(--danger); }

.mobile-bar { display: none; align-items: center; gap: 16px; }
.hamburger { background: none; border: none; font-size: 22px; padding: 4px 8px; cursor: pointer; line-height: 1; color: var(--text); }
.mobile-menu { display: none; flex-direction: column; gap: 12px; position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--border); padding: 16px 20px 20px; z-index: 10; }
.mobile-menu.open { display: flex; }
.mobile-menu a { text-decoration: none; font-size: 15px; font-weight: 500; padding: 6px 0; cursor: pointer; }

.ph { width: 100%; height: 100%; min-height: inherit; overflow: hidden; background: repeating-linear-gradient(45deg, oklch(0.91 0 0), oklch(0.91 0 0) 8px, oklch(0.95 0 0) 8px, oklch(0.95 0 0) 16px); display: flex; align-items: center; justify-content: center; }
.ph::after { content: "product photo"; font-family: ui-monospace, monospace; font-size: 10px; color: var(--text-faint); white-space: nowrap; }
.ph-plain { background: repeating-linear-gradient(45deg, oklch(0.91 0 0), oklch(0.91 0 0) 6px, oklch(0.95 0 0) 6px, oklch(0.95 0 0) 12px); }
.ph-plain::after { content: none; }
.search-thumb .ph::after { content: none; }
.img-cover { object-fit: cover; width: 100%; height: 100%; }
.prod-card .media, .cat-card .thumb { overflow: hidden; }

.hero { display: grid; grid-template-columns: 1.1fr 1fr; align-items: stretch; background: var(--hero-bg); }
.hero-copy { padding: 64px 48px; display: flex; flex-direction: column; gap: 20px; justify-content: center; }
.eyebrow { font-size: 14px; font-weight: 700; letter-spacing: 0.06em; color: var(--text-faint); text-transform: uppercase; }
.hero-title { font-family: var(--font-serif); font-size: 52px; line-height: 1.15; margin: 0; font-weight: 600; }
.hero-sub { font-size: 17px; line-height: 1.7; color: var(--text-muted); max-width: 480px; margin: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.hero-art { background: repeating-linear-gradient(45deg, oklch(0.88 0 0), oklch(0.88 0 0) 12px, oklch(0.91 0 0) 12px, oklch(0.91 0 0) 24px); display: flex; align-items: center; justify-content: center; min-height: 240px; }
.hero-art span { font-family: ui-monospace, monospace; font-size: 13px; color: var(--text-muted); background: oklch(0.98 0.01 25 / 0.8); padding: 8px 16px; border-radius: 6px; }
.hero-art img { width: 100%; height: 100%; min-height: 240px; object-fit: cover; display: block; }

.value-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border-bottom: 1px solid var(--border); }
.value-strip > div { background: var(--surface); padding: 28px 32px; display: flex; flex-direction: column; gap: 6px; }
.value-strip .vt { font-weight: 700; font-size: 15px; }
.value-strip .vd { font-size: 13.5px; color: var(--text-muted); }

.row-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 24px; }
.row-head h2 { font-family: var(--font-serif); font-size: 30px; font-weight: 600; margin: 0; }

.cat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.cat-card { text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 10px; cursor: pointer; }
.cat-card .thumb { aspect-ratio: 1; border-radius: 10px; background: repeating-linear-gradient(45deg, oklch(0.9 0 0), oklch(0.9 0 0) 10px, oklch(0.94 0 0) 10px, oklch(0.94 0 0) 20px); display: flex; align-items: center; justify-content: center; }
.cat-card .thumb span { font-family: ui-monospace, monospace; font-size: 11px; color: var(--text-faint); text-align: center; padding: 0 10px; }
.cat-card .name { font-size: 14px; font-weight: 600; text-align: center; }

.prod-grid { display: grid; gap: 20px; }
.prod-grid.g5 { grid-template-columns: repeat(5, 1fr); }
.prod-grid.g4 { grid-template-columns: repeat(4, 1fr); }
.prod-card { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface); display: flex; flex-direction: column; }
.prod-card .media { aspect-ratio: 1; cursor: pointer; }
.prod-card .body { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.prod-card .sku { font-size: 12px; color: var(--text-faint); }
.prod-card .pname { font-size: 14px; font-weight: 600; line-height: 1.4; text-decoration: none; color: inherit; cursor: pointer; }
.prod-card .price { font-size: 15px; font-weight: 700; color: var(--text-muted); margin-top: auto; }
.prod-card .moq { font-size: 12px; color: var(--text-faint); }
.prod-card .btn { margin-top: 6px; }

.cta-banner { background: var(--navy); color: oklch(0.97 0 0); padding: 20px 48px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.cta-banner .txt { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; max-width: 640px; }
.cta-banner h3 { font-family: var(--font-serif); font-size: 17px; margin: 0; font-weight: 600; white-space: nowrap; }
.cta-banner p { margin: 0; font-size: 13.5px; color: oklch(0.85 0 0); }
.cta-banner .btn { background: var(--accent-bright); padding: 10px 20px; font-size: 13.5px; font-weight: 700; white-space: nowrap; }

.catalog { display: grid; grid-template-columns: 240px 1fr; gap: 32px; padding: 20px 48px 64px; }
.cat-side { display: flex; flex-direction: column; gap: 6px; }
.cat-side .head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 15px; margin-bottom: 8px; cursor: pointer; }
.cat-side .chev { display: none; color: var(--accent-ink); font-weight: 700; }
.cat-side .list { display: flex; flex-direction: column; gap: 6px; }
.cat-side .list a { display: block; padding: 8px 10px; border-radius: 6px; text-decoration: none; font-size: 14px; cursor: pointer; font-weight: 500; }
.cat-side .list a.active { background: oklch(0.92 0 0); font-weight: 700; }
.catalog-main .row-head h2 { font-size: 26px; }
.empty-note { padding: 48px 0; text-align: center; color: var(--text-faint); font-size: 14.5px; }

.product { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 20px 48px 64px; }
.product-gallery { display: flex; flex-direction: column; gap: 10px; max-width: 420px; width: 100%; margin: 0 auto; }
.product-main { aspect-ratio: 1; max-height: 420px; border-radius: 12px; overflow: hidden; }
.product-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.product-thumbs button { width: 56px; height: 56px; border-radius: 8px; border: 2px solid transparent; padding: 0; overflow: hidden; cursor: pointer; background: none; }
.product-thumbs button.active { border-color: var(--accent); }
.product-info { display: flex; flex-direction: column; gap: 14px; }
.product-info h1 { font-family: var(--font-serif); font-size: 28px; font-weight: 600; margin: 0; }
.product-info .price { font-size: 24px; font-weight: 700; color: var(--text-muted); }
.product-info .desc { font-size: 15px; line-height: 1.7; color: var(--text-muted); margin: 8px 0; }
.qty-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 8px; }
.qty-row input { width: 90px; }

.prose { max-width: 760px; display: flex; flex-direction: column; gap: 20px; }
.prose h1 { font-family: var(--font-serif); font-size: 36px; font-weight: 600; margin: 0; }
.prose p { font-size: 16px; line-height: 1.8; color: var(--text-muted); margin: 0; }
.mini-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 12px; }
.mini-cards > div { border: 1px solid var(--border); border-radius: 10px; padding: 20px; }
.mini-cards .t { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.mini-cards .d { font-size: 13.5px; color: var(--text-muted); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .span2 { grid-column: span 2; }
.narrow { max-width: 640px; margin: 0 auto; }
.card-box { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 14px; border: 1px solid var(--border); border-radius: 12px; padding: 32px; }
.hint { font-size: 12px; color: oklch(0.55 0 0); text-align: center; }

.cart-list { display: flex; flex-direction: column; gap: 12px; }
.cart-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto 32px; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.cart-row .thumb { width: 48px; height: 48px; flex-shrink: 0; border-radius: 8px; }
.cart-row .info { min-width: 0; }
.cart-row .nm { font-weight: 600; font-size: 14px; }
.cart-row .meta { font-size: 12px; color: var(--text-faint); display: flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.cart-row .meta input { width: 56px; padding: 4px 6px; font-size: 12.5px; }
.cart-row .lt { font-weight: 700; font-size: 14px; flex-shrink: 0; }
.cart-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 24px; padding-top: 20px; align-items: center; }
.cart-foot .sub { font-size: 17px; font-weight: 700; }

.checkout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; }
.block-title { font-weight: 700; font-size: 15px; margin-bottom: 12px; }
.opt-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--border-input); border-radius: 8px; font-size: 13.5px; cursor: pointer; }
.opt-row.selected { border-color: var(--accent); }
.opt-row .price { margin-left: auto; font-weight: 600; }
.pay-icons { display: flex; gap: 6px; margin-left: auto; }
.pay-icons span { width: 22px; height: 22px; border-radius: 50%; color: oklch(0.98 0 0); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.summary { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 20px; align-self: start; display: flex; flex-direction: column; gap: 14px; }
.summary .line { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.summary .totals { border-top: 1px solid var(--border); padding-top: 14px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--text-faint); }
.summary .grand { border-top: 1px solid var(--border); padding-top: 14px; display: flex; justify-content: space-between; font-size: 17px; font-weight: 700; }
.summary .items { display: flex; flex-direction: column; gap: 10px; max-height: 260px; overflow-y: auto; }

.acct-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 20px; }
.panel .h { font-size: 12.5px; color: var(--text-faint); font-weight: 600; margin-bottom: 12px; }
.balance-big { font-size: 28px; font-weight: 700; margin: 6px 0 14px; color: var(--accent); }
.table-scroll { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow-x: auto; }
.grid-table { min-width: 640px; }
.grid-table .thead, .grid-table .trow { display: grid; gap: 10px; padding: 12px 16px; align-items: center; }
.grid-table .thead { background: oklch(0.94 0 0); font-size: 12.5px; font-weight: 700; color: var(--text-muted); }
.grid-table .trow { border-top: 1px solid var(--border-soft); font-size: 13.5px; }
.grid-table .trow.clickable { cursor: pointer; }
.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status { font-weight: 600; }

.admin { display: grid; grid-template-columns: 220px 1fr; min-height: 640px; border-top: 1px solid var(--border); }
.admin-side { background: var(--navy); color: oklch(0.9 0 0); padding: 28px 20px; display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.admin-side .brand { font-family: var(--font-serif); font-weight: 600; font-size: 18px; color: oklch(0.98 0 0); margin-bottom: 16px; }
.admin-side a { cursor: pointer; display: block; padding: 9px 12px; border-radius: 6px; text-decoration: none; font-size: 14px; color: oklch(0.95 0 0); font-weight: 500; }
.admin-side a.active { background: var(--navy-tab); font-weight: 700; }
.admin-side .back { color: oklch(0.7 0 0); font-size: 13.5px; margin-top: 24px; }
.admin-main { padding: 32px 40px; background: var(--bg); }
.admin-main h1 { font-family: var(--font-serif); font-weight: 600; margin: 0 0 20px; }
.admin-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }
.admin-head h1 { margin: 0; font-size: 26px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 20px; }
.stat .k { font-size: 12.5px; color: var(--text-faint); font-weight: 600; }
.stat .v { font-size: 28px; font-weight: 700; margin-top: 6px; }
.stat .v.accent { color: var(--accent); }
.admin-two { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin-top: 24px; }
.bar-track { background: oklch(0.92 0 0); border-radius: 4px; height: 6px; overflow: hidden; }
.bar-fill { background: var(--accent); height: 100%; }
.editable-row { display: flex; gap: 10px; align-items: center; }
.stack-list { display: flex; flex-direction: column; gap: 10px; max-width: 480px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--border-input); border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.stepper button { background: var(--surface-2); border: none; width: 36px; height: 40px; font-size: 18px; line-height: 1; cursor: pointer; color: var(--text); }
.stepper button:hover { background: oklch(0.93 0 0); }
.stepper input { width: 54px; border: none; border-left: 1px solid var(--border-input); border-right: 1px solid var(--border-input); border-radius: 0; text-align: center; padding: 8px 4px; }

.modal-overlay { position: fixed; inset: 0; background: oklch(0.15 0 0 / 0.5); display: flex; align-items: center; justify-content: center; z-index: 60; padding: 20px; }
.modal { background: var(--surface); border-radius: 12px; width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; padding: 28px; }
.modal-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; }
.modal-head h2 { font-family: var(--font-serif); font-size: 20px; font-weight: 600; margin: 0; }
.thumb-strip { display: flex; flex-wrap: wrap; gap: 10px; }
.thumb-strip .t { position: relative; width: 64px; height: 64px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border-input); }
.thumb-strip .t button { position: absolute; top: 2px; right: 2px; background: oklch(0.15 0 0 / 0.6); color: oklch(0.98 0 0); border: none; border-radius: 50%; width: 18px; height: 18px; font-size: 12px; line-height: 1; cursor: pointer; }
.thumb-add { width: 64px; height: 64px; border-radius: 8px; border: 1.5px dashed oklch(0.75 0 0); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-faint); font-size: 22px; }
.thumb-add input { display: none; }

.toast {
  position: fixed; bottom: 24px; left: 16px; right: 16px; margin: 0 auto;
  width: fit-content; max-width: min(440px, calc(100vw - 32px));
  transform: translateY(20px); opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  background: var(--text); color: oklch(0.98 0 0);
  padding: 12px 16px; border-radius: 10px; font-size: 14px; font-weight: 600;
  z-index: 50; box-shadow: 0 8px 20px oklch(0 0 0 / 0.25);
  display: flex; align-items: center; gap: 12px; pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; pointer-events: auto; }
.toast span { flex: 1; min-width: 0; line-height: 1.4; }
.toast button { flex-shrink: 0; background: var(--accent); color: oklch(0.98 0 0); border: none; padding: 8px 14px; border-radius: 7px; font-weight: 700; font-size: 12.5px; white-space: nowrap; cursor: pointer; }

.site-footer { background: var(--navy); color: oklch(0.8 0 0); padding: 64px 24px; display: flex; flex-direction: column; gap: 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; max-width: 1200px; margin: 0 auto; width: 100%; }
.footer-grid .brand { font-family: var(--font-serif); font-weight: 600; font-size: 20px; color: oklch(0.97 0 0); }
.footer-col { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.footer-col .ct { color: oklch(0.97 0 0); font-weight: 600; margin-bottom: 4px; }
.footer-col a { text-decoration: none; cursor: pointer; }
.footer-legal { border-top: 1px solid oklch(0.35 0 0); padding-top: 16px; font-size: 12.5px; color: oklch(0.6 0 0); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; max-width: 1200px; margin: 0 auto; width: 100%; }
.footer-legal a { text-decoration: none; cursor: pointer; }

@media (max-width: 1180px) and (min-width: 761px) {
  .topbar .secondary .hide-md { display: none; }
  .search-box input { width: 200px; }
  .main-nav { gap: 16px; }
  .site-header, .topbar { padding-left: 24px; padding-right: 24px; }
}
@media (max-width: 760px) {
  .section-pad { padding: 32px 20px; }
  .section-pad-x { padding-left: 20px; padding-right: 20px; }
  .crumbs { padding-left: 20px; padding-right: 20px; }
  .topbar { display: none; }
  .site-header { padding: 14px 16px; gap: 12px; }
  .header-left { flex: 0 0 auto; gap: 0; }
  .main-nav, .header-right { display: none; }
  .mobile-bar { display: flex; flex: 1 1 auto; justify-content: flex-end; min-width: 0; gap: 12px; }
  .mobile-bar > * { flex-shrink: 0; }
  .mobile-bar .auth-link:first-child { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .logo { font-size: 21px; }
  .hero { grid-template-columns: 1fr; }
  .hero-copy { padding: 32px 20px; }
  .hero-title { font-size: 30px; }
  .value-strip { grid-template-columns: 1fr 1fr; }
  .row-head h2 { font-size: 22px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .prod-grid.g5, .prod-grid.g4 { grid-template-columns: repeat(2, 1fr); }
  .catalog { grid-template-columns: 1fr; padding: 20px 20px 40px; }
  .cat-side .chev { display: inline; }
  .cat-side.collapsed .list { display: none; }
  .catalog.filtering .catalog-main { display: none; }
  .product { grid-template-columns: 1fr; padding: 20px 20px 40px; }
  .two-col, .checkout, .acct-grid, .admin-two, .form-grid { grid-template-columns: 1fr; }
  .form-grid .span2 { grid-column: 1; }
  .mini-cards { grid-template-columns: 1fr; }
  .cta-banner { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr; }
  .admin { grid-template-columns: 1fr; min-height: 0; }
  .admin-main { min-height: 60vh; }
  .admin-side { flex-direction: row; flex-wrap: nowrap; align-self: start; overflow-x: auto; -webkit-overflow-scrolling: touch; align-items: center; padding: 10px 12px; gap: 6px; }
  .admin-side > * { flex-shrink: 0; }
  .admin-side .brand { margin: 0 6px 0 2px; font-size: 16px; }
  .admin-side a { white-space: nowrap; padding: 8px 12px; }
  .admin-side .back { margin: 0 0 0 4px; }
  .admin-main { padding: 20px 16px 40px; }
  .admin-head { flex-direction: column; align-items: flex-start; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  
  .table-scroll { overflow-x: hidden; }
  .grid-table { min-width: 0 !important; }
  .grid-table .thead { display: none !important; }
  .grid-table .trow {
    display: flex !important; flex-direction: column; align-items: flex-start; gap: 7px;
    grid-template-columns: none !important; padding: 14px; text-align: left;
    border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
    margin-bottom: 10px;
  }
  .grid-table .trow > * { white-space: normal !important; overflow: visible !important; text-align: left; width: 100%; }
  .grid-table .trow > *:empty { display: none; }
  .grid-table .trow > *[data-l]::before {
    content: attr(data-l);
    display: block; font-size: 10px; font-weight: 700; letter-spacing: 0.05em;
    text-transform: uppercase; color: var(--text-faint); margin-bottom: 2px;
  }
  .grid-table .trow .btn-outline { align-self: flex-start; margin-top: 6px; width: auto; }
  .grid-table .trow .link { align-self: flex-start; width: auto; }
}
