/* base.css - shared by EVERY page: the customer site and the admin panel.
   Load it first, before any other stylesheet.
   Holds only what admin.html also uses (plus the topbar pieces the info
   pages add): tokens, reset, <main>, shared buttons, the topbar.

   Contents - search for the marker, e.g. "== BASE: tokens ==":
     == BASE: tokens ==  color/size variables + dark theme
     == BASE: reset ==  box-sizing, .visually-hidden, focus ring, body, headings
     == BASE: layout ==  <main> width/padding (admin overrides it with .admin-main)
     == BASE: controls ==  button hover/transition, .icon, .hero-cta (also the admin primary button)
     == BASE: topbar ==  fixed top bar, logo, icon buttons, info-page language pill
*/

/* == BASE: tokens == */
:root {
  --bg: #fdf6ef;
  --card: #ffffff;
  --ink: #3a352f;
  --muted: #676560;
  --accent: #c9702f;
  --accent-dark: #8a4a1c;
  --accent-warm: #fb8e28;
  --tan: #d3cbab;
  --border: #ece2d2;
  --radius: 14px;
}

/* Dark mode is switched off on the customer site for now (theme.js). */
.no-dark-mode #theme-toggle { display: none; }

:root[data-theme="dark"] {
  --bg: #1c1a17;
  --card: #26231f;
  --ink: #f0ece3;
  --muted: #b2aa9c;
  --border: #3c362f;
  --tan: #8f8570;
  --accent-dark: #ffab5e;
}

/* == BASE: reset == */
* { box-sizing: border-box; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

body {
  margin: 0;
  font-family: "Rubik", "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  padding-top: 58px;
}

h1, h2 { font-family: "Frank Ruhl Libre", serif; }

/* == BASE: layout == */
main { padding: 8px 16px; max-width: 1100px; margin: 0 auto; }
@media (min-width: 640px) {
  main { padding: 8px 24px; }
}

/* == BASE: controls == */
/* Subtle hover affordance on every clickable control, mouse devices only
   (touch taps shouldn't get a "stuck" hover state). Elements with their
   own tailored :hover further down the cascade win on specificity. */
button, summary, .topbar-cart, .contact-row {
  transition: filter 0.15s ease;
}
@media (hover: hover) and (pointer: fine) {
  button:not(:disabled):hover,
  summary:hover,
  .topbar-cart:hover,
  .contact-row:hover {
    filter: brightness(0.93);
  }
}

.icon { width: 22px; height: 22px; flex-shrink: 0; }

.hero-cta {
  display: inline-block;
  background: var(--accent-warm);
  color: #2a1d08;
  font-weight: 700;
  text-decoration: none;
  padding: 12px 28px;
  border-radius: 6px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}
.hero-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0,0,0,0.3); }

/* == BASE: topbar == */
/* Top bar (always fixed, visible while scrolling) */
#topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  height: 58px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(58,53,47,0.06);
  z-index: 50;
}
#logo-home {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: block;
  line-height: 0;
}

.topbar-icons, .topbar-left-icons { display: flex; align-items: center; gap: 4px; }

.topbar-icons button,
.topbar-left-icons button,
.topbar-cart {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--ink);
  padding: 8px;
  line-height: 1;
  border-radius: 8px;
  font-family: inherit;
  transition: background 0.15s ease, filter 0.15s ease;
}
.topbar-icons button:active,
.topbar-left-icons button:active,
.topbar-cart:active { background: var(--bg); }

/* Info-page topbar "EN/עב" pill (topbar.js). The .topbar-icons prefix
   outranks ".topbar-icons button" above, so no !important is needed. */
.topbar-icons .lang-toggle {
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 10px;
}

/* Every topbar writes the business name (index.html, topbar.js; admin.html
   as a plain div, not a link). "Gveret Levin"
   is a handwriting font from its own Google Fonts link on each page, with
   display=block: the name stays hidden for a moment until the font arrives
   instead of showing in a plain font first. The color is the logo's slate blue. */
#logo-home.wordmark {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  font-family: "Gveret Levin", cursive;
  color: #3f4b63;
}
:root[data-theme="dark"] #logo-home.wordmark { color: #c3ccdc; }
a#logo-home.wordmark:active { opacity: 0.7; }
.wordmark-top { font-size: 15px; }
.wordmark-main { font-size: 28px; margin-top: -3px; }
@media (min-width: 700px) {
  .wordmark-top { font-size: 17px; }
  .wordmark-main { font-size: 32px; }
}
/* Narrow phones: room for the info pages' "Back to menu". */
@media (max-width: 380px) {
  .wordmark-top { font-size: 13px; }
  .wordmark-main { font-size: 24px; }
}
@media (max-width: 340px) {
  a.topbar-cart { font-size: 0.85rem; padding-inline: 4px; }
}

.topbar-cart {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
}
