/* Kai's Atelier – header (☰ menu on phones, centred name) and the box (cart). 22 Nov 2026, branch warm-redesign. */

/* ---------- header ---------- */
.header-inner { gap: 16px; }
.main-nav { margin-left: auto; }
.menu-toggle { display: none; }

/* box button: orange pill like the other action buttons, with a count */
.box-btn {
  display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0;
  padding: .55rem 1.05rem; border-radius: 999px; text-decoration: none;
  background: var(--cta, #FF9500); color: var(--cta-ink, #2B1E18); border: 1.5px solid #D97E00;
  font: 700 .72rem var(--font-body); letter-spacing: .16em; text-transform: uppercase;
  box-shadow: 0 8px 18px -10px var(--cta-glow, rgba(214, 120, 0, .55));
}
.box-btn:hover { background: var(--cta-hover, #EB8700); }
.box-count {
  min-width: 1.45rem; height: 1.45rem; padding: 0 .35rem; border-radius: 999px; display: inline-grid; place-items: center;
  background: var(--crimson); color: #FFFDF9; font-size: .74rem; letter-spacing: 0;
}
.box-count[hidden] { display: none; }
.box-btn.bump { animation: boxBump .45s ease; }
@keyframes boxBump { 0% { transform: scale(1); } 35% { transform: scale(1.14); } 100% { transform: scale(1); } }

/* phones: ☰ left · name centred · box right */
@media (max-width: 760px) {
  .header-inner { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 8px; height: 64px; }
  .main-nav { display: none !important; }
  .menu-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; padding: 0 10px; border: 0; background: transparent; cursor: pointer;
  }
  .menu-toggle span { display: block; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .2s, opacity .2s; }
  .menu-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
  .menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .site-header .brand { justify-self: center; font-size: 1.7rem; }
  .box-btn { padding: .5rem .85rem; }
}
@media (min-width: 761px) { .mobile-menu { display: none !important; } }

/* phone dropdown */
.mobile-menu {
  display: grid; border-top: 1px solid var(--line); background: var(--cream, #F6F1E8);
  box-shadow: 0 18px 30px -20px rgba(43, 30, 24, .45);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a { display: block !important;
  padding: 16px 24px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none;
  font-family: var(--font-head); font-size: 1.6rem; text-transform: none; letter-spacing: 0; font-weight: 400;
}
.mobile-menu a:last-child { border-bottom: 0; }
.mobile-menu a[aria-current="page"] { color: var(--crimson); }

/* ---------- "Add to box" on menu cards ---------- */
.add-row { display: flex; align-items: center; gap: 12px; margin-top: 1rem; flex-wrap: wrap; }
.add-row .btn { padding: .9rem 1.6rem; }
.in-box { font-size: .85rem; color: var(--muted); }
.band-red .in-box { color: var(--wine-muted, #E6CFC4); }

/* ---------- box panel ---------- */
.box-drawer { position: fixed; inset: 0; z-index: 120; }
.box-drawer[hidden] { display: none; }
.box-backdrop { position: absolute; inset: 0; background: rgba(43, 30, 24, .45); }
.box-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(400px, 92vw);
  display: flex; flex-direction: column; background: var(--cream, #F6F1E8);
  box-shadow: -20px 0 40px -24px rgba(43, 30, 24, .6); padding: 20px 22px calc(20px + env(safe-area-inset-bottom));
  animation: boxIn .25s ease;
}
@keyframes boxIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.box-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.box-head h2 { margin: 0; font-size: 2rem; }
.box-close { width: 40px; height: 40px; border: 0; background: transparent; font-size: 1.8rem; line-height: 1; color: var(--ink); cursor: pointer; }
.box-lines { flex: 1; overflow-y: auto; }
.box-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.box-line .name { font-family: var(--font-head); font-size: 1.3rem; }
.box-line .price { color: var(--muted); font-size: .82rem; }
.box-empty { color: var(--muted); margin: 1.5rem 0; }
.box-empty[hidden], .box-foot[hidden] { display: none; }
.box-total { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0; }
.box-total span:first-child { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.box-total .pay-amount { font-family: var(--font-head); font-size: 1.9rem; }
.box-open { overflow: hidden; }

/* ---------- "Added ✓" message ---------- */
.toast {
  position: fixed; left: 50%; top: 78px; z-index: 130; transform: translateX(-50%); white-space: nowrap;
  background: var(--ink); color: #FFFDF9; padding: .7rem 1.2rem; border-radius: 999px; font-size: .9rem; font-weight: 500;
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .6); animation: toastIn .2s ease;
}
.toast[hidden] { display: none; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* =====================================================================
   v2 (22 Nov): white header · cart icon · menu slides over the page like the cart
   ===================================================================== */
.site-header { background: #FFFFFF; border-bottom-color: var(--line); }
.cart-icon { display: block; flex-shrink: 0; }
.box-btn { gap: 6px; }
@media (max-width: 760px) {
  .box-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } /* icon + count on phones */
  .box-btn { padding: .5rem .75rem; }
}

/* phone menu: panel from the left, over the page, with a dim backdrop (mirrors the cart) */
.menu-backdrop { position: fixed; inset: 0; z-index: 110; background: rgba(43, 30, 24, .45); }
.menu-backdrop[hidden] { display: none; }
.mobile-menu {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 111; width: min(320px, 84vw);
  display: flex; flex-direction: column; align-content: start; overflow-y: auto;
  background: #FFFFFF; border-top: 0; box-shadow: 20px 0 40px -24px rgba(43, 30, 24, .6);
  padding-bottom: env(safe-area-inset-bottom); animation: menuIn .25s ease;
}
@keyframes menuIn { from { transform: translateX(-30px); opacity: 0; } to { transform: none; opacity: 1; } }
.mobile-menu[hidden] { display: none; }
.mobile-menu-head { display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0 12px 0 24px; border-bottom: 1px solid var(--line); }
.mobile-menu-brand { font-family: "Cedarville Cursive", cursive; color: var(--crimson); font-size: 1.6rem; -webkit-text-stroke: .45px currentColor; }
.menu-close { width: 44px; height: 44px; border: 0; background: transparent; font-size: 1.9rem; line-height: 1; color: var(--ink); cursor: pointer; }
.menu-open { overflow: hidden; }
.menu-open .menu-toggle span { transform: none !important; opacity: 1 !important; } /* the panel has its own × */
.mobile-menu { align-items: stretch; gap: 0; }
.mobile-menu a { text-align: left; }
