/* ============ Rigo's Cantina — rustic Mexican menu ============ */

:root {
  --parchment: #e9dcbf;
  --parchment-dark: #ddcda9;
  --paper-card: #f0e6cd;
  --green: #1e4d2b;
  --green-dark: #163a20;
  --red: #c0392b;
  --ink: #2c2418;
  --ink-soft: #5a4d38;
  --yellow: #f5d90a;
  --radius: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Source Sans 3", Georgia, serif;
  color: var(--ink);
  background-color: #eedbb2;
  /* tiled parchment texture behind all content */
  background-image: url("../rigos_web_assets/rigos_tilable_parchment_texture.webp");
  background-size: 420px auto;
  background-repeat: repeat;
}

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

/* ---------- hamburger + side nav ---------- */

.hamburger {
  position: fixed;
  top: 14px; left: 14px;
  z-index: 60;
  width: 46px; height: 42px;
  padding: 10px 9px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--parchment);
  border: 2px solid rgba(30, 77, 43, 0.35);
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(44, 36, 24, 0.25);
}
.hamburger span {
  display: block;
  height: 4px;
  border-radius: 2px;
  background: var(--green);
}

.side-nav {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 80;
  width: min(78vw, 300px);
  background: var(--green-dark);
  color: var(--parchment);
  padding: 60px 26px 26px;
  transform: translateX(-100%);
  transition: transform 0.28s ease;
  box-shadow: 4px 0 18px rgba(0, 0, 0, 0.4);
}
.side-nav.open { transform: translateX(0); }
.side-nav__close {
  position: absolute;
  top: 10px; right: 12px;
  background: none; border: none;
  color: var(--parchment);
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
}
.side-nav__emblem {
  width: 54px;
  display: block;
  margin: 0 auto 18px;
}
.side-nav__list {
  list-style: none;
  margin: 0; padding: 0;
}
.side-nav__list a {
  display: block;
  padding: 14px 6px;
  color: var(--parchment);
  text-decoration: none;
  font-family: "Oswald", sans-serif;
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(233, 220, 191, 0.25);
}
.side-nav__list a:hover { color: var(--yellow); }

.scrim {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(20, 15, 8, 0.55);
}

/* ---------- hero ---------- */

.hero { text-align: center; }

.hero__inner {
  padding: 54px 20px 0;
  max-width: 640px;
  margin: 0 auto;
}

.hero__logo {
  width: 100%;
  max-width: 480px;
  height: auto;
  filter: drop-shadow(0 3px 4px rgba(44, 36, 24, 0.3));
}

.hero__est {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 8px auto 0;
  max-width: 340px;
}
.hero__est-text {
  font-family: "Oswald", sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.25em;
  color: var(--ink);
}
.hero__est-rule {
  flex: 1;
  height: 2px;
  background: rgba(44, 36, 24, 0.4);
}
.hero__flower { width: 34px; height: auto; }

.hero__art { line-height: 0; }

/* Mobile: pre-composed torn-parchment house artwork. */
.hero__art-mobile {
  display: block;
  width: 100%;
  height: min(30vh, 270px);
  object-fit: cover;
  /* focus the crop on the house band so it sits right under the logo */
  object-position: center 46%;
  margin-top: -4px;
}

.hero__art-desktop { display: none; }

/* desktop-only band between header and menu */
.hero-divider { display: none; }

/* ---------- menu landing ---------- */

.menu-landing {
  padding: 22px 20px 20px;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.category-nav {
  margin-top: 0;
  border-top: 2px solid rgba(44, 36, 24, 0.35);
}
.category-nav__row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 8px;
  border-bottom: 2px solid rgba(44, 36, 24, 0.35);
  text-decoration: none;
  color: var(--ink);
}
.category-nav__row img { width: 40px; height: 40px; object-fit: contain; }
.category-nav__row span:nth-child(2) {
  font-family: "Oswald", sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.category-nav__chev {
  margin-left: auto;
  font-size: 1.9rem;
  color: var(--green);
  font-weight: 700;
}
.category-nav__row:hover span:nth-child(2),
.category-nav__row:focus-visible span:nth-child(2) { color: var(--green); }

/* ---------- dynamic menu ---------- */

.loading {
  text-align: center;
  padding: 40px;
  font-style: italic;
  color: var(--ink-soft);
}

.menu-category {
  max-width: 860px;
  margin: 0 auto;
  padding: 64px 16px 8px;
  scroll-margin-top: 12px;
}

.menu-category__header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 6px;
}
.menu-category__header img { width: 42px; height: 42px; object-fit: contain; }
.menu-category__header h2 {
  margin: 0;
  font-family: "Oswald", sans-serif;
  font-size: clamp(1.7rem, 5vw, 2.3rem);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green);
}
.menu-category__rule {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 420px;
  margin: 0 auto 26px;
}
.menu-category__rule::before,
.menu-category__rule::after {
  content: "";
  flex: 1;
  height: 2px;
  background: rgba(44, 36, 24, 0.35);
}
.menu-category__rule img { width: 26px; height: auto; }

/* section (accordion) */

.menu-section {
  background: var(--paper-card);
  border: 1px solid rgba(110, 85, 45, 0.35);
  border-radius: var(--radius);
  box-shadow: 0 2px 5px rgba(44, 36, 24, 0.16);
  margin-bottom: 14px;
  overflow: hidden;
}

.menu-section__toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px 18px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: "Oswald", sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green-dark);
}
.menu-section__toggle::after {
  content: "\203A";
  margin-left: auto;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--red);
  transform: rotate(90deg);
  transition: transform 0.2s ease;
}
.menu-section.open .menu-section__toggle::after { transform: rotate(-90deg); }

.menu-section__body {
  display: none;
  padding: 0 18px 18px;
}
.menu-section.open .menu-section__body { display: block; }

.menu-section__note {
  margin: 0 0 14px;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 0.95rem;
  border-left: 3px solid var(--red);
  padding-left: 10px;
}

/* items */

.menu-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.menu-item {
  padding-bottom: 12px;
  border-bottom: 1px dashed rgba(110, 85, 45, 0.4);
}
.menu-item:last-child { border-bottom: none; padding-bottom: 0; }

.menu-item__head {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.menu-item__num {
  font-family: "Oswald", sans-serif;
  font-weight: 600;
  color: var(--red);
  font-size: 0.95rem;
  min-width: 1.4em;
}
.menu-item__name {
  font-family: "Oswald", sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
}
.menu-item__dots {
  flex: 1;
  border-bottom: 2px dotted rgba(110, 85, 45, 0.55);
  transform: translateY(-4px);
  min-width: 16px;
}
.menu-item__price {
  font-family: "Oswald", sans-serif;
  font-weight: 700;
  color: var(--green);
  white-space: nowrap;
}

.menu-item__variants {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}
.menu-item__variants li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-left: 1.7em;
  font-size: 0.95rem;
}
.menu-item__variant-label { color: var(--ink-soft); }

.menu-item__desc,
.menu-item__served,
.menu-item__options {
  margin: 5px 0 0;
  padding-left: 1.7em;
  font-size: 0.93rem;
  line-height: 1.45;
}
.menu-item__desc { color: var(--ink-soft); }
.menu-item__served { color: var(--ink-soft); font-style: italic; }
.menu-item__options { color: var(--red); font-weight: 600; }

/* items with a dish photo */

.menu-item--photo {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  align-items: start;
}
.menu-item--photo > :not(.menu-item__thumb) { grid-column: 2; }

.menu-item__thumb {
  grid-column: 1;
  grid-row: 1 / span 6;
  width: 76px;
  height: 76px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #fff7e4, var(--parchment-dark));
  box-shadow:
    0 0 0 3px var(--paper-card),
    0 0 0 5px rgba(30, 77, 43, 0.55),
    0 5px 12px rgba(44, 36, 24, 0.3);
  cursor: zoom-in;
  overflow: hidden;
  transition: box-shadow 0.25s ease, transform 0.2s ease;
}
.menu-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6%;
  display: block;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
/* the plate spins in once its row is revealed */
.js-reveal .menu-item.reveal .menu-item__thumb { opacity: 0; }
.js-reveal .menu-item.is-visible .menu-item__thumb {
  opacity: 1;
  animation: plateIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  animation-delay: calc(var(--d, 0ms) + 120ms);
}
.menu-item__thumb:hover,
.menu-item__thumb:focus-visible {
  box-shadow:
    0 0 0 3px var(--paper-card),
    0 0 0 5px var(--red),
    0 8px 18px rgba(44, 36, 24, 0.35);
}
.menu-item__thumb:hover img,
.menu-item__thumb:focus-visible img { transform: scale(1.12) rotate(4deg); }
.menu-item__thumb:active { transform: scale(0.93); }

/* ============================================================
   Motion: page-load animations + scroll reveals.
   Reveals are keyframe-based (not transitions) so they also fire
   reliably on iOS when content appears from display:none.
   ============================================================ */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes popIn {
  0%   { opacity: 0; transform: scale(0.6) translateY(10px); }
  65%  { opacity: 1; transform: scale(1.06) translateY(-2px); }
  100% { opacity: 1; transform: none; }
}
@keyframes plateIn {
  from { opacity: 0; transform: translateY(14px) scale(0.7) rotate(-14deg); }
  to   { opacity: 1; transform: none; }
}
@keyframes slideRight {
  from { opacity: 0; transform: translateX(-28px); }
  to   { opacity: 1; transform: none; }
}
@keyframes growX {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
@keyframes iconWiggle {
  0%, 100% { transform: rotate(0); }
  30%  { transform: rotate(-9deg) scale(1.08); }
  60%  { transform: rotate(7deg) scale(1.08); }
}
@keyframes bodyOpen {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}

/* Load animations use `backwards` fill: the element is held at the first
   keyframe during its delay, then released to its normal styles afterwards
   so hover/active transforms keep working. */

/* --- page load: hero --- */
.hero__logo { animation: popIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
.hero__est { animation: fadeIn 0.6s ease 0.35s backwards; }
.hero__est-rule { transform-origin: center; animation: growX 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.45s backwards; }
.hero__flower { animation: popIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.55s backwards; }
.hero__art-mobile, .hero__art-desktop { animation: fadeIn 0.9s ease 0.25s backwards; }

/* --- page load: category buttons stagger in --- */
.category-nav__row {
  animation: slideRight 0.6s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  transition: transform 0.12s ease;
}
.category-nav__row:nth-child(1) { animation-delay: 0.55s; }
.category-nav__row:nth-child(2) { animation-delay: 0.67s; }
.category-nav__row:nth-child(3) { animation-delay: 0.79s; }
.category-nav__row:nth-child(4) { animation-delay: 0.91s; }
.category-nav__row:hover img,
.category-nav__row:active img { animation: iconWiggle 0.5s ease; }
.category-nav__row:active { transform: scale(0.98); }

/* --- scroll reveals (only hidden when JS has an observer) --- */
.js-reveal .reveal { opacity: 0; }
.js-reveal .reveal.is-visible {
  opacity: 1;
  animation-duration: 0.65s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  animation-fill-mode: backwards;
  animation-delay: var(--d, 0ms);
}
.js-reveal .reveal--up.is-visible   { animation-name: fadeUp; }
.js-reveal .reveal--pop.is-visible  { animation-name: popIn; animation-duration: 0.75s; }
.js-reveal .reveal--rule.is-visible { animation-name: fadeIn; }
.js-reveal .reveal--rule.is-visible::before,
.js-reveal .reveal--rule.is-visible::after {
  animation: growX 0.7s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  animation-delay: calc(var(--d, 0ms) + 100ms);
}
.menu-category__rule::before { transform-origin: right; }
.menu-category__rule::after  { transform-origin: left; }
.js-reveal .reveal--rule.is-visible img {
  animation: popIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  animation-delay: calc(var(--d, 0ms) + 250ms);
}
.js-reveal .menu-category__header.is-visible img {
  animation: popIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) backwards, iconWiggle 0.6s ease 0.7s;
}

/* --- accordion open --- */
.menu-section.open .menu-section__body { animation: bodyOpen 0.35s ease both; }
.menu-section__toggle { transition: background-color 0.2s ease; }
.menu-section__toggle:active { background-color: rgba(30, 77, 43, 0.08); }

/* --- links / buttons: gentle press feedback on touch --- */
.contact a, .side-nav__list a { transition: color 0.2s ease, transform 0.12s ease; }
.contact a:active { transform: scale(0.96); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
  .js-reveal .reveal, .js-reveal .menu-item.reveal .menu-item__thumb { opacity: 1; }
}

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(22, 16, 8, 0.82);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.lightbox.open { opacity: 1; }
.lightbox[hidden] { display: none; }

.lightbox__close {
  position: absolute;
  top: 14px; right: 18px;
  background: none;
  border: none;
  color: var(--parchment);
  font-size: 2.6rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox__figure {
  margin: 0;
  width: min(92vw, 520px);
  background: var(--paper-card);
  background-image: url("../rigos_web_assets/rigos_tilable_parchment_texture.webp");
  background-size: 420px auto;
  border: 3px solid var(--green);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  padding: 20px 20px 22px;
  text-align: center;
  transform: scale(0.82) translateY(24px);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.lightbox.open .lightbox__figure { transform: none; }

.lightbox__img {
  width: 100%;
  max-height: 58vh;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 14px 18px rgba(44, 36, 24, 0.4));
}
.lightbox__caption { margin-top: 14px; }
.lightbox__name {
  display: block;
  font-family: "Oswald", sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green-dark);
}
.lightbox__price {
  display: inline-block;
  margin-top: 4px;
  font-family: "Oswald", sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--red);
}
.lightbox__desc {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.45;
}
.lightbox__desc:empty { display: none; }

/* ---------- contact ---------- */

.contact {
  max-width: 720px;
  margin: 56px auto 0;
  padding: 30px 20px 46px;
  text-align: center;
}
.contact__flower { width: 44px; height: auto; }
.contact h2 {
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green);
  margin: 10px 0 16px;
}
.contact address {
  font-style: normal;
  font-size: 1.05rem;
  margin-bottom: 6px;
}
.contact p { margin: 6px 0; font-size: 1.05rem; }
.contact a { color: var(--green); font-weight: 700; }

.contact__notes {
  margin-top: 22px;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--ink-soft);
  line-height: 1.5;
}
.contact__notes p { font-size: 0.85rem; margin: 4px 0; }

/* ---------- hidden admin: PIN + editor ---------- */

.hero__logo {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

.pin {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(22, 16, 8, 0.82);
}
.pin[hidden] { display: none; }
.pin__card {
  width: min(92vw, 340px);
  padding: 26px 24px 20px;
  text-align: center;
  background: var(--paper-card);
  background-image: url("../rigos_web_assets/rigos_tilable_parchment_texture.webp");
  background-size: 420px auto;
  border: 3px solid var(--green);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.pin__flower { width: 40px; height: 40px; }
.pin__card h2 {
  margin: 8px 0 14px;
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green);
  font-size: 1.2rem;
}
.pin__input {
  width: 100%;
  padding: 12px;
  font-family: "Oswald", sans-serif;
  font-size: 2rem;
  letter-spacing: 0.6em;
  text-align: center;
  color: var(--ink);
  background: #fff8e8;
  border: 2px solid rgba(30, 77, 43, 0.5);
  border-radius: 8px;
}
.pin__input:focus { outline: none; border-color: var(--red); }
.pin__input.shake { animation: shake 0.35s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}
.pin__error {
  min-height: 1.2em;
  margin: 10px 0 0;
  color: var(--red);
  font-weight: 600;
  font-size: 0.9rem;
}
.pin__cancel {
  margin-top: 8px;
  background: none;
  border: none;
  color: var(--ink-soft);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}

.admin {
  position: fixed;
  inset: 0;
  height: 100dvh;
  z-index: 105;
  display: flex;
  flex-direction: column;
  background: var(--parchment);
  background-image: url("../rigos_web_assets/rigos_tilable_parchment_texture.webp");
  background-size: 420px auto;
  color: var(--ink);
  overscroll-behavior: contain;
}
.admin[hidden] { display: none; }
body.admin-open {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.admin__bar {
  flex: 0 0 auto;
  padding: 12px 16px;
  background: var(--green);
  color: var(--parchment);
  border-bottom: 3px solid var(--red);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}
.admin__bar h2 {
  margin: 0 0 8px;
  font-family: "Oswald", sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.admin__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin__btn {
  padding: 8px 14px;
  font-family: "Oswald", sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--parchment);
  background: rgba(233, 220, 191, 0.12);
  border: 1px solid rgba(233, 220, 191, 0.5);
  border-radius: 6px;
  cursor: pointer;
}
.admin__btn:hover { background: rgba(233, 220, 191, 0.25); }
.admin__btn--primary { background: var(--yellow); color: var(--ink); border-color: var(--yellow); font-weight: 700; }
.admin__btn--primary:hover { background: #ffe94a; }
.admin__btn--danger { border-color: #e88; color: #ffd6d6; }
.admin__btn--danger:hover { background: rgba(192, 57, 43, 0.5); }
.admin__status { margin: 8px 0 0; font-size: 0.9rem; min-height: 1.2em; color: var(--yellow); }

.admin__body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
}

.admin-section {
  margin-bottom: 22px;
  background: var(--paper-card);
  border: 1px solid rgba(110, 85, 45, 0.35);
  border-radius: var(--radius);
  box-shadow: 0 2px 5px rgba(44, 36, 24, 0.16);
  overflow: hidden;
}
.admin-section__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(30, 77, 43, 0.1);
  border-bottom: 1px solid rgba(110, 85, 45, 0.3);
}
.admin-section__head input {
  flex: 1;
  font-family: "Oswald", sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green-dark);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 4px 6px;
}
.admin-section__head input:focus { background: #fff8e8; border-color: var(--green); outline: none; }
.admin-section__count { font-size: 0.8rem; color: var(--ink-soft); white-space: nowrap; }

.admin-table-wrap { overflow-x: auto; }
.admin-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.admin-table th {
  position: sticky;
  top: 0;
  padding: 6px 6px;
  font-family: "Oswald", sans-serif;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: left;
  color: var(--ink-soft);
  background: var(--paper-card);
  border-bottom: 1px solid rgba(110, 85, 45, 0.3);
}
.admin-table td { padding: 3px 4px; border-bottom: 1px dashed rgba(110, 85, 45, 0.25); vertical-align: top; }
.admin-table input, .admin-table select, .admin-table textarea {
  width: 100%;
  padding: 5px 6px;
  font: inherit;
  font-size: 16px; /* >=16px stops iOS from zooming the page on focus */
  color: var(--ink);
  background: #fff8e8;
  border: 1px solid rgba(110, 85, 45, 0.3);
  border-radius: 4px;
}
.admin-table textarea { resize: none; min-height: 34px; overflow: hidden; }
.admin-table textarea[readonly] { cursor: pointer; }
.admin-table textarea[readonly]:hover { border-color: var(--green); background: #fffdf6; }
.admin-table input:focus, .admin-table select:focus, .admin-table textarea:focus { outline: none; border-color: var(--green); }
.admin-table .col-type { width: 96px; }
.admin-table .col-num { width: 56px; }
.admin-table .col-name { width: 190px; }
.admin-table .col-variant { width: 90px; }
.admin-table .col-price { width: 74px; }
.admin-table .col-price input { text-align: right; font-family: "Oswald", sans-serif; }
.admin-table .col-del { width: 36px; text-align: center; }
.admin-row-del {
  background: none;
  border: none;
  color: var(--red);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}
.admin-section__foot { padding: 8px 14px; }
.admin-add-row {
  background: none;
  border: 1px dashed rgba(30, 77, 43, 0.5);
  border-radius: 6px;
  color: var(--green);
  font-family: "Oswald", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 12px;
  cursor: pointer;
}
.admin-add-row:hover { background: rgba(30, 77, 43, 0.08); }

/* large text viewer/editor for long fields */
.textedit {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(22, 16, 8, 0.7);
}
.textedit[hidden] { display: none; }
.textedit__card {
  width: 100%;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper-card);
  background-image: url("../rigos_web_assets/rigos_tilable_parchment_texture.webp");
  background-size: 420px auto;
  border-top: 3px solid var(--green);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.45);
}
.textedit__head { padding: 14px 18px 8px; }
.textedit__head h3 {
  margin: 0;
  font-family: "Oswald", sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--green);
}
.textedit__sub { margin: 2px 0 0; font-size: 0.85rem; color: var(--ink-soft); }
.textedit__area {
  flex: 1 1 auto;
  margin: 0 18px;
  padding: 12px;
  min-height: 160px;
  font: inherit;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: #fff8e8;
  border: 1px solid rgba(110, 85, 45, 0.35);
  border-radius: 8px;
  resize: none;
}
.textedit__area:focus { outline: none; border-color: var(--green); }
.textedit__foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px calc(14px + env(safe-area-inset-bottom));
}
.textedit__foot .admin__btn { color: var(--green-dark); border-color: rgba(30, 77, 43, 0.5); background: transparent; }
.textedit__foot .admin__btn--primary { color: var(--ink); background: var(--yellow); border-color: var(--yellow); }

/* Mobile editor: rows become stacked cards */
@media (max-width: 899px) {
  .admin__bar h2 { font-size: 1rem; margin-bottom: 6px; }
  .admin__btn { padding: 8px 10px; font-size: 0.75rem; }
  .admin__body { padding: 10px; }

  .admin-table { min-width: 0; }
  .admin-table thead { display: none; }
  .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; width: auto; }
  .admin-table tr {
    position: relative;
    padding: 10px 12px 10px;
    border-bottom: 2px solid rgba(110, 85, 45, 0.3);
  }
  .admin-table tr:last-child { border-bottom: none; }
  .admin-table td {
    padding: 4px 0;
    border: none;
  }
  .admin-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font-family: "Oswald", sans-serif;
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-soft);
  }
  .admin-table td.col-del::before { content: none; }
  .admin-table td.col-del {
    position: absolute;
    top: 6px; right: 6px;
    width: auto;
    padding: 0;
  }
  .admin-row-del { font-size: 1.5rem; padding: 4px 8px; }
  /* two-up for the short fields */
  .admin-table td.col-type, .admin-table td.col-num,
  .admin-table td.col-variant, .admin-table td.col-price {
    display: inline-block;
    width: calc(50% - 4px);
    vertical-align: top;
  }
  .admin-table td.col-type, .admin-table td.col-variant { margin-right: 8px; }
  .admin-table td.col-name { padding-right: 40px; }
  .admin-table .col-price input { text-align: left; }
}

@media (min-width: 900px) {
  .textedit { align-items: center; padding: 24px; }
  .textedit__card {
    width: min(92vw, 720px);
    max-height: 80vh;
    border: 3px solid var(--green);
    border-radius: 16px;
  }
  .textedit__area { min-height: 240px; }
}

/* ---------- tablet / desktop ---------- */

@media (min-width: 640px) {
  .menu-items { grid-template-columns: 1fr 1fr; column-gap: 34px; }
}

/* Larger screens: split header — logo on the left, house photo on the
   right, cut with a sharp diagonal edge and a green accent stripe. */
@media (min-width: 900px) {
  .hero {
    display: grid;
    grid-template-columns: minmax(440px, 0.95fr) 1.05fr;
    align-items: center;
    min-height: clamp(460px, 60vh, 620px);
    overflow: hidden;
  }
  .hero__inner {
    padding: 48px clamp(16px, 2vw, 32px) 48px clamp(32px, 5vw, 96px);
    max-width: none;
    text-align: center;
  }
  .hero__logo {
    width: 100%;
    max-width: 680px;
    filter: drop-shadow(0 6px 8px rgba(44, 36, 24, 0.35));
  }
  .hero__est {
    justify-content: center;
    max-width: 440px;
    margin: 22px auto 0;
  }
  .hero__est-text { font-size: 1.4rem; }
  .hero__flower { width: 40px; }

  .hero__art {
    position: relative;
    height: 100%;
    --cut: 22%;
  }
  /* The stripes live in a box extended 20% to the left of the photo column
     so the diagonal accent never gets sliced off at the column edge.
     Coordinates below are the photo-column values remapped into that box:
     x' = (x + 20%) / 120%. */
  .hero__art::before,
  .hero__art::after {
    content: "";
    position: absolute;
    top: 0; bottom: 0;
    left: -20%;
    width: 120%;
    z-index: 0;
  }
  .hero__art::before {
    background: var(--green);
    /* photo col: (cut-2.2%,0) (100%,0) (100%,100%) (-2.2%,100%) */
    clip-path: polygon(33.17% 0, 100% 0, 100% 100%, 14.83% 100%);
  }
  .hero__art::after {
    background: var(--red);
    /* photo col: (cut-3.2%,0) (cut-2.2%,0) (-2.2%,100%) (-3.2%,100%) */
    clip-path: polygon(32.33% 0, 33.17% 0, 14.83% 100%, 14% 100%);
  }
  .hero__art-mobile { display: none; }
  .hero__art-desktop {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    min-height: clamp(460px, 60vh, 620px);
    object-fit: cover;
    object-position: center 60%;
    clip-path: polygon(var(--cut) 0, 100% 0, 100% 100%, 0 100%);
  }

  .hero-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    /* overlap the hero so the diagonal cut runs straight into the bar */
    position: relative;
    z-index: 3;
    margin-top: -2px; /* sits exactly on the hero's bottom edge */
    padding: 16px clamp(24px, 6vw, 120px);
    background: var(--green);
    color: var(--parchment);
    border-top: 3px solid var(--red);
    border-bottom: 3px solid var(--red);
    box-shadow: 0 4px 14px rgba(44, 36, 24, 0.25);
    line-height: 1;
  }
  .hero-divider__line {
    flex: 1;
    max-width: 260px;
    height: 2px;
    background: rgba(233, 220, 191, 0.45);
  }
  .hero-divider__text {
    font-family: "Oswald", sans-serif;
    font-size: 0.95rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    white-space: nowrap;
  }
  .hero-divider__flower {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    object-fit: contain;
    filter: brightness(1.15);
  }

  .menu-landing { padding: 56px 20px 20px; }
  .category-nav { margin-top: 14px; }
  .category-nav__row { gap: 20px; padding: 20px 8px; }
  .category-nav__row img { width: 44px; height: 44px; }

  .menu-category { max-width: 1000px; }
  .menu-item__thumb { width: 96px; height: 96px; }
}

@media (min-width: 960px) {
  .category-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: none;
    gap: 14px;
  }
  .category-nav__row {
    border: 2px solid rgba(44, 36, 24, 0.35);
    border-radius: var(--radius);
    background: var(--paper-card);
    padding: 22px 24px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }
  .category-nav__row:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(44, 36, 24, 0.22);
  }
}
