/* ==========================================================================
   WickSpire — design tokens
   Palette: espresso ink / aged linen / ember rust / brand burgundy / sage
   Type: Fraunces (display, warm serif w/ personality) + Inter (body/UI)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600&display=swap');

:root {
  --ink: #221812;
  --ink-soft: #4a3c33;
  --linen: #ede6da;
  --linen-deep: #e2d8c6;
  --paper: #f7f2e8;
  --ember: #b9622b;
  --ember-dark: #914a1f;
  --burgundy: #5b2a24;
  --sage: #7c8465;
  --line: rgba(34, 24, 18, 0.14);
  --shadow: 0 10px 30px rgba(34, 24, 18, 0.12);

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius: 3px;
  --max-w: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--linen);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.4em;
  color: var(--ink);
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 500; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; max-width: 62ch; }

.lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 48ch;
}

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--linen);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--burgundy);
}

.brand span { color: var(--ember); }

.brand-logo {
  height: 42px;
  width: 42px;
  border-radius: 50%;
  flex-shrink: 0;
}

.admin-sidebar .brand-logo { height: 40px; width: 40px; }

.main-nav { display: flex; gap: 28px; align-items: center; }

.main-nav a {
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.main-nav a:hover { color: var(--ink); border-color: var(--ember); }

.main-nav a.cta {
  color: var(--paper);
  background: var(--burgundy);
  padding: 9px 18px;
  border-radius: var(--radius);
  border-bottom: none;
}

.main-nav a.cta:hover { background: var(--ember-dark); }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: var(--radius);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary { background: var(--ember); color: var(--paper); }
.btn-primary:hover { background: var(--ember-dark); }

.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { border-color: var(--ember); color: var(--ember-dark); }

.btn-full { width: 100%; text-align: center; }

/* ---------- hero ---------- */

.hero {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--line);
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.hero-copy .eyebrow {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ember-dark);
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.hero-actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

.hero-art {
  aspect-ratio: 4/5;
  background: linear-gradient(160deg, var(--burgundy) 0%, #3a1a16 100%);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }

.hero-note {
  position: absolute;
  bottom: 18px;
  left: 18px;
  right: 18px;
  background: rgba(247, 242, 232, 0.92);
  color: var(--ink);
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 0.85rem;
}

/* ---------- info strip ---------- */

.info-strip {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.info-strip .wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.info-item {
  padding: 26px 28px;
  border-left: 1px solid var(--line);
}

.info-item:first-child { border-left: none; padding-left: 0; }

.info-item .label {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ember-dark);
  font-size: 0.95rem;
  margin-bottom: 4px;
  display: block;
}

.info-item p { margin: 0; font-size: 0.92rem; color: var(--ink-soft); }

/* ---------- sections ---------- */

.section { padding: 64px 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 36px; gap: 24px; flex-wrap: wrap; }

/* ---------- product grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.product-card {
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
}

.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.product-thumb {
  aspect-ratio: 1/1;
  background: var(--linen-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-thumb img { width: 100%; height: 100%; object-fit: cover; }

.product-thumb .placeholder-svg { width: 60%; height: 60%; opacity: 0.55; }

.product-body { padding: 18px 20px 22px; flex: 1; display: flex; flex-direction: column; }

.product-body h3 { margin-bottom: 6px; font-size: 1.15rem; }

.product-body .desc { font-size: 0.9rem; color: var(--ink-soft); flex: 1; margin-bottom: 12px; }

.price-row { display: flex; justify-content: space-between; align-items: center; }

.price { font-family: var(--font-display); font-size: 1.15rem; color: var(--burgundy); }

/* ---------- custom order banner ---------- */

.custom-banner {
  background: var(--burgundy);
  color: var(--paper);
  border-radius: var(--radius);
  padding: 44px 40px;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 32px;
  align-items: center;
}

.custom-banner h2 { color: var(--paper); }
.custom-banner p { color: rgba(247, 242, 232, 0.82); }

.custom-banner .btn-primary { background: var(--ember); }

/* ---------- forms ---------- */

.form-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px;
  max-width: 640px;
}

.form-row { margin-bottom: 20px; }

.form-row label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink-soft);
}

.form-row .hint { font-size: 0.8rem; color: var(--ink-soft); margin-top: 4px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
}

textarea { resize: vertical; min-height: 90px; }

input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--ember);
  outline-offset: 1px;
}

fieldset { border: none; padding: 0; margin: 0 0 20px; }

.radio-group { display: flex; gap: 18px; }

.radio-option { display: flex; align-items: center; gap: 8px; font-size: 0.92rem; }

.upload-box {
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  background: #fff;
}

.upload-box input[type="file"] { margin-top: 10px; }

.alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  font-size: 0.92rem;
}

.alert-success { background: #eaf0e2; color: #3f4a2f; border: 1px solid #c3d2af; }
.alert-error { background: #f5e4e0; color: #7a2c1d; border: 1px solid #e0b6a9; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  margin-top: 40px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

/* ---------- admin ---------- */

.admin-body { background: var(--linen); }

.admin-shell { display: flex; min-height: 100vh; }

.admin-sidebar {
  width: 220px;
  background: var(--burgundy);
  color: var(--paper);
  padding: 26px 20px;
  flex-shrink: 0;
}

.admin-sidebar .brand { color: var(--paper); font-size: 1.25rem; }
.admin-sidebar .brand span { color: #e8b98b; }

.admin-sidebar nav { margin-top: 32px; display: flex; flex-direction: column; gap: 4px; }

.admin-sidebar nav a {
  color: rgba(247, 242, 232, 0.78);
  text-decoration: none;
  padding: 9px 10px;
  border-radius: var(--radius);
  font-size: 0.92rem;
}

.admin-sidebar nav a:hover, .admin-sidebar nav a.active {
  background: rgba(247, 242, 232, 0.12);
  color: var(--paper);
}

.admin-main { flex: 1; padding: 34px 40px; }

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

table.data-table { width: 100%; border-collapse: collapse; background: var(--paper); border: 1px solid var(--line); }

table.data-table th, table.data-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

table.data-table th { background: var(--linen-deep); font-weight: 600; }

table.data-table tr:last-child td { border-bottom: none; }

.status-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--linen-deep);
  color: var(--ink-soft);
}

.status-new { background: #f0e2c9; color: #8a5a12; }
.status-confirmed { background: #dde6d2; color: #4c5d34; }
.status-shipped { background: #d3e2ea; color: #2e5470; }
.status-completed { background: #d8ead9; color: #2f5d33; }
.status-cancelled { background: #ecd9d5; color: #7a3126; }

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--linen);
}

.login-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 44px;
  width: 100%;
  max-width: 380px;
}

.thumb-sm { width: 56px; height: 56px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }

.detail-photo { max-width: 360px; border-radius: var(--radius); border: 1px solid var(--line); margin-top: 10px; }

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { order: -1; aspect-ratio: 16/10; }
  .info-strip .wrap { grid-template-columns: 1fr; }
  .info-item { border-left: none; border-top: 1px solid var(--line); padding-left: 0; }
  .info-item:first-child { border-top: none; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .custom-banner { grid-template-columns: 1fr; text-align: left; }
  .two-col { grid-template-columns: 1fr; }
  .main-nav { gap: 16px; }
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; }
}

@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .main-nav a:not(.cta) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
