/* Stage 8: public customer page. Only layout that is specific to this page lives here.
   Buttons, fields, choices, badges, offer cards, the quantity stepper and the cart panel come from components.css (same look as the staff POS). */
:root{--tbh:64px;--tabh:0px}
body.pub{margin:0;min-height:100vh;display:flex;flex-direction:column}
.pub-head{position:sticky;top:0;z-index:40;background:var(--card);border-bottom:1px solid var(--border)}
.pub-head-in{max-width:1120px;margin-inline:auto;height:var(--tbh);padding:0 16px;display:flex;align-items:center;gap:12px}
.pub-logo{width:40px;height:40px;border-radius:10px;background:var(--primary);color:var(--on-primary);display:grid;place-items:center;font-weight:700;flex:none;overflow:hidden}
.pub-logo img{width:100%;height:100%;object-fit:cover;display:block}
.pub-name{font-weight:700;font-size:1.125rem;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pub-sp{flex:1}
.pub-wrap{width:100%;max-width:1120px;margin-inline:auto;padding:16px;display:flex;flex-direction:column;gap:24px;flex:1}
.pub-hero{display:flex;flex-direction:column;gap:8px}
.pub-info{display:flex;flex-wrap:wrap;gap:8px 16px;color:var(--muted)}
.pub-info span,.pub-info a{display:inline-flex;align-items:center;gap:6px}
.pub-info a{color:var(--link);min-height:44px}
.pub-sec>h2{margin-bottom:12px}
.pub-offers{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,280px),1fr));gap:16px}
.pub-bar{position:sticky;top:var(--tbh);z-index:30;background:var(--bg);padding-block:8px}
.pub-bar .chips{padding-bottom:0}
.pub-cat{font-size:1.125rem;margin:16px 0 8px}
.pub-cat:first-child{margin-top:0}
.pub-menu{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr));gap:8px}
.pub-item{display:grid;grid-template-columns:72px minmax(0,1fr);gap:12px;padding:12px;background:var(--card);border:1px solid var(--border);border-radius:10px}
.pub-item .thumb{width:72px;height:72px}
.pub-item-b{display:flex;flex-direction:column;gap:4px;min-width:0}
.pub-item-b strong{overflow-wrap:anywhere}
.pub-item-d{margin:0;font-size:.875rem;color:var(--muted);overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.pub-item-f{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:auto;padding-top:4px;flex-wrap:wrap}
.pub-item.off{opacity:.65}
.pub-done{max-width:560px;margin-inline:auto;width:100%}
.pub-steps{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;width:100%;text-align:start}
.pub-steps li{display:flex;align-items:center;gap:12px;min-height:44px;color:var(--muted)}
.pub-steps .dot{width:28px;height:28px;border-radius:50%;border:2px solid var(--line);display:grid;place-items:center;flex:none}
.pub-steps .dot .i{width:16px;height:16px}
.pub-steps li.done{color:var(--text)}
.pub-steps li.done .dot{background:var(--primary);border-color:var(--primary);color:var(--on-primary)}
.pub-steps li.now{color:var(--link);font-weight:700}
.pub-steps li.now .dot{border-color:var(--primary)}
.pub-steps li.now .dot::after{content:"";width:12px;height:12px;border-radius:50%;background:var(--primary)}
.pub-sum{width:100%;text-align:start;display:flex;flex-direction:column;gap:4px}
.pub-sum .sum-r span:first-child{overflow-wrap:anywhere}
.pub-foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px 16px;padding:24px 16px;color:var(--muted);font-size:.875rem;border-top:1px solid var(--border)}
.pub-chip{background:var(--warning-bg);color:var(--warning);border-radius:999px;padding:2px 10px;font-size:.875rem;font-weight:600;white-space:nowrap}
.pub-foot a{display:inline-flex;align-items:center;min-height:44px}
.pub-note{display:flex;gap:8px;align-items:flex-start;color:var(--muted);font-size:.9375rem}
.pub-note .i{margin-top:2px}
@media(max-width:639px){
 .pub-wrap{padding-bottom:96px}
 .pub-offers{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;padding-bottom:8px}
 .pub-offers .offer{flex:0 0 min(85%,300px);scroll-snap-align:start}
 .pub-item{grid-template-columns:64px minmax(0,1fr)}.pub-item .thumb{width:64px;height:64px}
}
/* offers on this page are a compact strip so the menu stays near the top */
.pub-offers .offer-img{aspect-ratio:2.6/1}
.pub-offers .offer-img .i{width:32px;height:32px}
.pub-item-b .sub{align-self:flex-start}
.pub-head-in .btn{flex:none}
@media(max-width:639px){.pub-name{white-space:normal;font-size:1rem;line-height:1.25;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}
