/* ============================================================
   Arlo's Cookies - colours and styles
   The colours come from the logo. Change them here to restyle the whole site.
   ============================================================ */
:root {
  --choc: #2b140a;        /* dark chocolate */
  --choc-2: #4a2414;
  --cream: #fff6e6;       /* page background */
  --dough: #fde9c4;
  --cookie: #d98b2b;      /* golden cookie */
  --red: #e2312b;         /* cap & sneakers */
  --red-dark: #b8231e;
  --yellow: #f7b500;      /* zoom lines */
  --green: #2e8b57;
  --ink: #2b140a;
  --muted: #7a5a45;
  --card: #ffffff;
  --line: #f0dcbc;
  --radius: 18px;
  --shadow: 0 4px 0 rgba(43, 20, 10, 0.12), 0 10px 24px rgba(43, 20, 10, 0.08);
  font-family: 'Nunito', system-ui, sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); line-height: 1.5; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
h1, h2, h3, .brand { font-family: 'Fredoka', 'Nunito', sans-serif; line-height: 1.15; }
h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 0.5rem; }
h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0 0 1rem; }
h3 { font-size: 1.3rem; margin: 0 0 0.25rem; }
a { color: var(--red-dark); }
.wrap { width: min(1100px, 100% - 32px); margin-inline: auto; }
.section { padding: 48px 0; }
.muted { color: var(--muted); }
.center { text-align: center; }
.hidden { display: none !important; }

/* ---------- Header ---------- */
.site-header { background: var(--choc); color: var(--cream); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; gap: 12px; padding: 8px 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--cream); text-decoration: none; font-size: 1.35rem; font-weight: 700; margin-right: auto; }
.brand img { width: 44px; height: 44px; border-radius: 50%; background: var(--choc-2); object-fit: cover; }
.nav { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.nav a, .nav button { color: var(--cream); text-decoration: none; font: inherit; font-weight: 700; padding: 8px 12px; border-radius: 999px; background: transparent; border: 0; cursor: pointer; }
.nav a:hover, .nav button:hover { background: rgba(255, 255, 255, 0.12); }
.nav .cart-link { background: var(--red); }
.nav .cart-link:hover { background: var(--red-dark); }
.nav .kitchen-link { background: var(--yellow); color: var(--choc); }
.badge { display: inline-block; min-width: 1.4em; padding: 0 6px; border-radius: 999px; background: var(--yellow); color: var(--choc); font-size: 0.85em; text-align: center; margin-left: 4px; }

/* ---------- Buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 800; font-size: 1.05rem; padding: 12px 22px; border-radius: 999px; border: 0; cursor: pointer; text-decoration: none; background: var(--red); color: #fff; box-shadow: 0 4px 0 var(--red-dark); transition: transform 0.08s, box-shadow 0.08s; }
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--red-dark); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.yellow { background: var(--yellow); color: var(--choc); box-shadow: 0 4px 0 #c48f00; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn.small { padding: 6px 14px; font-size: 0.9rem; }
.btn.block { width: 100%; }

label { display: block; font-weight: 700; margin: 14px 0 6px; }
input, select, textarea { width: 100%; font: inherit; padding: 11px 14px; border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--cookie); box-shadow: 0 0 0 3px rgba(217, 139, 43, 0.25); }
textarea { min-height: 80px; resize: vertical; }
.checkbox { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.checkbox input { width: auto; }
.hint { font-size: 0.9rem; color: var(--muted); margin-top: 4px; }

.alert { padding: 12px 16px; border-radius: 12px; margin: 12px 0; font-weight: 700; }
.alert.error { background: #fde3e1; color: var(--red-dark); }
.alert.success { background: #def5e6; color: #1d6b40; }
.alert.info { background: var(--dough); color: var(--choc); }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }

/* ---------- Home page ---------- */
.hero { background: radial-gradient(ellipse at top, var(--choc-2), var(--choc) 70%); color: var(--cream); text-align: center; padding: 24px 0 48px; }
.hero img { width: min(560px, 100%); height: auto; display: block; margin: 0 auto; }
.hero p { font-size: 1.2rem; max-width: 36rem; margin: 0 auto 24px; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 18px; }
.step { text-align: center; }
.step .icon { font-size: 2.6rem; }

.menu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 340px)); justify-content: center; gap: 20px; }
.cookie-card { display: flex; flex-direction: column; gap: 8px; }
.cookie-card .emoji { font-size: 3.2rem; line-height: 1; }
.cookie-card .price { font-family: 'Fredoka', sans-serif; font-size: 1.5rem; font-weight: 700; color: var(--red-dark); }
.cookie-card .desc { color: var(--muted); flex: 1; margin: 0; }

.stepper { display: inline-flex; align-items: center; gap: 4px; background: var(--dough); border-radius: 999px; padding: 4px; }
.stepper button { width: 38px; height: 38px; border-radius: 50%; border: 0; background: #fff; font-size: 1.3rem; font-weight: 800; cursor: pointer; color: var(--choc); }
.stepper button:hover { background: var(--yellow); }
.stepper span { min-width: 2ch; text-align: center; font-weight: 800; font-size: 1.1rem; }

.cart-bar { position: sticky; bottom: 0; z-index: 10; background: var(--choc); color: var(--cream); padding: 12px 0; box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.2); }
.cart-bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-weight: 800; font-size: 1.1rem; }

/* ---------- Checkout / account ---------- */
.two-col { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }
.narrow { width: min(460px, 100% - 32px); margin-inline: auto; }
.tabs { display: flex; gap: 6px; background: var(--dough); padding: 6px; border-radius: 999px; margin-bottom: 18px; }
.tabs button { flex: 1; font: inherit; font-weight: 800; border: 0; padding: 10px; border-radius: 999px; background: transparent; cursor: pointer; color: var(--choc); }
.tabs button.active { background: #fff; box-shadow: var(--shadow); }

.line-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 2px dashed var(--line); }
.line-item .emoji { font-size: 2rem; }
.line-item .name { flex: 1; font-weight: 700; }
.total-row { display: flex; justify-content: space-between; font-family: 'Fredoka', sans-serif; font-size: 1.5rem; font-weight: 700; padding-top: 14px; }
.cash-note { display: flex; gap: 12px; align-items: center; background: var(--dough); border-radius: 14px; padding: 14px; margin-top: 16px; font-weight: 700; }
.cash-note .icon { font-size: 2rem; }

/* ---------- Orders ---------- */
.order-card { margin-bottom: 18px; }
.order-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; flex-wrap: wrap; }
.order-items { margin: 10px 0; padding-left: 1.2em; }
.pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-weight: 800; font-size: 0.85rem; background: var(--dough); }
.pill.new { background: #e3eefe; color: #1f4f9c; }
.pill.baking { background: #fff0c2; color: #8a5a00; }
.pill.on_the_way { background: #ffe1d6; color: #a2391a; }
.pill.delivered { background: #def5e6; color: #1d6b40; }
.pill.cancelled { background: #eee; color: #666; }
.pill.paid { background: #def5e6; color: #1d6b40; }
.pill.unpaid { background: #fde3e1; color: var(--red-dark); }

.tracker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 14px 0 6px; }
.tracker div { text-align: center; font-size: 0.8rem; font-weight: 700; color: var(--muted); }
.tracker div::before { content: ''; display: block; height: 8px; border-radius: 999px; background: var(--line); margin-bottom: 6px; }
.tracker div.done { color: var(--ink); }
.tracker div.done::before { background: var(--cookie); }

/* ---------- Arlo's Kitchen ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 16px; margin-bottom: 24px; }
.stat .num { font-family: 'Fredoka', sans-serif; font-size: 2rem; font-weight: 700; }
.stat .label { color: var(--muted); font-weight: 700; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filters button.active { background: var(--choc); color: var(--cream); box-shadow: none; }
.status-buttons { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.status-buttons button.current { background: var(--choc); color: var(--cream); box-shadow: none; }
.bake-list { list-style: none; padding: 0; margin: 0; }
.bake-list li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 2px dashed var(--line); font-weight: 700; }
.menu-edit { display: grid; grid-template-columns: 70px 1fr 110px; gap: 10px; align-items: start; }
.menu-edit .full { grid-column: 1 / -1; }
.menu-edit label { margin-top: 0; font-size: 0.85rem; }
@media (max-width: 560px) { .menu-edit { grid-template-columns: 1fr 1fr; } .menu-edit .name-field { grid-column: 1 / -1; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--choc); color: var(--dough); text-align: center; padding: 24px 0; font-size: 0.95rem; }
.site-footer a { color: var(--yellow); }

@media (max-width: 560px) {
  .brand span { display: none; }
  .nav a, .nav button { padding: 7px 9px; font-size: 0.95rem; }
}

/* Meet the baker */
.about { display: flex; gap: 24px; align-items: center; }
.about img { width: 180px; height: auto; flex-shrink: 0; border-radius: 50%; background: var(--dough); }
@media (max-width: 560px) { .about { flex-direction: column; text-align: center; } }

/* Vote for the next cookie */
.poll { display: grid; gap: 10px; }
.poll-option { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; padding: 14px 16px; border: 2px solid var(--line); border-radius: 14px; background: #fff; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; text-align: left; }
.poll-option:hover { border-color: var(--cookie); }
.poll-option.mine { border-color: var(--red); }
.poll-fill { position: absolute; inset: 0 auto 0 0; background: var(--dough); transition: width 0.4s; }
.poll-label, .poll-count { position: relative; }
.poll-label strong { color: var(--red-dark); font-size: 0.85rem; margin-left: 4px; }
.poll-count { color: var(--muted); white-space: nowrap; }

/* Comments */
.comments { margin-top: 16px; max-height: 480px; overflow-y: auto; }
.comment { padding: 12px 0; border-top: 2px dashed var(--line); }
.comment p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment.pending { opacity: 0.75; }
.comment-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
@media (max-width: 800px) { #have-your-say .two-col { grid-template-columns: 1fr !important; } }
