body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
.wrap { max-width: 860px; margin: 0 auto; padding: 1rem; }
.top { position: sticky; top: 0; z-index: 50; background: var(--primary); color: var(--primary-contrast); }
.top-inner { max-width: 860px; margin: 0 auto; padding: .75rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.brand { color: inherit; text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.top .badge { background: rgba(255,255,255,.2); color: inherit; }

.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 60; display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--surface); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .5rem 0; font-size: .75rem; color: var(--muted); text-decoration: none; position: relative; }
.bottom-nav a span { font-size: 1.25rem; }
.bottom-nav a.active { color: var(--primary); font-weight: 600; }
.count { position: absolute; top: 4px; right: calc(50% - 22px); background: var(--primary); color: var(--primary-contrast); border-radius: 99px; font-size: .7rem; padding: 0 .4rem; }

.cats { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .5rem; margin-bottom: .5rem; scrollbar-width: none; position: sticky; top: 52px; background: var(--bg); z-index: 10; padding-top: .5rem; }
.cats a { white-space: nowrap; padding: .4rem .8rem; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: .9rem; }
.products { display: grid; gap: .75rem; }
@media (min-width: 640px) { .products { grid-template-columns: 1fr 1fr; } }
.product { display: flex; gap: .75rem; padding: .75rem; text-decoration: none; color: inherit; align-items: stretch; }
.product .ph { width: 92px; height: 92px; border-radius: 8px; flex-shrink: 0; object-fit: cover; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 2rem; }
.product .info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.product .desc { color: var(--muted); font-size: .85rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.product .price { margin-top: auto; font-weight: 700; }
.product.off { opacity: .55; }
.old { text-decoration: line-through; color: var(--muted); font-weight: 400; font-size: .85rem; margin-right: .35rem; }

.option { display: flex; align-items: center; gap: .6rem; padding: .55rem 0; border-bottom: 1px solid var(--border); }
.option:last-child { border-bottom: 0; }
.option .name { flex: 1; }
.option.disabled { opacity: .5; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 8px; }
.stepper button { border: 0; min-height: 34px; width: 34px; padding: 0; font-size: 1.1rem; }
.stepper span { min-width: 26px; text-align: center; font-weight: 600; }
.sticky-bar { position: fixed; left: 0; right: 0; bottom: calc(60px + env(safe-area-inset-bottom)); z-index: 55; padding: .6rem 1rem; background: var(--surface); border-top: 1px solid var(--border); }
.sticky-bar .inner { max-width: 860px; margin: 0 auto; display: flex; gap: .75rem; align-items: center; }
.has-sticky { padding-bottom: 80px; }
.hero-photo { width: 100%; max-height: 260px; object-fit: cover; border-radius: var(--radius); }
.gallery { display: flex; gap: .5rem; overflow-x: auto; }
.gallery img { width: 70px; height: 70px; object-fit: cover; border-radius: 6px; cursor: pointer; }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: flex; gap: .75rem; padding: .4rem 0; color: var(--muted); }
.timeline li .dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border); margin-top: 3px; flex-shrink: 0; }
.timeline li.done { color: var(--text); }
.timeline li.done .dot { background: var(--ok); border-color: var(--ok); }
.timeline li.current .dot { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.bignum { font-size: 2.6rem; font-weight: 800; letter-spacing: .02em; }
.qr { width: 220px; height: 220px; margin: .5rem auto; background: #fff; padding: 8px; border-radius: 8px; }
.copy { font-family: ui-monospace, monospace; font-size: .75rem; word-break: break-all; background: var(--surface-2); padding: .5rem; border-radius: 6px; }
.line { display: flex; justify-content: space-between; gap: .5rem; padding: .3rem 0; }
.line.total { font-weight: 700; font-size: 1.1rem; border-top: 1px solid var(--border); margin-top: .3rem; padding-top: .6rem; }
.item-details { font-size: .85rem; color: var(--muted); }
