/* Public menu layout (adapted from the RIONEXT menu template). */
.app { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--bg); padding-bottom: 120px; position: relative; }
@media (min-width: 520px) { body { background: #050505; } .app { box-shadow: 0 0 60px rgba(0,0,0,.6); } }

.hero { position: relative; height: 300px; overflow: hidden; }
.hero img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,11,12,0) 30%, rgba(11,11,12,.85) 100%); }

.logo-card { position: relative; margin: -70px 16px 0; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 18px 18px 16px; z-index: 2; text-align: center; box-shadow: 0 16px 40px rgba(0,0,0,.45); }
.logo { display: inline-block; width: 132px; height: 132px; border-radius: 22px; margin-top: -64px; border: 4px solid var(--surface); background: #000; overflow: hidden; vertical-align: top; }
.logo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tagline { font-family: var(--display); font-size: 21px; letter-spacing: .06em; color: var(--yellow); margin-top: 6px; }
.status { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding: 7px 14px; border-radius: 99px; font-size: 13.5px; font-weight: 800; background: var(--ok-bg); color: var(--green); }
.status i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(79,195,60,.18); }
.status.closed { background: var(--danger-bg); color: #ff8a9b; }
.status.closed i { box-shadow: 0 0 0 4px rgba(255,52,81,.18); }
.info { font-size: 13.5px; color: var(--muted); margin-top: 10px; line-height: 1.5; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.actions a { display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; font-size: 13.5px; font-weight: 800; padding: 11px 6px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.actions svg { width: 18px; height: 18px; stroke: var(--yellow); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.closed { margin: 16px 16px 0; background: var(--danger-bg); border: 1px solid #5c1d28; color: #ffd3da; border-radius: 16px; padding: 13px 15px; font-size: 14px; font-weight: 700; line-height: 1.45; }
/* Order-in-progress banner (inside the sticky nav). */
.lastorder { display: flex; align-items: center; gap: 10px; margin: 10px 16px 0; text-align: left; background: var(--surface); border: 1.5px solid var(--yellow); border-radius: 16px; padding: 10px 12px 10px 14px; font-size: 14px; line-height: 1.35; cursor: pointer; transition: background .4s, border-color .4s; }
.lastorder .lo-txt { flex: 1; min-width: 0; }
.lastorder b { color: var(--yellow); display: block; }
.lastorder small { color: var(--muted); font-size: 12.5px; }
.lastorder .lo-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--yellow); flex: none; animation: lo-pulse 1.6s infinite; }
.lastorder .lo-x { width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); font-size: 18px; line-height: 28px; flex: none; }
.lastorder.st-ok { border-color: var(--green); background: var(--ok-bg); }
.lastorder.st-ok b { color: var(--green); }
.lastorder.st-ok .lo-dot { background: var(--green); animation: none; }
.lastorder.st-done { border-color: var(--line); }
.lastorder.st-done b { color: var(--ink); }
.lastorder.st-done .lo-dot { background: var(--green); animation: none; }
.lastorder.st-bad { border-color: #5c1d28; background: var(--danger-bg); }
.lastorder.st-bad b { color: #ff8a9b; }
.lastorder.st-bad .lo-dot { background: var(--red); animation: none; }
@keyframes lo-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(252,202,65,.5); } 50% { box-shadow: 0 0 0 6px rgba(252,202,65,0); } }

/* Status box at the top of the confirmation sheet. */
.ostatus { margin: 12px 20px 0; border-radius: 16px; padding: 13px 15px; font-size: 14.5px; line-height: 1.45; background: #3a2a0b; color: #ffe2a3; border: 1.5px solid #5a4210; transition: background .4s, color .4s, border-color .4s; }
.ostatus b { display: block; font-size: 16px; margin-bottom: 2px; }
.ostatus .upd { display: block; margin-top: 6px; font-size: 12px; opacity: .75; }
.ostatus.st-ok { background: var(--ok-bg); color: #bff2b3; border-color: #2b6b38; }
.ostatus.st-done { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
.ostatus.st-bad { background: var(--danger-bg); color: #ffd3da; border-color: #5c1d28; }
/* Stage line inside the status box. */
.stages { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 2px 0 12px; counter-reset: st; }
.stages li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 11.5px; font-weight: 800; line-height: 1.2; color: var(--muted); }
.stages li::before { content: ""; position: absolute; top: 9px; right: 50%; width: 100%; height: 3px; background: var(--line); z-index: 0; }
.stages li:first-child::before { display: none; }
.stages li i { position: relative; z-index: 1; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-2); border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 11px; color: #0b0b0c; }
.stages li.done { color: var(--ink); }
.stages li.done::before, .stages li.cur::before { background: var(--green); }
.stages li.done i { background: var(--green); border-color: var(--green); }
.stages li.done i::after { content: "✓"; font-weight: 900; }
.stages li.cur { color: var(--ink); }
.stages li.cur i { background: var(--yellow); border-color: var(--yellow); animation: lo-pulse 1.6s infinite; }
.ostatus.st-ok .stages li.cur i { background: var(--green); border-color: var(--green); }
.stage-txt b { display: block; font-size: 16px; margin-bottom: 2px; }
.flash { animation: flash 1.2s ease-out 2; }
@keyframes flash { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(79,195,60,.7); } 40% { transform: scale(1.02); box-shadow: 0 0 0 10px rgba(79,195,60,0); } 100% { transform: scale(1); } }

.nav { position: sticky; top: 0; z-index: 30; background: rgba(11,11,12,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); margin-top: 18px; padding-top: env(safe-area-inset-top); }
.search { padding: 12px 16px; }
.search input { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 11px 14px 11px 38px; font-size: 16px; outline: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a7a198' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 13px center; }
.search input:focus { border-color: var(--yellow); }

section.sec { padding: 14px 16px 4px; }
/* Opening a section slides it in from the right; going back slides the cards in from the left.
   Only transform + opacity (cheap on simple phones). clip = no sideways scroll while it moves. */
#cats, #menu { overflow-x: clip; }
@keyframes sk-in-right { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes sk-in-left { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
.slide-in-right { animation: sk-in-right .22s cubic-bezier(.2,.8,.2,1); }
.slide-in-left { animation: sk-in-left .22s cubic-bezier(.2,.8,.2,1); }
@media (prefers-reduced-motion: reduce) { .slide-in-right, .slide-in-left { animation: none; } }
/* Section cards (under the search bar): photo on a brand tint, name and price range. */
.cats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 18px 16px 6px; }
.cats[hidden] { display: none; }
.cats > .empty { grid-column: 1 / -1; }
.cat { display: flex; flex-direction: column; text-align: left; border-radius: 22px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 10px 26px rgba(0,0,0,.35); transition: transform .15s; }
.cat:active { transform: scale(.97); }
.cat .cimg { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / .78; overflow: hidden; background: var(--tint); }
.cat .cimg img { width: 100%; height: 100%; object-fit: cover; }
.cat .cimg img.cmark { width: 46%; height: auto; aspect-ratio: 1; object-fit: contain; border-radius: 16px; opacity: .9; }
.cat .cbody { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; flex: 1; padding: 12px 14px 14px; }
.cat .cbody b { font-family: var(--display); font-weight: 400; font-size: 25px; letter-spacing: .04em; line-height: 1; }
.cat .crange { font-weight: 900; font-size: 14px; color: var(--accent); }
.cat.t-red { --accent: var(--red); --tint: rgba(255,52,81,.2); }
.cat.t-yellow { --accent: var(--yellow); --tint: rgba(252,202,65,.2); }
.cat.t-green { --accent: var(--green); --tint: rgba(79,195,60,.2); }
.cat.t-orange { --accent: var(--orange); --tint: rgba(255,133,0,.2); }
.cat.t-blue { --accent: var(--blue); --tint: rgba(1,154,247,.2); }
/* "Volver al menú" at the top of an open section. */
.sec .back { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 12px; padding: 8px 14px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-weight: 800; font-size: 14px; }
.sec .back[hidden] { display: none; }
.sh h2 { font-family: var(--display); font-weight: 400; font-size: 36px; letter-spacing: .03em; line-height: 1; }
section.sec:nth-of-type(5n+1) .sh h2 { color: var(--red); }
section.sec:nth-of-type(5n+2) .sh h2 { color: var(--yellow); }
section.sec:nth-of-type(5n+3) .sh h2 { color: var(--green); }
section.sec:nth-of-type(5n+4) .sh h2 { color: var(--orange); }
section.sec:nth-of-type(5n+5) .sh h2 { color: var(--blue); }
.note { font-size: 13.5px; color: var(--muted); margin-top: 6px; line-height: 1.4; }

.item { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px dashed var(--line); width: 100%; text-align: left; }
.items .item:last-child { border-bottom: 0; }
.item .txt { flex: 1; min-width: 0; }
.item .nm { font-weight: 900; font-size: 16px; line-height: 1.25; }
.item .nm small { font-weight: 700; color: var(--muted); font-size: 13px; }
.item .ds { font-size: 13.5px; color: var(--muted); margin-top: 3px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item .pr { font-weight: 900; font-size: 16px; white-space: nowrap; align-self: flex-start; color: var(--yellow); }
.item .th { display: block; width: 76px; height: 76px; border-radius: 14px; overflow: hidden; flex: none; background: var(--surface-2); }
.item .th img { display: block; width: 100%; height: 100%; object-fit: cover; }
.item.off .nm, .item.off .pr, .item.off .th { opacity: .5; }
.badge { display: inline-block; font-size: 10.5px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; background: var(--red); color: #fff; margin-bottom: 5px; }
.badge.gold { background: var(--yellow); color: #111; }
.badge.grey { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }

.sides { margin: 22px 16px 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; font-size: 14px; color: var(--muted); line-height: 1.45; }
.sides b { color: var(--green); display: block; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 4px; }

.install { margin: 26px 16px 0; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 16px; display: flex; gap: 14px; align-items: center; }
.install img { width: 56px; height: 56px; border-radius: 14px; flex: none; }
.install b { font-family: var(--display); font-weight: 400; font-size: 22px; letter-spacing: .03em; display: block; color: var(--yellow); }
.install p { font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.install strong { color: var(--ink); }
footer { text-align: center; padding: 26px 22px 10px; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
footer .h { font-family: var(--display); font-size: 28px; letter-spacing: .03em; color: var(--ink); margin-bottom: 4px; }
footer .by { margin-top: 14px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; opacity: .7; }

.cartbar { position: fixed; left: 50%; transform: translate(-50%, 160%); bottom: calc(16px + env(safe-area-inset-bottom)); width: calc(100% - 32px); max-width: 448px; z-index: 40; background: var(--yellow); color: #111; border-radius: 99px; padding: 13px 18px 13px 13px; display: flex; align-items: center; gap: 12px; box-shadow: 0 14px 34px rgba(0,0,0,.5); transition: transform .3s cubic-bezier(.2,.8,.2,1); font-weight: 900; }
.cartbar.on { transform: translate(-50%, 0); }
.cartbar .n { width: 32px; height: 32px; border-radius: 50%; background: #111; color: var(--yellow); display: flex; align-items: center; justify-content: center; font-size: 14px; }
.cartbar b { flex: 1; text-align: left; font-size: 15.5px; }

.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.6); opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 50; }
.scrim.on { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; left: 50%; bottom: 0; transform: translate(-50%, 105%); width: 100%; max-width: 480px; max-height: 92vh; max-height: 92dvh; overflow: auto; background: var(--surface); border-radius: 24px 24px 0 0; z-index: 60; transition: transform .32s cubic-bezier(.2,.8,.2,1); overscroll-behavior: contain; border-top: 1px solid var(--line); }
.sheet.on { transform: translate(-50%, 0); }
.sheet .x { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; background: rgba(22,22,24,.9); border: 1px solid var(--line); font-size: 22px; line-height: 38px; z-index: 3; }
.sheet .ph { height: 230px; background: var(--surface-2); overflow: hidden; border-radius: 24px 24px 0 0; }
.sheet .ph img { width: 100%; height: 100%; object-fit: cover; }
.sheet .ph.none { height: 58px; background: transparent; }
.sheet .bd { padding: 16px 20px 24px; }
.sheet .secn { font-family: var(--display); font-size: 19px; letter-spacing: .05em; color: var(--muted); }
.sheet h3 { font-family: var(--display); font-weight: 400; font-size: 34px; letter-spacing: .02em; line-height: 1.05; }
.sheet .desc { color: var(--muted); font-size: 15px; line-height: 1.5; margin-top: 6px; }
.sheet .bigp { font-size: 22px; font-weight: 900; margin-top: 8px; color: var(--yellow); }
.item .pr small, .sheet .bigp small { font-size: .62em; font-weight: 700; color: var(--muted); }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { background: var(--surface-2); border: 1.5px solid var(--line); border-radius: 99px; padding: 10px 15px; font-size: 14.5px; font-weight: 800; }
.opt small { font-weight: 700; color: var(--muted); margin-left: 4px; }
.opt.on { background: var(--yellow); border-color: var(--yellow); color: #111; }
.opt.on small { color: #4d3e10; }
.opt:disabled { opacity: .4; text-decoration: line-through; }
.addbar { position: sticky; bottom: 0; padding: 12px 20px calc(16px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(22,22,24,0), var(--surface) 30%); display: flex; gap: 10px; align-items: center; }
.qty { display: flex; align-items: center; background: var(--surface-2); border-radius: 99px; border: 1.5px solid var(--line); height: 52px; }
.qty button { width: 44px; height: 50px; font-size: 22px; font-weight: 800; }
.qty span { min-width: 24px; text-align: center; font-weight: 900; }
.addbar .btn { flex: 1; }
.only-local { margin-top: 16px; background: var(--surface-2); border-radius: 14px; padding: 12px 14px; font-weight: 800; color: var(--muted); }

/* Cart / checkout */
.oh { padding: 22px 20px 0; }
.oh h3 { font-family: var(--display); font-size: 38px; font-weight: 400; letter-spacing: .02em; }
.ol { padding: 4px 20px 0; }
.line { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px dashed var(--line); }
.line .tx { flex: 1; min-width: 0; }
.line b { font-weight: 900; font-size: 15px; }
.line small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; line-height: 1.35; }
.line .pr { font-weight: 900; white-space: nowrap; }
.line .q { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.line .q button { width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); border: 1.5px solid var(--line); font-weight: 900; line-height: 1; }
.line .q span { font-weight: 900; min-width: 16px; text-align: center; }
.line .q button.rm { width: auto; height: 30px; margin-left: 6px; padding: 0 12px; border-radius: 99px; font-size: 13px; font-weight: 800; color: #ff8a9b; border-color: #5c1d28; background: var(--danger-bg); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seg button { padding: 11px 6px; border-radius: 14px; background: var(--surface-2); border: 1.5px solid var(--line); font-weight: 900; font-size: 14px; line-height: 1.2; }
.seg button.on { background: var(--yellow); border-color: var(--yellow); color: #111; }
.fields { display: grid; gap: 10px; }
.sum { margin-top: 18px; background: var(--surface-2); border-radius: 16px; padding: 14px 15px; display: grid; gap: 9px; }
.sum .row { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.sum .row b { white-space: nowrap; font-size: 16px; }
.sum .row span small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.warn { background: #3a2a0b; color: #ffe2a3; border-radius: 12px; padding: 10px 12px; font-size: 13.5px; font-weight: 700; line-height: 1.4; }
.steps { margin-top: 16px; display: grid; gap: 10px; counter-reset: s; }
.steps div { display: flex; gap: 11px; font-size: 14px; line-height: 1.4; }
.steps div::before { counter-increment: s; content: counter(s); flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--yellow); color: #111; font-weight: 900; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.steps .done::before { content: "✓"; background: var(--green); }
.hint { font-size: 13px; color: var(--muted); text-align: center; padding: 0 20px 8px; }
.bank { margin-top: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; padding: 13px 15px; display: grid; gap: 7px; }
.bank div { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.bank span { color: var(--muted); }
.bank b { text-align: right; }
.bank .card { font-size: 18px; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.folio { font-family: var(--display); font-size: 26px; letter-spacing: .05em; color: var(--yellow); }
.shake { animation: shk .5s; }
@keyframes shk { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* Branch selector (only when the business has more than one branch). */
.branch-box { margin: 14px 16px 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px; font-size: 14px; }
.branch-box button { font-weight: 800; color: var(--yellow); }
.branch-pick h3 { margin-top: 8px; }
.branch-opt { display: block; width: 100%; text-align: left; margin-top: 10px; padding: 14px 16px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); }
.branch-opt b { display: block; font-size: 17px; }
.branch-opt span { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.branch-opt.on { border-color: var(--yellow); }
