/* Panini Land menu: ported from the canvas design (orange gradient, floating ingredients, product tilt). */
:root {
  --bg-center: #FF9A6D;
  --bg-edge: #DB633D;
  --ink: #FFFFFF;
  --ink-dark: #1A0C06;
  --soft-bg: rgba(255, 255, 255, .12);
  --soft-bd: rgba(255, 255, 255, .3);
  --panel: #1C130E;
  --panel-2: #2A1D15;
  --panel-3: #3A2A20;
  --panel-ink: #FFF3E6;
  --panel-muted: #CDB9A6;
  --warn: #FFC23C;
  /* vertical layout (bottom-up): thumbs, name/price bar, product photo */
  --safe-b: env(safe-area-inset-bottom, 0px);
  --thumbs-b: calc(13px + var(--safe-b));
  --cta-b: calc(160px + var(--safe-b));
  --hero-b: calc(264px + var(--safe-b));
  --hero-top: 160px;
  --hero-min: 140px;
  --hero-max: 320px;
}

* { box-sizing: border-box; }
/* the edge colour behind everything, so no white shows around the page or in browser overscroll */
html { height: 100%; background: var(--bg-edge); overscroll-behavior: none; }
body {
  margin: 0;
  height: 100%;
  background: radial-gradient(ellipse at 50% 64%, var(--bg-center) 0%, var(--bg-edge) 78%);
  color: var(--ink);
  font-family: Vazirmatn, Tahoma, sans-serif;
  overflow: hidden;
  overscroll-behavior: none;
}
button, input { font-family: inherit; }
a { color: inherit; }
a:hover { opacity: .8; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 3px; }
.scroll-x { scrollbar-width: none; }
/* centered when it fits, scrollable from the first item when it overflows */
.scroll-x > :first-child { margin-inline-start: auto; }
.scroll-x > :last-child { margin-inline-end: auto; }
.scroll-x::-webkit-scrollbar { display: none; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon-btn { display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; color: inherit; }

/* dvh = the part of the screen actually visible (100vh hides the bottom behind mobile browser bars) */
.app { position: relative; width: 100%; height: 100vh; height: 100dvh; overflow: hidden; background: radial-gradient(ellipse at 50% 64%, var(--bg-center) 0%, var(--bg-edge) 78%); }

/* nav */
.nav { position: absolute; top: 0; left: 0; right: 0; z-index: 35; height: 76px; padding: 0 clamp(16px, 4vw, 48px); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; flex: none; font-size: 22px; font-weight: 900; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.round-btn { position: relative; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--soft-bd); background: var(--soft-bg); }
.badge { position: absolute; top: -4px; left: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #FFFFFF; color: var(--ink-dark); font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.pill-btn { height: 40px; padding: 0 20px; border-radius: 20px; border: 0; background: #FFFFFF; color: var(--ink-dark); font-size: 14px; font-weight: 700; cursor: pointer; max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* categories */
.cats { position: absolute; top: 80px; left: 0; right: 0; z-index: 35; display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px; }
.cat { flex: none; height: 40px; padding: 0 18px; border-radius: 20px; border: 1px solid var(--soft-bd); background: rgba(255, 255, 255, .1); color: #FFFFFF; font-size: 14px; font-weight: 700; cursor: pointer; transition: background .3s, color .3s; }
.cat[aria-pressed="true"] { background: #FFFFFF; color: var(--ink-dark); border-color: #FFFFFF; }

/* floating ingredients */
.bit-wrap { position: absolute; pointer-events: none; transition: transform .35s ease-out; }
.bit-pop, .bit-float, .bit-rot { width: 100%; height: 100%; position: relative; }
.bit-pop { animation: popIn 1.1s cubic-bezier(.22, 1, .36, 1) both; }
.bit-float { animation: bitFloat 8s ease-in-out infinite; }
.leaf-flutter { width: 100%; height: 100%; animation: leafFlutter 4.6s ease-in-out infinite; }
.shape { position: absolute; }
.sh-warm { box-shadow: 0 8px 14px rgba(110, 35, 8, .26); }

/* product */
.hero-prod { position: absolute; left: 50%; bottom: var(--hero-b); width: 400px; height: clamp(var(--hero-min), calc(100vh - var(--hero-b) - var(--hero-top)), var(--hero-max)); height: clamp(var(--hero-min), calc(100dvh - var(--hero-b) - var(--hero-top)), var(--hero-max)); margin-left: -200px; z-index: 5; pointer-events: none; perspective: 900px; transition: transform .3s ease-out; }
.prod-tilt { width: 100%; height: 100%; position: relative; transition: transform .3s ease-out; }
.prod-photo { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; }
.prod-photo img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 14px 18px rgba(110, 35, 8, .3)) drop-shadow(0 3px 5px rgba(110, 35, 8, .18)); }
.fly { animation: flyIn .9s cubic-bezier(.22, 1, .36, 1) both; }

/* name / price / add */
.cta { position: absolute; left: 0; right: 0; bottom: var(--cta-b); z-index: 30; display: flex; justify-content: center; pointer-events: none; }
.cta-box { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 80%; padding: 2px 22px 2px 4px; border-radius: 26px; background: rgba(0, 0, 0, .22); border: 1px solid var(--soft-bd); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.cta-text { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; line-height: 1.3; }
.cta-name { font-size: 16px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cta-price { font-size: 14px; font-weight: 500; opacity: .85; white-space: nowrap; }
.cta-action { pointer-events: auto; flex: none; display: flex; align-items: center; gap: 2px; }
.ghost-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: inherit; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.qty { min-width: 20px; text-align: center; font-size: 16px; font-weight: 800; }
.title-in { animation: titleIn .7s cubic-bezier(.2, .8, .2, 1) both; }

/* bottom cards */
.thumbs-wrap { position: absolute; left: 0; right: 0; bottom: var(--thumbs-b); z-index: 30; }
.thumbs { display: flex; gap: 14px; overflow-x: auto; padding: 22px 16px 6px; }
.thumb { flex: none; width: 96px; height: 108px; border-radius: 20px; border: 2px solid transparent; background: transparent; color: inherit; cursor: pointer; padding: 6px 4px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; transition: transform .35s cubic-bezier(.2, .9, .25, 1.2), box-shadow .35s, background .35s; }
.thumb[aria-pressed="true"] { border-color: #FFFFFF; background: rgba(255, 255, 255, .16); transform: translateY(-16px) scale(1.1); box-shadow: 0 8px 20px rgba(120, 40, 10, .16), inset 0 1px 0 rgba(255, 255, 255, .35); }
.thumb img { width: 80px; height: 66px; object-fit: contain; filter: drop-shadow(0 5px 6px rgba(110, 35, 8, .2)); }
.thumb span { font-size: 11px; font-weight: 700; line-height: 1.3; text-align: center; }

/* toast */
.toast { position: fixed; top: 132px; left: 50%; transform: translateX(-50%); z-index: 90; padding: 12px 18px; border-radius: 999px; background: #FFFFFF; color: var(--ink-dark); font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; box-shadow: 0 14px 30px rgba(0, 0, 0, .35); white-space: nowrap; animation: fade .3s ease-out; }
.toast.error { background: #3A120B; color: #FFE3DA; }

/* panels: drawer + modals */
.scrim { position: fixed; inset: 0; z-index: 60; border: 0; padding: 0; background: rgba(8, 4, 2, .55); cursor: pointer; animation: fade .3s ease-out; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.drawer { position: fixed; top: 0; bottom: 0; left: 0; z-index: 61; width: min(420px, 100%); overflow-y: auto; background: var(--panel); border-right: 1px solid var(--panel-3); padding: 22px; display: flex; flex-direction: column; gap: 14px; color: var(--panel-ink); animation: drawerIn .4s cubic-bezier(.2, .8, .2, 1); }
.modal-wrap { position: fixed; inset: 0; z-index: 71; display: flex; align-items: center; justify-content: center; padding: 16px; pointer-events: none; }
.modal { pointer-events: auto; width: 440px; max-width: 100%; max-height: 100%; overflow-y: auto; background: var(--panel); border: 1px solid var(--panel-3); border-radius: 28px; padding: 24px; display: flex; flex-direction: column; gap: 16px; color: var(--panel-ink); box-shadow: 0 30px 60px rgba(0, 0, 0, .5); animation: modalIn .35s cubic-bezier(.2, .8, .2, 1); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.panel-head h2 { margin: 0; font-size: 22px; font-weight: 900; }
.close-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--panel-3); background: var(--panel-2); color: var(--panel-ink); }
.muted { color: var(--panel-muted); }
.small { font-size: 13px; }
.card { padding: 14px 16px; border-radius: 20px; background: var(--panel-2); border: 1px solid var(--panel-3); }
.primary { height: 54px; border-radius: 27px; border: 0; background: #FFFFFF; color: var(--ink-dark); font-size: 16px; font-weight: 800; cursor: pointer; }
.primary[disabled] { opacity: .55; cursor: progress; }
.link-btn { border: 0; background: none; padding: 6px 0; color: var(--warn); font-size: 13px; font-weight: 700; cursor: pointer; }
.link-btn.muted { color: var(--panel-muted); font-weight: 500; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--panel-muted); }
.field input { height: 48px; border-radius: 14px; border: 1px solid var(--panel-3); background: var(--panel-2); color: var(--panel-ink); font-size: 15px; padding: 0 14px; width: 100%; }
.field input[disabled] { opacity: .7; }
.field input.code { height: 56px; font-size: 24px; font-weight: 800; letter-spacing: 12px; text-align: center; }
.field .err { color: #FF9A85; font-size: 12px; }
.form-error { color: #FF9A85; font-size: 13px; }

/* contact modal */
.contact-row { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.contact-ic { width: 46px; height: 46px; flex: none; border-radius: 50%; background: radial-gradient(ellipse at 50% 64%, var(--bg-center) 0%, var(--bg-edge) 78%); color: #FFFFFF; display: flex; align-items: center; justify-content: center; }
a.contact-row b { font-size: 18px; }

/* cart lines */
.line { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 20px; background: var(--panel-2); border: 1px solid var(--panel-3); }
.line-img { width: 64px; height: 64px; flex: none; border-radius: 16px; background: radial-gradient(ellipse at 50% 64%, var(--bg-center) 0%, var(--bg-edge) 78%); display: flex; align-items: center; justify-content: center; }
.line-img img { width: 56px; height: 56px; object-fit: contain; }
.line-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.line-text b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stepper { display: flex; align-items: center; gap: 2px; background: var(--panel-3); border-radius: 22px; }
.stepper button { color: var(--panel-ink); }

/* addresses */
.addr { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 18px; background: var(--panel-2); border: 2px solid var(--panel-3); cursor: pointer; }
.addr input { margin-top: 4px; accent-color: #FF9A6D; width: 18px; height: 18px; flex: none; }
.addr:has(input:checked) { border-color: #FF9A6D; }
.addr .t { font-weight: 800; font-size: 14px; }
.addr .d { font-size: 13px; color: var(--panel-muted); line-height: 1.8; }
.result-icon { width: 84px; height: 84px; border-radius: 50%; background: #FFFFFF; color: var(--ink-dark); display: flex; align-items: center; justify-content: center; align-self: center; }
.result-icon.bad { background: #3A120B; color: #FF9A85; }

@keyframes bitFloat { 0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); } 25% { transform: translate3d(4px, -8px, 0) rotate(3deg); } 50% { transform: translate3d(-2px, -14px, 0) rotate(-2deg); } 75% { transform: translate3d(-5px, -6px, 0) rotate(2deg); } }
@keyframes bitFloatSm { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes leafFlutter { 0%, 100% { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); } 30% { transform: rotateX(28deg) rotateY(-14deg) rotateZ(5deg); } 60% { transform: rotateX(-10deg) rotateY(18deg) rotateZ(-4deg); } 80% { transform: rotateX(12deg) rotateY(6deg) rotateZ(2deg); } }
@keyframes popIn { from { opacity: 0; transform: translateY(36px) scale(.85) rotate(-10deg); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes flyIn { 0% { opacity: 0; transform: translateY(70px) scale(.9) rotate(-3deg); filter: blur(8px); } 100% { opacity: 1; transform: none; filter: none; } }
@keyframes titleIn { from { opacity: 0; transform: translateY(40px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes drawerIn { from { transform: translateX(-100%); } to { transform: none; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 600px) {
  :root { --cta-b: calc(150px + var(--safe-b)); --hero-b: calc(246px + var(--safe-b)); --hero-top: 150px; --hero-min: 120px; --hero-max: 230px; }
  .hero-prod { width: 250px; margin-left: -125px; }
  .bit-wrap { scale: .5; }
  .bit-2, .bit-3, .bit-6, .bit-7 { display: none; }
  .bit-wrap .bit-float { animation-name: bitFloatSm; }
  .thumb { width: 78px; height: 84px; padding: 4px 3px; }
  .thumb img { width: 62px; height: 48px; }
  .cta-box { width: calc(100% - 32px); }
  .pill-btn { max-width: 110px; padding: 0 14px; }
  .nav-actions { gap: 8px; }
  .round-btn { width: 42px; height: 42px; }
}
@media (max-width: 380px) { .pill-btn { max-width: 84px; } }
/* short screens (landscape phones, small laptop windows): compact header and cards so nothing overlaps */
@media (max-height: 640px) {
  :root { --thumbs-b: calc(4px + var(--safe-b)); --cta-b: calc(104px + var(--safe-b)); --hero-b: calc(162px + var(--safe-b)); --hero-top: 112px; --hero-min: 70px; }
  .nav { height: 58px; }
  .round-btn { width: 40px; height: 40px; }
  .cats { top: 58px; }
  .cat { height: 36px; }
  .thumbs { padding-top: 14px; gap: 10px; }
  .thumb { width: 74px; height: 80px; padding: 4px 3px; }
  .thumb[aria-pressed="true"] { transform: translateY(-8px) scale(1.06); }
  .thumb img { width: 58px; height: 46px; }
  .cta-box { padding-block: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .bit-float, .leaf-flutter, .bit-pop, .fly, .title-in { animation: none; }
}
