/* ===== Wots Cooking! — Shared Styles ===== */
/* ===== Fonts =====
   Roboto (text, form boxes, buttons, prices) and Barlow Semi Condensed (H1, H2 and H3 headings only).
   Both are free to use (SIL Open Font License). The files live in the /fonts folder on our own site, so nothing
   is loaded from another company. To change a font later, change the two --font- lines below. */
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/roboto-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/roboto-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/roboto-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Semi Condensed'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/barlow-semi-condensed-latin-700-normal.woff2') format('woff2'); }

:root {
  --red-ochre: #D81900;      /* buttons */
  --oxidized-iron: #A71F00;  /* headline text */
  --graphite: #35312C;       /* secondary accents */
  --spicy-orange: #D14A0A;   /* other accents */
  --cream: #F7F4EE;          /* background */
  --black: #111111;
  --white: #FFFFFF;
  --border: #E9E0C0;
  --rule: #d9d2bd;          /* thin divider lines */
  --rule-strong: #b9b095;   /* the underline of a form field */
  --font-body: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-head: 'Barlow Semi Condensed', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* One divider colour for every customer page. nav.js puts the wc-site class on those pages (the admin, kitchen and route pages
   never load it, so they keep their old lines). Anything that draws a line with --border follows it automatically. */
html.wc-site { --border: var(--rule); }

* { box-sizing: border-box; }

/* Buttons and form boxes use the page font instead of the browser's own default. */
button, input, select, textarea { font-family: inherit; }

body {
  font-family: var(--font-body);
  margin: 0;
  background: var(--cream);
  color: var(--black);
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

h1, h2, h3 {
  font-family: var(--font-head);
  text-transform: uppercase;
  color: var(--oxidized-iron);
  letter-spacing: 0.03em;
  margin: 0;
}
h1 { font-size: 1.875rem; font-weight: 700; }
h2 { font-size: 1.25rem; font-weight: 700; }
h3 { font-size: 1.0625rem; font-weight: 700; }
/* Several pages set their own heading size (page title, section title, the route page's sections). These keep them on the same scale.
   "body" in front makes them win over a page's own rule, so the sizes are set here and nowhere else. */
body h1.page-title { font-size: 1.875rem; }
body h2.section-title { font-size: 1.25rem; }
body h2.sec { font-size: 1.1rem; }

p { line-height: 1.5; color: var(--black); }

.btn-primary {
  display: inline-block;
  background: var(--red-ochre);
  color: var(--white);
  font-weight: 700;
  border: none;
  border-radius: 999px;
  padding: 0.9rem 1.6rem;
  font-size: 1rem;
  cursor: pointer;
  text-align: center;
}

/* ===== Top bar ===== */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  position: sticky;
  top: 0;
  background: var(--cream);
  z-index: 50;
  border-bottom: 1px solid var(--border);
}
.topbar .logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.01em;
  color: var(--black);
  text-transform: uppercase;
}
.topbar .icons { display: flex; align-items: center; gap: 1.1rem; }
.topbar .icons a, .topbar .icons button {
  background: none; border: none; cursor: pointer;
  display: flex; align-items: center; color: var(--black);
  padding: 0.15rem;
}
.topbar .icon-label { font-size: 0.82rem; font-weight: 600; }
.topbar > .icons { gap: 1.1rem; }

/* Sign out button at the top of the owner pages (admin, kitchen, route) */
.topbar-signout {
  background: none;
  border: 2px solid var(--oxidized-iron);
  color: var(--oxidized-iron);
  border-radius: 999px;
  padding: 0.4rem 0.95rem;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.topbar-signout[hidden] { display: none; }

/* Order Now button in the topbar (built by nav.js) */
.topbar .icons .order-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--red-ochre);
  color: var(--white);
  border-radius: 999px;
  padding: 0.5rem 0.95rem;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
/* Narrow phones: tighten the topbar so the logo, Order Now, cart, and menu all fit on one row */
@media (max-width: 380px) {
  .topbar { padding: 0.75rem 1rem; }
  .topbar > .icons { gap: 0.7rem; }
  .topbar .icons .order-pill { padding: 0.45rem 0.8rem; font-size: 0.8rem; }
}
/* Very narrow phones (about 340px and under): a slightly smaller logo keeps everything on one row */
@media (max-width: 340px) {
  .topbar .logo img { height: 30px !important; }
}

/* ===== Drawer / hamburger menu ===== */
.drawer-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 60; }
.drawer-overlay.show { display: block; }
.drawer {
  position: fixed; top: 0; right: -270px; width: 250px; height: 100%;
  background: var(--white); box-shadow: -4px 0 20px rgba(0,0,0,0.15);
  transition: right 0.25s ease; z-index: 61; padding: 1.5rem 1.25rem;
}
.drawer.open { right: 0; }
.drawer a {
  display: block; padding: 0.85rem 0; color: var(--black);
  font-size: 1.05rem; font-weight: 600; border-bottom: 1px solid var(--border);
  text-transform: uppercase;
}
.drawer-close { background: none; border: none; font-size: 1.4rem; float: right; cursor: pointer; }

/* ===== Hero ===== */
.hero { position: relative; }
.hero img { width: 100%; display: block; max-height: 480px; object-fit: cover; }
.hero .order-btn-wrap {
  position: absolute; bottom: 8%; left: 50%; transform: translateX(-50%);
  width: 30%; min-width: 200px;
}
.hero .order-btn-wrap .btn-primary { width: 100%; font-size: 1.1rem; padding: 1rem; }

/* ===== Bowl list blocks ===== */
.bowl-block {
  display: block;
  max-width: 640px;
  margin: 0 auto 2.5rem;
  padding: 0 1.25rem;
}
.bowl-block img { width: 100%; display: block; margin-bottom: 0.85rem; }
.bowl-block h3 { font-size: 1.2rem; margin-bottom: 0.3rem; }
.bowl-block p { font-size: 0.95rem; color: var(--graphite); margin: 0; }

.bowl-feature {
  max-width: 640px;
  margin: 0 auto 2.5rem;
  padding: 0 1.25rem;
}
.bowl-feature-photo { overflow: hidden; margin-bottom: 0.85rem; }
.bowl-feature-photo img { width: 100%; display: block; position: relative; top: 50%; transform: translateY(-50%); }
.bowl-feature h3 { font-size: 1.2rem; margin-bottom: 0.3rem; }
.bowl-feature p { font-size: 0.95rem; color: var(--graphite); margin: 0; }

.menu-section { max-width: 640px; margin: 0 auto 2rem; padding: 0 1.25rem; }
.menu-section > h2 { font-size: 1.15rem; padding-bottom: 0.5rem; margin-bottom: 1rem; border-bottom: 1px solid var(--rule); }
.menu-item { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.25rem; }
.menu-item .menu-photo { flex: 0 0 150px; width: 150px; height: 150px; display: block; object-fit: cover; }
.menu-item .menu-photo.placeholder { display: flex; align-items: center; justify-content: center; text-align: center; background: #ece6d5; border: 1px solid var(--rule); color: var(--graphite); font-size: 0.8rem; }
.menu-item .menu-text { flex: 1; min-width: 0; }
.menu-item h3 { font-size: 1.1rem; margin-bottom: 0.25rem; }
.menu-item .menu-price { display: block; color: var(--graphite); font-weight: 700; font-size: 1rem; margin: 0 0 0.3rem; }
.menu-item h3 a { text-decoration: underline; text-underline-offset: 3px; }
.menu-item p { font-size: 0.95rem; color: var(--graphite); margin: 0; }
.menu-gap { height: 1.5rem; }

.section-heading {
  text-align: center;
  margin: 2.5rem 0 1.5rem;
  padding: 0 1.25rem;
}

/* ===== A plain footer (a page with a <footer> of its own, such as the admin page) ===== */
footer {
  text-align: center; margin-top: 3rem; padding: 2rem 1.25rem;
  font-size: 0.85rem; color: var(--graphite); border-top: 1px solid var(--border);
}
footer a { color: var(--graphite); margin: 0 0.5rem; text-decoration: underline; }

/* ===== Footer (built by nav.js: one list of links there, the same footer on every page) =====
   The social icons are the first thing in the first column; then the links fill down each column. Three columns on a wide
   screen, two on a phone. Every row is the same height, so the icons and the links keep one even rhythm. */
footer.site-footer { margin-top: 3rem; padding: 2rem 1.25rem 2.25rem; border-top: 1px solid var(--rule); text-align: left; font-size: inherit; }
.footer-grid {
  max-width: 640px; margin: 0 auto;
  display: grid; grid-auto-flow: column; grid-template-rows: repeat(3, 2.2rem); grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 1.5rem; align-items: center;
}
.footer-grid a { color: var(--graphite); font-size: 0.92rem; text-decoration: none; margin: 0; }
.footer-grid a:hover, .footer-grid a:focus-visible { text-decoration: underline; }
.footer-social { display: flex; align-items: center; gap: 1.1rem; }
.footer-social a { display: flex; color: var(--black); }
.footer-social svg { width: 32px; height: 32px; }
@media (max-width: 560px) {
  footer.site-footer { padding: 1.6rem 1.1rem 1.9rem; margin-top: 2.25rem; }
  .footer-grid { grid-template-rows: repeat(5, 1.9rem); grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1rem; }
  .footer-grid a { font-size: 0.82rem; }
  .footer-social { gap: 0.9rem; }
  .footer-social svg { width: 28px; height: 28px; }
}

/* ===== A line with a checkbox ("I agree to...") =====
   One pattern for every one of them, so the boxes are the same size and the sentences line up. The box can never shrink. */
.agree-line { display: flex; gap: 0.6rem; align-items: flex-start; margin-top: 1rem; font-size: 0.8rem; line-height: 1.4; color: #5b554b; }
.agree-line input { flex: 0 0 18px; width: 18px; height: 18px; min-width: 18px; margin: 0; }

/* ===== Generic content page ===== */
.page-content { max-width: 640px; margin: 0 auto; padding: 1.75rem 1.25rem 3rem; }
.page-content h1 { margin-bottom: 0.5rem; }
.page-content .subhead { color: var(--graphite); margin-bottom: 2rem; font-size: 0.95rem; }

table.nutrition { width: 100%; border-collapse: collapse; margin-bottom: 2rem; background: transparent; }
table.nutrition th, table.nutrition td {
  text-align: left; padding: 0.6rem 0.7rem; font-size: 0.9rem; border-bottom: 1px solid var(--border);
}
table.nutrition th:first-child, table.nutrition td:first-child { padding-left: 0; }
table.nutrition th:last-child, table.nutrition td:last-child { padding-right: 0; }
table.nutrition th { background: transparent; color: var(--graphite); text-transform: uppercase; font-size: 0.78rem; border-bottom: 1.5px solid var(--graphite); }

.menu-item-row { display: flex; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px solid var(--border); font-size: 0.98rem; }

/* ===== Legal pages (Privacy Policy, Terms & Conditions) =====
   Same font, colors, and heading treatment as the rest of the site —
   only the max-width and paragraph spacing differ, for a denser-text
   reading page. Any future global change to fonts/colors/headings in
   this file applies here too, automatically, same as every other page. */
.legal-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}
.legal-page p { line-height: 1.6; }
.legal-page .updated { color: var(--graphite); font-size: 0.9rem; margin-bottom: 2rem; }
.legal-page h2 { margin-top: 2rem; }
.legal-page a { color: var(--red-ochre); text-decoration: underline; }

@media (min-width: 640px) {
  .hero img { max-height: 560px; }
}

/* Nutrition tables: on a phone the columns tighten up so the whole table fits without scrolling sideways. */
@media (max-width: 520px) {
  table.nutrition { table-layout: auto; }
  table.nutrition th, table.nutrition td { padding: 0.5rem 0.25rem; font-size: 0.8rem; line-height: 1.25; }
  table.nutrition th { font-size: 0.64rem; letter-spacing: 0; }
  table.nutrition th:first-child, table.nutrition td:first-child { padding-left: 0; width: 22%; }
  table.nutrition th:last-child, table.nutrition td:last-child { padding-right: 0; }
}
@media (max-width: 380px) {
  table.nutrition th, table.nutrition td { padding: 0.45rem 0.15rem; font-size: 0.72rem; }
  table.nutrition th { font-size: 0.56rem; }
}
