/*
 * NYC Store — Normies Yacht Club
 *
 * The palette and the typeface are lifted straight from the marina so the room
 * feels like part of the same building: paper, ink, and one line of gold.
 */

:root {
  --ink: #48494b;
  --paper: #e3e5e4;
  --soft: #6f7173;
  --gold: #b08d57;
  --gold-dim: #9a7a45;
  --line: rgba(72, 73, 75, 0.18);
  --line2: rgba(72, 73, 75, 0.28);
  --panel: rgba(227, 229, 228, 0.80);
  --card: #ffffff;
  --shadow: rgba(0, 0, 0, 0.10);
  --pix: "Pixelify Sans", ui-sans-serif, system-ui, sans-serif;
}

/* Night mode — the marina's own after-dark palette. */
html[data-theme="night"] {
  --ink: #e7e3da;
  --paper: #161618;
  --soft: #9b9891;
  --gold: #c39b60;
  --gold-dim: #b08d57;
  --line: rgba(231, 227, 218, 0.16);
  --line2: rgba(231, 227, 218, 0.26);
  --panel: rgba(22, 22, 24, 0.85);
  --card: #1e1e21;
  --shadow: rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--pix);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

/* ── The gate ─────────────────────────────────────────── */

.gate {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 22px;
  gap: 6px;
}

.brand h1 {
  margin: 0;
  font-size: clamp(26px, 7vw, 44px);
  font-weight: 700;
  letter-spacing: 0.12em;
}
.brand .g { color: var(--gold); }
.brand .rule {
  height: 1px;
  background: var(--line2);
  margin: 14px auto 12px;
  width: min(320px, 70vw);
}
.brand p {
  margin: 0;
  color: var(--soft);
  font-size: 13px;
  letter-spacing: 0.05em;
}

.gate-lead {
  color: var(--soft);
  font-size: 14px;
  line-height: 1.7;
  max-width: 380px;
  margin: 26px 0 4px;
}
.gate-lead b { color: var(--ink); }

.gate-status {
  font-size: 13px;
  color: var(--soft);
  min-height: 22px;
  line-height: 1.5;
  max-width: 380px;
  margin-top: 12px;
}
.gate-status.err { color: var(--gold-dim); }

.btn-primary {
  font-family: var(--pix);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
  background: var(--ink);
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 14px 30px;
  border-radius: 2px;
  margin-top: 18px;
  transition: opacity 0.15s;
}
.btn-primary:hover { opacity: 0.88; }
.btn-primary:disabled { opacity: 0.5; cursor: default; }

.gnav {
  display: flex;
  gap: 8px 18px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 34px;
  max-width: 360px;
}
.gnav a {
  color: var(--soft);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.03em;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}
.gnav a:hover { color: var(--ink); border-bottom-color: var(--gold); }

/* ── Top bar ──────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px clamp(14px, 4vw, 34px);
  background: var(--panel);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.topbrand { text-decoration: none; display: flex; flex-direction: column; line-height: 1.15; }
.tb-main { font-size: 17px; font-weight: 700; letter-spacing: 0.1em; }
.tb-main .g { color: var(--gold); }
.tb-sub { font-size: 10px; color: var(--soft); letter-spacing: 0.16em; text-transform: uppercase; }

.topactions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.tlink {
  color: var(--soft);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.04em;
  border-bottom: 1px solid transparent;
}
.tlink:hover { color: var(--ink); border-bottom-color: var(--gold); }

.tbtn {
  font-family: var(--pix);
  background: transparent;
  border: 1px solid var(--line2);
  color: var(--ink);
  border-radius: 2px;
  padding: 7px 12px;
  font-size: 12px;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.tbtn:hover { border-color: var(--gold); color: var(--gold-dim); }

.cart-btn { border-color: var(--gold); color: var(--gold-dim); }
.badge {
  display: inline-block;
  min-width: 18px;
  padding: 0 5px;
  margin-left: 4px;
  background: var(--ink);
  color: var(--gold);
  border-radius: 9px;
  font-size: 11px;
  text-align: center;
}

/* ── Layout ───────────────────────────────────────────── */

main { padding: clamp(20px, 5vw, 44px) clamp(14px, 4vw, 34px) 70px; max-width: 1180px; margin: 0 auto; }

.page-head { margin-bottom: 26px; }
.page-head h2 {
  margin: 0 0 6px;
  font-size: clamp(20px, 4vw, 28px);
  letter-spacing: 0.08em;
  font-weight: 700;
}
.page-head p { margin: 0; color: var(--soft); font-size: 13px; max-width: 560px; line-height: 1.7; }

.back {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--soft);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.04em;
}
.back:hover { color: var(--gold-dim); }

/* ── Product grid ─────────────────────────────────────── */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: clamp(14px, 2.5vw, 26px);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px var(--shadow);
}

.card-img {
  aspect-ratio: 1 / 1;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; }

.card-body { padding: 12px 14px 15px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-name { font-size: 14px; font-weight: 600; letter-spacing: 0.02em; }
.card-sub { font-size: 11px; color: var(--soft); line-height: 1.5; }
.card-price { font-size: 13px; color: var(--gold-dim); margin-top: auto; padding-top: 6px; }
.card-swatches { display: flex; gap: 4px; margin-top: 4px; }

.sw {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 1px solid var(--line2);
}

/* ── Club partners ────────────────────────────────────── */

.partner {
  margin-top: clamp(34px, 6vw, 60px);
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid var(--line2);
  border-left: 2px solid var(--gold);
  border-radius: 3px;
  background: var(--card);
  max-width: 680px;
}

.partner-eyebrow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold-dim);
  margin-bottom: 8px;
}

.partner-name {
  margin: 0 0 12px;
  font-size: clamp(18px, 3vw, 22px);
  letter-spacing: 0.06em;
  font-weight: 700;
}

.partner-body p {
  margin: 0 0 10px;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.75;
}

.partner-terms {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.7;
}

.partner-cta {
  display: inline-block;
  margin-top: 16px;
  font-size: 12.5px;
  letter-spacing: 0.05em;
  color: var(--gold-dim);
  text-decoration: none;
  border-bottom: 1px solid var(--line2);
  padding-bottom: 2px;
}
.partner-cta:hover { color: var(--gold); border-bottom-color: var(--gold); }

/* ── Product page ─────────────────────────────────────── */

.detail { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: start; }
@media (max-width: 780px) { .detail { grid-template-columns: 1fr; } }

.gallery { position: sticky; top: 92px; }
@media (max-width: 780px) { .gallery { position: static; } }

.gal-main {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 3px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.gal-main img { width: 100%; height: 100%; object-fit: cover; }

.gal-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.gal-thumbs button {
  width: 58px; height: 58px;
  padding: 0;
  border: 1px solid var(--line2);
  border-radius: 2px;
  background: var(--card);
  cursor: pointer;
  overflow: hidden;
}
.gal-thumbs button.on { border-color: var(--gold); }
.gal-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.detail h2 { margin: 0 0 4px; font-size: clamp(20px, 3.4vw, 27px); letter-spacing: 0.05em; font-weight: 700; }
.detail .sub { color: var(--gold-dim); font-size: 13px; margin: 0 0 14px; letter-spacing: 0.03em; }
.detail .price { font-size: 21px; letter-spacing: 0.04em; margin: 0 0 20px; }

/* Materials + certifications, straight from the maker. */
.quality {
  margin: -8px 0 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.quality-material {
  font-size: 13px;
  color: var(--soft);
  line-height: 1.6;
}
.quality-marks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mark {
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-dim);
  border: 1px solid var(--line2);
  border-radius: 2px;
  padding: 4px 8px;
  white-space: nowrap;
}

.opt { margin-bottom: 18px; }
.opt-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--soft);
  margin-bottom: 8px;
}
.opt-label span { color: var(--ink); text-transform: none; letter-spacing: 0.03em; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }

.chip {
  font-family: var(--pix);
  background: transparent;
  border: 1px solid var(--line2);
  color: var(--ink);
  border-radius: 2px;
  padding: 8px 13px;
  font-size: 12.5px;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: border-color 0.12s;
}
.chip:hover:not(:disabled) { border-color: var(--gold); }
.chip.on { border-color: var(--gold); background: var(--ink); color: var(--gold); }
.chip:disabled { opacity: 0.35; cursor: not-allowed; text-decoration: line-through; }

.chip-colour { display: flex; align-items: center; gap: 7px; }
.chip-colour .sw { width: 13px; height: 13px; }

.qty { display: flex; align-items: center; gap: 0; border: 1px solid var(--line2); border-radius: 2px; width: fit-content; }
.qty button {
  font-family: var(--pix);
  background: transparent;
  border: none;
  color: var(--ink);
  font-size: 17px;
  width: 36px; height: 38px;
  cursor: pointer;
}
.qty button:hover { color: var(--gold-dim); }
.qty span { min-width: 34px; text-align: center; font-size: 14px; }

.add-row { display: flex; gap: 10px; align-items: center; margin-top: 22px; flex-wrap: wrap; }

.desc {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--soft);
  font-size: 13px;
  line-height: 1.75;
}
.desc h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink);
  margin: 0 0 8px;
}
.desc p { margin: 0 0 10px; }
.desc ul { margin: 0 0 12px; padding-left: 16px; list-style: none; }
.desc li { position: relative; padding-left: 12px; margin-bottom: 4px; }
.desc li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
}

.made-note { margin-top: 14px; max-width: 420px; }

.opt-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sg-link { font-size: 11px; letter-spacing: 0.06em; color: var(--gold-dim); padding: 0; }
.sg-link:hover { border-bottom-color: var(--gold); }

/* ── Centred modal (size guide) ───────────────────────── */

.overlay-centre { align-items: center; justify-content: center; padding: 20px; }

.modal {
  background: var(--paper);
  border: 1px solid var(--gold);
  border-radius: 4px;
  width: min(560px, 100%);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 14px 44px var(--shadow);
}
.modal-body { padding: 16px 18px 20px; overflow-y: auto; }

.sg-head {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--soft);
  margin: 16px 0 8px;
}
.sg-head:first-child { margin-top: 0; }

.sg-scroll { overflow-x: auto; }

.sg-table { border-collapse: collapse; width: 100%; font-size: 13px; min-width: 260px; }
.sg-table th, .sg-table td {
  border: 1px solid var(--line);
  padding: 7px 10px;
  text-align: left;
  white-space: nowrap;
}
.sg-table thead th {
  background: var(--card);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--soft);
  font-weight: 600;
}
.sg-table tbody th { color: var(--ink); font-weight: 600; }
.sg-table tbody tr:nth-child(even) td { background: var(--card); }

/* ── Basket drawer ────────────────────────────────────── */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(38, 39, 42, 0.5);
  backdrop-filter: blur(3px);
  display: flex;
  justify-content: flex-end;
}

.drawer {
  width: min(420px, 100vw);
  height: 100%;
  background: var(--paper);
  border-left: 1px solid var(--line2);
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 40px var(--shadow);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.drawer-head h2 { margin: 0; font-size: 15px; letter-spacing: 0.08em; font-weight: 600; }

.iconbtn {
  font-family: var(--pix);
  background: transparent;
  border: none;
  color: var(--soft);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
}
.iconbtn:hover { color: var(--ink); }

.drawer-body { flex: 1; overflow-y: auto; padding: 8px 18px; }
.drawer-foot { padding: 16px 18px; border-top: 1px solid var(--line); }

.cart-line { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-line img { width: 62px; height: 62px; object-fit: cover; border: 1px solid var(--line); border-radius: 2px; flex: none; }
.cart-line .cl-body { flex: 1; min-width: 0; }
.cart-line .cl-name { font-size: 13px; font-weight: 600; }
.cart-line .cl-var { font-size: 11px; color: var(--soft); margin-top: 2px; }
.cart-line .cl-row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; gap: 8px; }
.cart-line .cl-price { font-size: 13px; color: var(--gold-dim); }

.totals { font-size: 13px; }
.totals div { display: flex; justify-content: space-between; padding: 4px 0; color: var(--soft); }
.totals div.grand { color: var(--ink); font-size: 16px; padding-top: 10px; margin-top: 6px; border-top: 1px solid var(--line); }

.empty { text-align: center; color: var(--soft); font-size: 13px; padding: 50px 20px; line-height: 1.8; }

/* ── Forms ────────────────────────────────────────────── */

.form { max-width: 560px; }
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--soft);
  margin-bottom: 5px;
}
.field input, .field select {
  font-family: var(--pix);
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line2);
  border-radius: 2px;
  color: var(--ink);
  font-size: 14px;
  padding: 10px 12px;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--gold); }
.field.bad input, .field.bad select { border-color: #c2553f; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }

.rate-list { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.rate {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line2);
  border-radius: 2px;
  padding: 12px 14px;
  cursor: pointer;
  font-size: 13px;
}
.rate:hover { border-color: var(--gold); }
.rate.on { border-color: var(--gold); background: var(--card); }
.rate input { accent-color: var(--gold); }
.rate .r-name { flex: 1; }
.rate .r-eta { color: var(--soft); font-size: 11px; }
.rate .r-cost { color: var(--gold-dim); }

.note { font-size: 11.5px; color: var(--soft); line-height: 1.65; margin-top: 12px; }
.err-box {
  border: 1px solid var(--gold-dim);
  border-radius: 2px;
  padding: 11px 13px;
  font-size: 12.5px;
  color: var(--gold-dim);
  margin: 14px 0;
}

/* ── Misc ─────────────────────────────────────────────── */

.spinner { text-align: center; color: var(--soft); font-size: 13px; padding: 60px 20px; letter-spacing: 0.05em; }

.foot {
  border-top: 1px solid var(--line);
  padding: 26px clamp(14px, 4vw, 34px) 40px;
  max-width: 1180px;
  margin: 0 auto;
  text-align: center;
}
.foot-rule { display: none; }
.foot p { color: var(--soft); font-size: 12px; max-width: 480px; margin: 0 auto 14px; line-height: 1.7; }
.fnav { display: flex; gap: 8px 18px; flex-wrap: wrap; justify-content: center; }
.fnav a, .linkbtn {
  color: var(--soft);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.03em;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  background: none;
  border-top: none; border-left: none; border-right: none;
  font-family: var(--pix);
  cursor: pointer;
}
.fnav a:hover, .linkbtn:hover { color: var(--ink); border-bottom-color: var(--gold); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 120;
  background: var(--ink);
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 2px;
  padding: 11px 20px;
  font-size: 13px;
  letter-spacing: 0.03em;
  box-shadow: 0 10px 30px var(--shadow);
  max-width: min(90vw, 420px);
  text-align: center;
}

.prose { max-width: 620px; color: var(--soft); font-size: 13.5px; line-height: 1.8; }
.prose h3 { color: var(--ink); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; margin: 26px 0 8px; }
.prose p { margin: 0 0 12px; }
