/* Harbor & Co. — interactive prototype. Tokens follow the Claude Design canvas. */
:root {
  --bg: #FAF9F5;
  --surface: #FFFFFF;
  --tile: #F1EFE6;
  --border: #E7E3D8;
  --border-strong: #D8D4C8;
  --divider: #F0EDE4;
  --text: #1E2624;
  --body: #3E463F;
  --muted: #5B655F;
  --icon: #8C948D;
  --accent: oklch(0.72 0.13 175);
  --on-accent: oklch(0.16 0.03 175);
  --link: oklch(0.4 0.1 175);
  --link-hover: oklch(0.32 0.1 175);
  --danger: #B3261E;
  --danger-bg: #FBEAE8;
  --danger-border: #E7B9B3;
  --danger-text: #7A2521;
  --ink: #1E2624;
  --ink-2: #141917;
  --ink-line: #33403B;
  --ink-text: #F5F3EC;
  --ink-muted: #A7B1AB;
  --font-head: 'Poppins', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Mono', Menlo, Consolas, monospace;
  --radius: 14px;
  --radius-sm: 10px;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 15px/1.5 var(--font-body);
}
[hidden] { display: none !important; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-head); color: var(--text); margin: 0; }
code { font-family: var(--font-mono); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Portfolio bar (not part of the store) ---------- */
.demo-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 18px;
  padding: 11px var(--gutter); background: var(--ink-2); color: #fff; font-size: 13px;
}
.demo-bar a { color: #fff; font-weight: 600; }
.demo-bar__back { text-decoration: none; }
.demo-bar__back:hover { color: #fff; text-decoration: underline; }
.demo-bar__label { color: #C9D2CC; }
.demo-bar__hint { margin-left: auto; color: #F2D58A; }
.demo-bar__hint code { color: #fff; }
.demo-bar__bugs { color: #C9D2CC; }
.demo-bar__bugs a { margin-left: 6px; }
.demo-bar :focus-visible { outline-color: #fff; }
.noscript { margin: 0; padding: 16px var(--gutter); background: #FEF3C7; color: #92400E; font-weight: 600; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--border); }
.site-header__inner {
  max-width: 1280px; margin: 0 auto; padding: 14px var(--gutter);
  display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap;
}
.logo {
  font-family: var(--font-head); font-weight: 800; font-size: 20px; letter-spacing: -0.01em;
  color: var(--text); text-decoration: none; white-space: nowrap;
}
.logo:hover { color: var(--text); }
.search { flex: 1 1 220px; max-width: 480px; min-width: 0; }
.search input {
  width: 100%; height: 44px; padding: 0 16px; border-radius: 12px;
  border: 1px solid var(--border-strong); background: var(--bg); font-size: 15px;
}
.search input::placeholder { color: #66706A; }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px; color: var(--text); text-decoration: none;
}
.icon-btn:hover { background: var(--bg); color: var(--text); }
.badge {
  position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--accent); color: var(--on-accent);
  font: 700 11px/18px var(--font-body); text-align: center;
}
.account { position: relative; }
.account-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px;
  border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface);
  font-size: 14px; font-weight: 500; color: var(--text); text-decoration: none;
}
.account-btn:hover { background: var(--bg); color: var(--text); }
.account-menu {
  position: absolute; right: 0; top: 52px; min-width: 190px; margin: 0; padding: 4px 0; list-style: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 8px 24px rgba(20, 30, 28, 0.1); z-index: 30;
}
.account-menu li + li { border-top: 1px solid var(--divider); }
.account-menu a, .account-menu button {
  display: block; width: 100%; padding: 12px 16px; font-size: 14px; text-align: left;
  color: var(--text); text-decoration: none; background: none; border: 0;
}
.account-menu a:hover, .account-menu button:hover { background: var(--bg); color: var(--text); }
.account-menu button { color: var(--link); }

/* ---------- Layout ---------- */
.view { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 36px var(--gutter) 64px; }
.view:focus { outline: none; }
.view--narrow { max-width: 920px; }
.view--form { max-width: 460px; }
.page-title { font-weight: 700; font-size: 26px; line-height: 1.25; margin-bottom: 6px; }
.page-sub { margin: 0 0 22px; color: var(--muted); font-size: 14px; }
.section-title { font-weight: 700; font-size: 19px; margin-bottom: 14px; }
.back-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-bottom: 8px;
  font-size: 14px; font-weight: 600; text-decoration: none;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: oklch(0.66 0.13 175); color: var(--on-accent); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--bg); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #8F1E18; }
.btn[disabled] { opacity: 0.65; cursor: default; }
.btn-block { width: 100%; }

/* ---------- Catalog ---------- */
.shelf { margin-bottom: 40px; }
.shelf__row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.rule { border: 0; border-top: 1px solid var(--border); margin: 0 0 32px; }
.toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.chip {
  display: inline-flex; align-items: center; height: 44px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text); font-size: 14px; font-weight: 600; text-decoration: none;
}
.chip:hover { background: var(--bg); color: var(--text); }
.chip[aria-current="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.controls { display: flex; gap: 12px; flex-wrap: wrap; }
.control { display: flex; flex-direction: column; gap: 4px; }
.control label { font-size: 12px; font-weight: 600; color: var(--muted); }
.control select {
  height: 44px; padding: 0 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface); font-size: 14px;
}
.result-count { margin: 0 0 14px; font-size: 13px; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 0; padding: 0; list-style: none; }
.card {
  display: flex; flex-direction: column; height: 100%; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s;
}
.card:hover { color: inherit; border-color: var(--border-strong); box-shadow: 0 6px 18px rgba(20, 30, 28, 0.07); }
.card__body { display: flex; flex-direction: column; gap: 6px; padding: 14px; flex: 1; }
.card__title {
  margin: 0; font-size: 14px; font-weight: 600; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em;
}
.card__price { margin: 0; font-family: var(--font-head); font-weight: 700; font-size: 16px; color: var(--text); }
.tile {
  display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 1 / 1;
  background: var(--tile); color: var(--icon);
}
.rating { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.stars { position: relative; display: inline-block; color: var(--border-strong); letter-spacing: 2px; line-height: 1; }
.stars__fill { position: absolute; inset: 0 auto 0 0; overflow: hidden; color: var(--accent); white-space: nowrap; }

.skel {
  border-radius: var(--radius);
  background: linear-gradient(90deg, #EFECE3 25%, #F7F5EE 37%, #EFECE3 63%);
  background-size: 400px 100%; animation: shimmer 1.4s ease-in-out infinite;
}
.skel--card { aspect-ratio: 3 / 4; }
@keyframes shimmer { 0% { background-position: -200px 0; } 100% { background-position: 200px 0; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } .toast { transition: none; } }

.empty {
  text-align: center; padding: 72px 20px; border: 1px dashed var(--border-strong); border-radius: var(--radius);
}
.empty--plain { border: 0; }
.empty svg { color: var(--icon); margin-bottom: 14px; }
.empty h1, .empty h2 { font-weight: 700; font-size: 19px; margin-bottom: 6px; }
.empty p { margin: 0 0 20px; color: var(--muted); font-size: 14px; }
.empty p:last-child { margin-bottom: 0; }

/* ---------- Product ---------- */
.detail { display: grid; grid-template-columns: 420px 1fr; gap: 48px; align-items: start; }
.detail .tile { border-radius: var(--radius); }
.kicker { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--link); }
.detail .rating { font-size: 13px; margin: 10px 0 14px; }
.detail .stars { font-size: 16px; letter-spacing: 3px; }
.detail__price { margin: 0 0 18px; font-family: var(--font-head); font-weight: 800; font-size: 26px; }
.detail__desc { margin: 0 0 24px; color: var(--body); line-height: 1.6; }
.buy { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); }
.stepper button {
  width: 44px; height: 44px; border: 0; background: none; font-size: 18px; line-height: 1; color: var(--text); border-radius: var(--radius-sm);
}
.stepper button:hover:not([disabled]) { background: var(--bg); }
.stepper button[disabled] { color: #A9AFAA; cursor: default; }
.stepper output { min-width: 32px; text-align: center; font-weight: 600; }

/* ---------- Cart ---------- */
.lines { display: flex; flex-direction: column; gap: 12px; margin: 0 0 24px; padding: 0; list-style: none; }
.line {
  display: grid; grid-template-columns: 72px 1fr auto 84px 44px; align-items: center; gap: 16px;
  padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.line .tile { width: 72px; border-radius: var(--radius-sm); }
.line__title { display: block; font-size: 14px; font-weight: 600; color: var(--text); text-decoration: none; margin-bottom: 2px; }
.line__title:hover { color: var(--link); text-decoration: underline; }
.line__each { margin: 0; font-size: 13px; color: var(--muted); }
.line__total { margin: 0; text-align: right; font-family: var(--font-head); font-weight: 700; font-size: 15px; }
.line .stepper button { width: 44px; height: 44px; font-size: 16px; }
.remove {
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: var(--radius-sm); background: none; color: var(--muted);
}
.remove:hover { background: var(--danger-bg); color: var(--danger); }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.total-row { display: flex; justify-content: space-between; font-family: var(--font-head); font-weight: 700; font-size: 18px; }
.panel__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.panel__actions .btn { flex: 1 1 160px; }
.summary-list { margin: 0; padding: 0; list-style: none; }
.summary-list li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--divider); font-size: 14px; }
.summary-list li span:last-child { font-weight: 600; white-space: nowrap; }
.summary-list + .total-row { padding-top: 16px; }
.panel__note { margin: 16px 0 0; font-size: 13px; color: var(--muted); }

/* ---------- Account ---------- */
.stack { display: flex; flex-direction: column; gap: 16px; }
.label { margin: 0 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.panel__name { margin: 0 0 2px; font-family: var(--font-head); font-weight: 700; font-size: 18px; }
.panel p { margin: 0; }
.panel--split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.skel--block { height: 96px; }

/* ---------- Sign in ---------- */
.signin-head { text-align: center; margin-bottom: 26px; }
.signin-head .logo { font-size: 24px; }
.signin-head h1 { font-family: var(--font-body); font-weight: 500; font-size: 15px; color: var(--muted); margin-top: 6px; }
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; }
.field input {
  width: 100%; height: 44px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface); font-size: 15px;
}
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field__error { margin: 6px 0 0; font-size: 13px; color: var(--danger-text); }
.password { position: relative; }
.password input { padding-right: 48px; }
.password button {
  position: absolute; right: 2px; top: 0; width: 44px; height: 44px; border: 0; background: none;
  display: flex; align-items: center; justify-content: center; color: var(--muted); border-radius: var(--radius-sm);
}
.alert {
  display: flex; gap: 10px; align-items: flex-start; margin-bottom: 18px; padding: 12px 14px;
  background: var(--danger-bg); border: 1px solid var(--danger-border); border-radius: var(--radius-sm);
  color: var(--danger-text); font-size: 14px; line-height: 1.5;
}
.alert:focus { outline: 2px solid var(--danger); outline-offset: 2px; }
.alert svg { flex: none; margin-top: 2px; color: var(--danger); }
.alert p { margin: 0; }
.alert button { margin-top: 2px; padding: 0; min-height: 44px; border: 0; background: none; color: var(--danger-text); font-size: 13px; font-weight: 600; text-decoration: underline; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 60; transform: translate(-50%, 12px);
  display: flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: var(--radius-sm);
  background: var(--ink); color: var(--ink-text); font-size: 14px; font-weight: 500;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast:empty { padding: 0; }
.toast--show { opacity: 1; transform: translate(-50%, 0); }
.toast svg { color: var(--accent); }

/* ---------- Dialog ---------- */
.dialog { width: min(380px, calc(100vw - 32px)); padding: 24px; border: 0; border-radius: var(--radius); color: var(--text); }
.dialog::backdrop { background: rgba(30, 38, 36, 0.45); }
.dialog h2 { font-size: 18px; margin-bottom: 8px; }
.dialog p { margin: 0 0 20px; font-size: 14px; color: var(--muted); }
.dialog__actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.dialog__actions .btn { min-height: 44px; padding: 0 18px; font-size: 14px; }

/* ---------- Footer + API inspector ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); }
.site-footer__inner {
  max-width: 1280px; margin: 0 auto; padding: 20px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.site-footer__inner p { margin: 0; font-size: 13px; color: var(--muted); }
.inspector-toggle {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--bg);
  font-size: 13px; font-weight: 500; color: var(--text);
}
.inspector-toggle:hover { background: var(--tile); }
.inspector { background: var(--ink); color: var(--ink-text); border-top: 1px solid var(--border); }
.inspector__inner { max-width: 1280px; margin: 0 auto; padding: 16px var(--gutter) 28px; }
.inspector :focus-visible { outline-color: #fff; }
.inspector__title { margin: 0 0 10px; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-muted); }
.inspector__empty { margin: 0; font-size: 14px; color: var(--ink-muted); }
.calls { margin: 0; padding: 0; list-style: none; }
.call { border-top: 1px solid var(--ink-line); padding: 10px 0; }
.call__row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.method { font: 700 11px/1 var(--font-body); letter-spacing: .03em; padding: 5px 8px; border-radius: 6px; }
.method--GET { background: #20342F; color: #7FD9B8; }
.method--POST { background: #1F2E36; color: #8CCBEA; }
.method--PUT { background: #2E2B1C; color: #E6CF7E; }
.method--DELETE { background: #3A2420; color: #F09C80; }
.endpoint { font: 13px/1.4 var(--font-mono); color: var(--ink-text); word-break: break-all; }
.status { font-size: 12px; font-weight: 600; }
.status--ok { color: #7FD9B8; }
.status--err { color: #F09C80; }
.bug-chip {
  display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 0 10px;
  border: 0; border-radius: 999px; background: #F2B84B; color: #2B211A; font-size: 11px; font-weight: 700;
}
.call__more { margin-left: auto; padding: 4px 0; border: 0; background: none; color: var(--ink-muted); font-size: 12px; text-decoration: underline; }
.call__more:hover { color: #fff; }
.call__bug { margin: 8px 0 0; padding: 10px 12px; border-radius: 8px; background: #33251A; color: #F2C98A; font-size: 13px; line-height: 1.5; }
.call__note { margin: 6px 0 0; font-size: 13px; color: var(--ink-muted); line-height: 1.5; }
.call pre {
  margin: 8px 0 0; padding: 12px; max-height: 280px; overflow: auto; border-radius: 8px;
  background: var(--ink-2); color: #C9D2CC; font: 12px/1.5 var(--font-mono);
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .detail { grid-template-columns: 340px 1fr; gap: 32px; }
}
@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .view { padding-top: 20px; }
  .demo-bar__hint { margin-left: 0; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .shelf { margin-bottom: 28px; }
  .shelf__row {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px;
    margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 6px;
    scroll-padding-inline: var(--gutter);
  }
  .demo-bar__label { display: none; }
  .shelf__row > * { flex: 0 0 42%; scroll-snap-align: start; }
  .detail { grid-template-columns: 1fr; gap: 20px; }
  .page-title { font-size: 22px; }
  .detail__price { font-size: 22px; }
  .line { grid-template-columns: 64px 1fr auto; gap: 10px 12px; }
  .line .tile { width: 64px; grid-row: 1 / 3; align-self: start; }
  .line .stepper { grid-column: 2; grid-row: 2; justify-self: start; }
  .line__total { grid-column: 3; grid-row: 2; }
  .line .remove { grid-column: 3; grid-row: 1; justify-self: end; }
  .panel { padding: 16px; }
  .panel--split { grid-template-columns: 1fr; }
  .card__body { padding: 12px; }
}
