/* Layout: brand band on top, sticky filter strip, 2-up photo grid on phones, action bar docked at the bottom. */
:root {
  --bg: #f4f5fa;
  --surface: #ffffff;
  --ink: #1c2140;
  --muted: #646a88;
  --line: #e1e3ee;
  --chip: #eaecf5;
  --brand: #262d5c;
  --brand-ink: #ffffff;
  --accent: #ff8a3d;
  --accent-ink: #2a1505;
  --sel: #2563eb;
  --danger: #c62f3a;
  --wa: #1c9d50;
  --wa-ink: #ffffff;
  --shadow: 0 1px 2px rgba(20, 25, 60, .06), 0 6px 18px rgba(20, 25, 60, .07);
  --f-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --f-body: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --r: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1220; --surface: #181c2e; --ink: #eef0fa; --muted: #a0a5c2; --line: #2a2f48;
    --chip: #232843; --brand: #222a58; --accent: #ff9b57; --sel: #5b8cff; --danger: #ff6b74;
    --wa: #22a95a; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 18px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.45 var(--f-body);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
body.noscroll { overflow: hidden; }
body.has-bar main { padding-bottom: 180px; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--sel); outline-offset: 2px; }
a { color: inherit; }

.wrap {
  max-width: 1180px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ---------- Top band ---------- */
.top { background: var(--brand); color: var(--brand-ink); padding-top: env(safe-area-inset-top, 0px); }
.top-in { display: flex; align-items: center; gap: 12px; padding-block: 14px; }
.logo { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; flex: none; background: var(--surface); }
.logo-txt { display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font: 700 22px var(--f-display); }
.brand { min-width: 0; flex: 1; }
.brand h1 { margin: 0; font: 700 clamp(19px, 4.6vw, 26px)/1.1 var(--f-display); letter-spacing: -.01em; text-wrap: balance; }
.brand p { margin: 2px 0 0; opacity: .8; font-size: 13px; }
.top-act { display: flex; gap: 8px; flex: none; }
.tbtn {
  border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.08); color: var(--brand-ink);
  border-radius: 10px; padding: 8px 12px; font-weight: 600; font-size: 14px; min-height: 40px;
}
.tbtn.solid { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
@media (max-width: 420px) {
  .top-in { gap: 10px; }
  .logo { width: 38px; height: 38px; }
  .tbtn { padding: 6px 9px; font-size: 13px; min-height: 36px; }
  .top-act { gap: 6px; }
}
.notice { background: #fff3c4; color: #4a3a00; font-size: 13px; padding-block: 8px; }
.notice button { border: 0; background: none; text-decoration: underline; font-weight: 600; padding: 0 4px; color: inherit; }

/* ---------- Owner bar ---------- */
.ownerbar { padding-top: env(safe-area-inset-top, 0px); }
.ob { background: var(--brand); color: var(--brand-ink); }
.ob-in { display: flex; align-items: center; gap: 8px; padding-block: 8px; }
.ob-tag { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.obtn { border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.08); color: var(--brand-ink); border-radius: 10px; padding: 0 14px; min-height: 38px; font-weight: 600; font-size: 14px; }
.obtn.solid { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
a.obtn { display: inline-flex; align-items: center; text-decoration: none; }
.ob-logo { width: 36px; height: 36px; border-radius: 10px; overflow: hidden; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex: none; font: 800 18px "Archivo", system-ui, sans-serif; }
.ob-logo img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.ob-name { display: grid; line-height: 1.15; min-width: 0; }
.ob-name strong { font: 700 15px var(--f-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ob-name small { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.notice a { color: inherit; font-weight: 600; }
@media (max-width: 520px) { .hide-sm { display: none !important; } .ob-name strong { max-width: 34vw; } }

/* Admin portal */
body.gated #filters, body.gated #grid, body.gated #foot { display: none; }
.gate { max-width: 420px; margin: 8vh auto 40px; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); padding: 26px 22px; display: grid; gap: 14px; }
.gate h1 { margin: 0; font: 800 24px "Archivo", var(--f-display); font-stretch: 112%; text-transform: uppercase; }
.gate p { margin: 0; }
.adm { display: grid; gap: 12px; padding-block: 4px; }
.adm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.adm-stats div { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); padding: 10px 12px; display: grid; }
.adm-stats b { font: 800 22px/1.1 "Archivo", var(--f-display); font-variant-numeric: tabular-nums; }
.adm-stats span { font-size: 12px; color: var(--muted); }
.adm-links { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.menu .menu-a { padding: 14px 6px; border-bottom: 1px solid var(--line); font-weight: 500; font-size: 16px; text-decoration: none; }
.ig-follow { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; }
.ig-follow svg { width: 18px; height: 18px; }

/* ---------- Business profile ---------- */
.profile { padding-top: 14px; }
.pf { background: var(--surface); border-radius: 24px; box-shadow: var(--shadow); overflow: hidden; }
.cover {
  position: relative; height: clamp(250px, 40vw, 440px); overflow: hidden; color: #fff;
  background:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,.13) 1.2px, transparent 0) 0 0 / 18px 18px,
    radial-gradient(120% 90% at 85% 10%, #3b4aa8 0%, transparent 60%),
    linear-gradient(150deg, #2a3272 0%, var(--brand) 55%, #171b40 100%);
}
/* Cover motion: several photos slide by themselves; one photo drifts slowly; no photos = scrolling belt of designs. */
.cv-track { position: absolute; inset: 0; display: flex; transition: transform .9s cubic-bezier(.65,.05,.25,1); }
.cv-slide { flex: 0 0 100%; height: 100%; position: relative; overflow: hidden; }
.cv-slide > img, .cv-slide > video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cv-drift > img { animation: drift 16s ease-in-out infinite alternate; }
.cv-fit { display: grid; place-items: center; padding: 16px 16px 66px; background: radial-gradient(120% 90% at 85% 10%, #3b4aa8 0%, transparent 60%), linear-gradient(150deg, #2a3272 0%, var(--brand) 55%, #171b40 100%); }
.cv-fit > img { width: auto; height: auto; max-width: min(100%, 760px); max-height: 100%; object-fit: contain; border-radius: 14px; box-shadow: 0 18px 40px rgba(0,0,0,.35); }
.cover-txt, .cover-shade { transition: opacity .6s ease; }
.cover.on-fit .cover-txt { opacity: 0; }
.cover.on-fit .cover-shade { opacity: 0; }
@keyframes drift { from { transform: scale(1.02) translateX(1%); } to { transform: scale(1.12) translateX(-2%); } }
.cv-belt-wrap { position: absolute; inset: 0; overflow: hidden; }
.cv-belt { display: flex; height: 100%; width: max-content; animation: belt 80s linear infinite; }
.cv-belt img { height: 100%; width: auto; aspect-ratio: 3 / 4; object-fit: cover; margin-right: 6px; }
@keyframes belt { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .cv-drift > img, .cv-belt { animation: none; } .cv-track { transition: none; } }
.cv-item { display: grid; gap: 4px; flex: none; }
.thumb video { width: 100%; height: 100%; object-fit: cover; }
.thumb .first, .thumb .vbadge { position: absolute; left: 4px; bottom: 4px; background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 700; border-radius: 5px; padding: 1px 5px; }
.thumb .vbadge { left: auto; right: 4px; top: 34px; bottom: auto; background: rgba(0,0,0,.65); color: #fff; }
.fitbox { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.fitbox input { width: 16px; height: 16px; accent-color: var(--brand); }
.cover-shade { position: absolute; inset: 0; background: radial-gradient(70% 55% at 50% 45%, rgba(12,15,38,.45), transparent 75%), linear-gradient(180deg, rgba(12,15,38,.3) 0%, rgba(12,15,38,.35) 40%, rgba(12,15,38,.55) 72%, var(--surface) 100%); }
.cover:not(.has-ph) .cover-shade { background: linear-gradient(180deg, transparent 0%, transparent 72%, var(--surface) 100%); }
.cover-txt {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; gap: 4px;
  padding: 0 max(16px, 5%) 56px;
}
.eyebrow { margin: 0; font: italic 400 clamp(20px, 3.2vw, 34px)/1 "Instrument Serif", Georgia, serif; opacity: .95; text-shadow: 0 1px 12px rgba(0,0,0,.35); }
.mega {
  margin: 0; font-family: "Archivo", "Arial Black", system-ui, sans-serif; font-weight: 800; font-stretch: 125%;
  font-size: clamp(30px, 7.4vw, 92px); line-height: .95; letter-spacing: -.01em; text-transform: uppercase; text-wrap: balance;
  text-shadow: 0 2px 24px rgba(0,0,0,.3); overflow-wrap: anywhere;
}
.cover-tag { margin: 8px 0 0; font-size: clamp(13px, 1.6vw, 16px); opacity: .9; text-shadow: 0 1px 10px rgba(0,0,0,.4); }
.cv-dots { position: absolute; left: 50%; transform: translateX(-50%); bottom: 18%; display: flex; gap: 6px; }
.cv-dots button { width: 8px; height: 8px; padding: 0; border-radius: 99px; border: 0; background: rgba(255,255,255,.5); transition: width .3s; }
.cv-dots button.on { width: 22px; background: #fff; }
.cover-edit {
  position: absolute; top: 12px; right: 12px; border: 0; border-radius: 10px; padding: 8px 12px; font-weight: 600; font-size: 13px;
  background: rgba(255,255,255,.92); color: #1c2140; box-shadow: 0 2px 10px rgba(0,0,0,.2);
}
.pf-body {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 18px 22px; align-items: start;
  padding: 0 clamp(16px, 3vw, 36px) 20px;
}
.pf-logo {
  width: clamp(96px, 11vw, 132px); aspect-ratio: 1; margin-top: calc(clamp(96px, 11vw, 132px) * -0.55); border-radius: 24px;
  background: color-mix(in srgb, var(--accent) 16%, var(--surface)); border: 4px solid var(--surface);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent), 0 10px 28px rgba(20,25,60,.18);
  display: grid; place-items: center; overflow: hidden; position: relative; z-index: 2;
}
.pf-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.pf-logo span { font: 800 clamp(40px, 5vw, 58px)/1 "Archivo", system-ui, sans-serif; font-stretch: 125%; color: var(--brand); }
.pf-main { min-width: 0; display: grid; gap: 8px; padding-top: 4px; }
.pf-name { font: 800 clamp(22px, 2.6vw, 32px)/1.1 "Archivo", var(--f-display); font-stretch: 112%; text-transform: uppercase; letter-spacing: -.005em; text-wrap: balance; }
.pf-loc { margin: 0; display: flex; gap: 6px; align-items: flex-start; color: var(--muted); }
.pf-loc svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--accent); }
.pf-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums;
  background: color-mix(in srgb, var(--accent) 13%, var(--surface)); color: color-mix(in srgb, var(--accent) 55%, var(--ink)); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.pill.alt { background: color-mix(in srgb, var(--sel) 10%, var(--surface)); color: color-mix(in srgb, var(--sel) 70%, var(--ink)); border-color: color-mix(in srgb, var(--sel) 30%, transparent); }
.pill.plain { background: var(--chip); color: var(--muted); border-color: var(--line); }
.pf-cta { display: grid; gap: 10px; min-width: 230px; padding-top: 4px; }
.btn-soft { background: color-mix(in srgb, var(--brand) 8%, var(--surface)); color: var(--brand); border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent); }
.pf-about { border-top: 1px solid var(--line); padding: 16px clamp(16px, 3vw, 36px) 20px; display: grid; gap: 12px; }
.pf-about p { margin: 0; color: var(--muted); max-width: 75ch; }
@media (prefers-color-scheme: dark) { .btn-soft { color: var(--ink); } .pf-logo span { color: var(--accent); } }
@media (max-width: 760px) {
  .profile { padding-top: 10px; }
  .pf { border-radius: 20px; }
  .pf-body { grid-template-columns: 1fr; gap: 12px; }
  .pf-logo { justify-self: start; }
  .pf-main { padding-top: 0; }
  .pf-cta { min-width: 0; grid-template-columns: 1fr 1fr; }
  .pf-cta .btn { padding: 0 10px; font-size: 14px; }
  .pf-cta .btn:only-child { grid-column: 1 / -1; }
}

/* ---------- Reels slider ---------- */
.reels { padding-top: 18px; }
.reels-in { display: grid; gap: 12px; }
.sec-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.sec-h h2 { margin: 0; font: 800 clamp(20px, 2.4vw, 26px)/1.1 "Archivo", var(--f-display); font-stretch: 112%; text-transform: uppercase; }
.eyebrow-sm { margin: 0 0 2px; font: italic 400 17px/1.1 "Instrument Serif", Georgia, serif; color: var(--muted); }
.sec-act { display: flex; gap: 6px; align-items: center; }
.arrow { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 22px; line-height: 1; }
.reel-track { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin; }
.reel { flex: 0 0 min(240px, 64vw); margin: 0; scroll-snap-align: start; }
.reel-frame { position: relative; display: block; aspect-ratio: 9 / 16; border-radius: 18px; overflow: hidden; background: #0d0f1e; box-shadow: var(--shadow); }
.reel iframe { display: block; width: 100%; height: 100%; border: 0; }
/* Instagram embed: 54px header + 4:5 picture + footer. Show only the picture, scaled to fill the 9:16 card. */
.reel-ig .reel-frame iframe {
  position: absolute; left: 50%; top: 0; border: 0; pointer-events: none;
  width: calc(100% * 1.42); height: calc(100% + 54px + 260px);
  transform: translate(-50%, -54px);
}
.reel-video video { width: 100%; height: 100%; object-fit: cover; display: block; }
.reel-sound {
  position: absolute; right: 10px; bottom: 10px; width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: rgba(0,0,0,.45); color: #fff; display: grid; place-items: center; backdrop-filter: blur(4px);
}
.reel-sound svg { width: 20px; height: 20px; }
.rl-thumb { width: 36px; height: 64px; object-fit: cover; border-radius: 6px; background: #000; flex: none; }
.reel-link { font-size: 13px; color: var(--muted); text-decoration: none; padding-left: 4px; }
.reel-empty { border: 2px dashed var(--line); border-radius: 18px; padding: 22px; display: grid; gap: 12px; justify-items: start; color: var(--muted); }
.reel-empty p { margin: 0; max-width: 60ch; }
.rl-list { display: grid; gap: 6px; }
.rl-row { display: flex; align-items: center; gap: 10px; background: var(--bg); border-radius: 12px; padding: 6px 6px 6px 12px; }
.rl-kind { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); flex: none; }
.rl-url { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.thumb.wide, .addph.wide { flex-basis: 160px; height: 100px; }

/* ---------- Store: filter tab + category rows ---------- */
.fbar { display: flex; align-items: center; gap: 8px; min-width: 0; }
.fbar .chips { flex: 1; min-width: 0; }
.fbtn {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14px;
}
.fbtn svg { width: 18px; height: 18px; }
.fbtn.on { border-color: var(--brand); color: var(--brand); }
.fcount { background: var(--brand); color: var(--brand-ink); border-radius: 999px; font-size: 12px; min-width: 20px; height: 20px; display: inline-grid; place-items: center; padding: 0 6px; }
.fwrap { display: flex; flex-wrap: wrap; gap: 6px; }
.lnk.back { padding-left: 0; }
#grid.grouped { display: block; }
.grp { margin-bottom: 26px; }
.grp-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.grp-h h3 { margin: 0; font: 800 clamp(16px, 2vw, 20px)/1.15 "Archivo", var(--f-display); font-stretch: 110%; text-transform: uppercase; }
.grp-h span { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.grp-h .lnk { margin-left: auto; white-space: nowrap; }
.grp-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(140px, 42%); gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: none;
}
.grp-row::-webkit-scrollbar { display: none; }
.grp-row > * { scroll-snap-align: start; }
.grp-more {
  border: 2px dashed color-mix(in srgb, var(--brand) 35%, var(--line)); border-radius: var(--r); background: var(--surface);
  display: grid; place-content: center; justify-items: center; gap: 4px; color: var(--brand); text-align: center; padding: 10px; font-size: 13px; font-weight: 600;
}
.grp-more b { font: 800 26px "Archivo", var(--f-display); }
@media (min-width: 700px) { .grp-row { grid-auto-columns: 200px; } }
@media (prefers-color-scheme: dark) { .grp-more, .fbtn.on { color: var(--ink); } }

/* ---------- Compact filter bar, floating Filter button, 2-up phone grid ---------- */
.row1 .fbtn { min-height: 38px; border-radius: 10px; padding: 0 12px; }
.row2 .meta { margin-left: auto; }
.pf-cta .btn-soft svg { width: 18px; height: 18px; }
.fbtn span:not(.fcount) { line-height: 1; }
.tagrows .chips { padding-bottom: 0; }
.tagrows .chip { min-height: 30px; padding: 4px 10px; font-size: 12px; }
.fab {
  position: fixed; z-index: 25; left: 50%; transform: translateX(-50%);
  bottom: calc(16px + var(--barh, 0px) + env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; padding: 0 18px; min-height: 44px;
  background: var(--brand); color: var(--brand-ink); font-weight: 600; font-size: 14px; box-shadow: 0 8px 24px rgba(20,25,60,.28);
}
.fab svg { width: 18px; height: 18px; }
body.has-bar .fab { bottom: calc(12px + var(--barh, 0px)); }
@media (max-width: 400px) {
  .seg button small { display: none; }
  .pf-cta .btn { font-size: 13.5px; padding: 0 6px; gap: 5px; }
  .pf-cta .btn svg { width: 17px; height: 17px; }
}
@media (max-width: 699px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .info { padding: 7px 8px 9px; }
  .code { font-size: 14px; }
  .name { font-size: 12px; }
  .pick { width: 30px; height: 30px; top: 6px; right: 6px; font-size: 15px; }
}

/* ---------- Contact dropdown ---------- */
.contact-dd { border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.contact-dd summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 12px 14px; min-height: 48px;
}
.contact-dd summary::-webkit-details-marker { display: none; }
.contact-dd summary span { font-weight: 700; }
.contact-dd summary small { color: var(--muted); font-size: 12px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-dd summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin: -4px 4px 0 0; transition: transform .2s; flex: none; }
.contact-dd[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.contact-dd .contacts { padding: 0 12px 12px; }

/* ---------- Install app banner ---------- */
.install { background: var(--surface); border-bottom: 1px solid var(--line); }
.install-in { display: flex; align-items: center; gap: 10px; padding-block: 8px; }
.install-in img { border-radius: 9px; flex: none; }
.install-txt { display: grid; min-width: 0; flex: 1; line-height: 1.25; }
.install-txt b { font-size: 14px; }
.install-txt span { font-size: 12px; color: var(--muted); }
.install-go { min-height: 38px; padding: 0 16px; font-size: 14px; }
.install-x { border: 0; background: none; color: var(--muted); font-size: 15px; padding: 6px; }
.ios-steps { display: grid; gap: 12px; padding-left: 20px; margin: 0 0 12px; font-size: 15px; }
.ios-ic { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--chip); }

/* ---------- Customer order form ---------- */
.of-rows { display: grid; gap: 10px; }
.of-row { display: grid; grid-template-columns: 86px 1fr; gap: 12px; background: var(--bg); border-radius: 14px; padding: 10px; }
.of-ph { width: 86px; aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; background: var(--chip); }
.of-ph img { width: 100%; height: 100%; object-fit: cover; }
.of-main { min-width: 0; display: grid; gap: 6px; align-content: start; }
.of-title { display: flex; align-items: baseline; gap: 6px; }
.of-title b { font: 700 16px var(--f-display); }
.of-title span { color: var(--muted); font-size: 14px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.of-rm { margin-left: auto; border: 0; background: none; color: var(--muted); font-size: 14px; padding: 2px 4px; }
.of-size { width: 100%; min-height: 38px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 0 8px; font-size: 14px; }
.of-size1 { font-size: 14px; color: var(--muted); }
.of-qty { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; }
.stepper button { border: 0; background: none; width: 38px; height: 38px; font-size: 20px; font-weight: 600; color: var(--brand); }
.stepper input { width: 44px; height: 38px; border: 0; text-align: center; background: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.of-unit { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.of-price { font-size: 14px; font-variant-numeric: tabular-nums; }
.of-price b { color: color-mix(in srgb, var(--accent) 70%, var(--ink)); }
.of-total { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--brand); color: var(--brand-ink); border-radius: 14px; padding: 12px 14px; font-size: 14px; font-variant-numeric: tabular-nums; }
.of-total b { font: 800 20px "Archivo", var(--f-display); color: var(--accent); }

/* ---------- Business card (legacy contact chips) ---------- */
.biz { padding-block: 14px 4px; }
.biz-in { display: grid; gap: 10px; }
.biz-about { margin: 0; color: var(--muted); max-width: 70ch; }
.contacts { display: flex; flex-wrap: wrap; gap: 8px; }
.contact {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 12px; font-size: 13px; min-height: 34px; max-width: 100%;
}
.contact b { font-weight: 600; color: var(--muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.contact span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact.wa { background: var(--wa); color: var(--wa-ink); border-color: var(--wa); }
.contact.wa b { color: inherit; opacity: .85; }

/* ---------- Filters ---------- */
.filters { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.filters-in { display: grid; gap: 7px; padding-block: 8px; }
.row1 { display: flex; gap: 8px; align-items: center; }
.row2 { display: flex; gap: 8px; align-items: center; justify-content: space-between; min-width: 0; }
#q {
  flex: 1 1 auto; min-width: 0; height: 38px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); padding: 0 14px;
}
.seg { display: flex; background: var(--chip); border-radius: 10px; padding: 2px; flex: none; }
.seg button {
  border: 0; background: none; border-radius: 8px; padding: 0 11px; height: 30px; font-weight: 600; font-size: 13px; color: var(--muted);
}
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg button small { font-weight: 500; opacity: .7; margin-left: 4px; font-variant-numeric: tabular-nums; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin: 0 -2px; }
.chips::-webkit-scrollbar { display: none; }
.tagrows { display: grid; gap: 6px; }
.chiprow { display: flex; align-items: center; gap: 8px; min-width: 0; }
.chiplbl { flex: none; width: 38px; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.chiprow .chips { flex: 1; min-width: 0; }
.chip {
  flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 6px 12px; font-size: 13px; font-weight: 500; white-space: nowrap; min-height: 34px;
}
.chip small { color: var(--muted); margin-left: 3px; font-variant-numeric: tabular-nums; }
.chip.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.chip.on small { color: inherit; opacity: .75; }
.chip.ghost { background: none; border-style: dashed; color: var(--muted); }
.meta { display: flex; align-items: center; justify-content: flex-end; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; min-width: 0; font-variant-numeric: tabular-nums; }
.meta .lnk { padding: 4px 2px; font-size: 13px; }
.lnk { border: 0; background: none; color: var(--sel); font-weight: 600; padding: 6px 4px; font-size: 14px; }
.lnk.danger { color: var(--danger); }

/* ---------- Grid ---------- */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 12px;
  padding-block: 14px 40px;
}
.card {
  background: var(--surface); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow);
  position: relative; cursor: pointer; outline: 3px solid transparent; outline-offset: -3px;
  transition: outline-color .12s, transform .12s;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.card:active { transform: scale(.985); }
.card.is-sel { outline-color: var(--sel); }
.ph { position: relative; aspect-ratio: 3 / 4; background: #fff; }
.ph img { width: 100%; height: 100%; object-fit: contain; } /* whole photo, never cropped */
.pick {
  position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid #fff; background: rgba(15, 18, 40, .32); color: transparent;
  display: grid; place-items: center; font-size: 17px; font-weight: 700; backdrop-filter: blur(2px);
}
.is-sel .pick { background: var(--sel); color: #fff; }
.badge, .cnt {
  position: absolute; left: 8px; font-size: 11px; font-weight: 600; border-radius: 6px; padding: 2px 7px;
  background: rgba(15, 18, 40, .7); color: #fff;
}
.badge { top: 8px; background: var(--danger); }
.cnt { bottom: 8px; }
.info { padding: 8px 10px 10px; display: grid; gap: 1px; }
.code { font: 600 15px/1.25 var(--f-display); }
.name { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.price { font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 2px; }
.price s { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 4px; }
.empty { grid-column: 1 / -1; text-align: center; padding: 48px 12px; color: var(--muted); }
.empty h2 { color: var(--ink); font: 600 20px var(--f-display); margin: 0 0 6px; }
.empty .btn { margin-top: 14px; }

.foot { padding-block: 10px 30px; color: var(--muted); font-size: 12px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.foot button { border: 0; background: none; color: var(--muted); text-decoration: underline; font-size: 12px; padding: 4px 0; }
body.has-bar .foot { display: none; }

/* ---------- Buttons ---------- */
.btn {
  border: 0; border-radius: 12px; min-height: 48px; padding: 0 18px; font-weight: 600; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
}
.btn-wa { background: var(--wa); color: var(--wa-ink); }
.btn-pri { background: var(--brand); color: var(--brand-ink); }
.btn-sec { background: var(--chip); color: var(--ink); }
.btn-ghost { background: none; border: 1px solid var(--line); color: var(--ink); }
.btn-danger { background: none; border: 1px solid var(--danger); color: var(--danger); }
.btn-danger.armed { background: var(--danger); color: #fff; }
.btn:disabled { opacity: .5; }
.btn svg { width: 20px; height: 20px; flex: none; }

/* ---------- Bottom selection bar ---------- */
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface);
  border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(20,25,60,.12);
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
}
.bar-in { display: grid; gap: 8px; padding-top: 10px; }
.bar-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bar-top strong { font: 600 16px var(--f-display); margin-right: 4px; }
.sp { flex: 1; }
.toggles { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.tog {
  flex: none; border: 1px solid var(--line); background: none; border-radius: 999px; padding: 5px 11px; font-size: 13px; color: var(--muted); min-height: 32px;
}
.tog.on { border-color: var(--sel); color: var(--sel); background: color-mix(in srgb, var(--sel) 10%, transparent); font-weight: 600; }
.tog.on::before { content: "✓ "; }
.capbox { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink); padding: 0 8px 0 2px; min-height: 32px; cursor: pointer; }
.capbox input { width: 18px; height: 18px; margin: 0; accent-color: var(--wa); }
.bar-main { display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px; }
.bar-main.one { grid-template-columns: 1fr; }

/* ---------- Sheets ---------- */
.modal {
  position: fixed; inset: 0; z-index: 50; background: rgba(10, 12, 28, .55);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  background: var(--surface); width: 100%; max-width: 620px; max-height: 92vh; max-height: 92dvh; overflow: auto;
  border-radius: 20px 20px 0 0; padding: 0 max(16px, env(safe-area-inset-left, 0px)) calc(16px + env(safe-area-inset-bottom, 0px));
  overscroll-behavior: contain; animation: up .18s ease-out;
}
@media (min-width: 700px) {
  .modal { align-items: center; padding: 24px; }
  .sheet { border-radius: 20px; padding-inline: 22px; }
}
@keyframes up { from { transform: translateY(24px); opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } .card { transition: none; } }
.sheet-h {
  position: sticky; top: 0; background: var(--surface); z-index: 2; display: flex; align-items: flex-start;
  justify-content: space-between; gap: 12px; padding-block: 16px 10px;
}
.sheet-h h2 { margin: 0; font: 700 20px/1.2 var(--f-display); }
.x { border: 0; background: var(--chip); width: 38px; height: 38px; border-radius: 50%; font-size: 16px; flex: none; }
.code-lg { font: 700 22px/1.15 var(--f-display); }
.muted { color: var(--muted); }
.car { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 14px; scrollbar-width: none; }
.car img { flex: 0 0 100%; width: 100%; max-height: 62vh; object-fit: contain; background: var(--chip); scroll-snap-align: center; border-radius: 14px; }
.car-hint { font-size: 12px; color: var(--muted); margin-top: 6px; text-align: center; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 14px 0; }
.facts div { background: var(--bg); border-radius: 12px; padding: 10px 12px; }
.facts dt { font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.facts dd { margin: 2px 0 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.notes { margin: 0 0 12px; color: var(--muted); white-space: pre-wrap; }
.tagrow { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tagrow span { background: var(--chip); border-radius: 999px; padding: 3px 10px; font-size: 13px; }
.sheet-actions { display: flex; gap: 8px; flex-wrap: wrap; position: sticky; bottom: 0; background: var(--surface); padding-top: 10px; }
.sheet-actions .btn { flex: 1 1 auto; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 14px; padding-bottom: 6px; }
.f { display: grid; gap: 5px; min-width: 0; }
.f > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.f input:not([type=checkbox]), .f select, .f textarea {
  width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); padding: 10px 12px;
}
.f textarea { min-height: 76px; resize: vertical; }
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; min-height: 40px; }
.check input { width: 22px; height: 22px; accent-color: var(--brand); }
.hint { font-size: 12px; color: var(--muted); margin: 0; }
.photos { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.thumb { position: relative; flex: 0 0 92px; height: 115px; border-radius: 12px; overflow: hidden; background: var(--chip); border: 2px solid transparent; padding: 0; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.cover { border-color: var(--accent); }
.thumb .cv { position: absolute; left: 4px; bottom: 4px; background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 700; border-radius: 5px; padding: 1px 5px; }
.thumb .rm { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 13px; }
.addph {
  flex: 0 0 92px; height: 115px; border-radius: 12px; border: 2px dashed var(--line); display: grid; place-items: center;
  color: var(--muted); font-weight: 600; font-size: 13px; text-align: center; cursor: pointer;
}
.addph input, .drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop {
  position: relative; display: grid; place-items: center; text-align: center; gap: 4px; padding: 26px 12px; border-radius: 14px;
  border: 2px dashed var(--line); color: var(--muted); cursor: pointer; font-weight: 600;
}
.drop strong { color: var(--ink); font: 600 17px var(--f-display); }
.tagbox { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); padding: 6px; }
.tagbox input { flex: 1 1 120px; border: 0 !important; background: none !important; min-height: 34px !important; padding: 0 6px !important; outline: none; }
.tg { display: inline-flex; align-items: center; gap: 4px; background: var(--brand); color: var(--brand-ink); border-radius: 999px; padding: 4px 6px 4px 11px; font-size: 13px; }
.tg button { border: 0; background: rgba(255,255,255,.2); color: inherit; width: 20px; height: 20px; border-radius: 50%; font-size: 11px; padding: 0; }
.sugg { display: flex; flex-wrap: wrap; gap: 6px; }
.sugg button { border: 1px dashed var(--line); background: none; border-radius: 999px; padding: 4px 10px; font-size: 13px; color: var(--muted); }
.menu { display: grid; gap: 4px; padding-bottom: 8px; }
.menu button {
  text-align: left; border: 0; background: none; padding: 14px 6px; border-bottom: 1px solid var(--line); font-weight: 500; font-size: 16px;
  display: flex; justify-content: space-between; gap: 10px;
}
.menu button small { color: var(--muted); font-weight: 400; font-size: 13px; }
.linkbox { display: flex; gap: 8px; }
.linkbox input { flex: 1; min-width: 0; }
.err { color: var(--danger); font-size: 14px; margin: 0; }

/* ---------- Busy + toast ---------- */
.busy { position: fixed; inset: 0; z-index: 80; background: rgba(10,12,28,.45); display: grid; place-items: center; padding: 16px; }
.busy-box { background: var(--surface); border-radius: 16px; padding: 22px 26px; display: grid; justify-items: center; gap: 12px; min-width: 220px; text-align: center; font-weight: 500; }
.spin { width: 34px; height: 34px; border-radius: 50%; border: 4px solid var(--chip); border-top-color: var(--accent); animation: sp 0.8s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 90;
  background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 12px; font-weight: 500; font-size: 14px;
  max-width: calc(100% - 32px); box-shadow: var(--shadow);
}
body.has-bar .toast { bottom: calc(170px + env(safe-area-inset-bottom, 0px)); }

@media (min-width: 700px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
  .bar-in { grid-template-columns: 1fr auto; align-items: center; }
  .bar-main { grid-template-columns: auto auto; }
  .bar-main .btn { min-width: 150px; }
  .bar-top { grid-column: 1 / -1; }
}
