/* ═══════════════════════════════════════════════════════════════
   CARDCRAFT — Profile Card Management System  (AAT-1)
   style.css — single shared stylesheet for all four pages
   Design language: "design-tool blueprint" — dotted canvas,
   selection outlines, and dimension labels, because this project
   is literally about margins, padding, borders and dimensions.
   ═══════════════════════════════════════════════════════════════ */

/* ───────────────────────── 1. Design tokens ───────────────────────── */
:root {
  /* palette */
  --paper: #f2f5f9;        /* blueprint paper background   */
  --panel: #ffffff;        /* raised surfaces              */
  --ink:   #0f1c2e;        /* primary text (deep navy)     */
  --muted: #5a6b82;        /* secondary text               */
  --line:  #d7dfea;        /* hairlines and borders        */
  --dot:   #c6d2e3;        /* canvas grid dots             */
  --blue:  #2454ff;        /* selection blue (accent)      */
  --blue-ink: #1b41e6;     /* accent hover                 */
  --blue-soft: #e6ecff;    /* accent tint                  */
  --amber: #ffb224;        /* highlight / badge            */
  --red:   #e5484d;        /* validation errors            */
  --green: #18a06a;        /* success                      */

  /* type */
  --font-display: "Bricolage Grotesque", "Arial Black", sans-serif;
  --font-body: "Instrument Sans", "Segoe UI", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  /* geometry */
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(15, 28, 46, 0.08);
  --shadow-lift: 0 16px 40px rgba(15, 28, 46, 0.14);
}

/* ───────────────────────── 2. Reset & base ───────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

.container { width: min(1140px, 92%); margin-inline: auto; }

/* mono eyebrow label used above every section heading */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
}
.eyebrow::before {
  content: "";
  width: 9px; height: 9px;
  background: var(--blue);
  border-radius: 2px;
}

.section { padding: 92px 0; }
.section-head { max-width: 620px; margin-bottom: 44px; }
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-top: 10px;
}
.section-head p { color: var(--muted); margin-top: 12px; }

/* ───────────────────────── 3. Buttons ───────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.8em 1.5em;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 6px 16px rgba(36, 84, 255, 0.28);
}
.btn-primary:hover { background: var(--blue-ink); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

/* ───────────────────────── 4. Navbar ───────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(242, 245, 249, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1.5px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}
.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
}
.brand-mark {
  width: 26px; height: 26px;
  border: 2px solid var(--blue);
  border-radius: 7px;
  position: relative;
  background: var(--panel);
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 5px;
  background: var(--blue);
  border-radius: 3px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--muted);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); border-bottom-color: var(--blue); }

.cart-link { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.cart-badge {
  min-width: 21px; height: 21px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
}
.burger span { width: 20px; height: 2px; background: var(--ink); border-radius: 2px; }

/* ───────────────────────── 5. Hero (landing) ───────────────────────── */
.hero { padding: 84px 0 96px; overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-top: 16px;
}
.hero h1 .accent { color: var(--blue); }
.hero-sub { color: var(--muted); font-size: 1.08rem; max-width: 480px; margin-top: 18px; }
.hero-actions { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.hero-note {
  margin-top: 26px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
}
.hero-note b { color: var(--ink); }

/* the "canvas" — dotted grid stage that holds the signature card */
.canvas {
  position: relative;
  border: 1.5px solid var(--line);
  border-radius: 20px;
  background-color: var(--panel);
  background-image: radial-gradient(var(--dot) 1.2px, transparent 1.2px);
  background-size: 18px 18px;
  padding: 56px 40px;
  display: flex;
  justify-content: center;
  box-shadow: var(--shadow);
}

/* selection frame — the Figma-style outline + handles + dimensions */
.selection { position: relative; }
.selection::before {
  content: "";
  position: absolute;
  inset: -12px;
  border: 1.5px solid var(--blue);
  border-radius: 4px;
  pointer-events: none;
}
.handle {
  position: absolute;
  width: 9px; height: 9px;
  background: #fff;
  border: 1.5px solid var(--blue);
  border-radius: 2px;
  z-index: 2;
}
.handle.tl { top: -16px; left: -16px; }
.handle.tr { top: -16px; right: -16px; }
.handle.bl { bottom: -16px; left: -16px; }
.handle.br { bottom: -16px; right: -16px; }

.dim-tag {
  position: absolute;
  left: 50%;
  bottom: -42px;
  transform: translateX(-50%);
  background: var(--blue);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
}

/* floating spec chips around the hero card */
.spec-chip {
  position: absolute;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 6px 11px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  white-space: nowrap;
}
.spec-chip.amber { background: var(--amber); color: var(--ink); }
.chip-1 { top: 26px; left: 18px; }
.chip-2 { bottom: 70px; right: 14px; }

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
.canvas .selection { animation: floaty 5.5s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .canvas .selection { animation: none; }
  html { scroll-behavior: auto; }
}

/* ───────────────────────── 6. Spec strip (stats) ───────────────────────── */
.spec-strip { background: var(--ink); color: var(--paper); }
.spec-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 44px 0;
}
.spec-item {
  padding: 6px 28px;
  border-left: 1.5px solid rgba(242, 245, 249, 0.18);
}
.spec-item:first-child { border-left: none; }
.spec-item b {
  display: block;
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 600;
  color: var(--amber);
}
.spec-item span { font-size: 0.85rem; color: rgba(242, 245, 249, 0.72); }

/* ───────────────────────── 7. Feature cards ───────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.feature {
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
  border-color: var(--blue);
}
.feature-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-weight: 600;
  margin-bottom: 16px;
}
.feature h3 { font-size: 1.02rem; font-weight: 700; margin-bottom: 6px; }
.feature p { font-size: 0.9rem; color: var(--muted); }

/* ───────────────────────── 8. Showcase (landing preview) ───────────────────────── */
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.showcase-cell {
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--panel);
  background-image: radial-gradient(var(--dot) 1.2px, transparent 1.2px);
  background-size: 18px 18px;
  padding: 34px 20px;
  display: flex;
  justify-content: center;
}
.showcase-more { text-align: center; margin-top: 36px; }

/* ───────────────────────── 9. CTA band ───────────────────────── */
.cta-band {
  border: 1.5px dashed var(--blue);
  border-radius: 20px;
  background: var(--blue-soft);
  padding: 52px 40px;
  text-align: center;
}
.cta-band h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.cta-band p { color: var(--muted); margin: 10px 0 24px; }

/* ───────────────────────── 10. Page hero (inner pages) ───────────────────────── */
.page-head { padding: 60px 0 8px; }
.page-head h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 12px;
}
.page-head p { color: var(--muted); margin-top: 10px; max-width: 560px; }

/* ───────────────────────── 11. Product grid ───────────────────────── */
.filter-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 30px 0 34px;
}
.chip {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  transition: all 0.15s ease;
}
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip.active { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  padding-bottom: 96px;
}
.product {
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.product:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }

/* stage = dotted canvas where the live card component is rendered */
.product-stage {
  background-color: var(--paper);
  background-image: radial-gradient(var(--dot) 1.2px, transparent 1.2px);
  background-size: 16px 16px;
  border-bottom: 1.5px solid var(--line);
  padding: 34px 18px;
  display: flex;
  justify-content: center;
  position: relative;
}
/* hover = "select the layer": outline + dimension tag appear */
.product-stage .hover-frame {
  position: absolute;
  inset: 14px;
  border: 1.5px solid var(--blue);
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}
.product-stage .hover-dims {
  position: absolute;
  top: 20px;
  right: 22px;
  background: var(--blue);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 5px;
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}
.product:hover .hover-frame,
.product:hover .hover-dims { opacity: 1; }

.product-info { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-info h3 { font-size: 1.08rem; font-weight: 700; }
.product-info .tagline { font-size: 0.88rem; color: var(--muted); flex: 1; }
.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
}
.price {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.1rem;
}
.add-btn {
  background: var(--ink);
  color: var(--paper);
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.65em 1.2em;
  font-weight: 600;
  font-size: 0.88rem;
  transition: background 0.15s ease, transform 0.15s ease;
}
.add-btn:hover { background: var(--blue); }
.add-btn.added { background: var(--green); }
.add-btn:active { transform: scale(0.96); }

/* ═══════════════════════════════════════════════════════════════
   12. THE PROFILE CARD COMPONENT  (.pcard)
   One reusable base class + eight theme modifiers.
   This block is the heart of the assignment: every theme is built
   from margins, padding, borders, dimensions and box shadows.
   ═══════════════════════════════════════════════════════════════ */
.pcard {
  width: 248px;                 /* fixed dimension            */
  padding: 26px 22px 22px;      /* inner spacing              */
  border: 1.5px solid var(--line);
  border-radius: 18px;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-family: var(--font-body);
}
.pcard-cover { display: none; }  /* only some themes use a cover strip */
.pcard-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, #64748b, #334155);
  margin-bottom: 14px;          /* margin separates avatar from name */
}
.pcard-name { font-size: 1.06rem; font-weight: 700; line-height: 1.3; }
.pcard-role { font-size: 0.82rem; color: var(--muted); margin-top: 3px; }
.pcard-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 16px 0 18px;
  padding-top: 14px;
  border-top: 1.5px solid var(--line);
  width: 100%;
}
.pcard-stats div { display: flex; flex-direction: column; }
.pcard-stats b { font-size: 0.95rem; font-weight: 700; }
.pcard-stats span { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.pcard-btn {
  display: inline-block;
  width: 100%;
  padding: 0.62em 1em;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
}

/* — theme 1 · Minimal Classic — */
.t-minimal { box-shadow: 0 8px 22px rgba(15, 28, 46, 0.07); }

/* — theme 2 · Sunset Gradient — */
.t-gradient {
  background: linear-gradient(145deg, #ff6b4a, #ff3d77);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 14px 34px rgba(255, 61, 119, 0.35);
}
.t-gradient .pcard-role { color: rgba(255, 255, 255, 0.85); }
.t-gradient .pcard-stats { border-top-color: rgba(255, 255, 255, 0.3); }
.t-gradient .pcard-stats span { color: rgba(255, 255, 255, 0.8); }
.t-gradient .pcard-avatar { background: rgba(255, 255, 255, 0.22); border: 1.5px solid rgba(255, 255, 255, 0.55); }
.t-gradient .pcard-btn { background: #fff; color: #ff3d77; }

/* — theme 3 · Dark Mode Pro — */
.t-dark {
  background: #14141c;
  border-color: #2b2b3a;
  color: #ecebf2;
  box-shadow: 0 14px 34px rgba(10, 10, 18, 0.45);
}
.t-dark .pcard-role { color: #9a99ad; }
.t-dark .pcard-stats { border-top-color: #2b2b3a; }
.t-dark .pcard-stats span { color: #9a99ad; }
.t-dark .pcard-avatar { background: linear-gradient(135deg, #0fc2c0, #2454ff); }
.t-dark .pcard-btn { background: #ecebf2; color: #14141c; }

/* — theme 4 · Glass Aurora — */
.t-glass {
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  box-shadow: 0 16px 40px rgba(20, 40, 90, 0.35);
}
.t-glass .pcard-role { color: rgba(255, 255, 255, 0.85); }
.t-glass .pcard-stats { border-top-color: rgba(255, 255, 255, 0.35); }
.t-glass .pcard-stats span { color: rgba(255, 255, 255, 0.8); }
.t-glass .pcard-avatar { background: rgba(255, 255, 255, 0.25); border: 1.5px solid rgba(255, 255, 255, 0.6); }
.t-glass .pcard-btn { background: #fff; color: #4338ca; }
/* aurora backdrop behind the glass card */
.stage-glass {
  background-image: linear-gradient(135deg, #0fc2c0, #5d5fef 55%, #9b5cf6) !important;
  background-size: cover !important;
}

/* — theme 5 · Corporate Edge — */
.t-corporate { padding-top: 0; overflow: hidden; }
.t-corporate .pcard-cover {
  display: block;
  width: calc(100% + 44px);     /* stretch past the padding      */
  margin: 0 -22px;              /* negative margin trick          */
  height: 62px;
  background: #1f3a5f;
}
.t-corporate .pcard-avatar {
  margin-top: -31px;            /* overlap the cover strip        */
  border: 3px solid #fff;
  background: linear-gradient(135deg, #33557f, #1f3a5f);
}
.t-corporate .pcard-btn { background: #1f3a5f; }

/* — theme 6 · Neo Brutalist — */
.t-brutal {
  background: #ffe14d;
  border: 3px solid #111;
  border-radius: 8px;
  box-shadow: 8px 8px 0 #111;
  color: #111;
}
.t-brutal .pcard-role { color: #444; font-weight: 600; }
.t-brutal .pcard-stats { border-top: 3px solid #111; }
.t-brutal .pcard-stats span { color: #444; }
.t-brutal .pcard-avatar { background: #111; border-radius: 8px; }
.t-brutal .pcard-btn { background: #111; border-radius: 8px; }

/* — theme 7 · Pastel Bloom — */
.t-pastel {
  background: #fff0f3;
  border-color: #f6c6d3;
  border-radius: 26px;
  box-shadow: 0 10px 26px rgba(232, 106, 146, 0.2);
}
.t-pastel .pcard-avatar { background: linear-gradient(135deg, #f99bb6, #e86a92); }
.t-pastel .pcard-stats { border-top-color: #f6c6d3; }
.t-pastel .pcard-btn { background: #e86a92; }

/* — theme 8 · Dev Terminal — */
.t-terminal {
  background: #0b1220;
  border-color: #1e3a2f;
  border-radius: 12px;
  color: #d7fbe8;
  font-family: var(--font-mono);
  box-shadow: 0 14px 34px rgba(4, 12, 8, 0.5);
}
.t-terminal .pcard-role { color: #34d399; font-size: 0.76rem; }
.t-terminal .pcard-stats { border-top: 1.5px dashed #1e3a2f; }
.t-terminal .pcard-stats span { color: #6ee7b7; }
.t-terminal .pcard-avatar { background: linear-gradient(135deg, #10b981, #047857); border-radius: 10px; }
.t-terminal .pcard-btn { background: transparent; border: 1.5px solid #34d399; color: #34d399; border-radius: 8px; }

/* ───────────────────────── 13. Cart page ───────────────────────── */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 28px;
  align-items: start;
  padding: 34px 0 96px;
}
.cart-list {
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.cart-row {
  display: grid;
  grid-template-columns: 58px 1fr auto auto auto;
  gap: 18px;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1.5px solid var(--line);
}
.cart-row:last-child { border-bottom: none; }
.swatch {
  width: 54px; height: 54px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
}
.sw-minimal   { background: #fff; }
.sw-gradient  { background: linear-gradient(145deg, #ff6b4a, #ff3d77); }
.sw-dark      { background: #14141c; }
.sw-glass     { background: linear-gradient(135deg, #0fc2c0, #5d5fef); }
.sw-corporate { background: #1f3a5f; }
.sw-brutal    { background: #ffe14d; border: 2px solid #111; }
.sw-pastel    { background: #fdd4de; }
.sw-terminal  { background: #0b1220; border-color: #1e3a2f; }

.cart-item-name { font-weight: 700; font-size: 0.98rem; }
.cart-item-price { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); }

.qty {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.qty button {
  width: 32px; height: 32px;
  border: none;
  background: transparent;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  transition: background 0.12s ease;
}
.qty button:hover { background: var(--blue-soft); color: var(--blue); }
.qty output {
  min-width: 30px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
}
.line-total { font-family: var(--font-mono); font-weight: 600; min-width: 74px; text-align: right; }
.remove-btn {
  width: 32px; height: 32px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 0.95rem;
  transition: all 0.12s ease;
}
.remove-btn:hover { border-color: var(--red); color: var(--red); background: #fdecec; }

/* summary panel — styled like a spec / invoice sheet */
.summary {
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  position: sticky;
  top: 92px;
}
.summary h3 {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 14px;
  border-bottom: 1.5px dashed var(--line);
  margin-bottom: 16px;
}
.summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 10px;
}
.summary-line span:last-child { font-family: var(--font-mono); color: var(--ink); }
.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 1.5px dashed var(--line);
  padding-top: 14px;
  margin: 14px 0 20px;
  font-weight: 700;
}
.summary-total span:last-child { font-family: var(--font-mono); font-size: 1.3rem; }
.summary-note {
  margin-top: 14px;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
}

/* empty state — an invitation to act */
.empty-state {
  border: 1.5px dashed var(--line);
  border-radius: 20px;
  background: var(--panel);
  text-align: center;
  padding: 76px 30px;
  margin: 34px 0 96px;
}
.empty-mark {
  width: 66px; height: 66px;
  margin: 0 auto 20px;
  border: 1.5px dashed var(--blue);
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 1.4rem;
  color: var(--blue);
}
.empty-state h2 { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; }
.empty-state p { color: var(--muted); margin: 8px 0 24px; }

/* ───────────────────────── 14. Payment page ───────────────────────── */
.pay-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: start;
  padding: 34px 0 96px;
}
.pay-form {
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
}
.pay-form fieldset { border: none; margin-bottom: 26px; }
.pay-form legend {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 16px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; }
.field input {
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  background: var(--paper);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(36, 84, 255, 0.15);
}
.field input.mono { font-family: var(--font-mono); letter-spacing: 0.04em; }
.field input.invalid { border-color: var(--red); background: #fff7f7; }
.err {
  font-size: 0.76rem;
  color: var(--red);
  margin-top: 5px;
  min-height: 1em;
  visibility: hidden;
}
.err.show { visibility: visible; }
.accepted {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-top: -6px;
  margin-bottom: 16px;
}

/* order summary items on payment page */
.mini-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.9rem;
}
.mini-item .swatch { width: 38px; height: 38px; border-radius: 9px; }
.mini-item .m-name { flex: 1; font-weight: 600; }
.mini-item .m-qty { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); }
.mini-item .m-price { font-family: var(--font-mono); font-weight: 600; }

/* ───────────────────────── 15. Toast & modal ───────────────────────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 80px);
  background: var(--ink);
  color: var(--paper);
  padding: 12px 22px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lift);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  z-index: 90;
  pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 28, 46, 0.55);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal {
  background: var(--panel);
  border-radius: 20px;
  padding: 44px 38px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  animation: pop 0.3s ease;
}
@keyframes pop {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.check-mark {
  width: 72px; height: 72px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 2rem;
  display: grid;
  place-items: center;
}
.modal h2 { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; }
.modal .order-id {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: var(--paper);
  border: 1.5px dashed var(--line);
  border-radius: 8px;
  display: inline-block;
  padding: 6px 14px;
  margin: 14px 0 8px;
}
.modal p { color: var(--muted); font-size: 0.92rem; margin-bottom: 22px; }

/* ───────────────────────── 16. Footer ───────────────────────── */
.footer {
  border-top: 1.5px solid var(--line);
  background: var(--panel);
  padding: 56px 0 0;
  margin-top: 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 44px;
}
.footer-blurb { color: var(--muted); font-size: 0.9rem; max-width: 320px; margin-top: 12px; }
.footer h4 {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.footer ul { list-style: none; }
.footer li { margin-bottom: 9px; }
.footer li a { font-size: 0.92rem; color: var(--ink); }
.footer li a:hover { color: var(--blue); }
.footer-bottom {
  border-top: 1.5px solid var(--line);
  padding: 18px 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--muted);
}

/* ───────────────────────── 17. Responsive ───────────────────────── */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero { padding: 60px 0 76px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .showcase-grid { grid-template-columns: repeat(2, 1fr); }
  .showcase-cell:last-child { display: none; }
  .cart-layout, .pay-layout { grid-template-columns: 1fr; }
  .summary { position: static; }
}

@media (max-width: 820px) {
  .burger { display: flex; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--panel);
    border-bottom: 1.5px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 10px 4%;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 13px 4px; width: 100%; }
  .spec-grid { grid-template-columns: repeat(2, 1fr); row-gap: 26px; }
  .spec-item:nth-child(3) { border-left: none; }
}

@media (max-width: 620px) {
  .section { padding: 66px 0; }
  .features-grid, .showcase-grid { grid-template-columns: 1fr; }
  .showcase-cell:last-child { display: flex; }
  .form-grid { grid-template-columns: 1fr; }
  .cart-row {
    grid-template-columns: 46px 1fr auto;
    grid-template-areas:
      "sw name remove"
      "sw qty  total";
    row-gap: 12px;
  }
  .swatch { grid-area: sw; width: 46px; height: 46px; }
  .cart-item-info { grid-area: name; }
  .qty { grid-area: qty; justify-self: start; }
  .line-total { grid-area: total; }
  .remove-btn { grid-area: remove; justify-self: end; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .canvas { padding: 46px 18px; }
  .chip-2 { bottom: 46px; right: 6px; }
  .spec-item { padding: 6px 16px; }
  .spec-item b { font-size: 1.6rem; }
}
