:root {
  /* Neutrals */
  --color-paper:      #F8F7F4;
  --color-snow:       #FFFFFF;
  --color-mist:       #F0EEEA;
  --color-line:       #E2E0DB;
  --color-slate:      #6E7379;
  --color-ink:        #1B1E23;
  --color-onyx:       #0E1013;

  /* Accents — pastel (fills, backgrounds, badges) */
  --color-ember:      #F2A18C;
  --color-teal:       #7FC7B6;
  --color-amber:      #F6D08A;

  /* Accents — deep companions (buttons, links, coloured text) */
  --color-ember-deep: #C05438;
  --color-teal-deep:  #2C8676;
  --color-amber-deep: #A9740F;

  /* Semantic roles */
  --bg-page:        var(--color-paper);
  --bg-surface:     var(--color-snow);
  --bg-hover:       var(--color-mist);
  --border-default: var(--color-line);
  --text-body:      var(--color-ink);
  --text-heading:   var(--color-onyx);
  --text-muted:     var(--color-slate);
  --text-link:      var(--color-teal-deep);

  --btn-primary-bg:       var(--color-ember-deep);
  --btn-primary-bg-hover: #A8462E;
  --btn-primary-text:     #FFFFFF;

  --radius-card:    12px;
  --radius-control: 8px;

  /* Back-compat aliases used by inline template styles */
  --ink-soft: var(--color-slate);
  --terracotta: var(--color-ember-deep);

  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', -apple-system, sans-serif;
}

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

body {
  font-family: var(--sans);
  background: var(--bg-page);
  color: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; letter-spacing: -0.01em; color: var(--text-heading); }
a { color: var(--text-link); text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.announce {
  background: var(--color-onyx); color: var(--color-snow);
  text-align: center; font-size: 0.82rem; padding: 9px 16px;
}
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg-page);
  border-bottom: 1px solid var(--border-default);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 96px; gap: 24px; }
.brand { font-family: var(--serif); font-size: 1.6rem; font-weight: 500; color: var(--text-heading); }
.brand span { color: var(--color-ember-deep); font-style: italic; }
.brand-light { color: var(--color-snow); }
.brand-logo { height: 80px; width: auto; display: block; }
.brand-logo-light { filter: brightness(0) invert(1); }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a {
  font-size: 0.9rem; font-weight: 500; color: var(--text-muted);
  padding-bottom: 4px; border-bottom: 2px solid transparent; transition: color 0.2s, border-color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text-heading); border-bottom-color: var(--color-ink); }
.nav-right { display: flex; align-items: center; gap: 4px; }
.cart-link { position: relative; display: flex; padding: 8px; color: var(--text-body); }
.nav-toggle { display: none; padding: 8px; background: none; border: none; color: var(--text-body); cursor: pointer; }
.cart-count {
  position: absolute; top: 0; right: -2px;
  background: var(--color-onyx); color: #fff;
  font-size: 0.68rem; font-weight: 600;
  min-width: 17px; height: 17px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font-family: var(--sans); font-size: 0.92rem; font-weight: 600;
  padding: 13px 28px; border-radius: var(--radius-control); border: 1px solid var(--btn-primary-bg);
  background: var(--btn-primary-bg); color: var(--btn-primary-text); cursor: pointer; transition: background 0.2s, border-color 0.2s;
}
.btn:hover { background: var(--btn-primary-bg-hover); border-color: var(--btn-primary-bg-hover); }
.btn-ghost { background: transparent; color: var(--text-body); border-color: var(--border-default); }
.btn-ghost:hover { background: var(--bg-hover); border-color: var(--color-slate); }
.btn-small { padding: 8px 18px; font-size: 0.82rem; }
.btn-block { width: 100%; text-align: center; }
.btn-danger { background: transparent; color: var(--color-ember-deep); border-color: var(--color-line); }
.btn-danger:hover { background: var(--color-ember-deep); border-color: var(--color-ember-deep); color: #fff; }

/* ---------- Hero ---------- */
.hero { padding-top: 90px; padding-bottom: 70px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 60px; align-items: center; }
.hero .eyebrow, .eyebrow {
  font-size: 0.82rem; letter-spacing: 0.02em;
  color: var(--color-teal-deep); font-weight: 600; margin-bottom: 18px; display: block;
}
.hero h1 { font-size: clamp(2.6rem, 5vw, 4.2rem); margin-bottom: 22px; }
.hero h1 em { font-style: italic; color: var(--color-teal-deep); }
.hero p { color: var(--text-muted); font-size: 1.08rem; max-width: 46ch; margin-bottom: 34px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-art {
  border-radius: var(--radius-card); overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
}
.hero-art img, .hero-art svg { width: 100%; height: auto; }

/* ---------- Sections ---------- */
.section { padding: 70px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 38px; gap: 16px; flex-wrap: wrap; }
.section-head h2 { font-size: 2.1rem; }
.section-head a { font-size: 0.9rem; font-weight: 600; color: var(--text-link); }
.section-alt { background: var(--bg-surface); border-top: 1px solid var(--border-default); border-bottom: 1px solid var(--border-default); }

/* ---------- Split feature (image(s) one side, text the other) ---------- */
.feature-grid { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 60px; align-items: center; }
.feature-grid.reverse .feature-media { order: 1; }
.feature-grid.reverse .feature-text { order: 2; }
.feature-media { position: relative; margin-bottom: 32px; }
.feature-media .media-main, .feature-media .media-overlay {
  border-radius: var(--radius-card); overflow: hidden; border: 1px solid var(--border-default);
  background: var(--bg-surface);
}
.feature-media .media-main img, .feature-media .media-overlay img { display: block; width: 100%; height: auto; }
.feature-media .media-overlay {
  position: absolute; width: 55%; bottom: -32px; right: -32px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.16);
}
@media (max-width: 720px) {
  .feature-grid { grid-template-columns: 1fr; gap: 44px; }
  .feature-grid.reverse .feature-media, .feature-grid.reverse .feature-text { order: initial; }
  .feature-media { margin-bottom: 8px; }
  .feature-media .media-overlay { width: 48%; bottom: -20px; right: -16px; }
}

/* ---------- Product grid ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 28px; }
.card { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-card); overflow: hidden; transition: border-color 0.2s, transform 0.2s; }
.card:hover { border-color: var(--color-slate); transform: translateY(-3px); }
.card-img { aspect-ratio: 1; background: var(--color-snow); display: flex; align-items: center; justify-content: center; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 18px 20px 22px; }
.card-cat { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; }
.card-body h3 { font-size: 1.2rem; margin: 6px 0 4px; }
.card-price { font-weight: 600; color: var(--text-body); }

/* ---------- Category pills ---------- */
.pills { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 34px; }
.pill {
  font-size: 0.85rem; font-weight: 500; padding: 8px 20px;
  border-radius: 999px; border: 1px solid var(--border-default); background: var(--bg-surface); color: var(--text-body);
  transition: border-color 0.2s, background 0.2s;
}
.pill:hover { border-color: var(--color-slate); }
.pill.active { background: var(--color-ink); color: var(--color-snow); border-color: var(--color-ink); }

/* ---------- Values strip ---------- */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; }
.value h3 { font-size: 1.25rem; margin: 14px 0 8px; }
.value p { color: var(--text-muted); font-size: 0.95rem; }
.value-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--color-teal); color: var(--color-teal-deep);
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Product page ---------- */
.pdp { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; padding: 60px 0; align-items: start; }
.pdp-media { position: sticky; top: 100px; }
.pdp-img { border-radius: var(--radius-card); overflow: hidden; background: var(--color-snow); border: 1px solid var(--border-default); }
.pdp-thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.pdp-thumb { width: 72px; height: 72px; padding: 0; border: 1px solid var(--border-default); border-radius: var(--radius-control); overflow: hidden; background: var(--color-snow); cursor: pointer; outline: 2px solid transparent; outline-offset: 2px; transition: outline 0.15s; }
.pdp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pdp-thumb:hover { border-color: var(--color-slate); }
.pdp-thumb.active { outline-color: var(--color-ink); }
.pdp h1 { font-size: 2.6rem; margin: 8px 0 10px; }
.pdp-price { font-size: 1.4rem; font-weight: 600; margin-bottom: 20px; color: var(--text-heading); }
.pdp-desc { color: var(--text-muted); margin-bottom: 24px; max-width: 52ch; }
.pdp-details { font-size: 0.88rem; color: var(--text-muted); border-top: 1px solid var(--border-default); padding-top: 18px; margin-top: 28px; }
.pdp-attribution { font-size: 0.74rem; color: var(--text-muted); margin-top: 12px; opacity: 0.85; }
.pdp-attribution a { color: var(--text-link); }

/* ---------- Blog ---------- */
.blog-content p { margin-bottom: 20px; }
.blog-content h2 { font-size: 1.4rem; margin: 36px 0 14px; }
.blog-content ul, .blog-content ol { margin: 0 0 20px 22px; }
.blog-content li { margin-bottom: 8px; }
.blog-content a { color: var(--text-link); text-decoration: underline; text-underline-offset: 2px; }
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 8px; color: var(--text-body); }
.field select, .field input, .field textarea {
  width: 100%; padding: 12px 14px; font: inherit; font-size: 0.95rem;
  border: 1px solid var(--border-default); border-radius: var(--radius-control); background: var(--bg-surface); color: var(--text-body);
}
.field select:focus, .field input:focus, .field textarea:focus { outline: none; border-color: var(--color-teal-deep); }
.qty-row { display: flex; gap: 14px; align-items: flex-end; margin: 26px 0; }
.qty-row .field { margin: 0; }
.qty-row input { width: 84px; }
.stock-note { font-size: 0.82rem; color: var(--color-ember-deep); font-weight: 600; }

/* Colour swatch dots */
.swatches { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.swatch {
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  background: var(--sw); border: 1px solid var(--border-default); padding: 0;
  transition: outline 0.15s, transform 0.15s; outline: 2px solid transparent; outline-offset: 2px;
}
.swatch:hover { transform: translateY(-2px); }
.swatch.active { outline-color: var(--color-ink); }
#swatchLabel { color: var(--text-muted); font-weight: 500; }

/* ---------- Cart & checkout ---------- */
.page-title { font-size: 2.4rem; padding: 50px 0 30px; }
.cart-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 44px; align-items: start; padding-bottom: 80px; }
.cart-lines { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-card); overflow: hidden; }
.cart-line { display: grid; grid-template-columns: 90px 1fr auto auto; gap: 20px; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--border-default); }
.cart-line:last-child { border-bottom: none; }
.cart-thumb { width: 90px; height: 90px; border-radius: var(--radius-control); overflow: hidden; background: var(--color-snow); border: 1px solid var(--border-default); }
.cart-line h3 { font-size: 1.05rem; }
.cart-line h3 a { color: var(--text-heading); }
.cart-line .muted { font-size: 0.85rem; color: var(--text-muted); }
.cart-line form { display: flex; align-items: center; gap: 10px; }
.cart-line input[type=number] { width: 64px; padding: 8px; border: 1px solid var(--border-default); border-radius: var(--radius-control); font: inherit; text-align: center; }
.link-danger { background: none; border: none; color: var(--color-ember-deep); font: inherit; font-size: 0.82rem; cursor: pointer; text-decoration: underline; }
.summary { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-card); padding: 28px; }
.summary h2 { font-size: 1.4rem; margin-bottom: 20px; }
.summary-row { display: flex; justify-content: space-between; padding: 9px 0; font-size: 0.95rem; color: var(--text-muted); }
.summary-row.total { border-top: 1px solid var(--border-default); margin-top: 12px; padding-top: 16px; font-size: 1.15rem; font-weight: 600; color: var(--text-heading); }
.free-ship-note { font-size: 0.82rem; color: var(--color-teal-deep); background: var(--color-teal); border-radius: var(--radius-control); padding: 10px 14px; margin: 14px 0; }
.ship-option { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--border-default); border-radius: var(--radius-control); margin-bottom: 10px; cursor: pointer; transition: border-color 0.2s; }
.ship-option:hover { border-color: var(--color-teal-deep); }
.ship-option input { accent-color: var(--color-ember-deep); }
.ship-option .grow { flex: 1; }
.ship-option .price { font-weight: 600; color: var(--text-body); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-grid .span-2 { grid-column: span 2; }
.errors { background: var(--color-ember); border: 1px solid var(--color-ember-deep); color: #7A2E1B; border-radius: var(--radius-control); padding: 14px 18px; margin-bottom: 24px; font-size: 0.9rem; }
.errors ul { margin-left: 18px; }

/* ---------- Confirmation ---------- */
.confirm { max-width: 640px; margin: 0 auto; padding: 70px 24px 90px; text-align: center; }
.confirm-badge { width: 64px; height: 64px; margin: 0 auto 24px; background: var(--color-teal); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--color-teal-deep); }
.confirm h1 { font-size: 2.4rem; margin-bottom: 10px; }
.confirm .ref { font-size: 1.05rem; color: var(--text-muted); margin-bottom: 34px; }
.confirm .ref strong { color: var(--text-heading); }
.order-box { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-card); padding: 26px 30px; text-align: left; margin-bottom: 30px; }
.order-box .summary-row:first-child { padding-top: 0; }

/* ---------- Empty states ---------- */
.empty { text-align: center; padding: 90px 24px; }
.empty h2 { font-size: 1.9rem; margin-bottom: 12px; }
.empty p { color: var(--text-muted); margin-bottom: 26px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--color-onyx); color: var(--color-paper); margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 44px; padding: 60px 24px 40px; }
.footer-blurb { color: #9A9EA3; font-size: 0.92rem; max-width: 40ch; margin-top: 14px; }
.site-footer h4 { font-size: 0.85rem; margin-bottom: 14px; color: #9A9EA3; font-family: var(--sans); font-weight: 600; }
.site-footer a { display: block; font-size: 0.92rem; color: var(--color-paper); padding: 4px 0; }
.site-footer a:hover { color: var(--color-snow); text-decoration: underline; }
.footer-base { display: flex; justify-content: space-between; padding-top: 24px; padding-bottom: 28px; border-top: 1px solid #2A2D31; font-size: 0.82rem; color: #9A9EA3; }
.footer-base a { display: inline; color: #9A9EA3; }

/* ---------- Admin ---------- */
.admin-wrap { max-width: 1440px; margin: 0 auto; padding: 32px 32px 80px; }
.admin-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; flex-wrap: wrap; gap: 14px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 36px; }
.stat { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-card); padding: 22px 24px; }
.stat .num { font-family: var(--serif); font-size: 2rem; color: var(--text-heading); }
.stat .lbl { font-size: 0.85rem; color: var(--text-muted); }
.table-card { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-card); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th { text-align: left; font-size: 0.8rem; color: var(--text-muted); font-weight: 600; padding: 14px 18px; border-bottom: 1px solid var(--border-default); }
td { padding: 13px 18px; border-bottom: 1px solid var(--border-default); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg-hover); }
.status { display: inline-block; font-size: 0.76rem; font-weight: 600; padding: 4px 12px; border-radius: 999px; text-transform: capitalize; }
.status-pending   { background: var(--color-mist);  color: var(--color-slate); }
.status-paid      { background: var(--color-teal);  color: var(--color-teal-deep); }
.status-printing  { background: var(--color-amber); color: var(--color-amber-deep); }
.status-shipped   { background: var(--color-ember); color: var(--color-ember-deep); }
.status-delivered { background: var(--color-teal);  color: var(--color-teal-deep); }
.status-cancelled { background: var(--color-mist);  color: var(--color-slate); }
.status-new         { background: var(--color-ember); color: var(--color-ember-deep); }
.status-in-progress { background: var(--color-amber); color: var(--color-amber-deep); }
.status-resolved    { background: var(--color-teal);  color: var(--color-teal-deep); }
.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form select, .inline-form input { padding: 8px 10px; border: 1px solid var(--border-default); border-radius: var(--radius-control); font: inherit; font-size: 0.85rem; }
.save-flash { background: var(--color-teal); color: var(--color-teal-deep); font-size: 0.85rem; font-weight: 600; padding: 8px 16px; border-radius: 999px; }
.swatch-row { display: inline-flex; gap: 5px; }
.mini-swatch { width: 16px; height: 16px; border-radius: 50%; display: inline-block; border: 1px solid var(--border-default); }
.form-card { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-card); padding: 32px; }
.form-card .field { margin-bottom: 18px; }
.checkline { display: flex; align-items: center; gap: 10px; font-size: 0.92rem; font-weight: 500; margin-bottom: 8px; }
.checkline input { width: auto; }
.form-subhead { font-size: 1.4rem; margin: 26px 0 8px; }
.form-hint { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 20px; max-width: 66ch; }
.colour-rows { display: flex; flex-direction: column; gap: 14px; }
.colour-row { display: grid; grid-template-columns: 60px 1.6fr 90px 1.4fr; gap: 16px; align-items: end; padding: 14px; border: 1px solid var(--border-default); border-radius: var(--radius-card); }
.colour-row .field { margin-bottom: 0; }
.colour-preview { width: 60px; height: 60px; border-radius: var(--radius-control); background: var(--color-mist) center/cover no-repeat; border: 1px solid var(--border-default); }
.colour-row input[type=color] { height: 44px; padding: 4px; cursor: pointer; }
.colour-row input[type=file] { font-size: 0.8rem; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px; }
.gallery-item { display: block; border: 1px solid var(--border-default); border-radius: var(--radius-control); overflow: hidden; background: var(--color-snow); }
.gallery-item img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.gallery-remove { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--text-muted); padding: 8px 10px; cursor: pointer; }
.gallery-remove input { width: auto; }
@media (max-width: 700px) { .colour-row { grid-template-columns: 1fr 1fr; } .colour-preview { grid-column: span 2; width: 100%; } }
.login-card { max-width: 400px; margin: 90px auto; background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-card); padding: 40px; }
.login-card h1 { font-size: 1.8rem; margin-bottom: 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .pdp, .cart-layout { grid-template-columns: 1fr; }
  .pdp-media { position: static; }
  .values { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
  .cart-line { grid-template-columns: 70px 1fr; }

  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--bg-page); border-bottom: 1px solid var(--border-default);
    padding: 8px 24px 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 12px 0; border-bottom: 1px solid var(--border-default); }
  .nav-links li:last-child a { border-bottom: none; }
  .site-header { position: sticky; }
  .nav { position: relative; }
}

@media (max-width: 600px) {
  .container { padding: 0 20px; }
  .hero { padding-top: 40px; padding-bottom: 36px; }
  .hero-grid { gap: 32px; }
  .hero h1 { font-size: clamp(2rem, 9vw, 2.6rem); }
  .hero p { max-width: none; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { text-align: center; }
  .section { padding: 44px 0; }
  .section-head h2 { font-size: 1.6rem; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .card-body { padding: 12px 14px 16px; }
  .card-body h3 { font-size: 1rem; }
  .pdp { padding: 30px 0; gap: 28px; }
  .pdp h1 { font-size: 1.8rem; }
  .qty-row { flex-direction: column; align-items: stretch; }
  .qty-row input { width: 100%; }
  .page-title { font-size: 1.7rem; padding: 30px 0 20px; }
  .summary { padding: 20px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat { padding: 16px 18px; }
  .footer-base { flex-direction: column; gap: 8px; align-items: flex-start; }
  .colour-row { grid-template-columns: 1fr !important; }
  .colour-preview { grid-column: span 1 !important; }
}
