/* Customer shop (PWA) */
:root { --nav-h: 64px; --tabbar-h: 64px; }
body { background: var(--bg); }
.shop { min-height: 100vh; display: flex; flex-direction: column; }
.shop-head { position: sticky; top: 0; z-index: 40; background: var(--navy); color: #fff; padding-top: env(safe-area-inset-top); }
.shop-head .inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 0 16px; height: var(--nav-h); }
.shop-head .brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none !important; }
.shop-head .logo { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: grid; place-items: center; }
.shop-head .brand > div { min-width: 0; }
.shop-head .name { font-weight: 800; font-size: 15px; letter-spacing: -.01em; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-head .sub { font-size: 11px; color: #94a3b8; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 420px) { .shop-head .sub { display: none; } .shop-head .name { font-size: 14px; } }
.filters .check { white-space: nowrap; }
.shop-head .links { margin-left: auto; display: flex; gap: 4px; }
.shop-head .links a { color: #cbd5e1; padding: 8px 12px; border-radius: 8px; font-weight: 560; font-size: 14px; display: inline-flex; align-items: center; gap: 7px; text-decoration: none !important; position: relative; }
.shop-head .links a:hover { background: rgba(255,255,255,.08); color: #fff; }
.shop-head .links a.on { background: rgba(20,184,166,.18); color: #fff; }
.cart-dot { position: absolute; top: 2px; right: 4px; background: var(--accent); color: #042f2e; font-size: 10.5px; font-weight: 800; min-width: 17px; height: 17px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; padding: 0 4px; }
.shop-main { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 16px 16px calc(var(--tabbar-h) + 24px); display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 860px) { .shop-main { padding-bottom: 40px; } }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(255,255,255,.96); backdrop-filter: blur(12px); border-top: 1px solid var(--border); display: grid; grid-template-columns: repeat(4, 1fr); height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--text-3); font-size: 11px; font-weight: 600; text-decoration: none !important; position: relative; }
.tabbar a.on { color: var(--accent-strong); }
.tabbar a svg { width: 22px; height: 22px; }
.tabbar .cart-dot { top: 8px; right: calc(50% - 22px); }
@media (min-width: 860px) { .tabbar { display: none; } }
@media (max-width: 859px) { .shop-head .links .hide-m { display: none; } }

/* hero / welcome */
.hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-3) 100%); color: #fff; border-radius: 18px; padding: 22px 20px; display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; box-shadow: var(--shadow); }
.hero h1 { font-size: 22px; } .hero p { color: #cbd5e1; font-size: 14px; margin-top: 4px; }
.hero .live { display: inline-flex; align-items: center; gap: 7px; background: rgba(20,184,166,.18); color: #99f6e4; padding: 6px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.hero .live .pulse { width: 8px; height: 8px; border-radius: 50%; background: #2dd4bf; box-shadow: 0 0 0 0 rgba(45,212,191,.6); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(45,212,191,.6); } 70% { box-shadow: 0 0 0 8px rgba(45,212,191,0); } 100% { box-shadow: 0 0 0 0 rgba(45,212,191,0); } }

/* filters */
.filters { position: sticky; top: var(--nav-h); z-index: 30; background: var(--bg); padding: 6px 0 8px; margin: -6px -16px 0; padding-left: 16px; padding-right: 16px; display: flex; flex-direction: column; gap: 10px; }
.cat-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.cat-row::-webkit-scrollbar { display: none; }
.cat { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); font-weight: 600; font-size: 13.5px; color: var(--text-2); white-space: nowrap; }
.cat svg { width: 16px; height: 16px; }
.cat.on { background: var(--navy-2); border-color: var(--navy-2); color: #fff; }
.cat .cnt { font-size: 11px; opacity: .65; font-weight: 600; }
.filters .row2 { display: flex; gap: 8px; align-items: center; }
.filters .select { height: 36px; font-size: 13.5px; width: auto; max-width: 50%; }

/* product list */
.plist { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 700px) { .plist { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .plist { grid-template-columns: repeat(3, 1fr); } }
.group-h { display: flex; align-items: baseline; gap: 10px; margin-top: 10px; }
.group-h h2 { font-size: 17px; font-weight: 750; } .group-h .cnt { color: var(--text-3); font-size: 13px; }
.pcard { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow-sm); transition: box-shadow .15s, transform .15s; position: relative; }
.pcard:hover { box-shadow: var(--shadow); }
.pcard.out { opacity: .72; }
.pcard .top { display: flex; gap: 10px; align-items: flex-start; }
.pcard .brandtag { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-strong); }
.pcard .pname { font-weight: 650; font-size: 14.5px; line-height: 1.3; color: var(--text); cursor: pointer; }
.pcard .pname:hover { text-decoration: underline; }
.pcard .meta { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.pcard .bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: auto; }
.pcard .price { font-weight: 750; font-size: 15px; } .pcard .price small { font-weight: 500; color: var(--text-3); font-size: 12px; }
.pcard .avail { font-size: 12.5px; color: var(--text-2); margin-top: 3px; }
.addbtn { height: 36px; padding: 0 14px; border-radius: 10px; border: 0; background: var(--navy-2); color: #fff; font-weight: 650; display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; }
.addbtn:hover { background: var(--navy-3); } .addbtn:disabled { background: var(--surface-3); color: var(--text-3); }
.incart { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-soft); color: #0f766e; border-radius: 10px; padding: 0 8px 0 10px; height: 36px; font-weight: 700; font-size: 13px; }
.incart button { width: 28px; height: 28px; border-radius: 8px; border: 0; background: #fff; color: #0f766e; display: grid; place-items: center; }

/* steppers & sheet */
.sheet-overlay { position: fixed; inset: 0; background: rgba(10,16,30,.5); z-index: 60; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
@media (min-width: 700px) { .sheet-overlay { align-items: center; padding: 20px; } }
.sheet { background: var(--surface); width: 100%; max-width: 520px; border-radius: 22px 22px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); box-shadow: var(--shadow-lg); animation: up .22s var(--ease); max-height: 92vh; overflow: auto; }
@media (min-width: 700px) { .sheet { border-radius: 20px; } }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.sheet .handle { width: 40px; height: 4px; border-radius: 2px; background: var(--border-strong); margin: 0 auto 14px; }
.stepper { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 6px; }
.stepper button { height: 44px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface); font-size: 20px; font-weight: 600; display: grid; place-items: center; }
.stepper button:active { background: var(--surface-3); }
.stepper input { height: 44px; text-align: center; font-size: 18px; font-weight: 700; border-radius: 12px; }
.qrow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qrow .lbl { font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.qrow .sub { font-size: 12px; color: var(--text-3); margin-top: 5px; }

/* cart */
.cline { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.cline .t { font-weight: 650; } .cline .m { font-size: 12.5px; color: var(--text-3); }
.cline .ctr { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.totals { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.totals .grand { font-size: 18px; font-weight: 800; display: flex; justify-content: space-between; margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--border); }
.cta { position: sticky; bottom: calc(var(--tabbar-h) + 10px); z-index: 20; }
@media (min-width: 860px) { .cta { position: static; } }

/* orders */
.oline { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; display: flex; justify-content: space-between; gap: 10px; align-items: center; cursor: pointer; }
.oline:hover { box-shadow: var(--shadow); }
.timeline { display: flex; gap: 0; align-items: center; margin: 6px 0 2px; }
.timeline .st { flex: 1; text-align: center; font-size: 11.5px; color: var(--text-3); position: relative; padding-top: 18px; }
.timeline .st::before { content: ""; position: absolute; top: 4px; left: 50%; transform: translateX(-50%); width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.timeline .st::after { content: ""; position: absolute; top: 8px; left: calc(50% + 7px); right: calc(-50% + 7px); height: 2px; background: var(--border); }
.timeline .st:last-child::after { display: none; }
.timeline .st.done { color: var(--accent-strong); font-weight: 600; } .timeline .st.done::before { background: var(--accent-strong); } .timeline .st.done::after { background: var(--accent-strong); }

/* auth */
.auth { max-width: 440px; margin: 20px auto; width: 100%; }
.auth .card { padding: 24px; }
.auth h1 { font-size: 22px; margin-bottom: 4px; }
.install { background: linear-gradient(135deg, #ecfeff, #f0fdfa); border: 1px solid #99f6e4; border-radius: 14px; padding: 12px 14px; display: flex; gap: 12px; align-items: center; }
.install .ic { width: 40px; height: 40px; border-radius: 11px; background: var(--navy); color: #fff; display: grid; place-items: center; flex: none; }
.offline { background: var(--amber-soft); color: var(--amber-text); text-align: center; font-size: 13px; padding: 6px; font-weight: 600; }
.skel { height: 92px; border-radius: 14px; }
