/* MagnetPhoto — site styles. Tokens first; everything else uses them. */
:root {
  --navy: #1F2A44;
  --navy-2: #2D3A5C;
  --heart: #D93A55;
  --heart-dark: #B82A44;
  --gold: #FFC845;
  --cream: #FFF7F3;
  --paper: #FFFFFF;
  --ink: #1F2A44;
  --muted: #5B6478;
  --line: #E7E1DC;
  --ok: #1E7A55;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 8px 24px rgba(31, 42, 68, 0.10);
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'Figtree', system-ui, sans-serif;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 17px/1.55 var(--body);
}
img { max-width: 100%; display: block; }
a { color: var(--heart-dark); }
a:hover { color: var(--navy); }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 0.4em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Draft banner: shown while catalogue.pricesConfirmed is false */
.draft { background: var(--gold); color: var(--navy); text-align: center; font-weight: 700; font-size: 0.9rem; padding: 6px 12px; }

/* Header */
.head { background: var(--paper); border-bottom: 1px solid var(--line); }
.head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; flex-wrap: wrap; }
.brand img { height: 40px; width: auto; }
.nav { display: flex; gap: 4px 18px; flex-wrap: wrap; align-items: center; }
.nav a { color: var(--navy); text-decoration: none; font-weight: 600; font-size: 0.97rem; padding: 10px 0; }
.nav a:hover { color: var(--heart); }
.nav { margin-left: auto; }
.cart-link { display: inline-flex; align-items: center; gap: 6px; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 999px; text-decoration: none; font-weight: 700; }
.cart-link:hover { background: var(--navy-2); color: #fff; }
.cart-count { background: var(--heart); color: #fff; border-radius: 999px; font-size: 0.8rem; min-width: 22px; text-align: center; padding: 0 6px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0; font: 700 1rem var(--body); text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--heart); color: #fff; }
.btn-primary:hover { background: var(--heart-dark); color: #fff; }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-2); color: #fff; }
.btn-ghost { background: transparent; color: var(--navy); border: 2px solid var(--navy); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* Hero */
.hero { padding: 56px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.hero p.lede { font-size: 1.2rem; color: var(--muted); max-width: 34em; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.fridge { position: relative; min-height: 340px; }
.fridge .tile { position: absolute; background: var(--paper); padding: 10px; box-shadow: var(--shadow); border-radius: 6px; }
.fridge .tile span { display: block; background: linear-gradient(135deg, #F6C8A8, #D98E7A 55%, #7A5C8E); border-radius: 3px; }
.fridge .t1 { left: 4%; top: 6%; transform: rotate(-5deg); }
.fridge .t1 span { width: 210px; height: 148px; }
.fridge .t2 { right: 6%; top: 0; transform: rotate(4deg); }
.fridge .t2 span { width: 150px; height: 106px; background: linear-gradient(135deg, #A8D0E6, #4A7FB0 60%, #1F2A44); }
.fridge .t3 { left: 26%; bottom: 0; transform: rotate(2deg); }
.fridge .t3 span { width: 180px; height: 108px; background: linear-gradient(135deg, #FFE08A, #F2A65A 55%, #D93A55); }
.fridge .dot { position: absolute; width: 18px; height: 18px; border-radius: 50%; background: var(--heart); box-shadow: 0 2px 4px rgba(0,0,0,0.25); top: -8px; left: 50%; margin-left: -9px; }

/* Sections */
.section { padding: 48px 0; }
.section-alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-cats { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.card:hover { box-shadow: var(--shadow); color: inherit; }
.card-body { padding: 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body p { margin: 0; color: var(--muted); font-size: 0.97rem; }
.price { font-weight: 700; color: var(--navy); }
.badge { align-self: flex-start; display: inline-block; font-size: 0.78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #EFEAE6; color: var(--muted); }
.badge-live { background: #DDF2E8; color: var(--ok); }

/* Product mock: a magnet drawn at the product's real proportions */
.mock { background: #EEF1F5; display: flex; align-items: center; justify-content: center; padding: 28px; aspect-ratio: 4 / 3; }
.mock .mag { background: linear-gradient(135deg, #F6C8A8, #D98E7A 55%, #7A5C8E); border: 6px solid #fff; border-radius: 6px; box-shadow: var(--shadow); max-height: 100%; }

/* Steps */
.steps { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: s; }
.step { background: var(--paper); border-radius: var(--radius); padding: 22px; border: 1px solid var(--line); }
.step::before { counter-increment: s; content: counter(s); display: inline-flex; width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: #fff; font: 800 1rem var(--display); align-items: center; justify-content: center; margin-bottom: 10px; }

/* Product page */
.pdp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; padding: 40px 0 56px; }
.opts { display: flex; flex-direction: column; gap: 22px; }
.opt h3 { margin-bottom: 10px; font-size: 1rem; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; }
.chip label { display: flex; flex-direction: column; min-width: 96px; padding: 10px 14px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); cursor: pointer; font-weight: 600; }
.chip label small { font-weight: 500; color: var(--muted); }
.chip input:checked + label { border-color: var(--heart); box-shadow: 0 0 0 3px rgba(217, 58, 85, 0.15); }
.chip input:focus-visible + label { outline: 3px solid var(--navy); outline-offset: 2px; }
.chip input:disabled + label { opacity: 0.4; cursor: not-allowed; }

/* Our own frame around the Printess editor */
body.editor-open { overflow: hidden; }
.editor-panel { position: fixed; inset: 0; z-index: 1000; background: var(--paper); display: flex; flex-direction: column; }
.editor-bar { display: flex; align-items: center; gap: 14px; padding: 8px 16px; border-bottom: 1px solid var(--line); min-height: 56px; }
.editor-bar img { height: 30px; width: auto; }
.editor-title { font-weight: 700; color: var(--muted); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.editor-close { min-height: 40px; padding: 0 16px; }
.editor-host { position: relative; flex: 1; min-height: 0; }
@media (max-width: 560px) { .editor-title { display: none; } .editor-bar { justify-content: space-between; } }

select { min-height: 48px; padding: 0 12px; border-radius: var(--radius-sm); border: 2px solid var(--line); font: 600 1rem var(--body); background: var(--paper); color: var(--ink); }
.total { font: 800 1.6rem var(--display); }
.note { background: #FFF1D6; border-radius: var(--radius-sm); padding: 12px 14px; font-size: 0.95rem; }

/* Cart */
.cart-table { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: var(--radius); overflow: hidden; }
.cart-table th, .cart-table td { padding: 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.cart-thumb { width: 72px; height: 54px; object-fit: contain; background: #EEF1F5; border-radius: 6px; }
.cart-sum { margin-left: auto; max-width: 360px; background: var(--paper); border-radius: var(--radius); padding: 20px; border: 1px solid var(--line); }
.cart-sum .row { display: flex; justify-content: space-between; padding: 4px 0; }
.cart-sum .grand { font-weight: 800; font-size: 1.2rem; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; }
.table-scroll { overflow-x: auto; }

/* Prose pages */
.prose { max-width: 760px; padding: 40px 0 64px; }
.prose h2 { margin-top: 1.4em; font-size: 1.4rem; }
.prose ul { padding-left: 1.2em; }

/* Footer */
.foot { background: var(--navy); color: #C9CFDB; padding: 40px 0; margin-top: 40px; font-size: 0.95rem; }
.foot .wrap { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.foot a { color: #fff; text-decoration: none; }
.foot a:hover { color: var(--gold); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot img { height: 36px; width: auto; margin-bottom: 10px; }

@media (max-width: 860px) {
  .hero .wrap, .pdp { grid-template-columns: minmax(0, 1fr); }
  .fridge { min-height: 280px; }
  .fridge .t1 span { width: 160px; height: 112px; }
  .fridge .t2 span { width: 120px; height: 84px; }
  .fridge .t3 span { width: 140px; height: 84px; }
  .cart-sum { max-width: none; }
  .head .wrap { padding-top: 10px; }
  .nav { order: 3; margin-left: 0; width: 100%; flex-wrap: nowrap; overflow-x: auto; gap: 18px; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
  .nav a { white-space: nowrap; }
}
