/* ==========================================================================
   PIXEL TO PLASTIC NZ — Design System
   --------------------------------------------------------------------------
   Structure:
     1.  Tokens (dark = default, light = [data-theme="light"])
     2.  Reset & base
     3.  Layout primitives
     4.  Typography
     5.  Icons
     6.  Buttons
     7.  Forms
     8.  Badges, pills, tags
     9.  Cards & media
     10. Navigation
     11. Hero & home
     12. Shop / product
     13. Reviews
     14. Cart drawer & modal
     15. Contact, policy, footer
     16. Admin
     17. Utilities & motion
   ========================================================================== */

/* ==========================================================================
   1. TOKENS
   --------------------------------------------------------------------------
   The theme attribute is always written by the inline script in <head>, so
   each palette is declared exactly once. :root doubles as the no-JS fallback.
   ========================================================================== */

:root {
  color-scheme: dark;

  /* Surfaces */
  --bg: #0e0e10;
  --bg-sunken: #0a0a0c;
  --surface: #151517;
  --surface-2: #1c1c20;
  --surface-3: #26262b;

  /* Lines */
  --border: #292a2e;
  --border-strong: #3a3b41;

  /* Text */
  --text: #f2f2f3;
  --text-muted: #a2a2aa;
  --text-subtle: #6d6d76;

  /* Ink — the primary action colour. Deliberately not the accent. */
  --ink: #f2f2f3;
  --ink-text: #0e0e10;
  --ink-hover: #ffffff;

  /* Accent — clay. Links, focus, active states, the mark. Nothing else. */
  --accent: #e8895e;
  --accent-hover: #f19b73;
  --accent-soft: rgba(232, 137, 94, 0.14);
  --accent-line: rgba(232, 137, 94, 0.35);

  /* Status */
  --success: #63bd82;
  --success-soft: rgba(99, 189, 130, 0.13);
  --danger: #e5715f;
  --danger-soft: rgba(229, 113, 95, 0.13);
  --warn: #dfb057;
  --warn-soft: rgba(223, 176, 87, 0.13);

  /* Elevation — dark leans on borders, not shadow */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
  --overlay: rgba(6, 6, 8, 0.72);

  /* Type */
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;

  /* Radii — airy on marketing surfaces, compact on dense ones */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-full: 999px;

  /* Rhythm */
  --gap: 24px;
  --section-y: 96px;
  --section-y-tight: 64px;
  --page-x: 32px;
  --maxw: 1180px;
  --nav-h: 64px;
  --rail-fade: 72px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

:root[data-theme='light'] {
  color-scheme: light;

  --bg: #fafaf9;
  --bg-sunken: #f2f2f0;
  --surface: #ffffff;
  --surface-2: #f5f5f3;
  --surface-3: #ebebe8;

  --border: #e4e3df;
  --border-strong: #cfcec9;

  --text: #17171a;
  --text-muted: #5f5f68;
  --text-subtle: #8b8b93;

  --ink: #17171a;
  --ink-text: #ffffff;
  --ink-hover: #000000;

  --accent: #a8442a;
  --accent-hover: #8e3821;
  --accent-soft: rgba(168, 68, 42, 0.08);
  --accent-line: rgba(168, 68, 42, 0.28);

  --success: #2f7d4f;
  --success-soft: rgba(47, 125, 79, 0.09);
  --danger: #b4402b;
  --danger-soft: rgba(180, 64, 43, 0.08);
  --warn: #8a6316;
  --warn-soft: rgba(138, 99, 22, 0.1);

  --shadow-sm: 0 1px 2px rgba(23, 23, 26, 0.05);
  --shadow-md: 0 4px 16px rgba(23, 23, 26, 0.07);
  --shadow-lg: 0 24px 60px rgba(23, 23, 26, 0.16);
  --overlay: rgba(23, 23, 26, 0.42);
}

/* ==========================================================================
   2. RESET & BASE
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

/* One focus treatment for the whole site. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

::selection {
  background: var(--accent-soft);
  color: var(--text);
}

::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border: 3px solid var(--bg);
  border-radius: var(--r-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-subtle);
}

/* ==========================================================================
   3. LAYOUT PRIMITIVES
   ========================================================================== */

.page {
  display: none;
  padding-top: var(--nav-h);
  min-height: 100vh;
}

.page.active {
  display: block;
}

.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--section-y) var(--page-x);
}

.section--tight {
  padding-top: var(--section-y-tight);
  padding-bottom: var(--section-y-tight);
}

.section--flush-top {
  padding-top: 0;
}

.section--flush-bottom {
  padding-bottom: 0;
}

.section--narrow {
  max-width: 780px;
}

.section-head {
  margin-bottom: 40px;
}

.section-head--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.rule {
  height: 1px;
  background: var(--border);
  border: none;
  max-width: var(--maxw);
  margin: 0 auto;
}

/* ==========================================================================
   4. TYPOGRAPHY
   ========================================================================== */

h1,
h2,
h3,
h4 {
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.021em;
  color: var(--text);
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(1.6rem, 3.2vw, 2.15rem);
  margin-bottom: 12px;
}

.section-sub {
  color: var(--text-muted);
  max-width: 58ch;
  font-size: 1.02rem;
}

.lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.prose {
  color: var(--text-muted);
  line-height: 1.75;
}

.prose h3 {
  color: var(--text);
  font-size: 1.05rem;
  margin: 34px 0 10px;
}

.prose p + p {
  margin-top: 14px;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

/* Numbers, prices, dimensions — tabular so columns line up. */
.num {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.muted {
  color: var(--text-muted);
}

.subtle {
  color: var(--text-subtle);
}

.link {
  color: var(--accent);
  font-weight: 500;
}

.link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ==========================================================================
   5. ICONS
   ========================================================================== */

.ico {
  /* inline-block so icons can sit mid-sentence; flex parents blockify it anyway */
  display: inline-block;
  vertical-align: -0.15em;
  width: 1.05em;
  height: 1.05em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ico--lg {
  width: 22px;
  height: 22px;
}

.ico--xl {
  width: 30px;
  height: 30px;
  stroke-width: 1.3;
}

/* ==========================================================================
   6. BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: none;
  font-size: 0.925rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease),
    color 0.15s var(--ease), opacity 0.15s var(--ease);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn--sm {
  height: 34px;
  padding: 0 14px;
  font-size: 0.865rem;
}

.btn--lg {
  height: 50px;
  padding: 0 26px;
  font-size: 1rem;
}

.btn--block {
  width: 100%;
}

/* Primary = ink. The accent is never a button fill. */
.btn--primary {
  background: var(--ink);
  color: var(--ink-text);
}

.btn--primary:hover:not(:disabled) {
  background: var(--ink-hover);
}

.btn--secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn--secondary:hover:not(:disabled) {
  background: var(--surface-2);
  border-color: var(--text-subtle);
}

.btn--ghost {
  color: var(--text-muted);
}

.btn--ghost:hover:not(:disabled) {
  background: var(--surface-2);
  color: var(--text);
}

.btn--danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: var(--danger);
}

.btn--danger:hover:not(:disabled) {
  background: var(--danger);
  color: #fff;
}

/* Icon-only square button */
.btn--icon {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: var(--r-sm);
  color: var(--text-muted);
}

.btn--icon:hover:not(:disabled) {
  background: var(--surface-2);
  color: var(--text);
}

.btn-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Arrow nudge — the one motion flourish on buttons. */
.btn .ico--arrow {
  transition: transform 0.18s var(--ease);
}

.btn:hover .ico--arrow {
  transform: translateX(3px);
}

.btn--back:hover .ico--arrow {
  transform: translateX(-3px);
}

/* ==========================================================================
   7. FORMS
   ========================================================================== */

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 18px;
}

.field > label,
.label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0;
}

.label--inline {
  display: block;
  margin-bottom: 8px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field-hint {
  font-size: 0.8rem;
  color: var(--text-subtle);
}

.field-hint--warn {
  color: var(--warn);
}

.input,
.select,
.textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  padding: 10px 13px;
  min-height: 42px;
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
  outline: none;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--text-subtle);
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.textarea {
  resize: vertical;
  min-height: 112px;
  line-height: 1.6;
}

.select {
  appearance: none;
  padding-right: 38px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 19px) calc(50% + 1px), calc(100% - 14px) calc(50% + 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.input--sm {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 0.875rem;
}

.input--qty {
  width: 64px;
  text-align: center;
}

/* Selectable option pills (size / material / colour) */
.opt-group {
  margin-bottom: 22px;
}

.opt-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.opt {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  padding: 9px 14px;
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease);
}

.opt:hover {
  border-color: var(--text-subtle);
}

.opt.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.opt-surcharge {
  color: var(--text-subtle);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

/* Drop zone */
.dropzone {
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-lg);
  padding: 48px 32px;
  text-align: center;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.dropzone:hover,
.dropzone.is-dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dropzone .ico {
  display: block;
  color: var(--text-subtle);
  margin: 0 auto 14px;
}

.dropzone h3 {
  font-size: 1rem;
  margin-bottom: 5px;
}

.dropzone p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 18px;
}

.dropzone input[type='file'] {
  display: none;
}

.file-chip {
  display: none;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--accent-line);
  border-radius: var(--r-sm);
  padding: 11px 14px;
  margin-top: 14px;
  font-size: 0.92rem;
}

.file-chip.is-visible {
  display: flex;
}

.file-chip .ico {
  color: var(--accent);
}

.file-chip .file-name {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-chip .file-remove {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-subtle);
  cursor: pointer;
  display: flex;
  padding: 4px;
  border-radius: var(--r-xs);
}

.file-chip .file-remove:hover {
  color: var(--danger);
  background: var(--danger-soft);
}

/* Status messages */
.status {
  display: none;
  align-items: flex-start;
  gap: 9px;
  padding: 12px 15px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  margin-top: 16px;
  font-size: 0.92rem;
  line-height: 1.5;
}

.status.is-visible {
  display: flex;
}

.status .ico {
  margin-top: 3px;
}

.status--success {
  background: var(--success-soft);
  border-color: var(--success);
  color: var(--success);
}

.status--error {
  background: var(--danger-soft);
  border-color: var(--danger);
  color: var(--danger);
}

.status--loading {
  background: var(--surface-2);
  color: var(--text-muted);
}

/* Star rating input */
.star-input {
  display: inline-flex;
  gap: 4px;
}

.star-btn {
  background: none;
  border: none;
  padding: 2px;
  cursor: pointer;
  line-height: 0;
  color: var(--border-strong);
  transition: color 0.12s var(--ease), transform 0.12s var(--ease);
}

.star-btn .ico {
  width: 26px;
  height: 26px;
  stroke-width: 1.4;
}

.star-btn:hover {
  transform: scale(1.12);
}

.star-btn.is-on {
  color: var(--warn);
}

.star-btn.is-on .ico {
  fill: var(--warn);
}

/* ==========================================================================
   8. BADGES, PILLS, TAGS
   ========================================================================== */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: 3px 10px;
  white-space: nowrap;
}

.tag--accent {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.tag--success {
  color: var(--success);
  background: var(--success-soft);
  border-color: var(--success);
}

.tag--danger {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: var(--danger);
}

.tag--warn {
  color: var(--warn);
  background: var(--warn-soft);
  border-color: var(--warn);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Category filter tabs */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 28px;
}

/* Only one category? The tab bar renders empty — don't leave its gap behind. */
.tabs:empty {
  display: none;
}

.tab {
  background: none;
  border: 1px solid transparent;
  border-radius: var(--r-full);
  color: var(--text-muted);
  padding: 7px 15px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}

.tab:hover {
  background: var(--surface-2);
  color: var(--text);
}

.tab.is-active {
  background: var(--ink);
  color: var(--ink-text);
}

/* ==========================================================================
   9. CARDS & MEDIA
   ========================================================================== */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.card--pad {
  padding: 22px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--gap);
}

/* Uniform square media — keeps grids aligned whatever gets uploaded. */
.media {
  position: relative;
  aspect-ratio: 1;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}

.media-empty {
  color: var(--text-subtle);
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.product-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.product-card:hover .media img {
  transform: scale(1.03);
}

.product-card.is-sold-out .media {
  opacity: 0.5;
}

.product-card-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.product-card-body h3 {
  font-size: 0.98rem;
  font-weight: 550;
}

.product-card-desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 4px;
}

.price {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.015em;
}

.price-from {
  font-size: 0.78rem;
  color: var(--text-subtle);
  font-weight: 400;
  margin-right: 3px;
}

.card-flag {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--r-full);
  padding: 4px 10px;
}

/* Empty / loading states */
.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 72px 20px;
  color: var(--text-muted);
}

.empty .ico {
  display: block;
  color: var(--text-subtle);
  margin: 0 auto 14px;
}

.empty h3 {
  font-size: 1.02rem;
  margin-bottom: 6px;
}

.empty p {
  font-size: 0.93rem;
}

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--gap);
}

.skeleton {
  background: var(--surface-2);
  border-radius: var(--r-lg);
  position: relative;
  overflow: hidden;
}

.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--surface-3), transparent);
  animation: shimmer 1.4s infinite;
}

.skeleton--card {
  height: 340px;
}

.skeleton--row {
  height: 18px;
  border-radius: var(--r-xs);
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

/* ==========================================================================
   10. NAVIGATION
   ========================================================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 var(--page-x);
  z-index: 100;
  transition: border-color 0.2s var(--ease);
}

.nav.is-scrolled {
  border-bottom-color: var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand:hover {
  color: var(--text);
}

.brand-mark {
  width: 22px;
  height: 22px;
  flex: none;
  color: var(--accent);
}

.brand-region {
  color: var(--text-subtle);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  padding: 1px 5px;
  margin-left: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin-left: auto;
}

.nav-links a {
  display: block;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: var(--r-sm);
  transition: color 0.15s var(--ease), background-color 0.15s var(--ease);
}

.nav-links a:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav-links a.active {
  color: var(--text);
  background: var(--surface-2);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-divider {
  width: 1px;
  height: 22px;
  background: var(--border);
  margin: 0 6px;
}

.cart-btn {
  position: relative;
}

.cart-count {
  position: absolute;
  top: 1px;
  right: 1px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
  border-radius: var(--r-full);
  font-variant-numeric: tabular-nums;
}

:root[data-theme='light'] .cart-count {
  color: #fff;
}

/* Theme toggle: shows the icon of the mode you'd switch to. */
.theme-toggle .ico-sun {
  display: none;
}

:root[data-theme='dark'] .theme-toggle .ico-sun {
  display: block;
}

:root[data-theme='dark'] .theme-toggle .ico-moon {
  display: none;
}

.nav-burger {
  display: none;
}

/* ==========================================================================
   11. HERO & HOME
   ========================================================================== */

.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(56px, 9vw, 104px) var(--page-x) clamp(48px, 7vw, 80px);
}

.hero-inner {
  max-width: 820px;
}

.hero h1 {
  font-size: clamp(2.1rem, 5.4vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.032em;
  line-height: 1.06;
  margin-bottom: 20px;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero p {
  font-size: clamp(1.02rem, 1.6vw, 1.15rem);
  color: var(--text-muted);
  max-width: 52ch;
  margin-bottom: 30px;
}

.hero .btn-row {
  gap: 10px;
}

/* Factual strip — every claim here already existed on the site. */
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 38px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}

.hero-fact {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.hero-fact .ico {
  color: var(--accent);
}

/* Three-step explainer */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  counter-reset: step;
}

.step {
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.step-num {
  counter-increment: step;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  margin-bottom: 8px;
}

.step-num::before {
  content: '0' counter(step);
}

.step h3 {
  font-size: 0.98rem;
  margin-bottom: 6px;
}

.step p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Featured horizontal rail */
.rail-outer {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
  /* Each edge softens only when there's actually more row past it, so the
     first card isn't dimmed at rest. JS toggles the two classes on scroll. */
  --fade-l: 0px;
  --fade-r: 0px;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0,
    #000 var(--fade-l),
    #000 calc(100% - var(--fade-r)),
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0,
    #000 var(--fade-l),
    #000 calc(100% - var(--fade-r)),
    transparent 100%
  );
  /* No transition here on purpose: transitioning a custom property leaves
     these pinned at 0 in Chrome, and the switch happens the moment scrolling
     starts or stops, where it isn't perceptible anyway. */
}

.rail-outer.is-fade-left {
  --fade-l: var(--rail-fade);
}

.rail-outer.is-fade-right {
  --fade-r: var(--rail-fade);
}

.rail-outer::-webkit-scrollbar {
  display: none;
}

.rail {
  display: flex;
  gap: 16px;
  width: max-content;
  padding: 0 var(--page-x);
  margin: 0 auto;
  min-width: 100%;
}

.rail-card {
  width: 216px;
  flex: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.rail-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.rail-card:hover .media img {
  transform: scale(1.04);
}

.rail-card-body {
  padding: 12px 14px 14px;
}

.rail-card-body h4 {
  font-size: 0.88rem;
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rail-card-cat {
  font-size: 0.74rem;
  color: var(--text-subtle);
  margin-bottom: 3px;
}

/* Quote form panel — the one centred block on the site. Heading and panel
   centre together; the fields inside stay left-aligned so labels still scan. */
#quoteSection .section-head {
  text-align: center;
}

#quoteSection .section-sub {
  margin-left: auto;
  margin-right: auto;
}

.quote-panel {
  max-width: 720px;
  margin: 0 auto;
}

/* ==========================================================================
   12. SHOP / PRODUCT
   ========================================================================== */

.product-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 48px;
  align-items: start;
}

.gallery-main {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface-2);
  aspect-ratio: 1;
}

.gallery-track {
  display: flex;
  height: 100%;
  transition: transform 0.4s var(--ease);
}

.gallery-slide {
  flex: none;
  height: 100%;
}

.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-subtle);
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-full);
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.15s var(--ease);
  z-index: 2;
}

.gallery-nav:hover {
  background: var(--surface-2);
}

.gallery-nav.is-visible {
  display: flex;
}

.gallery-nav--prev {
  left: 10px;
}

.gallery-nav--next {
  right: 10px;
}

.dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}

.dot {
  width: 6px;
  height: 6px;
  border: none;
  padding: 0;
  border-radius: var(--r-full);
  background: var(--border-strong);
  cursor: pointer;
  transition: background-color 0.2s var(--ease), width 0.2s var(--ease);
}

.dot.is-active {
  background: var(--accent);
  width: 18px;
}

.thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.15s var(--ease), opacity 0.15s var(--ease);
  opacity: 0.65;
}

.thumb:hover {
  opacity: 1;
}

.thumb.is-active {
  border-color: var(--accent);
  opacity: 1;
  box-shadow: 0 0 0 1px var(--accent);
}

.product-title {
  font-size: clamp(1.5rem, 2.6vw, 1.95rem);
  margin-bottom: 10px;
}

.product-desc {
  color: var(--text-muted);
  line-height: 1.7;
  margin: 16px 0 28px;
}

/* Buy box — sticky on desktop so the price follows long option lists. */
.buy-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 18px;
  margin-top: 8px;
}

.buy-box-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.buy-price {
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.buy-currency {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-subtle);
  margin-left: 2px;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.soldout-box {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  padding: 20px;
  text-align: center;
}

.soldout-box h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.soldout-box p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.char-count {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 5px;
  font-size: 0.78rem;
  color: var(--text-subtle);
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.spec {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 12px 14px;
}

.spec-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-subtle);
  margin-bottom: 3px;
}

.spec-value {
  font-size: 0.92rem;
  font-weight: 500;
}

/* ==========================================================================
   13. REVIEWS
   ========================================================================== */

.stars {
  display: inline-flex;
  gap: 2px;
  color: var(--border-strong);
}

.stars .ico {
  width: 15px;
  height: 15px;
  stroke-width: 1.5;
}

.stars .star-on {
  color: var(--warn);
}

.stars .star-on .ico {
  fill: var(--warn);
}

.stars--lg .ico {
  width: 20px;
  height: 20px;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.review-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.review-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.review-photo {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
}

.review-body {
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.65;
  white-space: pre-wrap;
}

.review-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}

.review-name {
  font-weight: 550;
  font-size: 0.9rem;
}

.review-date {
  font-size: 0.8rem;
  color: var(--text-subtle);
}

.review-product {
  font-size: 0.8rem;
  color: var(--text-subtle);
}

.reviews-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 22px;
  margin-bottom: 24px;
}

.reviews-score {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.reviews-avg {
  font-size: 1.9rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* Before the first review there's no score to show — just the invitation. */
.reviews-summary.is-empty .reviews-avg,
.reviews-summary.is-empty .stars {
  display: none;
}

.review-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.review-form h3 {
  font-size: 1.02rem;
  margin-bottom: 20px;
}

.photo-preview {
  display: none;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.photo-preview img {
  width: 78px;
  height: 78px;
  object-fit: cover;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
}

/* ==========================================================================
   14. CART DRAWER & MODAL
   ========================================================================== */

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease), visibility 0.25s var(--ease);
}

.drawer-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.drawer {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 100%;
  max-width: 392px;
  background: var(--bg);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s var(--ease);
}

.drawer-overlay.is-open .drawer {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.drawer-head h3 {
  font-size: 1rem;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 6px 18px;
}

.drawer-foot {
  padding: 16px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.cart-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-img {
  width: 54px;
  height: 54px;
  flex: none;
  object-fit: cover;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
}

.cart-item-main {
  flex: 1;
  min-width: 0;
}

.cart-item-title {
  font-size: 0.9rem;
  font-weight: 550;
  margin-bottom: 2px;
}

.cart-item-variant {
  font-size: 0.79rem;
  color: var(--text-subtle);
  line-height: 1.45;
}

.cart-item-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.cart-item-price {
  font-size: 0.88rem;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}

.cart-remove {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-subtle);
  cursor: pointer;
  padding: 4px;
  display: flex;
  border-radius: var(--r-xs);
}

.cart-remove:hover {
  color: var(--danger);
  background: var(--danger-soft);
}

.totals-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.88rem;
  color: var(--text-muted);
  padding: 3px 0;
  font-variant-numeric: tabular-nums;
}

.totals-row--discount {
  color: var(--success);
}

.totals-row--total {
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.discount-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.discount-row .input {
  text-transform: uppercase;
}

.hint-line {
  font-size: 0.8rem;
  margin: 6px 0 0;
}

.hint-line--ok {
  color: var(--success);
}

.hint-line--err {
  color: var(--danger);
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: 300;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.is-open {
  display: flex;
}

.modal {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px;
  max-width: 1000px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
}

.modal-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 36px;
  align-items: start;
}

.modal-title {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.modal-desc {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 22px;
}

/* ==========================================================================
   15. CONTACT, POLICY, FOOTER
   ========================================================================== */

.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: start;
}

.contact-info h3 {
  font-size: 1rem;
  margin-bottom: 12px;
}

.contact-info p {
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.7;
  font-size: 0.95rem;
}

.contact-list {
  margin-top: 28px;
  border-top: 1px solid var(--border);
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}

.contact-item .ico {
  color: var(--text-subtle);
  margin-top: 3px;
}

.contact-item-label {
  font-size: 0.78rem;
  color: var(--text-subtle);
  margin-bottom: 1px;
}

.footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 48px var(--page-x) 32px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
}

.footer-blurb {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 34ch;
  margin-top: 14px;
}

.footer h4 {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 14px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-bottom {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px var(--page-x) 32px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.84rem;
  color: var(--text-subtle);
}

/* ==========================================================================
   16. ADMIN
   ========================================================================== */

.admin-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.admin-login-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 36px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-md);
}

.admin-login-box h2 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.admin-login-box > p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 26px;
}

.admin-shell {
  max-width: 1560px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 36px) var(--page-x) 64px;
}

.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.admin-head h1 {
  font-size: 1.35rem;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 18px;
}

.stat-num {
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  margin-bottom: 3px;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.83rem;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: 24px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.panel-head h2 {
  font-size: 0.98rem;
}

.panel-body {
  padding: 18px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  padding: 10px 16px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-subtle);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  vertical-align: top;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover td {
  background: var(--surface-2);
}

.table-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Status badges in tables */
.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: var(--r-full);
  font-size: 0.75rem;
  font-weight: 550;
  text-transform: capitalize;
  border: 1px solid;
}

.badge-new {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.badge-reviewed {
  color: var(--warn);
  background: var(--warn-soft);
  border-color: var(--warn);
}

.badge-done {
  color: var(--success);
  background: var(--success-soft);
  border-color: var(--success);
}

/* Compact row actions — the admin's workhorse button */
.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  padding: 5px 11px;
  border-radius: var(--r-sm);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  margin: 0 4px 4px 0;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease),
    color 0.15s var(--ease);
}

.action-btn:hover {
  background: var(--surface-2);
  border-color: var(--text-subtle);
  color: var(--text);
}

.action-btn.download {
  color: var(--text);
  border-color: var(--border-strong);
}

.action-btn--primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--ink-text);
}

.action-btn--primary:hover {
  background: var(--ink-hover);
  border-color: var(--ink-hover);
  color: var(--ink-text);
}

.action-btn--danger {
  color: var(--danger);
  border-color: var(--border-strong);
}

.action-btn--danger:hover {
  background: var(--danger-soft);
  border-color: var(--danger);
  color: var(--danger);
}

/* Filter pills above tables */
.filter-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.filter-btn {
  background: none;
  border: 1px solid transparent;
  border-radius: var(--r-full);
  color: var(--text-muted);
  padding: 6px 14px;
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}

.filter-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

.filter-btn.active {
  background: var(--ink);
  color: var(--ink-text);
}

/* Stock / material / custom-option groups */
.stock-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  margin-bottom: 10px;
}

.stock-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.stock-material-name {
  font-size: 0.92rem;
  font-weight: 600;
}

.stock-colours {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.colour-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-full);
  padding: 4px 6px 4px 12px;
  font-size: 0.85rem;
}

.colour-tag button {
  background: none;
  border: none;
  color: var(--text-subtle);
  cursor: pointer;
  line-height: 0;
  padding: 3px;
  border-radius: var(--r-full);
  display: inline-flex;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}

.colour-tag button:hover {
  color: var(--danger);
  background: var(--danger-soft);
}

.add-material-row {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.add-material-row .input {
  flex: 1;
  min-width: 220px;
}

/* Admin project cards */
.admin-projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}

.admin-project-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s var(--ease);
}

.admin-project-card:hover {
  border-color: var(--border-strong);
}

.admin-project-img {
  width: 100%;
  aspect-ratio: 1;
  background: var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.admin-project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-project-info {
  padding: 11px 13px 4px;
  font-size: 0.9rem;
}

.admin-project-actions {
  padding: 6px 13px 12px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: auto;
}

/* Typeahead dropdowns (category / material) */
.combo {
  position: relative;
}

.combo-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  margin-top: 4px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 50;
  box-shadow: var(--shadow-md);
}

.combo-item {
  padding: 9px 13px;
  cursor: pointer;
  font-size: 0.9rem;
}

.combo-item:hover {
  background: var(--surface-2);
}

/* Photo thumbnails in the project editor */
.photo-tile {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: var(--r-sm);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  cursor: grab;
}

.photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Danger confirmation dialogs */
.confirm-modal {
  max-width: 440px;
  text-align: center;
}

.confirm-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin: 0 auto 16px;
  border-radius: var(--r-full);
  background: var(--danger-soft);
  color: var(--danger);
}

.confirm-modal h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.confirm-modal p {
  color: var(--text-muted);
  font-size: 0.93rem;
  margin-bottom: 22px;
}

.confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.field-inline input[type='checkbox'] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.field-inline label {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text);
  cursor: pointer;
}

.settings-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: flex-end;
}

/* ==========================================================================
   17. UTILITIES & MOTION
   ========================================================================== */

.stack {
  display: flex;
  flex-direction: column;
}

.row {
  display: flex;
  align-items: center;
}

.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.ml-auto { margin-left: auto; }
.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.fade-up {
  animation: fadeUp 0.5s var(--ease) both;
}

.fade-up-1 { animation-delay: 0.05s; }
.fade-up-2 { animation-delay: 0.12s; }
.fade-up-3 { animation-delay: 0.19s; }

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.spin {
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 940px) {
  .product-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .modal-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .step {
    padding: 18px 0;
  }
}

@media (max-width: 720px) {
  :root {
    --page-x: 20px;
    --section-y: 64px;
    --section-y-tight: 48px;
    --gap: 16px;
    --rail-fade: 28px;
  }

  .nav {
    gap: 8px;
  }

  .nav-burger {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0 var(--page-x);
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s var(--ease), padding 0.3s var(--ease);
  }

  .nav-links.is-open {
    max-height: 340px;
    padding: 10px var(--page-x) 16px;
  }

  .nav-links a {
    padding: 11px 12px;
    font-size: 0.98rem;
  }

  .nav-actions {
    margin-left: auto;
  }

  .nav-divider {
    display: none;
  }

  /* Two-up on phones — 150px keeps both columns on a 375px screen. */
  .grid,
  .skeleton-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .skeleton--card {
    height: 250px;
  }

  .product-card-body {
    padding: 12px 13px 14px;
  }

  .reviews-grid {
    grid-template-columns: 1fr;
  }

  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .spec-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .modal {
    padding: 20px;
    max-height: 94vh;
  }

  .dropzone {
    padding: 36px 20px;
  }

  .drawer {
    max-width: 100%;
  }

  .hero-facts {
    gap: 8px 20px;
  }
}
