/* Papa Sweets NC : cream, warm brown, soft gold. Mobile first. */

:root {
  --cream: #FBF3E7;
  --card: #FFFFFF;
  --ink: #2E1B0F;
  --ink-soft: #6B5744;
  --muted: #8A7A66;
  --brown: #8A4B2E;
  --gold: #C97F2B;
  --gold-soft: #E3CBA6;
  --line: #EEDFC6;
  --green: #5C7A5C;
  --green-bg: #EFF5EF;
  --red: #B33F2E;
  --red-bg: #FDECEA;
  --amber-bg: #FDF2E3;
  --amber-ink: #7A4A16;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(46, 27, 15, .05), 0 8px 28px rgba(46, 27, 15, .07);
  --wrap: 1080px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 16px/1.6 'Open Sans', system-ui, -apple-system, sans-serif;
}

h1, h2, h3, .display { font-family: 'Satisfy', cursive; font-weight: 400; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.9rem, 4.4vw, 2.6rem); }
h3 { font-size: 1.4rem; }
p { margin: 0 0 1rem; }
a { color: var(--brown); }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.section { max-width: var(--wrap); margin: 0 auto; padding: 44px 20px; }
.section-title { margin-bottom: 20px; color: var(--ink); }
.eyebrow {
  font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
  font-weight: 700; color: var(--brown); margin: 0 0 4px;
}
.lede { font-size: 1.08rem; color: var(--ink-soft); }
.muted { color: var(--muted); font-size: .9rem; }
.center { text-align: center; }

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

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(251, 243, 231, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gold-soft);
}
.header-inner { display: flex; align-items: center; gap: 16px; justify-content: space-between; padding: 10px 20px; max-width: var(--wrap); margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-name { font-family: 'Satisfy', cursive; font-size: 1.55rem; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav a {
  padding: 7px 13px; border-radius: 999px; text-decoration: none;
  color: var(--ink-soft); font-size: .92rem; font-weight: 600;
}
.nav a:hover { background: rgba(138, 75, 46, .08); }
.nav a.is-active { background: var(--brown); color: #fff; }
.cart-pill {
  background: var(--green); color: #fff; border: 0; border-radius: 999px;
  padding: 7px 14px; font-weight: 700; font-size: .82rem; cursor: pointer; font-family: inherit;
}

/* --------------------------------------------------------------- cards */

.card { background: var(--card); border: 1px solid var(--gold-soft); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr 1fr; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } .split { grid-template-columns: 1.15fr .85fr; } }
.split { display: grid; gap: 32px; align-items: center; }

/* ----------------------------------------------------------- rotator */

.rotator { position: relative; aspect-ratio: 1 / 1; background: #F5E6CE; overflow: hidden; }
.rotator-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s ease; }
.rotator-img.is-on { opacity: 1; }

/* ---------------------------------------------------------- products */

.pie-card { display: flex; flex-direction: column; overflow: hidden; }
.pie-body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.pie-name { font-family: 'Satisfy', cursive; font-size: 1.45rem; }
.pie-tagline { font-size: .84rem; color: var(--muted); margin: 2px 0 12px; }
.size-row { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.size-btn {
  border: 1px solid var(--gold-soft); background: #fff; color: var(--ink-soft);
  border-radius: 999px; padding: 5px 13px; font-size: .8rem; cursor: pointer; font-family: inherit;
}
.size-btn.is-on { background: var(--gold); border-color: var(--gold); color: #fff; font-weight: 700; }
.price-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.price { font-weight: 700; font-size: 1.05rem; }

.badge { font-size: .7rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; border: 1px solid; }
.badge-in { background: var(--green-bg); color: #3F5C3F; border-color: #C4D8C4; }
.badge-out { background: #EFEAE2; color: var(--muted); border-color: #DED5C7; }
.badge-sold { background: var(--red-bg); color: var(--red); border-color: #F0C4BC; }
.badge-pre { background: var(--amber-bg); color: var(--amber-ink); border-color: #E7CDA0; }

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

.btn {
  font-family: inherit; font-size: .94rem; font-weight: 700; cursor: pointer;
  border: 1px solid transparent; border-radius: 999px; padding: 11px 22px;
  background: var(--gold); color: #fff; transition: filter .15s ease;
}
.btn:hover:not(:disabled) { filter: brightness(.94); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-brown { background: var(--brown); }
.btn-green { background: var(--green); }
.btn-ghost { background: transparent; border-color: var(--gold-soft); color: var(--ink-soft); }
.btn-danger { background: transparent; border-color: #E3B4AC; color: var(--red); }
.btn-sm { padding: 7px 14px; font-size: .82rem; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

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

.field { display: block; margin-bottom: 14px; }
.field-label { display: block; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 5px; }
.field-hint { display: block; font-size: .76rem; color: var(--muted); margin-top: 4px; }
.input {
  width: 100%; font-family: inherit; font-size: .95rem; color: var(--ink);
  padding: 11px 13px; border: 1px solid var(--gold-soft); border-radius: 11px; background: #fff;
}
.input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
textarea.input { min-height: 90px; resize: vertical; }
.check { display: flex; align-items: flex-start; gap: 9px; font-size: .88rem; color: var(--ink-soft); margin-bottom: 10px; }
.check input { margin-top: 4px; }
/* Honeypot: off screen rather than display:none, which some bots skip. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.toggle-row { display: flex; gap: 8px; }
.toggle {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px; border: 1px solid var(--gold-soft); background: #fff;
  border-radius: 11px; cursor: pointer; font-family: inherit; font-size: .9rem; color: var(--ink-soft);
}
.toggle.is-on { background: var(--brown); border-color: var(--brown); color: #fff; font-weight: 700; }

/* ---------------------------------------------------------- alerts */

.alert { border-radius: 11px; padding: 12px 15px; font-size: .9rem; margin-bottom: 14px; }
.alert-error { background: var(--red-bg); color: #8A2E22; }
.alert-ok { background: var(--green-bg); color: #3F5C3F; }
.alert-info { background: var(--amber-bg); color: var(--amber-ink); }
.alert-list { margin: 6px 0 0; padding-left: 18px; }

.toast-host { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 999px;
  font-size: .88rem; box-shadow: var(--shadow); opacity: 1; transition: opacity .5s ease;
  max-width: 90vw;
}
.toast-out { opacity: 0; }
.toast-error { background: var(--red); }
.toast-ok { background: var(--green); }

.spinner { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .9rem; padding: 20px 0; }
.spinner-dot { width: 15px; height: 15px; border: 2px solid var(--gold-soft); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* -------------------------------------------------------- schedule */

.schedule { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .schedule { grid-template-columns: repeat(3, 1fr); } }
.schedule-item .k { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.schedule-item .v { font-family: 'Satisfy', cursive; font-size: 1.5rem; }
.schedule-note { border-top: 1px solid var(--line); padding-top: 14px; font-size: .9rem; color: var(--ink-soft); grid-column: 1 / -1; }

/* ----------------------------------------------------------- cart */

.line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .93rem; }
.line:last-of-type { border-bottom: 0; }
.qty { display: flex; align-items: center; gap: 8px; }
.qty button { width: 27px; height: 27px; border-radius: 50%; border: 1px solid var(--gold-soft); background: #fff; cursor: pointer; font-size: 1rem; line-height: 1; color: var(--ink); }
.total-row { display: flex; justify-content: space-between; font-weight: 700; padding-top: 12px; border-top: 1px solid var(--line); margin-top: 8px; }

.code-input { font-size: 1.7rem; letter-spacing: .45em; text-align: center; max-width: 240px; margin: 0 auto; text-transform: uppercase; }
.order-number { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 1.5rem; font-weight: 700; color: var(--brown); background: var(--cream); padding: 12px 20px; border-radius: 11px; display: inline-block; letter-spacing: .04em; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; }

/* --------------------------------------------------------- reviews */

.stars { display: flex; gap: 2px; color: var(--gold); }
.star-btn { background: none; border: 0; cursor: pointer; padding: 0; color: var(--gold); font-size: 1.4rem; line-height: 1; }

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

.site-footer { border-top: 1px solid var(--gold-soft); margin-top: 50px; padding: 30px 0 40px; }
.footer-inner { display: grid; gap: 20px; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
@media (min-width: 760px) { .footer-inner { grid-template-columns: 1.1fr 1fr 1fr; } }
.footer-inner a { color: var(--brown); }
.footer-line { display: flex; gap: 8px; align-items: flex-start; font-size: .9rem; color: var(--ink-soft); margin-bottom: 5px; }
.footer-note { font-size: .8rem; color: var(--muted); }

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

.admin-body { background: #F4F1EC; }
.admin-shell { max-width: 1180px; margin: 0 auto; padding: 20px; }
.admin-login { max-width: 380px; margin: 8vh auto; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.tab { border: 1px solid var(--gold-soft); background: #fff; border-radius: 999px; padding: 7px 15px; font-size: .86rem; cursor: pointer; font-family: inherit; color: var(--ink-soft); }
.tab.is-on { background: var(--brown); border-color: var(--brown); color: #fff; font-weight: 700; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; font-size: .82rem; }
.filters select, .filters input { font-family: inherit; font-size: .82rem; padding: 6px 9px; border: 1px solid var(--gold-soft); border-radius: 9px; background: #fff; }
.order-row { border: 1px solid var(--gold-soft); background: #fff; border-radius: 11px; padding: 13px; margin-bottom: 9px; font-size: .88rem; }
.order-row.is-cancelled { opacity: .58; }
.order-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.plan-card { border-radius: 11px; padding: 15px; font-size: .88rem; }
.plan-line { display: flex; justify-content: space-between; font-size: .82rem; }
.stat { background: #fff; border: 1px solid var(--gold-soft); border-radius: 11px; padding: 14px; }
.stat .n { font-size: 1.7rem; font-weight: 700; color: var(--brown); }
.stat .l { font-size: .76rem; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }

@media print { .site-header, .site-footer, .nav, .btn { display: none; } }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
