:root {
  --bg: #fffaf8;
  --surface: #ffffff;
  --surface-2: #fff2ef;
  --ink: #2d1c1a;
  --muted: #735e5a;
  --brand: #8b3d49;
  --brand-strong: #6e2634;
  --accent: #d8a268;
  --line: #eadbd6;
  --success: #2f6d53;
  --danger: #9a3445;
  --shadow: 0 18px 44px rgba(72, 38, 32, .10);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --max: 1180px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.container { width: min(calc(100% - 32px), var(--max)); margin: 0 auto; }
.header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid rgba(234,219,214,.8); background: rgba(255,250,248,.9); backdrop-filter: blur(18px); }
.nav { min-height: 72px; display:flex; align-items:center; justify-content:space-between; gap:16px; }
.brand { display:flex; align-items:center; gap:10px; font-weight:900; letter-spacing:-.03em; }
.brand-mark { width:42px; height:42px; display:grid; place-items:center; border-radius:50%; background:var(--brand); color:white; box-shadow:var(--shadow); }
.nav-actions { display:flex; align-items:center; gap:8px; }
.btn { border:0; border-radius:999px; padding:12px 18px; font-weight:800; transition:.2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background:var(--brand); color:white; }
.btn-primary:hover { background:var(--brand-strong); }
.btn-secondary { background:var(--surface-2); color:var(--brand-strong); }
.btn-ghost { background:transparent; color:var(--ink); }
.hero { padding:48px 0 26px; }
.hero-grid { display:grid; grid-template-columns:1.1fr .9fr; gap:28px; align-items:stretch; }
.hero-copy { padding:46px; border-radius:var(--radius-xl); background:linear-gradient(135deg,#fff 0%,#fff1ed 100%); border:1px solid var(--line); box-shadow:var(--shadow); }
.kicker { color:var(--brand); font-weight:900; text-transform:uppercase; letter-spacing:.12em; font-size:.78rem; }
h1 { font-size:clamp(2.5rem,6vw,5.4rem); line-height:.93; letter-spacing:-.065em; margin:16px 0 20px; }
.hero-copy p { color:var(--muted); font-size:1.08rem; line-height:1.7; max-width:58ch; }
.hero-actions { display:flex; gap:10px; flex-wrap:wrap; margin-top:28px; }
.hero-card { min-height:420px; border-radius:var(--radius-xl); padding:30px; background:radial-gradient(circle at 70% 20%,#ffd4d4 0 18%,transparent 19%), linear-gradient(145deg,#8b3d49,#51242d); color:white; display:flex; flex-direction:column; justify-content:space-between; box-shadow:var(--shadow); overflow:hidden; }
.hero-emoji { font-size:8rem; align-self:center; filter:drop-shadow(0 16px 24px rgba(0,0,0,.18)); }
.hero-card small { opacity:.8; }
.hero-card strong { font-size:1.6rem; }
.metrics { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-top:24px; }
.metric { background:rgba(255,255,255,.08); padding:14px; border-radius:16px; }
.metric b { display:block; font-size:1.2rem; }
.section { padding:46px 0; }
.section-head { display:flex; justify-content:space-between; align-items:end; gap:16px; margin-bottom:22px; }
.section h2 { margin:0; font-size:clamp(1.8rem,4vw,3rem); letter-spacing:-.04em; }
.section p.lead { color:var(--muted); margin:8px 0 0; }
.chips { display:flex; gap:8px; overflow:auto; padding-bottom:4px; }
.chip { white-space:nowrap; border:1px solid var(--line); background:white; color:var(--muted); padding:9px 14px; border-radius:999px; font-weight:800; }
.chip.active { background:var(--ink); color:white; border-color:var(--ink); }
.products { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.product { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-lg); overflow:hidden; display:flex; flex-direction:column; box-shadow:0 8px 30px rgba(72,38,32,.05); }
.product-visual { aspect-ratio:4/3; height:auto; min-height:185px; position:relative; overflow:hidden; display:grid; place-items:center; font-size:5.4rem; background:linear-gradient(145deg,#fff5f1,#f7ddd5); }
.product-body { padding:18px; display:flex; flex-direction:column; gap:10px; flex:1; background:var(--surface); border-top:1px solid var(--line); position:relative; z-index:1; }
.badge { width:max-content; background:#f7e9d8; color:#7b4d22; padding:6px 9px; border-radius:999px; font-size:.72rem; font-weight:900; text-transform:uppercase; letter-spacing:.05em; }
.product h3 { margin:0; font-size:1.18rem; color:var(--ink); line-height:1.25; }
.product p { margin:0; color:var(--muted); line-height:1.5; }
.product-footer { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:auto; padding-top:6px; }
.price { font-weight:950; font-size:1.18rem; }
.story { display:grid; grid-template-columns:.9fr 1.1fr; gap:18px; }
.story-card { border-radius:var(--radius-xl); padding:34px; border:1px solid var(--line); background:white; }
.story-card.dark { background:var(--ink); color:white; border-color:var(--ink); }
.story-card p { color:var(--muted); line-height:1.75; }
.story-card.dark p { color:#dccfcb; }
.track-box { display:grid; grid-template-columns:1fr auto; gap:10px; max-width:680px; margin-top:22px; }
.input { width:100%; border:1px solid var(--line); background:white; border-radius:14px; padding:13px 14px; outline:none; }
.input:focus { border-color:var(--brand); box-shadow:0 0 0 3px rgba(139,61,73,.08); }
.footer { border-top:1px solid var(--line); margin-top:40px; padding:34px 0 50px; color:var(--muted); }
.footer-grid { display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.drawer { position:fixed; inset:0; z-index:40; pointer-events:none; overflow:hidden; }
.drawer.open { pointer-events:auto; }
.drawer-backdrop { position:absolute; inset:0; background:rgba(45,28,26,.42); opacity:0; transition:.2s; }
.drawer.open .drawer-backdrop { opacity:1; }
.drawer-panel { position:absolute; right:0; top:0; height:100%; width:min(92vw,440px); background:white; transform:none; opacity:0; visibility:hidden; transition:opacity .2s ease, visibility 0s linear .2s; padding:24px; overflow:auto; box-shadow:-18px 0 50px rgba(0,0,0,.14); }
.drawer.open .drawer-panel { transform:none; opacity:1; visibility:visible; transition:opacity .2s ease; }
.drawer-head { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.icon-btn { width:42px; height:42px; border-radius:50%; border:1px solid var(--line); background:white; font-weight:900; }
.cart-item { display:grid; grid-template-columns:1fr auto; gap:8px; padding:15px 0; border-bottom:1px solid var(--line); }
.cart-item p { margin:4px 0 0; color:var(--muted); }
.qty { display:flex; gap:6px; align-items:center; }
.qty button { width:30px; height:30px; border:0; border-radius:50%; background:var(--surface-2); }
.total { display:flex; justify-content:space-between; gap:12px; font-size:1.2rem; font-weight:950; margin:18px 0; }
.form-grid { display:grid; gap:12px; }
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.notice { padding:13px 14px; border-radius:14px; background:#f8eee8; color:#67453e; font-size:.92rem; line-height:1.45; }
.toast { position:fixed; left:12px; right:12px; bottom:20px; transform:translateY(24px); opacity:0; z-index:70; width:max-content; max-width:calc(100vw - 24px); margin-inline:auto; background:var(--ink); color:white; padding:12px 18px; border-radius:999px; transition:.25s; font-weight:800; text-align:center; overflow-wrap:anywhere; box-shadow:var(--shadow); }
.toast.show { opacity:1; transform:translateY(0); }
.tracking { margin-top:20px; display:grid; gap:10px; }
.track-step { display:grid; grid-template-columns:18px 1fr; gap:12px; align-items:start; }
.track-dot { width:12px; height:12px; margin-top:5px; border-radius:50%; background:var(--line); }
.track-step.done .track-dot { background:var(--success); }
.track-step b { display:block; }
.track-step span { color:var(--muted); font-size:.9rem; }
.admin-shell { min-height:100vh; display:grid; grid-template-columns:250px 1fr; }
.sidebar { background:var(--ink); color:white; padding:26px 20px; }
.sidebar .brand { margin-bottom:32px; }
.side-link { display:block; padding:12px 14px; border-radius:12px; margin:5px 0; color:#e7dcd8; }
.side-link.active { background:rgba(255,255,255,.1); color:white; }
.admin-main { padding:30px; min-width:0; }
.admin-top { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:24px; }
.admin-top h1 { font-size:2.4rem; margin:0; letter-spacing:-.05em; }
.kpi-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; }
.kpi { background:white; border:1px solid var(--line); border-radius:18px; padding:18px; }
.kpi span { color:var(--muted); font-size:.9rem; }
.kpi strong { display:block; font-size:1.7rem; margin-top:5px; }
.table-card { background:white; border:1px solid var(--line); border-radius:20px; overflow:hidden; margin-top:18px; }
table { width:100%; border-collapse:collapse; }
th,td { text-align:left; padding:14px; border-bottom:1px solid var(--line); vertical-align:top; }
th { color:var(--muted); font-size:.8rem; text-transform:uppercase; letter-spacing:.06em; }
.status { display:inline-flex; padding:6px 9px; border-radius:999px; background:var(--surface-2); font-size:.78rem; font-weight:900; }
.empty { padding:34px; text-align:center; color:var(--muted); }
@media (max-width: 900px) {
  .hero-grid,.story { grid-template-columns:1fr; }
  .products { grid-template-columns:repeat(2,1fr); }
  .kpi-grid { grid-template-columns:repeat(2,1fr); }
  .admin-shell { grid-template-columns:1fr; }
  .sidebar {
    display:flex;
    align-items:center;
    gap:6px;
    overflow-x:auto;
    padding:10px 12px;
    position:sticky;
    top:0;
    z-index:30;
    white-space:nowrap;
    scrollbar-width:thin;
  }
  .sidebar .brand { flex:0 0 auto; margin:0 8px 0 0; }
  .side-link { flex:0 0 auto; margin:0; padding:10px 12px; }
  .admin-env-note { display:none; }
}
@media (max-width: 620px) {
  .container { width:min(calc(100% - 22px), var(--max)); }
  .nav { min-height:64px; }
  .nav .btn-ghost { display:none; }
  .hero { padding-top:22px; }
  .hero-copy { padding:28px 22px; }
  .hero-card { min-height:340px; padding:24px; }
  .hero-emoji { font-size:6rem; }
  .metrics { grid-template-columns:1fr; }
  .products { grid-template-columns:1fr; }
  .section { padding:34px 0; }
  .section-head { align-items:stretch; flex-direction:column; }
  .chips { width:100%; max-width:100%; min-width:0; }
  .track-box,.form-row { grid-template-columns:1fr; }
  .admin-main { padding:18px 12px; }
  .admin-top { align-items:start; flex-direction:column; }
  .kpi-grid { grid-template-columns:1fr 1fr; }
  .table-card { overflow:auto; }
  table { min-width:760px; }
}

/* v0.2.0 — Catalog Administration */
.btn:disabled { cursor:not-allowed; opacity:.55; transform:none; }
.full { width:100%; }
.product-meta-row { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.availability-badge { color:var(--danger); background:#f8e4e7; padding:6px 9px; border-radius:999px; font-size:.72rem; font-weight:900; text-transform:uppercase; }
.product-unavailable { opacity:.72; }
.price { display:grid; gap:2px; }
.price small { color:var(--muted); font-size:.7rem; font-weight:700; }
.catalog-empty { grid-column:1/-1; background:white; border:1px solid var(--line); border-radius:var(--radius-lg); }
.cart-options { display:block; color:var(--muted); margin-top:4px; line-height:1.35; }
.order-created,.tracking-card { padding:20px; margin-top:14px; }
.tracking-card { margin-top:18px; }
.modal-dialog { width:min(92vw,680px); max-height:90vh; padding:0; border:0; border-radius:24px; box-shadow:0 28px 80px rgba(45,28,26,.28); overflow:hidden; color:var(--ink); }
.modal-dialog::backdrop { background:rgba(45,28,26,.52); backdrop-filter:blur(5px); }
.product-dialog > div,.admin-dialog > div { padding:24px; }
.admin-dialog > div { max-height:90vh; overflow:hidden; }
.editor-form-shell { display:flex; flex-direction:column; max-height:calc(90vh - 48px); gap:0; }
.editor-scroll-body { overflow-y:auto; min-height:0; display:grid; gap:16px; padding:2px 4px 18px 0; }
.editor-dialog-head { flex:0 0 auto; margin-bottom:14px; }
.editor-sticky-footer { position:sticky; bottom:0; z-index:3; flex:0 0 auto; margin:0 -4px -2px; padding:14px 4px 2px; background:white; border-top:1px solid var(--line); }
.editor-feedback { min-height:22px; padding:8px 0; color:var(--muted); font-size:.82rem; font-weight:800; }
.catalog-mutation-status:empty { display:none; }
.catalog-write-loading { border-color:#dfc68e; }
.catalog-write-success { border-color:#b9d8c2; }
.catalog-write-warning,.catalog-write-error { border-color:#e4b7bc; }
.readiness-ready strong { color:var(--success); }
.readiness-degraded strong,.readiness-checking strong { color:#916300; }
.readiness-blocked strong { color:var(--danger); }
.dialog-head { display:flex; align-items:start; justify-content:space-between; gap:18px; margin-bottom:18px; }
.dialog-head h2 { margin:5px 0 0; font-size:2rem; letter-spacing:-.04em; }
.config-form { display:grid; gap:18px; }
.config-product-line { display:grid; grid-template-columns:70px 1fr; gap:14px; align-items:center; background:var(--surface-2); padding:14px; border-radius:18px; }
.config-emoji { font-size:3.2rem; text-align:center; }
.config-product-line p { margin:0 0 6px; color:var(--muted); line-height:1.4; }
.option-group { border:0; padding:0; margin:0; display:grid; gap:8px; }
.option-group legend { font-weight:900; margin-bottom:8px; }
.option-card { display:flex; align-items:center; gap:12px; border:1px solid var(--line); padding:12px 14px; border-radius:14px; cursor:pointer; }
.option-card:has(input:checked) { border-color:var(--brand); background:#fff7f4; }
.option-card input { accent-color:var(--brand); }
.option-card span { display:grid; flex:1; }
.option-card small { color:var(--muted); margin-top:2px; }
.config-footer { display:flex; align-items:end; justify-content:space-between; gap:18px; padding-top:4px; }
.config-footer label { display:grid; gap:6px; color:var(--muted); font-size:.82rem; font-weight:800; }
.config-footer > div { text-align:right; display:grid; }
.config-footer strong { font-size:1.45rem; }
.qty-input { width:96px; }
.admin-env-note { margin-top:26px; background:rgba(255,255,255,.08); color:#eadbd6; }
.admin-top-actions { display:flex; align-items:center; gap:10px; }
.release-pill { border:1px solid var(--line); background:white; padding:8px 11px; border-radius:999px; font-size:.78rem; font-weight:900; }
.kpi small { display:block; color:var(--muted); margin-top:4px; }
.card-head { padding:18px 18px 0; display:flex; align-items:start; justify-content:space-between; gap:18px; }
.card-head h2 { margin:5px 0 16px; font-size:1.7rem; letter-spacing:-.035em; }
.catalog-head { padding-bottom:18px; }
.microcopy { color:var(--muted); margin:5px 0 0; font-size:.9rem; }
.toolbar { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.mini-btn { border:1px solid var(--line); background:white; color:var(--ink); padding:8px 10px; border-radius:10px; font-weight:800; font-size:.78rem; }
.mini-btn:hover { background:var(--surface-2); }
.mini-btn.danger { color:var(--danger); }
.mini-btn:disabled { opacity:.4; cursor:not-allowed; }
.row-actions { display:flex; gap:6px; flex-wrap:wrap; }
.compact-input { min-width:150px; padding:9px 10px; }
.table-note { margin:14px; }
.admin-info { margin-top:14px; }
.admin-product { display:flex; align-items:center; gap:10px; min-width:210px; }
.admin-product > span { width:38px; height:38px; display:grid; place-items:center; background:var(--surface-2); border-radius:10px; font-size:1.5rem; }
.admin-product div { display:grid; }
.admin-product small { color:var(--muted); margin-top:2px; }
.status-stack { display:flex; gap:5px; flex-wrap:wrap; }
.status-ok { background:#e6f2eb; color:var(--success); }
.status-warn { background:#f8e4e7; color:var(--danger); }
.editor-form { display:grid; gap:16px; }
.editor-form.narrow { max-width:480px; }
.editor-form > label,.editor-grid > label { display:grid; gap:6px; color:var(--muted); font-size:.82rem; font-weight:800; }
.editor-grid { display:grid; gap:12px; }
.editor-grid.two { grid-template-columns:1fr 1fr; }
.editor-checks { display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.check-line { display:flex!important; align-items:center; gap:7px; color:var(--ink)!important; font-size:.86rem!important; font-weight:800!important; }
.check-line input { accent-color:var(--brand); }
.editor-subsection { border:1px solid var(--line); border-radius:18px; padding:14px; }
.subsection-head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:10px; }
.subsection-head div { display:grid; }
.subsection-head small { color:var(--muted); margin-top:2px; }
.repeat-list { display:grid; gap:8px; }
.repeat-row { display:grid; grid-template-columns:1.4fr .7fr .55fr auto; gap:8px; align-items:center; }
.repeat-row .input { padding:10px; }
.dialog-actions { display:flex; justify-content:flex-end; gap:8px; padding-top:4px; }
code { background:var(--surface-2); padding:3px 6px; border-radius:7px; }

@media (max-width: 760px) {
  .modal-dialog { width:min(96vw,680px); max-height:94vh; }
  .admin-dialog > div { padding:16px; max-height:94vh; }
  .editor-form-shell { max-height:calc(94vh - 32px); }
  .editor-sticky-footer { gap:10px; }
  .editor-sticky-footer .btn { flex:1; }
  .editor-grid.two { grid-template-columns:1fr; }
  .repeat-row { grid-template-columns:1fr 1fr; }
  .repeat-row .check-line { order:3; }
  .repeat-row .danger { order:4; }
  .catalog-head { flex-direction:column; }
  .toolbar { justify-content:flex-start; }
}

/* v0.3.0 — Scheduling & Capacity */
.field-label { display:grid; gap:6px; color:var(--muted); font-size:.82rem; font-weight:800; }
.schedule-callout { padding:14px; border:1px solid #ead7cb; background:#fff9f5; border-radius:15px; color:#67453e; line-height:1.45; font-size:.9rem; }
.schedule-callout b { color:var(--ink); }
.schedule-admin-grid { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.inline-settings-form { display:grid; grid-template-columns:1fr 1fr auto; gap:12px; align-items:end; padding:0 18px 18px; }
.inline-settings-form label { display:grid; gap:6px; color:var(--muted); font-size:.82rem; font-weight:800; }
.form-submit-row { display:flex; justify-content:flex-end; padding:14px 18px 18px; }
.capacity-preview { padding:0 18px 18px; display:grid; gap:9px; }
.capacity-day { display:grid; grid-template-columns:minmax(125px,1fr) 1.4fr 34px; gap:10px; align-items:center; }
.capacity-day > div:first-child { display:grid; }
.capacity-day small { color:var(--muted); margin-top:2px; }
.capacity-day strong { text-align:right; }
.capacity-bar { height:8px; background:var(--surface-2); border-radius:999px; overflow:hidden; }
.capacity-bar span { display:block; height:100%; background:var(--brand); border-radius:999px; }
.schedule-settings-card { align-self:start; }

@media (max-width: 900px) {
  .schedule-admin-grid { grid-template-columns:1fr; }
  .inline-settings-form { grid-template-columns:1fr; }
}


/* v0.4.0 — Customer & Order Domain Closure */
.checkout-section-head { display:grid; gap:3px; padding-top:4px; }
.checkout-section-head b { color:var(--ink); }
.checkout-section-head small { color:var(--muted); line-height:1.35; }
.address-fields { display:grid; gap:10px; border:1px solid var(--line); background:var(--surface-2); padding:14px; border-radius:16px; }
.address-fields[hidden] { display:none; }
#customers-table small { color:var(--muted); line-height:1.45; }

/* v0.5.0 — Firebase Remote Foundation */
.infrastructure-grid { display:grid; grid-template-columns:1.35fr .65fr; gap:18px; }
.infra-status-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; padding:0 18px 18px; }
.infra-status-card { border:1px solid var(--line); background:var(--surface-2); border-radius:16px; padding:14px; display:grid; gap:5px; }
.infra-status-card span { color:var(--muted); font-size:.75rem; font-weight:900; text-transform:uppercase; letter-spacing:.04em; }
.infra-status-card strong { font-size:1rem; overflow-wrap:anywhere; }
.infra-status-card small { color:var(--muted); line-height:1.4; }
.infra-status-card.infra-error { border-color:#e7b7bd; background:#fff4f5; }
.infra-status-card.infra-error strong { color:var(--danger); }
.infra-actions { display:flex; gap:8px; flex-wrap:wrap; padding:0 18px 18px; }
.infra-policy { padding:0 18px 18px; display:grid; gap:8px; }
.infra-policy p { margin:0; padding:9px 0; border-bottom:1px solid var(--line); color:var(--muted); }
.infra-policy p:last-child { border-bottom:0; }
.infra-policy b { color:var(--ink); }
#emulator-services-table { padding-bottom:4px; }
@media (max-width: 900px) {
  .infrastructure-grid { grid-template-columns:1fr; }
}
@media (max-width: 620px) {
  .infra-status-grid { grid-template-columns:1fr; }
}

/* v0.6.0 — Auth & Remote Identity */
.auth-identity-card { margin-top:18px; }
.auth-panel-grid { display:grid; grid-template-columns:minmax(280px,.8fr) minmax(280px,1.2fr); gap:18px; padding:0 18px 18px; }
.auth-form { display:grid; gap:12px; align-content:start; }
.auth-form label { display:grid; gap:6px; color:var(--muted); font-size:.82rem; font-weight:800; }
.auth-session-box { min-height:150px; border:1px solid var(--line); border-radius:16px; background:var(--surface-2); padding:14px; }
.auth-session-state { display:grid; gap:8px; align-content:start; }
.auth-session-state small { color:var(--muted); line-height:1.45; overflow-wrap:anywhere; }
.auth-dialog { width:min(92vw,520px); }
.auth-dialog .auth-form { margin-top:14px; }
.account-note { margin-top:14px; }
@media (max-width:760px) { .auth-panel-grid { grid-template-columns:1fr; } }

/* v0.9.0 — governed catalog media + operational tracking */
.product-visual .product-image{width:100%;height:100%;object-fit:cover;border-radius:inherit;display:block}
.admin-product-image{width:42px;height:42px;object-fit:cover;border-radius:10px;flex:0 0 auto}
.tracking-events{margin-top:18px;padding-top:14px;border-top:1px solid var(--line)}
.tracking-events h4{margin:0 0 10px}
.tracking-event{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--line)}
.tracking-event small{display:block;text-align:right;color:var(--muted)}
@media(max-width:700px){.tracking-event{display:block}.tracking-event small{text-align:left;margin-top:4px}}


/* ADMIN ACCESS GATE v1.0.1 */

.admin-access-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
  background:
    radial-gradient(
      circle at top right,
      rgba(154, 59, 76, .18),
      transparent 34%
    ),
    #f8f1ed;
}

.admin-access-gate[hidden],
.admin-shell[hidden] {
  display: none !important;
}

.admin-access-card {
  width: min(100%, 460px);
  padding: 34px;
  border: 1px solid rgba(78, 39, 31, .16);
  border-radius: 28px;
  background: #fffaf7;
  box-shadow:
    0 24px 70px
    rgba(47, 25, 20, .12);
}

.admin-access-brand {
  display: inline-flex;
  margin-bottom: 28px;
  color: inherit;
  text-decoration: none;
}

.admin-access-card h1 {
  margin:
    8px 0 14px;
  font-size:
    clamp(2rem, 6vw, 3rem);
  line-height: 1;
}

.admin-access-copy {
  margin: 0 0 24px;
  line-height: 1.6;
  opacity: .76;
}

.admin-access-form {
  display: grid;
  gap: 16px;
}

.admin-access-form label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

.admin-access-status {
  margin-top: 18px;
  padding: 13px 15px;
  border-radius: 14px;
  background: rgba(78, 39, 31, .07);
  font-size: .92rem;
}

.admin-access-status[data-state="error"] {
  background:
    rgba(171, 48, 48, .10);
}

.admin-access-status[data-state="success"] {
  background:
    rgba(35, 126, 76, .10);
}

.admin-access-back {
  display: inline-block;
  margin-top: 20px;
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 560px) {
  .admin-access-card {
    padding: 26px 20px;
    border-radius: 22px;
  }
}

/* v1.0.3 RC2 — Operations Workspace */
.operations-workspace-card { overflow:hidden; min-width:0; max-width:100%; }
.operations-workspace-head { align-items:start; }
.operations-filter-grid { display:grid; grid-template-columns:minmax(240px,1.8fr) repeat(5,minmax(120px,.8fr)); gap:10px; padding:0 18px 14px; align-items:end; min-width:0; width:100%; max-width:100%; }
.operations-search-field { min-width:0; }
.operations-queue-chips { display:flex; gap:8px; flex-wrap:wrap; padding:0 18px 14px; }
.operations-chip { border:1px solid var(--line); background:white; color:var(--ink); border-radius:999px; padding:7px 10px; font-size:.76rem; font-weight:900; cursor:pointer; }
.operations-chip.is-active { border-color:var(--brand); background:#fff4ef; color:var(--brand-dark); }
.operations-priority { display:inline-flex; align-items:center; border-radius:999px; padding:5px 8px; font-size:.7rem; font-weight:900; letter-spacing:.02em; }
.operations-priority-critical { background:#f8e4e7; color:var(--danger); }
.operations-priority-high { background:#fff1cf; color:#825a00; }
.operations-priority-normal { background:#e6f2eb; color:var(--success); }
.operations-queue-bucket { color:var(--muted); font-size:.75rem; font-weight:900; text-transform:uppercase; letter-spacing:.03em; }
.operations-order-main { display:grid; gap:4px; min-width:190px; }
.operations-order-main small,.operations-customer small,.operations-fulfillment small { color:var(--muted); line-height:1.35; }
.operations-customer,.operations-fulfillment { display:grid; gap:3px; min-width:150px; }
.operations-attention { color:var(--danger); font-weight:900; font-size:.74rem; }
.operations-action-row { display:flex; gap:6px; flex-wrap:wrap; min-width:170px; }
.operations-action-row .mini-btn { white-space:nowrap; }
.operations-empty { padding:24px 18px; }
#operations-queue table { min-width:1040px; }
#operations-queue { overflow-x:auto; min-width:0; width:100%; max-width:100%; }
@media (max-width: 1180px) { .operations-filter-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } .operations-search-field { grid-column:span 2; } }
@media (max-width: 760px) { .operations-filter-grid { grid-template-columns:1fr 1fr; } .operations-search-field { grid-column:1 / -1; } .operations-workspace-head { flex-direction:column; } }
@media (max-width: 480px) { .operations-filter-grid { grid-template-columns:1fr; } .operations-search-field { grid-column:auto; } }

/* v1.0.3 RC3 — Customer Tracking & UX */
.sr-only { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important; }
.tracking-recovery-fields { grid-column:1 / -1; min-width:0; }
#tracking-result,.tracking-card { min-width:0; max-width:100%; }
.tracking-card { overflow:hidden; }
.tracking-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.tracking-code { margin:.25rem 0 0; overflow-wrap:anywhere; }
.tracking-current-status { flex:0 0 auto; max-width:48%; padding:8px 10px; border-radius:999px; background:var(--surface-2); font-size:.78rem; font-weight:900; text-align:center; }
.tracking-summary-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:16px; }
.tracking-summary-grid > div { min-width:0; padding:12px; border:1px solid var(--line); border-radius:14px; background:white; }
.tracking-summary-grid span { display:block; color:var(--muted); font-size:.76rem; font-weight:800; text-transform:uppercase; letter-spacing:.04em; }
.tracking-summary-grid b { display:block; margin-top:4px; overflow-wrap:anywhere; }
.tracking-timeline-section { margin-top:20px; }
.tracking-timeline-section h4,.tracking-updates h4 { margin:0 0 12px; }
.tracking-timeline { list-style:none; display:grid; gap:0; margin:0; padding:0; }
.tracking-timeline-item { position:relative; display:grid; grid-template-columns:18px minmax(0,1fr); gap:12px; min-width:0; padding:0 0 18px; }
.tracking-timeline-item:not(:last-child)::after { content:''; position:absolute; left:5px; top:13px; bottom:0; width:2px; background:var(--line); }
.tracking-timeline-dot { width:12px; height:12px; margin-top:4px; border-radius:50%; background:var(--success); z-index:1; }
.tracking-timeline-content { min-width:0; }
.tracking-timeline-content b,.tracking-timeline-content time { display:block; overflow-wrap:anywhere; }
.tracking-timeline-content time,.tracking-update time,.tracking-updated { margin-top:3px; color:var(--muted); font-size:.82rem; }
.tracking-empty { color:var(--muted); padding:10px 0; }
.tracking-updates { margin-top:4px; padding-top:16px; border-top:1px solid var(--line); }
.tracking-update { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:10px 0; border-bottom:1px solid var(--line); }
.tracking-update > * { min-width:0; overflow-wrap:anywhere; }
.tracking-updated { display:block; margin-top:14px; }
.tracking-loading { min-height:72px; display:flex; align-items:center; }
.tracking-error { border:1px solid #e4b7bc; }
.tracking-terminal { margin-top:14px; }
@media (max-width:620px) {
  .track-box > .btn { width:100%; }
  .tracking-card { padding:16px; }
  .tracking-card-head { flex-direction:column; }
  .tracking-current-status { max-width:100%; }
  .tracking-summary-grid { grid-template-columns:1fr; }
  .tracking-update { display:block; }
  .tracking-update time { display:block; margin-top:4px; }
}

/* v1.0.4 — Customer Experience & Commercial Readiness */
.commercial-trust { display:flex; flex-wrap:wrap; gap:10px 16px; margin-top:24px; color:var(--muted); font-size:.9rem; font-weight:800; }
.hero-media { min-height:170px; display:grid; place-items:center; align-self:stretch; overflow:hidden; border-radius:20px; }
.hero-image { width:100%; height:230px; object-fit:cover; border-radius:20px; box-shadow:0 16px 34px rgba(0,0,0,.18); }
.checkout-progress { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin:4px 0 8px; }
.checkout-step { padding:10px; border:1px solid var(--line); border-radius:12px; background:var(--surface-2); font-size:.78rem; font-weight:900; text-align:center; }
.payment-next-steps { display:grid; gap:10px; margin-top:16px; }
.payment-next-steps ol { margin:0; padding-left:20px; color:var(--muted); line-height:1.6; }
.payment-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:14px; }
.demo-note { background:#fff7e8; color:#6f531c; }
.track-box > .field-label { min-width:0; }
@media (max-width:620px) {
  .checkout-progress { grid-template-columns:1fr; }
  .payment-actions { display:grid; }
  .payment-actions .btn { width:100%; }
  .hero-image { height:200px; }
}


/* v1.0.1 RC4 — Public UX Fix
   Publication-first: category filters remain fully visible, product configurator
   works at browser zoom 100%, and checkout separates customer data from payment. */
#produtos .section-head {
  display:grid;
  grid-template-columns:minmax(0, 1fr);
  align-items:start;
  gap:16px;
}
#produtos #category-chips {
  width:100%;
  max-width:100%;
  min-width:0;
  display:flex;
  flex-wrap:wrap;
  overflow:visible;
  gap:8px;
  padding:2px 0 4px;
}
#produtos #category-chips .chip {
  flex:0 0 auto;
}

.product-dialog > #product-dialog-content {
  padding:0;
  min-height:0;
}
.product-dialog .config-form-public {
  display:flex;
  flex-direction:column;
  gap:0;
  max-height:min(90dvh, 820px);
  min-height:0;
}
.product-dialog .config-dialog-head {
  flex:0 0 auto;
  margin:0;
  padding:22px 24px 16px;
  background:var(--surface);
  border-bottom:1px solid var(--line);
}
.product-dialog .config-scroll-body {
  min-height:0;
  overflow-y:auto;
  overscroll-behavior:contain;
  display:grid;
  gap:18px;
  padding:18px 24px;
}
.product-dialog .config-submit-bar {
  flex:0 0 auto;
  padding:14px 24px 18px;
  background:var(--surface);
  border-top:1px solid var(--line);
  box-shadow:0 -10px 24px rgba(72,38,32,.06);
}
#checkout-form .checkout-section-head {
  margin-top:4px;
}
#checkout-form #payment-method {
  min-height:48px;
}

@media (max-width:620px) {
  #produtos #category-chips {
    flex-wrap:nowrap;
    overflow-x:auto;
    scrollbar-width:thin;
    padding-bottom:8px;
  }
  .product-dialog {
    width:min(96vw, 680px);
    max-height:96dvh;
  }
  .product-dialog .config-form-public {
    max-height:96dvh;
  }
  .product-dialog .config-dialog-head {
    padding:16px 16px 12px;
  }
  .product-dialog .config-dialog-head h2 {
    font-size:1.55rem;
  }
  .product-dialog .config-scroll-body {
    padding:14px 16px;
    gap:14px;
  }
  .product-dialog .config-submit-bar {
    padding:12px 16px calc(12px + env(safe-area-inset-bottom));
  }
  .config-product-line {
    grid-template-columns:52px 1fr;
    padding:12px;
  }
  .config-emoji {
    font-size:2.5rem;
  }
}


/* RC5 customer portal and operator UX */
.tech-only{display:none!important}.technical-mode .tech-only{display:block!important}.technical-mode a.tech-only{display:flex!important}
.account-dialog{width:min(760px,calc(100vw - 28px));max-height:min(88vh,860px);overflow:auto}.account-tabs{display:flex;gap:8px;margin:4px 0 16px}.account-tabs .active{background:var(--ink);color:#fff}.account-auth-form{display:grid;gap:12px}.account-link-button{border:0;background:transparent;color:var(--primary);font:inherit;font-weight:800;text-decoration:underline;cursor:pointer;justify-self:start}.account-profile-card{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:18px;border:1px solid var(--line);border-radius:18px;background:var(--surface)}.account-profile-card h3{margin:4px 0 8px}.account-profile-card p{margin:3px 0}.account-orders-section{margin-top:18px}.account-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.account-section-head h3{margin:4px 0}.account-order-card{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 0;border-bottom:1px solid var(--line)}.account-order-card:last-child{border-bottom:0}.account-order-card small{display:block;margin-top:4px;color:var(--muted)}.account-claim-card{margin-top:18px;padding:16px;border:1px solid var(--line);border-radius:18px;background:var(--soft)}.account-claim-card summary{font-weight:900;cursor:pointer}.account-claim-card p{color:var(--muted)}
@media(max-width:680px){.account-dialog{width:calc(100vw - 16px);max-height:92vh}.account-profile-card,.account-order-card,.account-section-head{align-items:stretch;flex-direction:column}.account-order-card .mini-btn{align-self:flex-start}}

/* RC6 product media gallery */
.product-media-editor { display:grid; gap:12px; }
.media-upload-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; align-items:end; }
.media-upload-grid label { display:grid; gap:6px; }
.media-editor-list { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:10px; }
.media-editor-list:empty::before { content:'Nenhuma foto cadastrada ainda.'; color:var(--muted); font-size:.9rem; padding:10px 0; }
.media-editor-list.compact { grid-template-columns:repeat(auto-fill,minmax(130px,1fr)); }
.media-editor-item { border:1px solid var(--line); border-radius:14px; overflow:hidden; background:#fff; }
.media-editor-item.is-primary { box-shadow:0 0 0 2px rgba(153,58,76,.13); }
.media-editor-item img { width:100%; height:105px; object-fit:cover; display:block; background:#f8efeb; }
.media-editor-actions { display:flex; flex-wrap:wrap; gap:6px; align-items:center; padding:8px; }
.media-primary-label { font-size:.78rem; font-weight:800; color:var(--brand); margin-right:auto; }
.repeat-row-variant { display:block; border:1px solid var(--line); border-radius:16px; padding:12px; }
.repeat-row-variant .repeat-row-main { display:grid; grid-template-columns:1.4fr .7fr .55fr auto; gap:8px; align-items:center; }
.variant-media-editor { margin-top:10px; padding-top:10px; border-top:1px dashed var(--line); display:grid; gap:10px; }
.variant-media-heading { display:flex; justify-content:space-between; gap:12px; align-items:baseline; }
.variant-media-heading small { color:var(--muted); text-align:right; }
.config-media-gallery { display:grid; gap:8px; }
.config-main-media { width:100%; height:min(34vh,280px); min-height:170px; border-radius:16px; overflow:hidden; background:linear-gradient(145deg,#fff5f1,#f7ddd5); }
.config-main-media img { width:100%; height:100%; object-fit:cover; display:block; }
.config-media-thumbs { display:flex; gap:8px; overflow-x:auto; padding-bottom:2px; scrollbar-width:thin; }
.config-media-thumb { width:64px; height:54px; padding:0; border:2px solid transparent; border-radius:10px; overflow:hidden; background:#fff; cursor:pointer; flex:0 0 auto; }
.config-media-thumb.active { border-color:var(--brand); }
.config-media-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.config-gallery-empty { height:150px; display:grid; place-items:center; font-size:4.5rem; border-radius:16px; background:linear-gradient(145deg,#fff5f1,#f7ddd5); }
@media (max-width:760px) {
  .media-upload-grid { grid-template-columns:1fr; }
  .repeat-row-variant .repeat-row-main { grid-template-columns:1fr 1fr; }
  .variant-media-heading { display:grid; }
  .variant-media-heading small { text-align:left; }
  .config-main-media { height:220px; }
}


/* RC7 product card readability + multi-variant cart */
.product-copy-panel { isolation:isolate; }
.product-title { min-height:1.5em; }
.product-description { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; min-height:3em; }
.product-lead-time { color:var(--muted); font-weight:750; }
.product-visual .product-image { width:100%; height:100%; object-fit:cover; object-position:center; display:block; }
.multi-variant-group { display:grid; gap:10px; }
.variant-selector-help { margin:-2px 0 4px; color:var(--muted); font-size:.9rem; }
.variant-quantity-list { display:grid; gap:10px; }
.variant-quantity-card { border:1px solid var(--line); border-radius:16px; padding:10px; background:var(--surface); display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px 14px; align-items:center; }
.variant-quantity-card.is-previewing { box-shadow:0 0 0 2px rgba(153,58,76,.12); border-color:var(--brand); }
.variant-preview-button { min-width:0; display:flex; align-items:center; gap:12px; padding:0; border:0; background:transparent; color:inherit; text-align:left; cursor:pointer; }
.variant-preview-media { width:54px; height:54px; flex:0 0 54px; border-radius:12px; overflow:hidden; display:grid; place-items:center; background:var(--soft); font-size:2rem; }
.variant-preview-media img { width:100%; height:100%; object-fit:cover; display:block; }
.variant-preview-copy { min-width:0; display:grid; gap:3px; }
.variant-preview-copy b { overflow-wrap:anywhere; }
.variant-preview-copy small { color:var(--muted); }
.variant-quantity-control { display:grid; grid-template-columns:38px 64px 38px; gap:6px; align-items:center; }
.variant-quantity-control button { height:38px; border:1px solid var(--line); border-radius:10px; background:var(--surface); font-size:1.15rem; font-weight:900; cursor:pointer; }
.variant-qty-input { height:38px; padding:6px; text-align:center; font-weight:900; }
.variant-addons-panel { grid-column:1/-1; border-top:1px dashed var(--line); padding-top:9px; }
.variant-addons-panel summary { cursor:pointer; font-weight:850; color:var(--ink); }
.variant-addons-list { display:grid; gap:8px; margin-top:9px; }
.variant-addon-choice { display:flex; gap:10px; align-items:flex-start; padding:9px 10px; border:1px solid var(--line); border-radius:12px; }
.variant-addon-choice input { margin-top:3px; accent-color:var(--brand); }
.variant-addon-choice span { display:grid; }
.variant-addon-choice small { color:var(--muted); }
.config-batch-summary { display:flex; justify-content:space-between; gap:18px; align-items:end; padding-top:4px; }
.config-batch-summary > span { display:grid; gap:3px; }
.config-batch-summary > span small { color:var(--muted); }
.config-batch-summary > div { text-align:right; display:grid; }
.config-batch-summary strong { font-size:1.45rem; }
@media (max-width:620px) {
  .product-visual { min-height:0; }
  .variant-quantity-card { grid-template-columns:1fr; }
  .variant-quantity-control { justify-self:start; }
  .config-batch-summary { align-items:flex-start; flex-direction:column; }
  .config-batch-summary > div { text-align:left; }
}


/* RC8 WhatsApp + account mode UX + image editor */
.account-auth-form[hidden], [data-account-panel][hidden] { display:none !important; }
.account-tabs { padding:4px; border:1px solid var(--line); border-radius:14px; background:var(--surface-2); }
.account-tabs .mini-btn { flex:1; justify-content:center; }
.account-mode-heading { display:grid; gap:4px; padding:12px 14px; border-radius:14px; background:var(--surface-2); }
.account-mode-heading small { color:var(--muted); line-height:1.4; }
.btn-whatsapp { background:#1f7a4c; color:#fff; border-color:#1f7a4c; }
.btn-whatsapp:hover { filter:brightness(.96); }
.whatsapp-help { display:block; margin-top:10px; color:var(--muted); line-height:1.4; }
.image-editor-dialog { width:min(94vw,760px); }
.image-editor-shell { padding:20px; display:grid; gap:14px; }
.image-editor-canvas-wrap { position:relative; width:100%; aspect-ratio:4/3; overflow:hidden; border-radius:16px; background:#201714; touch-action:none; }
.image-editor-canvas-wrap canvas { width:100%; height:100%; display:block; cursor:grab; touch-action:none; }
.image-editor-canvas-wrap canvas:active { cursor:grabbing; }
.image-editor-guide { position:absolute; inset:7%; border:1px dashed rgba(255,255,255,.65); border-radius:10px; pointer-events:none; }
.image-editor-controls { display:grid; grid-template-columns:auto auto auto minmax(180px,1fr); gap:8px; align-items:center; }
.image-editor-controls label { display:flex; align-items:center; gap:8px; font-weight:800; }
.image-editor-controls input[type="range"] { width:100%; accent-color:var(--brand); }
.media-edit-hint { color:var(--muted); line-height:1.35; }
@media(max-width:680px){
  .image-editor-shell { padding:14px; }
  .image-editor-controls { grid-template-columns:1fr 1fr; }
  .image-editor-controls label { grid-column:1/-1; }
  .payment-actions .btn { width:100%; }
}

/* RC9 Team & Access Management */
.team-invite-access-card { max-width:620px; }
.team-invite-tabs { display:flex; gap:8px; margin:14px 0; padding:4px; border:1px solid var(--line); border-radius:14px; background:var(--surface-2); }
.team-invite-tabs .mini-btn { flex:1; justify-content:center; }
.team-invite-tabs .mini-btn.active { background:var(--ink); color:#fff; }
[data-team-invite-panel][hidden] { display:none !important; }
.team-principal-summary { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:16px; border:1px solid var(--line); border-radius:18px; background:var(--surface-2); }
.team-principal-summary h3 { margin:4px 0; }
.team-principal-summary p { margin:0; color:var(--muted); }
.team-principal-bootstrap .form-submit-row { margin-top:14px; }
.team-invite-form { display:grid; grid-template-columns:1.2fr 1.5fr 1fr auto; gap:12px; align-items:end; }
.team-invite-form label { display:grid; gap:6px; font-weight:800; }
.team-invite-link-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; margin:12px 0 6px; }
.team-role-select { min-width:180px; height:38px; padding:6px 10px; }
.team-member-actions { align-items:center; }
.admin-shell .admin-only[hidden] { display:none !important; }
@media(max-width:900px){
  .team-invite-form { grid-template-columns:1fr 1fr; }
  .team-invite-form .btn { align-self:end; }
}
@media(max-width:620px){
  .team-invite-form { grid-template-columns:1fr; }
  .team-principal-summary { align-items:flex-start; flex-direction:column; }
  .team-invite-link-row { grid-template-columns:1fr; }
  .team-member-actions { align-items:stretch; flex-direction:column; }
  .team-role-select { width:100%; min-width:0; }
}


/* RC10 mobile navigation + storefront personalization */
.mobile-menu-toggle { display:none; width:42px; height:42px; border:1px solid var(--line); background:white; color:var(--ink); border-radius:999px; font-size:1.55rem; font-weight:900; line-height:1; cursor:pointer; }
.mobile-nav-menu { position:absolute; right:12px; top:58px; width:min(260px,calc(100vw - 24px)); padding:8px; background:white; border:1px solid var(--line); border-radius:16px; box-shadow:0 18px 44px rgba(45,28,26,.18); z-index:80; }
.mobile-nav-menu[hidden] { display:none!important; }
.mobile-nav-menu a,.mobile-nav-menu button { display:block; width:100%; border:0; background:transparent; color:var(--ink); text-align:left; padding:12px 14px; border-radius:11px; font:inherit; font-weight:800; cursor:pointer; }
.mobile-nav-menu a:hover,.mobile-nav-menu button:hover { background:var(--surface-2); }
.hero-featured-badge { display:inline-flex; margin-top:8px; padding:5px 8px; border-radius:999px; background:rgba(255,255,255,.15); color:white; font-size:.72rem; font-weight:900; }
.tracking-whatsapp-action { margin-top:14px; display:flex; justify-content:flex-start; }
.personalization-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; padding:18px; }
.personalization-section { border:1px solid var(--line); border-radius:18px; padding:16px; display:grid; gap:12px; align-content:start; }
.personalization-section.full { grid-column:1/-1; }
.personalization-section h3 { margin:0; }
.personalization-section label { display:grid; gap:6px; color:var(--muted); font-size:.82rem; font-weight:800; }
.personalization-section textarea { min-height:92px; resize:vertical; }
.personalization-actions { grid-column:1/-1; display:flex; justify-content:flex-end; gap:10px; }
@media (max-width:620px) {
  .nav { position:relative; }
  .mobile-menu-toggle { display:inline-grid; place-items:center; order:1; }
  #open-cart { order:2; }
  .nav-actions { margin-left:auto; gap:7px; }
  .personalization-grid { grid-template-columns:1fr; }
  .personalization-section.full { grid-column:auto; }
}

/* RC11 brand identity */
.brand-lockup,.brand{min-width:0}.brand-copy{display:flex;flex-direction:column;line-height:1.05;min-width:0}.brand-copy strong{font:inherit;font-weight:900;white-space:nowrap}.brand-copy small{font-size:.72rem;font-weight:600;letter-spacing:0;color:var(--muted);margin-top:3px;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.brand-compact-logo{width:42px;height:42px;object-fit:contain;border-radius:10px;flex:0 0 42px}.hero-brand-logo{display:block;max-width:min(280px,70%);max-height:110px;object-fit:contain;object-position:left center;margin:0 0 18px}.hero-brand-logo[hidden],.brand-compact-logo[hidden]{display:none!important}.brand-asset-editor{display:grid;grid-template-columns:110px minmax(0,1fr);gap:10px 14px;align-items:center;padding:12px;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.55)}.brand-asset-editor label{grid-column:2}.brand-asset-preview{grid-row:1/span 2;width:110px;height:80px;border-radius:12px;border:1px dashed var(--line);display:grid;place-items:center;overflow:hidden;background:white;color:var(--muted);font-size:.76rem;text-align:center;padding:8px}.brand-asset-preview.compact,.brand-asset-preview.favicon{width:80px;height:80px}.brand-asset-preview.social{width:110px;height:72px}.brand-asset-preview img{width:100%;height:100%;object-fit:contain}.brand-asset-preview img[hidden]{display:none}.brand-identity-section{grid-column:1/-1}.brand-identity-section .form-row{grid-template-columns:2fr 1fr}@media(max-width:720px){.brand-copy small{display:none}.hero-brand-logo{max-width:200px;max-height:80px}.brand-asset-editor{grid-template-columns:1fr}.brand-asset-editor label{grid-column:1}.brand-asset-preview,.brand-asset-preview.compact,.brand-asset-preview.favicon,.brand-asset-preview.social{grid-row:auto;width:100%;height:120px}.brand-identity-section .form-row{grid-template-columns:1fr}}

/* RC12 unified account and admin access */
.mobile-nav-divider{height:1px;background:var(--line);margin:6px 8px}.mobile-nav-menu .mobile-store-area{color:var(--muted);font-size:.9rem}.footer-store-area{color:var(--muted);font-size:.82rem;text-decoration:none;font-weight:700}.footer-store-area:hover{text-decoration:underline}.footer-secondary{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.account-staff-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.staff-account-card{align-items:center}@media(max-width:680px){.account-staff-actions{align-items:stretch;flex-direction:column}.account-staff-actions .btn,.account-staff-actions .mini-btn{width:100%}}


/* RC13 mobile header + featured showcase */
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.cart-icon-button{position:relative;width:46px;height:46px;display:inline-grid;place-items:center;border:1px solid var(--line);border-radius:999px;background:white;color:var(--ink);transition:.2s ease;flex:0 0 46px}
.cart-icon-button:hover{transform:translateY(-1px);box-shadow:0 8px 24px rgba(72,38,32,.10)}
.cart-icon-button .cart-icon{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.cart-count-badge{position:absolute;right:-4px;top:-5px;min-width:20px;height:20px;padding:0 5px;display:grid;place-items:center;border-radius:999px;background:var(--accent);color:var(--ink);font-size:.7rem;font-weight:950;border:2px solid var(--bg);line-height:1}
.cart-icon-button.is-empty .cart-count-badge{opacity:0;transform:scale(.7);pointer-events:none}
.cart-icon-button.has-items{background:var(--brand);border-color:var(--brand);color:white;box-shadow:0 8px 24px rgba(139,61,73,.22)}
.cart-icon-button.has-items .cart-count-badge{opacity:1;transform:scale(1)}
.hero-feature-head{display:grid;gap:5px;position:relative;z-index:2}
.hero-feature-head strong{font-size:clamp(1.35rem,2.5vw,1.75rem);line-height:1.08}
.hero-media{width:100%;min-height:0;aspect-ratio:8/5;display:grid;place-items:center;align-self:stretch;overflow:hidden;border-radius:20px;background:rgba(255,255,255,.08)}
.hero-image{width:100%;height:100%;object-fit:cover;object-position:center;border-radius:20px;box-shadow:none;display:block}
.hero-card{gap:18px}
.highlight-asset-editor{grid-template-columns:140px minmax(0,1fr)}
.highlight-asset-editor .brand-asset-preview{width:140px;height:88px}
.highlight-editor-dialog .image-editor-canvas-wrap{aspect-ratio:8/5}
@media(max-width:620px){
  .nav{gap:8px}.brand{gap:7px}.brand-mark,.brand-compact-logo{width:36px;height:36px;flex-basis:36px}.brand-copy strong{font-size:.9rem}
  .nav-actions{margin-left:auto;gap:6px}.cart-icon-button{order:1;width:40px;height:40px;flex-basis:40px}.cart-icon-button .cart-icon{width:20px;height:20px}
  .mobile-menu-toggle{order:2;width:40px;height:40px;flex:0 0 40px;font-size:1.4rem}.cart-count-badge{right:-3px;top:-5px;min-width:18px;height:18px;font-size:.64rem}
  .hero-card{min-height:0;padding:18px;gap:14px}.hero-media{aspect-ratio:8/5;border-radius:16px}.hero-image{border-radius:16px}.metrics{margin-top:0}
  .highlight-asset-editor{grid-template-columns:1fr}.highlight-asset-editor .brand-asset-preview{width:100%;height:auto;aspect-ratio:8/5}
}


/* RC14 — Mobile Real Device Hotfix
   Real-device evidence (Moto G54 + 360/375/412/768 widths) overrides emulator-only confidence.
   Scope: no horizontal overflow, robust header, products before featured showcase on phones,
   safe sticky-header anchors, compact hero, and predictable catalog rendering. */
html,body{max-width:100%;overflow-x:hidden}
@supports (overflow:clip){html,body{overflow-x:clip}}
body,header,main,footer,section,.container,.nav,.brand,.nav-actions,.hero-grid,.hero-copy,.hero-card,.section-head,.products,.product{min-width:0;max-width:100%}
#produtos,#historia,#acompanhar{scroll-margin-top:84px}
.mobile-featured-section{display:none}
.mobile-menu-toggle .menu-icon{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.product-image{max-width:100%}

/* Tablet gets the compact navigation too. This avoids the squeezed 768px header. */
@media(max-width:820px){
  .nav{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;min-height:64px;padding:8px 0}
  .brand{min-width:0;overflow:hidden;gap:8px}
  .brand-copy{min-width:0;overflow:hidden}
  .brand-copy strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .brand-copy small{display:none!important}
  .nav-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:nowrap;flex:0 0 auto;min-width:max-content;margin-left:0;gap:7px}
  .nav .btn-ghost{display:none}
  .mobile-menu-toggle{display:inline-grid!important;place-items:center;order:2}
  #open-cart{order:1}
  .mobile-nav-menu{right:0;top:62px}
}

@media(max-width:620px){
  .container{width:calc(100% - 20px);max-width:none}
  .header{backdrop-filter:blur(12px)}
  .nav{min-height:60px;padding:7px 0;gap:6px}
  .brand{gap:7px}
  .brand-mark,.brand-compact-logo{width:36px;height:36px;flex:0 0 36px}
  .brand-copy strong{font-size:.92rem;line-height:1.05}
  .nav-actions{gap:6px}
  .cart-icon-button,.mobile-menu-toggle{width:38px;height:38px;flex:0 0 38px}
  .cart-icon-button .cart-icon,.mobile-menu-toggle .menu-icon{width:19px;height:19px}
  .cart-count-badge{right:-2px;top:-4px;min-width:17px;height:17px;padding:0 4px;font-size:.61rem}
  .mobile-nav-menu{top:56px;right:0;width:min(268px,calc(100vw - 20px))}

  .hero{padding:14px 0 0}
  .hero-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:0}
  .hero-copy{padding:24px 20px;border-radius:22px}
  .hero-brand-logo{max-width:170px;max-height:64px;margin-bottom:14px}
  .kicker{font-size:.68rem;line-height:1.45;letter-spacing:.095em;overflow-wrap:anywhere}
  h1{font-size:clamp(2.05rem,10vw,2.75rem);line-height:.98;letter-spacing:-.052em;margin:14px 0 18px;overflow-wrap:normal;word-break:normal}
  .hero-copy p{font-size:1rem;line-height:1.55;margin:0;color:var(--muted)}
  .hero-actions{display:grid;grid-template-columns:1fr;gap:9px;margin-top:20px}
  .hero-actions .btn{width:100%;text-align:center;padding:12px 14px}
  .commercial-trust{display:grid;grid-template-columns:1fr;gap:7px;margin-top:18px;font-size:.82rem;line-height:1.35}
  .commercial-trust>span{display:block;min-width:0;overflow-wrap:anywhere}

  /* Product discovery wins on mobile: catalog immediately follows the hero. */
  #produtos{padding:26px 0 28px;scroll-margin-top:72px}
  #produtos .section-head{gap:12px;margin-bottom:16px}
  #produtos .section-head h2{font-size:clamp(1.7rem,8vw,2.15rem);line-height:1.02}
  #produtos .lead{font-size:.95rem;line-height:1.5}
  #produtos #category-chips{margin:0 -2px;padding:2px 2px 8px;overscroll-behavior-x:contain;scroll-snap-type:x proximity}
  #produtos #category-chips .chip{scroll-snap-align:start;padding:8px 12px}
  .products{grid-template-columns:minmax(0,1fr)!important;gap:14px;width:100%}
  .product{width:100%;min-width:0}
  .product-visual{min-height:0;aspect-ratio:4/3}
  .product-body{padding:15px;gap:8px}
  .product-description{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .product-footer{align-items:end}
  .product-footer .btn{padding:10px 14px;flex:0 0 auto}

  .mobile-featured-section{display:block;padding:0 0 30px}
  .mobile-featured-section[hidden]{display:none!important}
  .mobile-featured-section .hero-card{width:100%;min-height:0;padding:16px;gap:10px;border-radius:22px}
  .mobile-featured-section .hero-feature-head{gap:4px}
  .mobile-featured-section .hero-feature-head strong{font-size:1.28rem;line-height:1.08;overflow-wrap:anywhere}
  .mobile-featured-section .hero-featured-badge{margin-top:4px;width:max-content;max-width:100%;white-space:normal}
  .mobile-featured-section .hero-media{aspect-ratio:8/5;border-radius:15px}
  .mobile-featured-section .hero-image{border-radius:15px}
  .mobile-featured-section .metrics{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:0}
  .mobile-featured-section .metric{min-width:0;padding:8px 7px;border-radius:11px}
  .mobile-featured-section .metric b{font-size:.78rem;line-height:1.1;overflow-wrap:anywhere}
  .mobile-featured-section .metric small{display:block;margin-top:3px;font-size:.62rem;line-height:1.2;overflow-wrap:anywhere}

  .section{padding:30px 0}
  .story-card{padding:24px 20px;border-radius:22px}
  .story-card h2{line-height:1.05}
  .story-card p{line-height:1.6}
  .track-box{width:100%;max-width:100%}
  .footer{margin-top:22px;padding:28px 0 calc(34px + env(safe-area-inset-bottom))}
}

@media(max-width:380px){
  .container{width:calc(100% - 14px)}
  .nav{gap:4px}
  .brand-mark,.brand-compact-logo{width:34px;height:34px;flex-basis:34px}
  .brand-copy strong{font-size:.86rem}
  .cart-icon-button,.mobile-menu-toggle{width:36px;height:36px;flex-basis:36px}
  .nav-actions{gap:4px}
  .hero-copy{padding:22px 18px}
  h1{font-size:clamp(1.95rem,10.3vw,2.35rem)}
  .hero-copy p{font-size:.96rem}
  .commercial-trust{font-size:.79rem}
  .mobile-featured-section .metrics{grid-template-columns:1fr 1fr 1fr}
}

@media(min-width:621px){
  #mobile-featured-section{display:none!important}
}
