/* TasteMingle — earthy / woody palette */

:root {
  --bg:        #f5efe6;     /* warm cream */
  --bg-card:   #fffaf2;     /* paper */
  --bg-deep:   #ece2d3;     /* parchment shadow */
  --line:      #d6c5ad;     /* sand line */
  --ink:       #2a2218;     /* near-black with warmth */
  --ink-soft:  #5a4a39;     /* aged wood */
  --rust:      #a05a2c;     /* terracotta */
  --rust-deep: #7d3f1c;     /* burnt umber */
  --moss:      #5b6b3a;     /* forest moss */
  --moss-deep: #3f4d28;
  --gold:      #c89b4f;     /* harvest gold */
  --shadow:    0 1px 2px rgba(80,55,30,.05), 0 8px 24px rgba(80,55,30,.07);
  --radius-lg: 18px;
  --radius:    12px;
  --radius-sm: 8px;
  --font-h:    'Cormorant Garamond', Georgia, serif;
  --font-b:    'Inter', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-b);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--rust); text-decoration: none; }
a:hover { color: var(--rust-deep); }

h1, h2, h3 { font-family: var(--font-h); font-weight: 600; line-height: 1.15; letter-spacing: .005em; margin: 0 0 .4em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }

/* ── nav ───────────────────────────────────────────────────────────── */

.site-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px;
  background: rgba(245,239,230,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.site-nav .brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.brand-mark   { color: var(--moss); font-size: 1.7rem; line-height: 1; transform: translateY(2px); }
.brand-name   { font-family: var(--font-h); font-weight: 700; font-size: 1.4rem; letter-spacing: .03em; }
.site-nav nav { display: flex; align-items: center; gap: 28px; }
.site-nav nav a { color: var(--ink-soft); font-weight: 500; font-size: .95rem; }
.site-nav nav a:hover { color: var(--rust); }
.cart-count {
  display: inline-block; min-width: 20px; padding: 2px 7px; margin-left: 4px;
  background: var(--moss); color: #fff; border-radius: 999px;
  font-size: .75rem; font-weight: 600; text-align: center;
  transform-origin: center;
}
/* Admin tab strip — sits at the top of every /admin/* page so the
   manager can move between sections in one click. Pill-style, native
   feel, active state in moss + rust accent. Wraps cleanly on narrow
   screens (mobile admin is rare but should still work). */
.admin-tabs {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 10px 14px; margin: -8px 0 24px;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--bg-card);
}
.admin-tab {
  display: inline-block; padding: 8px 16px; border-radius: 999px;
  font-size: .88rem; font-weight: 600; color: var(--ink-soft);
  text-decoration: none; transition: background .12s ease, color .12s ease;
}
.admin-tab:hover { background: rgba(91,107,58,.06); color: var(--ink); }
.admin-tab.is-active { background: var(--moss); color: #fff; }
.admin-tab.is-active:hover { background: var(--moss-deep, var(--moss)); }

/* Pulse animation when an item is added to the cart — gives the user
   a clear "yes, that worked" signal without needing a toast. */
.cart-count.cart-bump { animation: cart-bump .45s cubic-bezier(.2,.8,.2,1.2); }
@keyframes cart-bump {
  0%   { transform: scale(1);   background: var(--moss); }
  35%  { transform: scale(1.45); background: #00C853; box-shadow: 0 0 0 6px rgba(0,200,83,.18); }
  100% { transform: scale(1);   background: var(--moss); }
}
.open-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: .76rem; font-weight: 600; letter-spacing: .04em;
  background: rgba(91,107,58,.12); color: var(--moss-deep);
}
.open-pill::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--moss);
}
.open-pill.closed     { background: rgba(160,90,44,.10); color: var(--rust-deep); }
.open-pill.closed::before { background: var(--rust); }

/* ── pages ─────────────────────────────────────────────────────────── */

.page { max-width: 1180px; margin: 0 auto; padding: 48px 32px 96px; }

.hero {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center;
  padding: 56px 0 24px;
}
.hero h1 { color: var(--ink); }
.hero p.lead { font-size: 1.18rem; color: var(--ink-soft); max-width: 32em; }
.hero-cta { display: flex; gap: 14px; margin-top: 26px; flex-wrap: wrap; }
.hero-art {
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 28% 22%, rgba(200,155,79,.35), transparent 55%),
    radial-gradient(circle at 72% 78%, rgba(91,107,58,.30), transparent 60%),
    linear-gradient(135deg, #d8c4a8 0%, #b89f7c 100%);
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.hero-art::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 60% 40%, rgba(255,255,255,.18), transparent 40%),
    repeating-linear-gradient(45deg, rgba(125,63,28,.06) 0 2px, transparent 2px 8px);
  mix-blend-mode: overlay;
}

@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; gap: 32px; }
  .hero-art { aspect-ratio: 16/10; }
}

/* Phone-sized screens — tighten paddings + button spacing so the
   admin button bars don't overflow the viewport. */
@media (max-width: 640px) {
  .page { padding: 28px 16px 72px; }
  .btn { padding: 11px 18px; font-size: .9rem; gap: 6px; }
  .catalog-header h1 { font-size: 1.6rem; }
  .summary { padding: 18px 16px !important; }
  /* Long button rows wrap one-per-row instead of awkwardly splitting */
  #admin-root > div[style*="flex-wrap:wrap"] .btn {
    flex: 1 1 calc(50% - 14px);
    min-width: 0;
  }
}
@media (max-width: 380px) {
  #admin-root > div[style*="flex-wrap:wrap"] .btn {
    flex: 1 1 100%;
  }
}

/* ── buttons ───────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 26px; border-radius: 999px;
  font-family: var(--font-b); font-weight: 600; font-size: .95rem;
  border: 1px solid transparent; cursor: pointer; transition: all .18s ease;
  letter-spacing: .01em; text-decoration: none;
}
.btn-primary { background: var(--moss); color: #fff; }
.btn-primary:hover { background: var(--moss-deep); color: #fff; }
.btn-ghost   { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--rust); color: var(--rust); }
.btn-rust    { background: var(--rust); color: #fff; }
.btn-rust:hover { background: var(--rust-deep); color: #fff; }
.btn-link    { background: none; color: var(--rust); padding: 4px 0; border-radius: 0; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ── catalog grid ──────────────────────────────────────────────────── */

.catalog-header { margin-bottom: 32px; }
.catalog-header .eyebrow { color: var(--rust); font-size: .85rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.catalog-header h1 { margin-top: 6px; }

.section-title {
  font-family: var(--font-h); font-size: 1.6rem; margin: 48px 0 18px;
  display: flex; align-items: baseline; gap: 14px;
}
.section-title::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}

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

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(80,55,30,.06), 0 16px 36px rgba(80,55,30,.10); }
.card-img {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--bg-deep), var(--line));
  background-size: cover; background-position: center;
}
.card-body { padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column; }
.card-name  { font-family: var(--font-h); font-size: 1.25rem; margin: 0 0 4px; }
.card-desc  { color: var(--ink-soft); font-size: .9rem; margin: 0 0 14px; flex: 1; }
.card-row   { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; }
.card-price { font-weight: 700; color: var(--ink); font-size: 1.05rem; }
.card-price .cur { color: var(--ink-soft); font-weight: 500; margin-right: 2px; }
.card-add {
  background: var(--rust); color: #fff; border: 0; padding: 8px 16px;
  border-radius: 999px; font-weight: 600; font-size: .85rem; cursor: pointer;
}
.card-add:hover { background: var(--rust-deep); }
.card-add.in {  background: var(--moss); }

.empty {
  background: var(--bg-card); border: 1px dashed var(--line); border-radius: var(--radius-lg);
  padding: 56px 32px; text-align: center; color: var(--ink-soft);
}
.empty h3 { color: var(--ink); }

/* ── cart / checkout ───────────────────────────────────────────────── */

/* ── ORDER STATUS TIMELINE ───────────────────────────────────────── */

.ord-timeline {
  display: flex;
  align-items: center;
  margin: 16px 0 22px;
  gap: 0;
}
.ord-timeline__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  text-align: center;
  min-width: 0;
}
.ord-timeline__bar {
  flex: 1;
  height: 2px;
  background: #ddd;
  margin: 0 -2px 22px;
  align-self: center;
  position: relative;
  z-index: 0;
}
.ord-timeline__step--done + .ord-timeline__bar,
.ord-timeline__step--active + .ord-timeline__bar { background: var(--moss); }

.ord-timeline__dot {
  width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700;
  background: #fff; border: 2px solid #ddd; color: #aaa;
  position: relative; z-index: 1;
  transition: all .2s ease;
}
.ord-timeline__step--done .ord-timeline__dot   { background: var(--moss); border-color: var(--moss); color: #fff; }
.ord-timeline__step--active .ord-timeline__dot { background: var(--moss); border-color: var(--moss); color: #fff; box-shadow: 0 0 0 0 rgba(91,107,58,.55); animation: ord-pulse 1.6s ease-out infinite; }
@keyframes ord-pulse {
  to { box-shadow: 0 0 0 10px rgba(91,107,58,0); }
}
.ord-timeline__label {
  font-size: .72rem;
  font-weight: 600;
  color: #888;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.ord-timeline__step--done .ord-timeline__label,
.ord-timeline__step--active .ord-timeline__label { color: var(--moss-deep); }

@media (max-width: 540px) {
  .ord-timeline__label { font-size: .6rem; letter-spacing: 0; }
  .ord-timeline__dot { width: 22px; height: 22px; font-size: .7rem; }
}

.ord-banner {
  margin: 14px 0 18px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid;
  font-weight: 600;
}
.ord-banner--cancel    { background: rgba(160,90,44,.08); border-color: rgba(160,90,44,.3); color: var(--rust-deep); }
.ord-banner--disputed  { background: rgba(160,90,44,.04); border-color: rgba(160,90,44,.18); color: var(--rust-deep); }

.cart-shell { display: grid; grid-template-columns: 1fr 360px; gap: 32px; }
@media (max-width: 900px) { .cart-shell { grid-template-columns: 1fr; } }

.cart-line {
  display: grid; grid-template-columns: 64px 1fr auto auto;
  gap: 16px; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.cart-line .thumb {
  width: 64px; height: 64px; border-radius: var(--radius-sm);
  background: var(--bg-deep); background-size: cover; background-position: center;
}
.cart-line .qty {
  display: inline-flex; align-items: center; gap: 8px; background: var(--bg);
  border-radius: 999px; padding: 4px 10px;
}
.cart-line .qty button {
  background: transparent; border: 0; font-size: 1.1rem; cursor: pointer; color: var(--ink-soft);
  width: 24px; height: 24px;
}

.summary {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow);
  align-self: start; position: sticky; top: 96px;
}
.summary h3 { margin-top: 0; }
.summary-row { display: flex; justify-content: space-between; margin: 10px 0; color: var(--ink-soft); }
.summary-row.total { color: var(--ink); font-size: 1.15rem; font-weight: 700; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }

.fulfillment-picker { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 14px 0 18px; }
.fulfillment-picker label {
  border: 1px solid var(--line); padding: 10px 8px; text-align: center;
  border-radius: var(--radius); cursor: pointer; font-size: .85rem; color: var(--ink-soft);
  font-weight: 600;
}
.fulfillment-picker input { display: none; }
.fulfillment-picker input:checked + label,
.fulfillment-picker label.active { border-color: var(--moss); color: var(--moss); background: rgba(91,107,58,.08); }

.payment-picker { display: grid; gap: 8px; margin: 14px 0 18px; }
.payment-picker label {
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid var(--line); padding: 12px 14px;
  border-radius: var(--radius); cursor: pointer; font-weight: 500;
}
.payment-picker input { margin-right: 10px; }
.payment-picker label.active { border-color: var(--moss); background: rgba(91,107,58,.06); }
.payment-picker .pmname { font-weight: 600; }
.payment-picker .pmnote { color: var(--ink-soft); font-size: .8rem; margin-left: 8px; }

.field { display: block; margin: 12px 0; }
.field label { display: block; font-size: .85rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--bg-card); font-family: inherit;
  font-size: .95rem; color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid rgba(160,90,44,.3); border-color: var(--rust);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── footer ────────────────────────────────────────────────────────── */

.site-footer {
  background: #2a2218; color: #d6c5ad; margin-top: 80px;
  padding: 56px 32px 40px;
}
.footer-cols {
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; align-items: start;
}
.site-footer .brand-name { color: #f5efe6; font-size: 1.6rem; }
.site-footer p { color: #d6c5ad; font-size: .9rem; line-height: 1.7; margin: 12px 0 0; }
.site-footer a { color: #d6c5ad; display: block; padding: 4px 0; font-size: .9rem; }
.site-footer a:hover { color: var(--gold); }
.footer-fineprint { color: #8b7d68; font-size: .8rem; }
.footer-fineprint a { display: inline; color: var(--gold); }
@media (max-width: 700px) { .footer-cols { grid-template-columns: 1fr; gap: 28px; } }

/* ── tiny utility ──────────────────────────────────────────────────── */

.muted { color: var(--ink-soft); }
.center { text-align: center; }
.divider { height: 1px; background: var(--line); border: 0; margin: 32px 0; }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--rust); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
