/* Shared styles for the customer menu (index.html) and the owner form (admin.html).
   Mobile-first: everything is designed for a phone screen first.
   Only the phone's built-in fonts are used, so nothing extra is downloaded. */

:root {
  --text: #2b1d14;      /* espresso */
  --muted: #6b5b4f;
  --line: #e8dccb;
  --accent: #9a4f1c;    /* caramel */
  --bg: #fbf6ee;        /* cream */
  --card: #ffffff;
  --soldout: #776b61;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.4;
}

h1, h2 { font-family: var(--serif); }
h1 { font-size: 1.6rem; line-height: 1.1; margin: 0; }
h2 { font-size: 1.25rem; margin: 24px 0 4px; }

p { margin: 0; }
a { color: var(--accent); }
.muted { color: var(--muted); font-size: 0.9rem; }

/* ---------- Header ---------- */

.sample-strip {
  padding: 6px 16px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.8rem;
  text-align: center;
}

.shop {
  display: grid;
  gap: 10px;
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--line);
}
.shop-title { display: flex; align-items: center; gap: 12px; }
.logo { flex: none; }

.status-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.badge {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}
.badge.open { background: #e3f1e6; color: #1f5c34; }
.badge.closed { background: #ece6df; color: #4f453d; }

/* Four quick contact buttons in a row */
.quick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 4px;
}
.quick a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
}

/* Line icons: one style for all the small SVGs */
.quick svg, .contact-list svg {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Category tabs: one row that scrolls sideways and sticks to the top ---------- */

.tabs {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.tabs a {
  flex: none;
  padding: 7px 14px;
  border: 1px solid #c9a27e;
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.9rem;
  text-decoration: none;
}
.tabs a.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

/* ---------- Menu items ---------- */

main { padding: 0 16px 8px; max-width: 640px; }

/* Leave room for the sticky tabs when jumping to a section */
section { scroll-margin-top: 60px; }

.item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.item-name { font-weight: 600; }
.item-desc { color: var(--muted); font-size: 0.85rem; }
.item-price { font-weight: 600; white-space: nowrap; }

.item.sold-out .item-name,
.item.sold-out .item-price { color: var(--soldout); }

.tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  vertical-align: middle;
}
.tag.sold-out { background: #ece6df; color: #4f453d; }
.tag.bestseller { background: #f6e3c8; color: #6b3a10; }
.tag.new { background: #e1ecf7; color: #1d4e89; }

/* ---------- Find us ---------- */

.find-us { display: grid; gap: 12px; padding: 8px 16px 4px; max-width: 640px; }
.find-us h2 { margin-bottom: 0; }

.card { border: 1px solid var(--line); border-radius: 14px; background: var(--card); overflow: hidden; }
.card-body { display: grid; gap: 8px; padding: 12px 14px; }
.map { display: block; width: 100%; height: 150px; }

.button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.contact-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 6px 14px;
  border-bottom: 1px solid #f0e7da;
  color: var(--text);
  text-decoration: none;
}
.contact-list a:last-child { border-bottom: 0; }
.contact-list span { display: grid; }
.contact-list small { color: var(--muted); }

.footer { display: grid; gap: 6px; padding: 20px 16px 32px; text-align: center; color: var(--muted); font-size: 0.85rem; }

/* ---------- Owner form (admin.html) ---------- */

label { display: block; font-size: 0.85rem; color: var(--muted); }

input[type="text"], input[type="password"], input[type="number"], select {
  width: 100%;
  padding: 10px;
  font-size: 1rem;
  border: 1px solid #c9b8a6;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

button {
  min-height: 44px;
  padding: 12px 18px;
  font-size: 1rem;
  font-weight: 600;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
}
button.secondary { background: #fff; color: var(--accent); border: 1px solid var(--accent); }

.edit-row {
  display: grid;
  grid-template-columns: 1fr 100px;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.edit-row .available { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--text); font-size: 1rem; }
.edit-row .available input { width: 24px; height: 24px; accent-color: var(--accent); }

.card.form { margin: 16px 0; padding: 14px; overflow: visible; }
.card.form > * + * { margin-top: 10px; }

.save-bar {
  position: sticky;
  bottom: 0;
  padding: 12px 0;
  background: var(--bg);
  border-top: 1px solid var(--line);
  text-align: center;
}
.save-bar button { width: 100%; }
.save-bar p { margin-top: 8px; color: var(--muted); font-size: 0.75rem; }

.message { padding: 10px 12px; border-radius: 8px; margin-top: 14px; }
.message.ok { background: #e3f1e6; color: #1f5c34; }
.message.error { background: #fdecea; color: #8a1c13; }
