/* ============================================================
   Signature — wholesale glassware & kitchen catalog
   Palette: porcelain ground, petrol-teal accent, brass prices
   ============================================================ */
:root {
  --bg: #f5f7f6;
  --surface: #ffffff;
  --ink: #182022;
  --ink-soft: #5d6d6e;
  --line: #dde5e2;
  --accent: #0e5e66;
  --accent-ink: #ffffff;
  --accent-soft: #e2eeee;
  --gold: #8a6d24;
  --chip-bg: #eaefed;
  --chip-active: #0e5e66;
  --chip-active-ink: #ffffff;
  --shadow: 0 1px 2px rgba(24, 32, 34, 0.05), 0 10px 28px rgba(24, 32, 34, 0.07);
  --radius: 12px;
  --serif: "Bodoni MT", Didot, "Playfair Display", Georgia, serif;
  --sans: "Segoe UI", system-ui, -apple-system, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1516; --surface: #182021; --ink: #e9eeec; --ink-soft: #9aabaa;
    --line: #263231; --accent: #57b7bd; --accent-ink: #0f1516;
    --accent-soft: #14292b; --gold: #d6b76a;
    --chip-bg: #1f2b2b; --chip-active: #57b7bd; --chip-active-ink: #0f1516;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 28px rgba(0, 0, 0, 0.4);
  }
}
:root[data-theme="light"] {
  --bg: #f5f7f6; --surface: #ffffff; --ink: #182022; --ink-soft: #5d6d6e;
  --line: #dde5e2; --accent: #0e5e66; --accent-ink: #ffffff;
  --accent-soft: #e2eeee; --gold: #8a6d24;
  --chip-bg: #eaefed; --chip-active: #0e5e66; --chip-active-ink: #ffffff;
  --shadow: 0 1px 2px rgba(24, 32, 34, 0.05), 0 10px 28px rgba(24, 32, 34, 0.07);
}
:root[data-theme="dark"] {
  --bg: #0f1516; --surface: #182021; --ink: #e9eeec; --ink-soft: #9aabaa;
  --line: #263231; --accent: #57b7bd; --accent-ink: #0f1516;
  --accent-soft: #14292b; --gold: #d6b76a;
  --chip-bg: #1f2b2b; --chip-active: #57b7bd; --chip-active-ink: #0f1516;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 28px rgba(0, 0, 0, 0.4);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ---------- hero ---------- */
.hero { border-bottom: 1px solid var(--line); }
.hero-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-top: 52px;
  padding-bottom: 34px;
}
.kicker {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
.wordmark {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(42px, 7vw, 68px);
  letter-spacing: 0.01em;
  margin: 6px 0 10px;
  line-height: 1.05;
  text-wrap: balance;
}
.wordmark .dot { color: var(--gold); font-style: normal; }
.tagline { color: var(--ink-soft); font-size: 16.5px; max-width: 52ch; margin: 0 0 18px; }
.stats { display: flex; gap: 28px; flex-wrap: wrap; }
.stat .n {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  display: block;
  line-height: 1.15;
}
.stat .l {
  font-size: 11.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 14.5px;
  padding: 11px 20px;
  border-radius: 999px;
  white-space: nowrap;
  margin-bottom: 6px;
  transition: opacity 0.15s ease;
}
.cta:hover { opacity: 0.9; }

/* ---------- toolbar ---------- */
.toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 10px 0 0;
}
.toolbar-inner { display: flex; gap: 10px; align-items: center; }
.search {
  flex: 1 1 260px;
  min-width: 160px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 14px;
  color: var(--ink);
  outline: none;
}
.search::placeholder { color: var(--ink-soft); }
.search:focus, .sort:focus { border-color: var(--accent); }
.sort {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 13.5px;
  color: var(--ink);
  outline: none;
}
.count {
  color: var(--ink-soft);
  font-size: 13px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.chips-scroll { overflow-x: auto; scrollbar-width: none; }
.chips-scroll::-webkit-scrollbar { display: none; }
.chips { display: flex; gap: 7px; padding: 10px 0 12px; width: max-content; }
.chip {
  border: none;
  background: var(--chip-bg);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.chip .k {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 12px;
  margin-left: 4px;
  font-variant-numeric: tabular-nums;
}
.chip:hover { background: var(--line); }
.chip:focus-visible, .search:focus-visible, .sort:focus-visible,
.vbtn:focus-visible, .lb-close:focus-visible, .lb-nav:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.chip.active { background: var(--chip-active); color: var(--chip-active-ink); }
.chip.active .k { color: var(--chip-active-ink); opacity: 0.75; }

/* ---------- grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 18px;
  padding: 26px 0 60px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.card:hover { transform: translateY(-2px); }
.imgbox {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--chip-bg);
}
.imgbox img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.vnav {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}
.imgbox:hover .vnav, .imgbox:focus-within .vnav { opacity: 1; }
.vbtn {
  pointer-events: auto;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}
.vcount {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(15, 21, 22, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 4px 9px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.vcount svg { display: block; opacity: 0.85; }
.body { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.cat {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
}
.card h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 17.5px;
  font-weight: 600;
  line-height: 1.3;
}
.variant { color: var(--ink-soft); font-size: 13px; min-height: 1.3em; }
.pack { color: var(--ink-soft); font-size: 12px; }
.pricerow { margin-top: auto; padding-top: 8px; display: flex; align-items: baseline; gap: 6px; }
.price {
  font-size: 18.5px;
  font-weight: 700;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.unit { color: var(--ink-soft); font-size: 12.5px; }

.empty { grid-column: 1 / -1; text-align: center; color: var(--ink-soft); padding: 70px 0; }

/* ---------- product detail view ---------- */
.detail {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(10, 14, 15, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.detail-panel {
  position: relative;
  background: var(--surface);
  border-radius: 16px;
  width: 100%;
  max-width: 960px;
  max-height: 90vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
}
.d-media {
  position: relative;
  background: var(--chip-bg);
  min-height: 420px;
}
.d-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 14px;
}
.d-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.28);
}
.d-nav:hover { background: var(--surface); }
.d-prev { left: 12px; }
.d-next { right: 12px; }
.d-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.28);
}
.d-close:hover { background: var(--surface); }
.d-info {
  padding: 24px 26px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.d-info h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
  line-height: 1.25;
  text-wrap: balance;
}
.d-meta { color: var(--ink-soft); font-size: 14px; margin: 0; min-height: 1.4em; }
.d-info .pricerow { padding-top: 2px; }
.d-info .price { font-size: 23px; }
.d-inquire {
  margin-top: 10px;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  border-radius: 999px;
  padding: 10px 19px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.d-inquire:hover { opacity: 0.9; }
.d-inquire:focus-visible, .inq-send:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.inq {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  padding: 13px 14px;
  margin-top: 6px;
}
.inq-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.inq-badge {
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
}
.inq-row { display: flex; gap: 8px; }
.inq input, .inq textarea {
  width: 100%;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
}
.inq input::placeholder { color: var(--ink-soft); }
.inq input:focus, .inq textarea:focus { border-color: var(--accent); outline: none; }
.inq textarea { resize: vertical; line-height: 1.45; }
.inq-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.inq-send {
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
  border-radius: 999px;
  padding: 7px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}
.inq-send:hover { background: var(--accent-soft); }
.inq-note { margin: 0; font-size: 11.5px; color: var(--ink-soft); line-height: 1.45; }
.inq-note.flash { color: var(--accent); font-weight: 600; }

.d-styles-label {
  font-size: 11.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink-soft);
  margin-top: 10px;
}
.d-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  overflow-y: auto;
  padding: 2px;
}
.d-thumb {
  width: 72px;
  flex: 0 0 auto;
  border: 2px solid transparent;
  border-radius: 9px;
  padding: 0 0 4px;
  overflow: hidden;
  background: var(--chip-bg);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.d-thumb img { width: 100%; height: 62px; object-fit: cover; display: block; }
.d-thumb-label {
  font-size: 9.5px;
  line-height: 1.25;
  color: var(--ink-soft);
  text-align: center;
  padding: 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.d-thumb.active .d-thumb-label { color: var(--ink); font-weight: 600; }
.d-thumb:hover { border-color: var(--line); }
.d-thumb.active { border-color: var(--accent); }
.d-thumb:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

@media (max-width: 720px) {
  .detail { padding: 10px; }
  .detail-panel {
    grid-template-columns: 1fr;
    max-height: 94vh;
    overflow-y: auto;
  }
  .d-media { min-height: 0; height: 44vh; flex: 0 0 auto; }
  .d-info { overflow-y: visible; padding: 18px 18px 22px; }
  .d-info h2 { font-size: 20px; }
  /* full-width stacked inputs, and 16px font so iOS Safari doesn't zoom on focus */
  .inq-row { flex-direction: column; }
  .inq input, .inq textarea { font-size: 16px; }
}

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 26px 0 40px;
  color: var(--ink-soft);
  font-size: 13.5px;
}
footer a { color: var(--accent); text-decoration: none; font-weight: 600; }

@media (max-width: 560px) {
  .hero-inner { flex-direction: column; align-items: flex-start; padding-top: 36px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .body { padding: 10px 12px 12px; }
  .card h3 { font-size: 15px; }
  .price { font-size: 16px; }
  .count { display: none; }
  .vnav { opacity: 1; }
  .vbtn { width: 36px; height: 36px; }
  .search { font-size: 16px; }
}
