*,*::before,*::after{box-sizing:border-box}
:root{--navy:#6b3e12;--gold:#e8b84a;--bg:#fff6e8;--card:#fff;--text:#2a1a0c;--muted:#8a6a45;--line:#ead7b8}
html,body{margin:0;font-family:Cairo,Tahoma,sans-serif;background:var(--bg);color:var(--text);min-height:100dvh}
button,input,textarea{font:inherit}
.hidden{display:none!important}
.top{background:var(--navy);color:#fff;padding:14px 16px;display:flex;justify-content:space-between;align-items:center;gap:10px;position:sticky;top:0;z-index:20}
.brand-row{min-width:0}
.mark{display:block;height:48px;width:48px;object-fit:contain;background:transparent}
.top p{margin:4px 0 0;font-size:.78rem;opacity:.85}
.auth-lead{margin:0 0 12px;color:var(--muted);font-weight:700;text-align:right;padding:0}
.auth-switch{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:12px}
.auth-switch button{border:1px solid var(--line);background:#fff;border-radius:10px;padding:10px;font-weight:800;color:var(--muted)}
.auth-switch button.on{background:var(--navy);color:#fff;border-color:var(--navy)}
.top-actions{display:flex;gap:8px;align-items:center;flex-shrink:0}
.ghost{background:rgba(255,255,255,.14);color:#fff;border:0;border-radius:10px;padding:8px 12px;font-weight:700;text-decoration:none;display:inline-block}
a.ghost.app-dl{background:var(--gold);color:#6b3e12}
.app-banner{display:block;background:#fff7e0;color:#6b3e12;text-align:center;padding:10px 12px;font-weight:800;text-decoration:none;border-bottom:1px solid #f0dfb0}
.ghost.navy{background:var(--navy);color:#fff;width:100%;margin-top:8px}
.loc-box{background:#fff;border-radius:12px;padding:12px;margin:12px 0;border:1px solid var(--line)}
.loc-box.warn{border-color:#dc2626;background:#fff7f7}
.loc-box.ok{border-color:#16a34a;background:#f0fdf4}
.account-box{background:#fff;border-radius:12px;padding:12px;margin:0 0 12px;border:1px solid var(--line)}
.account-box .bal{font-size:1.25rem;font-weight:900;margin:6px 0}
.account-box .debt{color:#b91c1c}
.account-box .clear{color:#15803d}
.st{display:inline-block;border-radius:999px;padding:3px 10px;font-size:.75rem;font-weight:800;margin-top:6px}
.st.wait{background:#fef3c7;color:#92400e}
.st.mid{background:#dbeafe;color:#1e40af}
.st.ok{background:#dcfce7;color:#166534}
.st.no{background:#fee2e2;color:#991b1b}
.legend{font-size:.8rem;color:var(--muted);margin:0 0 10px;line-height:1.6}
.order{flex-wrap:wrap}
.loc-title{font-weight:800;margin-bottom:4px}
.loc-msg{padding:4px 0 8px!important;text-align:right!important}
.loc-map{width:100%;height:180px;border:0;border-radius:10px;margin-top:8px}
.proof-preview{max-width:100%;max-height:180px;border-radius:10px;margin-top:8px;display:block}
.tabs{display:flex;background:#fff;border-bottom:1px solid var(--line);position:sticky;top:64px;z-index:15}
.tab{flex:1;border:0;background:none;padding:12px 8px;font-weight:800;color:var(--muted)}
.tab.on{color:var(--navy);box-shadow:inset 0 -3px 0 var(--gold)}
#badge{background:#dc2626;color:#fff;border-radius:999px;padding:0 6px;font-size:.7rem;margin-inline-start:4px}
.tab-page{display:none;padding:12px 12px 28px}
.tab-page.on{display:block}
#search{width:100%;padding:12px 14px;border:1px solid var(--line);border-radius:12px;margin-bottom:10px}
.fams{display:flex;gap:8px;overflow-x:auto;padding:4px 0 12px;-webkit-overflow-scrolling:touch}
.fam{flex:0 0 auto;border:1px solid var(--line);background:#fff;border-radius:999px;padding:8px 14px;font-weight:800;color:var(--navy)}
.fam.on{background:var(--navy);color:#fff;border-color:var(--navy)}
.grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
#grid[hidden]{display:none!important}
.card{background:#fff;border-radius:14px;overflow:hidden;box-shadow:0 6px 18px rgba(8,49,95,.08);display:flex;flex-direction:column}
.media{height:120px;background:#edf2f7;display:flex;align-items:center;justify-content:center}
.media img{width:100%;height:100%;object-fit:cover}
.ph{font-size:2rem;opacity:.35}
.note{margin-top:4px;color:#9a3412;font-size:.82rem;font-weight:800;line-height:1.35}
.body{padding:10px;display:flex;flex-direction:column;gap:6px;flex:1}
.name{font-weight:800;font-size:.92rem;line-height:1.35;min-height:2.5em}
.prices{display:flex;flex-wrap:wrap;gap:4px}
.pill{background:#f1f5f9;border-radius:8px;padding:3px 7px;font-size:.72rem}
.qty{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.qty label{font-size:.72rem;font-weight:700;color:var(--muted);display:flex;flex-direction:column;gap:4px}
.qty input{width:100%;text-align:center;padding:8px;border:1px solid var(--line);border-radius:8px}
.line-note{font-size:.72rem;font-weight:700;color:var(--muted);display:flex;flex-direction:column;gap:4px}
.line-note input,.cart-item .item-note{width:100%;padding:8px;border:1px solid var(--line);border-radius:8px;font:inherit}
.add{margin-top:auto;background:linear-gradient(135deg,#6b3e12,#8a5520);color:#fff;border:0;border-radius:10px;padding:10px;font-weight:800}
.muted{color:var(--muted);text-align:center;padding:28px 8px}
.cart-item,.order{background:#fff;border-radius:12px;padding:12px;margin-bottom:8px;display:flex;justify-content:space-between;gap:8px;align-items:flex-start}
.cart-item .item-note{margin-top:6px}
.del{background:#fee2e2;color:#991b1b;border:0;border-radius:8px;padding:8px 10px;font-weight:800}
.block{display:block;margin:10px 0;font-weight:700}
.block input,.block textarea{width:100%;margin-top:6px;padding:10px;border:1px solid var(--line);border-radius:10px}
.pay{display:flex;gap:12px;flex-wrap:wrap;margin:10px 0;font-weight:700}
.total{display:flex;justify-content:space-between;font-size:1.1rem;font-weight:800;margin:12px 0}
.primary{width:100%;border:0;background:var(--gold);color:#6b3e12;font-weight:900;padding:14px;border-radius:12px}
.more{display:block;margin:16px auto 8px;border:0;background:#6b3e12;color:#fff;font-weight:800;border-radius:12px;padding:12px 18px;cursor:pointer}
.err{color:#dc2626;font-weight:700;min-height:1.2em}
.sheet{position:fixed;inset:0;background:rgba(8,49,95,.45);z-index:40;display:flex;align-items:flex-end;justify-content:center}
.sheet-card{background:#fff;width:100%;max-width:480px;border-radius:18px 18px 0 0;padding:18px}
.sheet-card h2{margin:0 0 12px}
.sheet-card label{display:block;font-weight:700;margin-bottom:10px}
.sheet-card input{width:100%;margin-top:6px;padding:12px;border:1px solid var(--line);border-radius:10px}
.toast{position:fixed;bottom:18px;left:50%;transform:translateX(-50%) translateY(80px);background:#6b3e12;color:#fff;padding:10px 16px;border-radius:12px;font-weight:700;opacity:0;transition:.25s;z-index:50;max-width:90%}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
@media (min-width:900px){
  .grid{grid-template-columns:repeat(3,1fr)}
  .fams{flex-wrap:wrap;overflow:visible}
}
.stage-wrap{position:relative;height:auto;border-radius:20px;overflow:hidden;background:radial-gradient(circle at 50% 18%,#f3d7a1,#2a1a0c 72%);margin-bottom:12px}
.stage-wrap.flat{background:#fff6e8}
#viewer-mount{height:min(58vh,560px)}
#viewer-mount[hidden]{display:none!important}
.flat-photo{display:block;width:100%;height:min(58vh,560px);object-fit:contain;background:#fff}
.flat-photo[hidden]{display:none!important}
.stage-wrap.flat .stage-hint{display:none}
.stage-arrow{position:absolute;top:28%;z-index:3;width:42px;height:42px;border:0;border-radius:50%;background:rgba(255,248,236,.9);color:#6b3e12;font-size:1.6rem;font-weight:900;cursor:pointer}
.stage-arrow.prev{right:10px}
.stage-arrow.next{left:10px}
.stage-dock{position:relative;z-index:3;background:#fff8ec;color:#2a1a0c;padding:10px 12px 12px}
.stage-dock .name{font-weight:900;font-size:1rem}
.stage-dock .prices{margin:6px 0}
.stage-dock .qty{margin-top:6px}
.stage-dock .add{margin-top:8px}
.stage-hint{position:absolute;top:10px;left:0;right:0;text-align:center;color:#fff8ec;font-size:.78rem;font-weight:800;text-shadow:0 1px 4px rgba(0,0,0,.45);pointer-events:none}
