:root {
  --navy: #16215c; --navy-2: #22318a; --yellow: #ffcb05; --yellow-2: #ffe066; --red: #e3350d; --green: #1f9d55;
  --bg: #f6f4ee; --card: #fff; --ink: #1b1d29; --muted: #6b6f80; --line: #e6e2d8;
  --on-navy: #fff; --on-yellow: #16215c; --on-red: #fff; --soft: #efece3; --field: #fff;
  --radius: 14px; --shadow: 0 1px 2px rgba(22,33,92,.06), 0 6px 20px rgba(22,33,92,.07);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Escala fluida: cresce suavemente de ~360px até ~1440px de largura, sem saltos */
  --step--2: clamp(.7rem, .67rem + .14vw, .78rem);
  --step--1: clamp(.8rem, .76rem + .2vw, .9rem);
  --step-0: clamp(.94rem, .89rem + .24vw, 1.06rem);
  --step-1: clamp(1.06rem, .98rem + .4vw, 1.3rem);
  --step-2: clamp(1.25rem, 1.08rem + .85vw, 1.8rem);
  --step-3: clamp(1.5rem, 1.18rem + 1.6vw, 2.45rem);
  --step-4: clamp(1.8rem, 1.3rem + 2.6vw, 3.2rem);
  --space-3xs: clamp(.2rem, .18rem + .1vw, .28rem);
  --space-2xs: clamp(.35rem, .3rem + .2vw, .5rem);
  --space-xs: clamp(.5rem, .44rem + .3vw, .7rem);
  --space-s: clamp(.75rem, .66rem + .45vw, 1.05rem);
  --space-m: clamp(1rem, .86rem + .7vw, 1.5rem);
  --space-l: clamp(1.4rem, 1.1rem + 1.5vw, 2.5rem);
  --space-xl: clamp(2rem, 1.4rem + 3vw, 4rem);
  --gutter: clamp(.9rem, .5rem + 2vw, 2.5rem);
  --container: 1240px;
  --grid-gap: clamp(.6rem, .4rem + 1vw, 1.25rem);
  --header-h: 64px;
  --bottom-nav-h: 0px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 4rem); }
body { margin: 0; font-family: var(--font); font-size: var(--step-0); background: var(--bg); color: var(--ink); line-height: 1.5; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; padding-bottom: var(--bottom-nav-h); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link, var(--navy-2)); }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .4em; text-wrap: balance; }
h1 { font-size: var(--step-4); } h2 { font-size: var(--step-2); } h3 { font-size: var(--step-1); }
p { text-wrap: pretty; }
[hidden] { display: none !important; }
.muted { color: var(--muted); } .small { font-size: var(--step--1); } .center { text-align: center; }

/* ---------- Top */
.ribbon { background: var(--yellow); color: var(--on-yellow); text-align: center; font-size: var(--step--1); padding: var(--space-2xs) var(--gutter); }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: var(--space-m); padding: var(--space-xs) var(--gutter); transition: transform .3s var(--ease), padding .25s var(--ease), box-shadow .25s; background: var(--navy); color: var(--on-navy); box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.brand { display: flex; align-items: center; gap: .55rem; color: inherit; text-decoration: none; font-weight: 800; font-size: var(--step-1); letter-spacing: -.01em; min-width: 0; }
.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav { display: flex; gap: var(--space-3xs); flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a, .nav button { color: inherit; opacity: .82; text-decoration: none; padding: var(--space-2xs) var(--space-s); min-height: 40px; border-radius: 999px; font: inherit; font-size: var(--step-0); transition: background .2s, opacity .2s; background: none; border: 0; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: .35rem; }
.nav a:hover, .nav button:hover { background: color-mix(in srgb, var(--on-navy) 8%, transparent); }
.nav a.active, .nav button.active { background: color-mix(in srgb, var(--on-navy) 14%, transparent); opacity: 1; }
.nav a:hover, .nav button:hover { opacity: 1; }
.cart-btn { display: flex; align-items: center; gap: .45rem; background: var(--yellow); color: var(--on-yellow); border: 0; border-radius: 999px; padding: var(--space-2xs) var(--space-s); min-height: 42px; font: inherit; font-weight: 700; cursor: pointer; flex: none; }
.cart-btn b { background: var(--navy); color: var(--on-navy); border-radius: 999px; min-width: 1.5rem; padding: 0 .4rem; text-align: center; font-size: .85rem; }
.cart-btn b.bump { animation: bump .35s; }
@keyframes bump { 50% { transform: scale(1.4); } }
.who { display: flex; align-items: center; gap: .6rem; font-size: .9rem; }
.badge { background: var(--red); color: var(--on-red); border-radius: 999px; font-size: .72rem; padding: .05rem .45rem; }
.badge.warn { background: var(--yellow); color: var(--on-yellow); }

main { width: min(var(--container), 100% - 2 * var(--gutter)); margin-inline: auto; padding-block: var(--space-m) var(--space-xl); min-height: 60vh; }
.view.narrow { max-width: 42rem; margin-inline: auto; }
.footer { text-align: center; padding: var(--space-l) var(--gutter); font-size: var(--step--1); border-top: 1px solid var(--line); color: var(--ink); }
.footer p { margin: .2rem 0; }

/* ---------- Hero */
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr)); gap: var(--space-l); align-items: center; background: linear-gradient(120deg, var(--navy) 0%, var(--navy-2) 100%); color: var(--on-navy); border-radius: calc(var(--radius) + 8px); padding: var(--space-l) clamp(1.25rem, .5rem + 4vw, 3.5rem); margin-bottom: var(--space-l); isolation: isolate; overflow: hidden; position: relative; }
.hero::after { content: ""; position: absolute; inset: auto -10% -60% 40%; height: 120%; background: radial-gradient(circle, color-mix(in srgb, var(--yellow) 25%, transparent), transparent 60%); pointer-events: none; z-index: -1; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: var(--step--2); color: var(--yellow); font-weight: 700; margin: 0 0 .6rem; }
.hero h1 { font-size: var(--step-4); letter-spacing: -.02em; }
.hero h1 span { color: var(--yellow); }
.hero h1 span.h-title { color: inherit; }
.lead { color: inherit; opacity: .85; max-width: 42ch; margin: 0; font-size: var(--step-0); }
.hero-cards { position: relative; height: clamp(110px, 4rem + 11vw, 200px); }
.hero-cards i { position: absolute; width: clamp(70px, 2.2rem + 6.5vw, 126px); aspect-ratio: 5 / 7; border-radius: 10px; left: 50%; top: 6%; background: linear-gradient(135deg, #fff6c7, var(--yellow) 40%, #f59e0b); border: 5px solid #ffe066; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.hero-cards i:nth-child(1) { transform: translateX(-120%) rotate(-14deg); background: linear-gradient(135deg, #ffd5c7, var(--red)); }
.hero-cards i:nth-child(2) { transform: translateX(-50%) rotate(0); z-index: 1; }
.hero-cards i:nth-child(3) { transform: translateX(20%) rotate(14deg); background: linear-gradient(135deg, #c7e3ff, #3b82f6); }

/* ---------- Toolbar & chips */
.toolbar { display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-s); align-items: center; justify-content: space-between; margin-bottom: var(--space-m); }
.toolbar h2 { margin: 0; }
.toolbar-right { display: flex; gap: var(--space-xs); flex-wrap: wrap; align-items: center; flex: 1 1 26rem; justify-content: flex-end; }
.chips { display: flex; gap: var(--space-2xs); flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--card); padding: var(--space-2xs) var(--space-s); min-height: 40px; border-radius: 999px; font: inherit; font-size: var(--step--1); cursor: pointer; color: var(--ink); white-space: nowrap; transition: background .2s, color .2s, border-color .2s; }
.chip.active { background: var(--navy); color: var(--on-navy); border-color: var(--navy); }
input, select, textarea { font: inherit; color: inherit; border: 1px solid var(--line); border-radius: 10px; padding: var(--space-xs) var(--space-s); min-height: 44px; background: var(--field); width: 100%; font-size: max(16px, var(--step-0)); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--yellow); outline-offset: 1px; border-color: var(--navy-2); }
.toolbar-right input[type=search] { flex: 1 1 14rem; width: auto; min-width: 0; }
.toolbar-right select { width: auto; }
.check { display: inline-flex; align-items: center; gap: var(--space-2xs); font-size: var(--step--1); white-space: nowrap; min-height: 40px; }
.check input { width: auto; min-height: 0; accent-color: var(--navy-2); }

/* ---------- Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 0; border-radius: 10px; padding: var(--space-xs) var(--space-m); min-height: 44px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; transition: transform .1s, filter .15s; touch-action: manipulation; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.sm { padding: var(--space-2xs) var(--space-s); min-height: 38px; font-size: var(--step--1); }
.btn.block { width: 100%; }
.btn.primary { background: var(--red); color: var(--on-red); } .btn.primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn.success { background: var(--green); color: #fff; }
.btn.danger { background: var(--card); color: var(--red); border: 1px solid #f3b9a9; }
.btn.ghost { background: transparent; color: inherit; border: 1px solid currentColor; opacity: .9; }
.btn.whatsapp { background: #25d366; color: #073b1c; }
.icon-btn { border: 0; background: none; font-size: 1.1rem; cursor: pointer; padding: .3rem .5rem; border-radius: 8px; color: inherit; }
.icon-btn:hover { background: rgba(0,0,0,.06); }
.link { background: none; border: 0; padding: 0; font: inherit; font-size: .88rem; color: var(--link, var(--navy-2)); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.link.danger { color: var(--red); }

/* ---------- Product grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(calc((100% - var(--grid-gap)) / 2), clamp(10.5rem, 8rem + 6vw, 14rem)), 1fr)); gap: var(--grid-gap); }
.product { container-type: inline-size; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; transition: transform .25s var(--ease), box-shadow .25s; content-visibility: auto; contain-intrinsic-size: auto 380px; }
.product:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(22,33,92,.14); }
.product.out { opacity: .6; }
.product-media { position: relative; border: 0; padding: 0; background: var(--soft); cursor: pointer; aspect-ratio: 5 / 6; overflow: hidden; }
.product-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.45) 45%, transparent 60%); transform: translateX(-100%); transition: transform .7s; pointer-events: none; }
.product:hover .product-media::after { transform: translateX(100%); }
.thumb { width: 100%; height: 100%; object-fit: contain; padding: 4%; }
.thumb-empty { display: grid; place-items: center; background: repeating-linear-gradient(45deg, var(--soft) 0 10px, color-mix(in srgb, var(--soft) 50%, var(--bg)) 10px 20px); }
.thumb-empty span { font-weight: 800; letter-spacing: .15em; font-size: .7rem; color: var(--muted); border: 2px dashed var(--line); padding: .4rem .6rem; border-radius: 6px; }
.tag { position: absolute; top: .6rem; left: .6rem; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: .22rem .55rem; border-radius: 6px; background: var(--navy); color: var(--on-navy); }
.tag.lacrado { background: var(--red); color: var(--on-red); }
.tag.star { top: auto; bottom: .6rem; background: var(--yellow); color: var(--on-yellow); }
.tag.inline { position: static; display: inline-block; }
.product-body { padding: clamp(.6rem, 5cqi, 1rem); display: flex; flex-direction: column; flex: 1; }
.product-body h3 { font-size: clamp(.9rem, .7rem + 3cqi, 1.08rem); margin-bottom: .2rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.detail { color: var(--muted); font-size: clamp(.72rem, .6rem + 2cqi, .82rem); margin: 0 0 var(--space-xs); min-height: 1.2em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: .5rem; }
.price { font-size: clamp(1rem, .8rem + 4cqi, 1.25rem); color: var(--price, var(--navy)); display: block; }
.price.big { font-size: var(--step-3); font-weight: 800; margin: .6rem 0 .1rem; }
.stock { color: var(--muted); font-size: var(--step--2); } .stock.low { color: var(--red); font-weight: 700; }
.empty { color: var(--muted); text-align: center; padding: 2.5rem 1rem; grid-column: 1 / -1; }

/* ---------- Cards & forms */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: var(--space-m); }
.form { display: grid; gap: .9rem; }
.form label { display: grid; gap: var(--space-3xs); font-size: var(--step--1); font-weight: 600; }
.form label small { font-weight: 400; color: var(--muted); }
.form label.check { display: inline-flex; font-weight: 500; }
.row-form { grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); align-items: end; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: var(--space-s) var(--space-m); }
.span-2 { grid-column: 1 / -1; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.notice { background: #fff8d6; border: 1px solid #f5e08a; color: #5b4a00; padding: .7rem .9rem; border-radius: 10px; font-size: .9rem; margin: 0; }
.shipping-info { font-size: .92rem; color: var(--muted); }
.shipping-info.free { background: #e5f7ec; color: #0f6b38; font-weight: 700; padding: .7rem .9rem; border-radius: 10px; }
.sum { display: flex; justify-content: space-between; align-items: center; padding: .25rem 0; gap: 1rem; }
.sum.big { font-size: 1.1rem; border-top: 1px dashed var(--line); padding-top: .6rem; margin-top: .3rem; }

/* ---------- Drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(10,14,40,.45); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--bg); z-index: 41; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .25s ease; box-shadow: -10px 0 30px rgba(0,0,0,.2); }
.drawer.open { transform: none; }
.drawer-head, .dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.drawer-head { padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); }
.drawer-head h2, .dialog-head h2 { margin: 0; font-size: 1.25rem; }
.cart-items { flex: 1; overflow-y: auto; padding: .6rem 1.2rem; }
.cart-line { display: grid; grid-template-columns: 58px 1fr auto; gap: .8rem; padding: .8rem 0; border-bottom: 1px solid var(--line); align-items: center; }
.cart-thumb { width: 58px; height: 70px; object-fit: contain; background: var(--soft); border-radius: 8px; }
.cart-thumb.thumb-empty span { font-size: .5rem; padding: .2rem; }
.cart-info { display: grid; gap: .2rem; font-size: .92rem; }
.cart-right { display: grid; justify-items: end; gap: .3rem; font-size: .92rem; }
.drawer-foot { padding: 1rem 1.2rem 1.3rem; border-top: 1px solid var(--line); background: var(--card); display: grid; gap: .6rem; }
.drawer-foot p { margin: 0; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--field); width: max-content; }
.qty button { border: 0; background: none; width: 2.2rem; height: 2.2rem; font-size: 1.1rem; cursor: pointer; color: inherit; }
.qty.sm button { width: 1.8rem; height: 1.8rem; font-size: 1rem; }
.qty-val, .stock-val { min-width: 1.8rem; text-align: center; font-weight: 700; }
.stock-val.low { color: var(--red); }

/* ---------- Dialogs */
.dialog { border: 0; border-radius: 18px; padding: var(--space-m); width: min(560px, 100% - 1.5rem); max-height: calc(100dvh - 2rem); overscroll-behavior: contain; box-shadow: 0 20px 60px rgba(0,0,0,.3); background: var(--bg); color: var(--ink); }
.dialog.wide { width: min(760px, 100% - 1.5rem); }
.dialog::backdrop { background: rgba(10,14,40,.55); }
.dialog-actions { display: flex; justify-content: flex-end; gap: .6rem; }
.pd { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: var(--space-m); margin-top: var(--space-xs); }
.pd-media { background: var(--soft); border-radius: 12px; aspect-ratio: 5 / 6; overflow: hidden; }
.pd-img { width: 100%; height: 100%; object-fit: contain; padding: .8rem; }
.pd-info h2 { font-size: var(--step-2); }
.specs { display: grid; grid-template-columns: auto 1fr; gap: .25rem .8rem; font-size: .9rem; margin: .6rem 0; }
.specs dt { color: var(--muted); } .specs dd { margin: 0; font-weight: 600; }
.pd-desc { font-size: .92rem; white-space: pre-line; }
.pd-buy { display: flex; gap: .6rem; margin-top: .8rem; flex-wrap: wrap; }
.done { text-align: center; display: grid; gap: .6rem; justify-items: center; }
.done p { margin: 0; }
.done-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-size: 2rem; font-weight: 800; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.7rem; font-weight: 800; letter-spacing: .08em; background: var(--yellow); color: var(--on-yellow); padding: .3rem .9rem; border-radius: 10px; }
.code.sm { font-size: 1rem; padding: .15rem .5rem; }

/* ---------- Orders */
.order-view { margin-top: 1rem; display: grid; gap: .5rem; }
.order-top { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; }
.order-items { list-style: none; padding: 0; margin: .3rem 0; display: grid; gap: .35rem; font-size: .92rem; }
.order-items li { display: flex; justify-content: space-between; gap: 1rem; }
.status { font-size: .78rem; font-weight: 800; padding: .25rem .65rem; border-radius: 999px; background: #eee; }
.s-pendente { background: #fff1c2; color: #7a5b00; } .s-confirmado { background: #dcfce7; color: #166534; }
.s-enviado { background: #dbeafe; color: #1e40af; } .s-concluido { background: #e0e7ff; color: #3730a3; }
.s-recusado, .s-cancelado { background: #fee2e2; color: #991b1b; }
.orders, .suggestions { display: grid; gap: 1rem; }
.order { display: grid; gap: .9rem; border-left: 5px solid #ddd; }
.s-border-pendente { border-left-color: var(--yellow); } .s-border-confirmado { border-left-color: var(--green); }
.s-border-enviado { border-left-color: #3b82f6; } .s-border-recusado, .s-border-cancelado { border-left-color: var(--red); opacity: .8; }
.order-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: var(--space-m); }
.order-customer p { margin: .15rem 0; font-size: .92rem; }
.order-items-box { background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: .8rem 1rem; }
.inline-money { display: inline-flex; align-items: center; gap: .3rem; font-weight: 600; }
.money { width: 110px; text-align: right; padding: .4rem .6rem; }
.free-badge { background: #e5f7ec; color: #0f6b38; font-weight: 800; font-size: .8rem; padding: .2rem .55rem; border-radius: 6px; }
.order-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; }
.spacer { flex: 1; }

/* ---------- Admin table */
.admin main { max-width: 1280px; }
.table-wrap { overflow-x: auto; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: .8rem; border-bottom: 1px solid var(--line); }
.table td { padding: .6rem .8rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr.inactive td { opacity: .5; }
.table-thumb { width: 44px; height: 54px; object-fit: contain; background: var(--soft); border-radius: 6px; }
.table-thumb.thumb-empty span { font-size: .42rem; letter-spacing: 0; padding: .15rem; border-width: 1px; }
.row-actions { white-space: nowrap; display: flex; gap: .8rem; }
.switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #ccc; border-radius: 999px; transition: .2s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::before { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--yellow); }
.image-field { display: grid; grid-template-columns: auto minmax(min(100%, 14rem), 1fr); gap: var(--space-s); align-items: center; }
.image-preview { width: 110px; height: 132px; background: var(--soft); border-radius: 10px; display: grid; place-items: center; overflow: hidden; }
.image-preview img { width: 100%; height: 100%; object-fit: contain; }
.image-inputs { display: grid; gap: .6rem; }
.suggestion { display: grid; gap: .3rem; border-left: 5px solid var(--yellow); }
.suggestion p { margin: 0; }
.suggestion select { width: auto; padding: .3rem .5rem; font-size: .85rem; }
.sg-vista { border-left-color: #93c5fd; } .sg-atendida { border-left-color: var(--green); } .sg-arquivada { border-left-color: #ccc; opacity: .65; }
.login { min-height: 100dvh; display: grid; place-items: center; padding: 1rem; background: linear-gradient(140deg, var(--navy), var(--navy-2)); }
.login-card { width: min(380px, 100%); justify-items: stretch; }
.login-card img { justify-self: center; }
.login-card h1 { text-align: center; font-size: 1.4rem; }

/* ---------- Toasts */
.toasts { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); z-index: 100; display: grid; gap: .5rem; width: min(420px, calc(100% - 2rem)); }
.toast { background: var(--navy); color: var(--on-navy); padding: .75rem 1rem; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.25); font-size: .92rem; transition: opacity .4s, transform .4s; }
.toast-err { background: #b91c1c; } .toast-warn { background: #a16207; }
.toast.out { opacity: 0; transform: translateY(8px); }

/* ---------- Tema: logo, imagem de destaque, modo escuro */
.brand img.custom-logo { width: auto; max-width: clamp(110px, 20vw, 190px); height: clamp(30px, 1.6rem + .6vw, 40px); object-fit: contain; }
.hero-img { max-height: clamp(160px, 8rem + 10vw, 280px); width: 100%; object-fit: contain; position: relative; z-index: 1; }
.dialog { background: var(--bg); }
.theme-dark .notice { background: color-mix(in srgb, var(--yellow) 14%, var(--card)); border-color: color-mix(in srgb, var(--yellow) 30%, var(--card)); color: var(--ink); }
.theme-dark .shipping-info.free { background: color-mix(in srgb, #22c55e 18%, var(--card)); color: #86efac; }
.theme-dark .icon-btn:hover { background: rgba(255,255,255,.08); }
.theme-dark .status { filter: saturate(.9); }

/* ---------- Aba Aparência */
.appearance { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.appearance-form { display: grid; gap: 1rem; min-width: 0; }
.appearance-form fieldset > * { min-width: 0; }
.appearance-form fieldset { border: 0; margin: 0; padding: 1.1rem 1.2rem; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); display: grid; gap: .8rem; }
.appearance-form legend { font-weight: 800; font-size: 1rem; padding: 0; float: left; width: 100%; margin-bottom: .2rem; }
.presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.preset { border: 2px solid var(--line); border-radius: 10px; padding: .35rem; background: var(--field); cursor: pointer; font: inherit; font-size: .75rem; color: var(--ink); display: grid; gap: .3rem; }
.preset:hover { border-color: var(--navy-2); }
.swatches { display: flex; height: 18px; border-radius: 5px; overflow: hidden; }
.swatches i { flex: 1; }
.colors-grid { display: grid; grid-template-columns: 1fr; gap: .5rem; }
.color-field { display: flex !important; align-items: center; gap: .55rem; font-weight: 600; font-size: .86rem; }
.color-field input[type=color] { width: 42px; height: 34px; padding: 2px; border-radius: 8px; cursor: pointer; flex: none; }
.color-field input[type=text] { font-family: ui-monospace, Menlo, monospace; font-size: .82rem; padding: .35rem .5rem; width: 86px; }
.color-field span { flex: 1; }
.upload-row { display: grid; grid-template-columns: 96px 1fr; gap: .9rem; align-items: center; }
.upload-preview { width: 96px; height: 64px; border-radius: 10px; background: var(--soft); display: grid; place-items: center; overflow: hidden; border: 1px dashed var(--line); }
.upload-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.upload-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.range-row { display: flex; align-items: center; gap: .8rem; }
.range-row b { min-width: 3.2rem; text-align: right; }
.range-row input { flex: 1; padding: 0; accent-color: var(--navy-2); }
.preview-pane { position: sticky; top: 80px; display: grid; gap: .6rem; }
.preview-bar { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; }
.preview-frame { width: 100%; height: calc(100dvh - 210px); min-height: 520px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.preview-frame.mobile { width: 390px; justify-self: center; }
.save-bar { position: sticky; bottom: 0; display: flex; gap: .6rem; justify-content: flex-end; padding: .8rem 0; background: linear-gradient(transparent, var(--bg) 35%); }
.dirty-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-right: .3rem; }
@media (max-width: 1000px) { .appearance { grid-template-columns: 1fr; } .preview-pane { position: static; } .preview-frame { height: 640px; } }
.field-label { font-size: .88rem; font-weight: 600; margin: 0 0 .35rem; }

/* =====================================================================
   NAVEGAÇÃO, MICROINTERAÇÕES E ACESSIBILIDADE
   ===================================================================== */
.skip-link { position: absolute; left: var(--space-s); top: -100px; z-index: 100; background: var(--yellow); color: var(--on-yellow); padding: var(--space-xs) var(--space-s); border-radius: 8px; font-weight: 700; }
.skip-link:focus { top: var(--space-s); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--yellow) 75%, var(--navy-2)); outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 1px; }

/* Cabeçalho: encolhe ao rolar e se esconde ao descer (volta ao subir) */
.topbar.scrolled { padding-block: var(--space-2xs); box-shadow: 0 6px 24px rgba(0,0,0,.18); }
html.nav-hidden .topbar { transform: translateY(-110%); }

/* Filtros fixos logo abaixo do cabeçalho */
.toolbar.sticky { position: sticky; top: calc(var(--header-h) - 1px); z-index: 20; margin-inline: calc(-1 * var(--space-xs)); padding: var(--space-xs); border-radius: 0 0 var(--radius) var(--radius);
  background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); transition: top .3s var(--ease), box-shadow .2s; }
html.nav-hidden .toolbar.sticky { top: 0; }
.toolbar.sticky.stuck { box-shadow: 0 8px 18px -12px rgba(0,0,0,.35); }
.toolbar .chips.scroll { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; mask-image: linear-gradient(90deg, #000 88%, transparent); padding-right: var(--space-m); }
.toolbar .chips.scroll::-webkit-scrollbar { display: none; }
.toolbar .chips.scroll .chip { scroll-snap-align: start; }
.result-count { font-size: var(--step--1); color: var(--muted); margin: calc(-1 * var(--space-xs)) 0 var(--space-s); min-height: 1.4em; }
.search-wrap { position: relative; flex: 1 1 14rem; display: flex; min-width: 0; }
.search-wrap input { padding-right: 2.4rem; }
.search-wrap kbd { position: absolute; right: .6rem; top: 50%; transform: translateY(-50%); font: 600 .72rem/1 ui-monospace, monospace; padding: .2rem .4rem; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); pointer-events: none; }
.search-wrap input:focus + kbd, .search-wrap input:not(:placeholder-shown) + kbd { display: none; }

/* Card: rodapé empilha quando o PRÓPRIO card fica estreito (container query) */
@container (max-width: 13rem) {
  .product-foot { flex-direction: column; align-items: stretch; gap: var(--space-2xs); }
  .product-foot .btn { width: 100%; }
}
.product:hover, .product:focus-within { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(22,33,92,.16); }
.product img.thumb { transition: transform .4s var(--ease), opacity .3s; }
.product:hover img.thumb { transform: scale(1.04); }
img.thumb[data-loading] { opacity: 0; }

/* Esqueleto enquanto carrega (sem "pulos" de layout) */
.skeleton { pointer-events: none; }
.skeleton .product-media, .skeleton .sk-line { background: linear-gradient(90deg, var(--soft) 25%, color-mix(in srgb, var(--soft) 40%, var(--card)) 50%, var(--soft) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; }
.sk-line { height: .85em; border-radius: 6px; margin-bottom: .55em; }
.sk-line.w60 { width: 60%; } .sk-line.w40 { width: 40%; } .sk-line.w80 { width: 80%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Barra de navegação inferior (celular) */
.bottom-nav { display: none; }
@media (max-width: 47.99rem) {
  :root { --bottom-nav-h: calc(62px + env(safe-area-inset-bottom)); }
  body[data-page="loja"] .topbar .nav, body[data-page="loja"] .cart-btn { display: none; }
  body[data-page="loja"] .topbar { justify-content: center; }
  .bottom-nav { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; inset: auto 0 0 0; z-index: 35; height: var(--bottom-nav-h);
    padding-bottom: env(safe-area-inset-bottom); background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(0,0,0,.08); }
  .bottom-nav a, .bottom-nav button { display: grid; place-items: center; align-content: center; gap: 2px; color: var(--muted); text-decoration: none; font: 600 var(--step--2)/1.1 var(--font); background: none; border: 0; cursor: pointer; position: relative; -webkit-tap-highlight-color: transparent; }
  .bottom-nav svg { width: 24px; height: 24px; transition: transform .2s var(--ease); }
  .bottom-nav .active { color: var(--navy-2); }
  .theme-dark .bottom-nav .active { color: var(--yellow); }
  .bottom-nav .active svg { transform: translateY(-2px); }
  .bottom-nav .active::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: currentColor; }
  .bottom-nav b { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--red); color: var(--on-red); font-size: .68rem; display: grid; place-items: center; }
  .bottom-nav b.bump { animation: bump .35s; }
  .toasts { bottom: calc(var(--bottom-nav-h) + .8rem); }
  /* Diálogos viram "folhas" que sobem de baixo — mais naturais no polegar */
  .dialog, .dialog.wide { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 20px 20px 0 0; max-height: 92dvh; padding-bottom: calc(var(--space-m) + env(safe-area-inset-bottom)); }
  .dialog[open] { animation: sheet-up .3s var(--ease); }
  .drawer { width: 100%; }
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: .4; } }

/* Botão voltar ao topo */
.to-top { position: fixed; right: var(--gutter); bottom: calc(var(--bottom-nav-h) + var(--space-m)); z-index: 25; width: 46px; height: 46px; border-radius: 50%; border: 0;
  background: var(--navy); color: var(--on-navy); box-shadow: 0 8px 20px rgba(0,0,0,.25); cursor: pointer; display: grid; place-items: center;
  opacity: 0; transform: translateY(12px) scale(.9); pointer-events: none; transition: opacity .25s, transform .25s var(--ease); }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }

/* Troca de seção suave (View Transitions) */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }
.view:not([hidden]) { animation: view-in .3s var(--ease); }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } }

/* Painel em telas pequenas */
@media (max-width: 47.99rem) {
  .admin .topbar { flex-wrap: wrap; }
  .admin .topbar .nav { order: 3; flex-basis: 100%; }
  .admin .who { margin-left: auto; }
  .table th:nth-child(3), .table td:nth-child(3) { display: none; }
}

/* Quem prefere menos movimento */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
/* reserva espaço enquanto os produtos carregam (evita o rodapé "pular") */
.grid[aria-busy="true"] { min-height: 110vh; }

/* "Só em estoque" com cara de chip, ao lado dos filtros */
.chip-check { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; }
.chip-check input { width: 1rem; height: 1rem; min-height: 0; margin: 0; accent-color: var(--navy-2); }
.chip-check:has(input:checked) { border-color: var(--navy-2); color: var(--navy-2); background: color-mix(in srgb, var(--navy-2) 8%, var(--card)); }
.theme-dark .chip-check:has(input:checked) { color: var(--yellow); border-color: var(--yellow); }
.toolbar-right select { flex: 0 1 11rem; min-width: 7.5rem; }
.toolbar-right { flex-wrap: nowrap; }
.toolbar > * { min-width: 0; }
.toolbar-right { flex: 1 1 22rem; min-width: 0; }
.search-wrap { flex: 1 1 10rem; }
.search-wrap input, .toolbar-right input[type=search] { width: 100%; min-width: 0; flex: 1 1 auto; }
.toolbar-right select { flex: 0 0 auto; width: clamp(7.5rem, 5rem + 8vw, 11rem); min-width: 0; }
html, body { overflow-x: clip; }
@media (hover: none) { .search-wrap kbd { display: none; } .search-wrap input { padding-right: var(--space-s); } }
.toolbar-right select { padding-right: 1.6rem; text-overflow: ellipsis; }
.table td:nth-child(2) small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 34ch; }
.table td:nth-child(2) { min-width: 9rem; }

/* ---------- Lupa na imagem do produto */
.zoomable { position: relative; overflow: visible; cursor: zoom-in; touch-action: none; user-select: none; -webkit-user-select: none; }
.pd-media.zoomable .pd-img { border-radius: inherit; -webkit-user-drag: none; }
.zooming { cursor: none; }
.zoom-lens { position: fixed; left: 0; top: 0; z-index: 50; width: clamp(198px, 9.9rem + 10.8vw, 324px); aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  border: 3px solid #fff; background-color: var(--card); background-repeat: no-repeat;
  box-shadow: 0 0 0 1px rgba(0,0,0,.18), 0 14px 34px rgba(0,0,0,.38), inset 0 0 18px rgba(0,0,0,.12);
  opacity: 0; transform: translate(-50%, -50%) scale(.55); transition: opacity .15s, transform .18s var(--ease); }
.zoom-lens.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.zoom-hint { position: absolute; left: 50%; bottom: .6rem; transform: translateX(-50%); white-space: nowrap; pointer-events: none;
  font-size: var(--step--2); font-weight: 600; color: #fff; background: rgba(0,0,0,.62); padding: .28rem .7rem; border-radius: 999px; transition: opacity .2s; }
.zooming .zoom-hint { opacity: 0; }

/* =====================================================================
   VITRINE: cabeçalho, barra de controle, filtros e novo card
   ===================================================================== */
.shop-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-s) var(--space-l); margin: var(--space-l) 0 var(--space-m); }
.shop-eyebrow { margin: 0 0 .15rem; font-size: var(--step--2); font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--link, var(--navy-2)); }
.shop-title { margin: 0; font-size: var(--step-3); letter-spacing: -.02em; }
.shop-search { flex: 1 1 18rem; max-width: 28rem; }
.search-ico { position: absolute; left: .85rem; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.shop-search input { padding-left: 2.6rem; border-radius: 12px; background: var(--card); }

.toolbar.shop-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--space-xs) var(--space-s); flex-wrap: nowrap; }
.bar-left { display: flex; align-items: center; gap: var(--space-xs); min-width: 0; }
.segmented { display: inline-flex; gap: 2px; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.segmented::-webkit-scrollbar { display: none; }
.seg { border: 0; background: none; color: var(--muted); font: 700 var(--step--1)/1 var(--font); padding: .55rem .9rem; border-radius: 8px; white-space: nowrap; cursor: pointer; min-height: 36px; transition: background .2s, color .2s; }
.seg:hover { color: var(--ink); }
.seg.active { background: var(--navy); color: var(--on-navy); box-shadow: 0 2px 8px color-mix(in srgb, var(--navy) 35%, transparent); }
.filter-btn { display: inline-flex; align-items: center; gap: .45rem; flex: none; min-height: 46px; padding: .5rem .95rem; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: 700 var(--step--1)/1 var(--font); cursor: pointer; transition: border-color .2s; }
.filter-btn svg { width: 18px; height: 18px; color: var(--link, var(--navy-2)); }
.filter-btn:hover, .filter-btn.on { border-color: var(--navy-2); }
.filter-btn b { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--red); color: var(--on-red); font-size: .72rem; display: grid; place-items: center; }
.shop-bar .result-count { margin: 0; text-align: center; white-space: nowrap; }
.shop-bar .result-count b { color: var(--ink); }
.sort-wrap { justify-self: end; display: inline-flex; align-items: center; gap: .55rem; font-size: var(--step--1); color: var(--muted); white-space: nowrap; }
.sort-wrap select { width: auto; min-width: 10.5rem; border-radius: 12px; background: var(--card); font-weight: 600; }
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin: 0 0 var(--space-s); }
.a-pill { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .75rem; border: 1px solid var(--navy-2); border-radius: 999px; background: color-mix(in srgb, var(--navy-2) 9%, var(--card)); color: var(--link, var(--navy-2)); font: 600 var(--step--1)/1.2 var(--font); cursor: pointer; }
.a-pill span { font-size: .7rem; opacity: .7; }
.a-pill:hover span { opacity: 1; }
@media (max-width: 47.99rem) {
  .toolbar.shop-bar { grid-template-columns: 1fr auto; }
  .bar-left { grid-column: 1 / -1; }
  .segmented { flex: 1; }
  .seg { flex: 1; padding-inline: .6rem; }
  .shop-bar .result-count { text-align: left; }
  .sort-wrap span { display: none; }
  .sort-wrap select { min-width: 0; width: 9.5rem; min-height: 40px; }
  .shop-search { max-width: none; }
}

/* Janela de filtros */
.filter-dialog { width: min(600px, 100% - 1.5rem); }
.filter-dialog .dialog-head h2 { display: flex; align-items: center; gap: .5rem; font-size: var(--step-1); }
.filter-dialog .dialog-head h2 svg { color: var(--link, var(--navy-2)); }
.filter-body { display: grid; gap: var(--space-m); margin: var(--space-s) 0 var(--space-m); }
.f-group { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: .6rem; }
.f-group legend { padding: 0; margin-bottom: .55rem; font-size: var(--step--2); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.f-chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.f-chip { display: inline-flex; align-items: center; gap: .4rem; min-height: 38px; padding: .4rem .85rem; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); font: 600 var(--step--1)/1.1 var(--font); cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.f-chip:hover { border-color: var(--navy-2); }
.f-chip .f-pre { font-size: .64rem; font-weight: 800; opacity: .7; }
.f-chip .f-n { font-size: .72rem; font-weight: 600; color: var(--muted); }
.f-chip.on { background: var(--navy); border-color: var(--navy); color: var(--on-navy); }
.f-chip.on .f-n { color: inherit; opacity: .75; }
.f-range-sum { margin: 0; font-weight: 700; color: var(--link, var(--navy-2)); }
.range2 { position: relative; height: 30px; }
.range2-track { position: absolute; left: 11px; right: 11px; top: 50%; height: 6px; transform: translateY(-50%); border-radius: 99px; background: var(--line); }
.range2-track i { position: absolute; top: 0; bottom: 0; border-radius: inherit; background: var(--navy-2); }
.range2 input[type=range] { position: absolute; inset: 0; width: 100%; height: 30px; min-height: 0; margin: 0; padding: 0; border: 0; background: none; outline: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.range2 input[type=range]::-webkit-slider-runnable-track { background: none; }
.range2 input[type=range]::-moz-range-track { background: none; }
.range2 input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid var(--navy-2); box-shadow: 0 2px 6px rgba(0,0,0,.25); cursor: grab; }
.range2 input[type=range]::-moz-range-thumb { pointer-events: auto; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--navy-2); box-shadow: 0 2px 6px rgba(0,0,0,.25); cursor: grab; }
.range2 input[type=range]:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--yellow); outline-offset: 2px; }
.f-range-labels { display: flex; justify-content: space-between; font-size: var(--step--1); color: var(--muted); }
.f-range-labels b { color: var(--ink); }
.f-switch { display: flex; align-items: center; gap: .7rem; font-size: var(--step--1); font-weight: 600; cursor: pointer; }
.f-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.f-switch-ui { position: relative; flex: none; width: 44px; height: 26px; border-radius: 99px; background: var(--line); transition: background .2s; }
.f-switch-ui::before { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s var(--ease); }
.f-switch input:checked + .f-switch-ui { background: var(--green); }
.f-switch input:checked + .f-switch-ui::before { transform: translateX(18px); }
.f-switch input:focus-visible + .f-switch-ui { outline: 3px solid var(--yellow); outline-offset: 2px; }
.filter-dialog .dialog-actions { justify-content: space-between; }

/* Novo card de produto */
.product-media { aspect-ratio: 63 / 88; }
.product .thumb { padding: 5%; }
.tag.star { top: .6rem; bottom: auto; left: auto; right: .6rem; padding: .22rem .45rem; }
.pill-badge { position: absolute; bottom: .55rem; display: inline-flex; align-items: center; gap: .3rem; padding: .32rem .5rem; border-radius: 8px; font: 800 clamp(.62rem, .5rem + 1.6cqi, .74rem)/1 var(--font); letter-spacing: .02em; color: #fff; background: rgba(14, 17, 30, .78); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.pill-badge.lang { left: .55rem; }
.pill-badge.lang small { font-size: .82em; opacity: .7; }
.pill-badge.cond { right: .55rem; }
.product-body h3 .num { color: var(--muted); font-weight: 500; font-size: .86em; }
.product-body .detail { -webkit-line-clamp: 1; min-height: 1.3em; margin-bottom: .35rem; }
.price-row { margin-top: auto; display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.price-row .price { font-weight: 800; }
.units { font-size: var(--step--2); font-weight: 600; color: var(--muted); }
.units.low { color: var(--red); }
.btn.buy { width: 100%; margin-top: .65rem; min-height: 42px; }
.filter-dialog .dialog-actions { position: sticky; z-index: 2; bottom: calc(-1 * var(--space-m)); margin: 0 calc(-1 * var(--space-m)) calc(-1 * var(--space-m)); padding: var(--space-s) var(--space-m); background: var(--bg); border-top: 1px solid var(--line); }
@media (max-width: 47.99rem) {
  .filter-dialog .dialog-actions { bottom: calc(-1 * (var(--space-m) + env(safe-area-inset-bottom))); margin-bottom: calc(-1 * (var(--space-m) + env(safe-area-inset-bottom))); padding-bottom: calc(var(--space-s) + env(safe-area-inset-bottom)); }
  .filter-dialog .dialog-actions .btn { flex: 1; }
}

/* =====================================================================
   FOTOS REAIS DA CARTA
   ===================================================================== */
.cam-ico { width: 1.05em; height: 1.05em; flex: none; }
.badges-right { position: absolute; right: .55rem; bottom: .55rem; display: inline-flex; gap: .3rem; }
.badges-right .pill-badge { position: static; }
.pill-badge.cam { padding: .3rem .4rem; color: #7dd3fc; }

.specs dd { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.cam-btn { position: relative; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--navy-2); background: color-mix(in srgb, var(--navy-2) 10%, var(--card)); color: var(--link, var(--navy-2)); cursor: pointer; transition: transform .15s, background .15s; }
.cam-btn .cam-ico { width: 16px; height: 16px; }
.cam-btn:hover { transform: scale(1.08); background: color-mix(in srgb, var(--navy-2) 18%, var(--card)); }
.cam-btn::after { content: attr(data-tip); position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(-50%) translateY(-4px); white-space: nowrap; padding: .4rem .65rem; border-radius: 6px; background: #fff; color: #1b1d29; font: 500 .8rem/1 var(--font); box-shadow: 0 6px 18px rgba(0,0,0,.25); opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; z-index: 3; }
.cam-btn:hover::after, .cam-btn:focus-visible::after { opacity: 1; transform: translateX(-50%) translateY(0); }
.photos-link { display: inline-flex; align-items: center; gap: .4rem; width: fit-content; margin: 0 0 .4rem; padding: .45rem .8rem; border: 1px dashed var(--navy-2); border-radius: 10px; background: none; color: var(--link, var(--navy-2)); font: 700 var(--step--1)/1.1 var(--font); cursor: pointer; }
.photos-link:hover { background: color-mix(in srgb, var(--navy-2) 8%, transparent); }

/* Visualizador */
.photo-dialog { width: min(600px, 100% - 1.5rem); display: none; }
.photo-dialog[open] { display: grid; gap: .75rem; }
.photo-dialog .dialog-head h2 { font-size: var(--step-1); margin: 0; }
.photo-dialog .dialog-head .num { color: var(--muted); font-weight: 500; font-size: .85em; }
.pv-info { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.pv-info .price { font-size: var(--step-2); font-weight: 800; }
.pv-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.pv-tag { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .6rem; border: 1px solid var(--line); border-radius: 8px; background: var(--card); font-size: var(--step--1); font-weight: 600; }
.pv-tag small { font-size: .7em; font-weight: 800; opacity: .7; }
.pv-tag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.pv-stage { position: relative; border-radius: var(--radius); background: #0d0f17; display: grid; place-items: center; min-height: 240px; }
.pv-img { width: 100%; height: min(62dvh, 640px); object-fit: contain; border-radius: inherit; -webkit-user-drag: none; user-select: none; }
.pv-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); color: #111; font-size: 1.7rem; line-height: 1; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.35); display: grid; place-items: center; padding-bottom: 3px; }
.pv-nav.prev { left: .6rem; } .pv-nav.next { right: .6rem; }
.pv-nav:hover { background: #fff; }
.pv-counter { position: absolute; top: .6rem; right: .6rem; z-index: 2; padding: .25rem .55rem; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; font-size: .75rem; font-weight: 700; }
.pv-stage .zoom-hint { bottom: .7rem; }
.pv-thumbs { display: flex; gap: .45rem; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
.pv-thumb { flex: none; width: 58px; height: 58px; padding: 0; border-radius: 8px; border: 2px solid transparent; overflow: hidden; background: var(--soft); cursor: pointer; opacity: .65; transition: opacity .15s, border-color .15s; }
.pv-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pv-thumb.on, .pv-thumb:hover { opacity: 1; border-color: var(--navy-2); }
.pv-note { margin: 0; font-size: var(--step--2); color: var(--muted); }

/* Painel: fotos reais no cadastro */
.photos-field { display: grid; gap: .6rem; padding: .8rem; border: 1px dashed var(--line); border-radius: 12px; }
.photos-head { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.photos-head .field-label { margin-bottom: .15rem; }
.photos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: .5rem; }
.photos-grid:empty { display: none; }
.photo-thumb { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--soft); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-first { position: absolute; left: 4px; top: 4px; padding: .1rem .35rem; border-radius: 5px; background: var(--navy); color: var(--on-navy); font-size: .62rem; font-weight: 800; text-transform: uppercase; }
.photo-actions { position: absolute; right: 4px; top: 4px; display: flex; gap: 3px; }
.photo-actions button { width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; font-size: .8rem; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.photo-actions button.del:hover { background: #dc2626; }

/* Acesso discreto ao painel (cadeado no canto do rodapé) */
.footer { position: relative; }
.admin-link { position: absolute; right: var(--gutter); bottom: var(--space-s); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--muted); opacity: .18; transition: opacity .2s, background .2s; }
.admin-link:hover, .admin-link:focus-visible { opacity: 1; background: color-mix(in srgb, var(--muted) 14%, transparent); }

/* =====================================================================
   CHECKOUT SIMPLIFICADO
   ===================================================================== */
.checkout-dialog { width: min(480px, 100% - 1.5rem); }
.checkout-dialog form { gap: var(--space-s); }
.co-summary { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem .85rem; display: grid; gap: .55rem; }
.co-items { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; max-height: 9.5rem; overflow-y: auto; }
.co-items li { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: .6rem; font-size: var(--step--1); }
.co-thumb { width: 34px; height: 46px; object-fit: contain; border-radius: 5px; background: var(--soft); }
.co-thumb.thumb-empty span { display: none; }
.co-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.co-totals { border-top: 1px dashed var(--line); padding-top: .5rem; display: grid; gap: .2rem; font-size: var(--step--1); }
.co-totals > div { display: flex; justify-content: space-between; align-items: baseline; }
.co-total { font-size: var(--step-0); }
.co-total strong { font-size: var(--step-1); }
.co-total small { font-weight: 500; color: var(--muted); font-size: .75em; }
.co-free { color: var(--green); font-weight: 800; }
.theme-dark .co-free { color: #86efac; }
.co-fields { display: grid; gap: .7rem; }
.co-row { display: grid; grid-template-columns: 1.3fr 1fr; gap: .7rem; }
.co-manual .co-row { grid-template-columns: 1fr 1fr 4.2rem; }
.co-manual { display: grid; gap: .7rem; padding: .7rem; border-radius: 12px; background: var(--soft); }
.co-uf input { text-transform: uppercase; text-align: center; padding-inline: .3rem; }
.co-nocep { justify-self: start; margin-top: -.35rem; font-size: var(--step--2); color: var(--muted); }
.co-address { display: flex; align-items: center; gap: .5rem; padding: .6rem .75rem; border-radius: 12px; background: color-mix(in srgb, var(--green) 9%, var(--card)); border: 1px solid color-mix(in srgb, var(--green) 30%, var(--line)); font-size: var(--step--1); }
.co-addr-text { flex: 1; min-width: 0; }
.co-free-tag { display: inline-block; margin-left: .4rem; padding: .1rem .45rem; border-radius: 999px; background: var(--green); color: #fff; font-size: .7rem; font-weight: 800; vertical-align: middle; }
.co-warn { color: #a16207; font-weight: 600; }
.theme-dark .co-warn { color: #fcd34d; }
.co-extras { display: flex; flex-wrap: wrap; gap: .4rem .9rem; }
.co-more { border: 0; background: none; padding: .2rem 0; color: var(--link, var(--navy-2)); font: 600 var(--step--1)/1.2 var(--font); cursor: pointer; }
.co-more:hover { text-decoration: underline; }
.co-submit { min-height: 52px; font-size: var(--step-1); }
.co-foot { margin: -.2rem 0 0; text-align: center; font-size: var(--step--2); color: var(--muted); }
.checkout-dialog input.invalid, .checkout-dialog textarea.invalid { border-color: #dc2626; background: color-mix(in srgb, #dc2626 6%, var(--field)); }
@media (max-width: 47.99rem) {
  .co-manual .co-row { grid-template-columns: 1fr 1fr; }
  .co-manual .co-uf { grid-column: span 2; }
}

/* Retirar em mãos */
.co-delivery { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.co-opt { position: relative; cursor: pointer; }
.co-opt input { position: absolute; opacity: 0; pointer-events: none; }
.co-opt span { display: grid; gap: .15rem; height: 100%; padding: .65rem .75rem; border: 2px solid var(--line); border-radius: 12px; background: var(--card); transition: border-color .15s, background .15s; }
.co-opt b { font-size: var(--step--1); }
.co-opt small { font-size: var(--step--2); color: var(--muted); }
.co-opt input:checked + span { border-color: var(--navy-2); background: color-mix(in srgb, var(--navy-2) 8%, var(--card)); }
.co-opt input:focus-visible + span { outline: 3px solid var(--yellow); outline-offset: 2px; }
.co-ship { display: grid; gap: .7rem; }
.co-pickup-info { margin: 0; padding: .6rem .75rem; border-radius: 12px; background: color-mix(in srgb, var(--navy-2) 8%, var(--card)); font-size: var(--step--1); }
.pickup-tag { font-weight: 700; color: var(--link, var(--navy-2)); }

/* Botão do WhatsApp contornado */
.btn.whatsapp-outline { background: transparent; color: #128c4a; border: 2px solid #25d366; min-height: 48px; }
.btn.whatsapp-outline:hover { background: color-mix(in srgb, #25d366 10%, transparent); }
.theme-dark .btn.whatsapp-outline { color: #4ade80; }
.btn.whatsapp svg, .btn.whatsapp-outline svg { flex: none; }

/* Tela de pedido solicitado: como consultar */
.done-help { width: 100%; text-align: left; padding: .8rem 1rem; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.done-help-title { margin: 0 0 .4rem; font-weight: 800; }
.done-help ol { margin: 0 0 .4rem; padding-left: 1.2rem; display: grid; gap: .35rem; font-size: var(--step--1); }
.code-copy { border: 0; cursor: pointer; font-size: .95rem; padding: .1rem .45rem; vertical-align: middle; }

/* =====================================================================
   PROMOÇÕES / DESCONTO
   ===================================================================== */
.off-ribbon { position: absolute; top: 0; right: 0; z-index: 2; padding: .42rem .7rem .42rem .8rem; border-radius: 0 var(--radius) 0 14px;
  background: var(--red); color: var(--on-red); font: 900 clamp(.78rem, .6rem + 2.4cqi, 1rem)/1 var(--font); letter-spacing: .01em; box-shadow: -2px 3px 10px rgba(0,0,0,.18); }
.has-off .tag.star { top: 2.5rem; }
.price-col { display: grid; justify-items: end; line-height: 1.1; }
.old-price { color: var(--muted); font-size: clamp(.72rem, .6rem + 1.8cqi, .85rem); font-weight: 500; }
.price.sale { color: var(--red); }
.pd-old { display: flex; align-items: center; gap: .5rem; margin: .5rem 0 -.4rem; color: var(--muted); font-size: var(--step-0); }
.off-chip { display: inline-block; padding: .12rem .45rem; border-radius: 6px; background: var(--red); color: var(--on-red); font-size: .75rem; font-weight: 900; text-decoration: none; }
.pv-info .old-price { font-size: var(--step--1); }
/* painel */
.promo-field { display: grid; gap: .55rem; padding: .7rem .8rem; border: 1px dashed var(--line); border-radius: 12px; }
.promo-grid { display: grid; grid-template-columns: 1fr 8rem; gap: .6rem .8rem; align-items: end; }
.promo-preview { grid-column: 1 / -1; margin: 0; font-size: var(--step--1); }
.promo-preview s { color: var(--muted); }
.promo-err { color: #dc2626; font-weight: 600; }

/* =====================================================================
   RODAPÉ
   ===================================================================== */
.site-footer { text-align: left; padding: 0; margin-top: var(--space-l); background: var(--navy); color: var(--on-navy); border-top: 0; }
.site-footer a { color: inherit; }
.sf-inner { width: min(var(--container), 100% - 2 * var(--gutter)); margin-inline: auto; padding: var(--space-xl) 0 var(--space-l);
  display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr)); gap: var(--space-l); }
.sf-logo { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; font-weight: 800; font-size: var(--step-1); }
.sf-logo img { height: 40px; width: auto; max-width: 200px; object-fit: contain; }
.sf-about { margin: .8rem 0 1rem; max-width: 46ch; opacity: .8; font-size: var(--step--1); line-height: 1.6; }
.sf-social { display: flex; gap: .55rem; }
.sf-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: color-mix(in srgb, var(--on-navy) 10%, transparent); transition: background .2s, transform .2s; }
.sf-ico svg { width: 20px; height: 20px; }
.sf-ico:hover { background: var(--yellow); color: var(--on-yellow); transform: translateY(-2px); }
.sf-col { display: grid; align-content: start; gap: .55rem; }
.sf-col h3 { margin: 0 0 .3rem; font-size: var(--step--1); letter-spacing: .14em; text-transform: uppercase; color: var(--yellow); }
.sf-col > a { text-decoration: none; opacity: .82; width: fit-content; font-size: var(--step--1); }
.sf-col > a:hover { opacity: 1; text-decoration: underline; }
.sf-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.sf-contact a { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; opacity: .88; font-size: var(--step--1); word-break: break-all; }
.sf-contact a:hover { opacity: 1; text-decoration: underline; }
.sf-contact svg { width: 18px; height: 18px; flex: none; opacity: .9; }
.sf-bottom { position: relative; border-top: 1px solid color-mix(in srgb, var(--on-navy) 14%, transparent); text-align: center; padding: var(--space-m) var(--gutter); font-size: var(--step--2); }
.sf-bottom p { margin: .15rem 0; opacity: .7; }
.site-footer .admin-link { color: inherit; bottom: var(--space-s); }
.site-footer .admin-link:hover { background: color-mix(in srgb, var(--on-navy) 14%, transparent); }
@media (max-width: 47.99rem) {
  .sf-inner { grid-template-columns: 1fr; text-align: center; justify-items: center; gap: var(--space-l); }
  .sf-about { margin-inline: auto; }
  .sf-social, .sf-col { justify-items: center; justify-content: center; }
  .sf-col > a { justify-self: center; }
  .site-footer .admin-link { right: .6rem; }
}

/* cadeado do painel: ao lado do "Todos os direitos reservados" */
.site-footer .admin-link { position: static; display: inline-grid; vertical-align: middle; width: 26px; height: 26px; margin-right: .15rem; opacity: .45; }
.site-footer .admin-link svg { width: 14px; height: 14px; }
.site-footer .admin-link:hover, .site-footer .admin-link:focus-visible { opacity: 1; }
.sf-bottom .sf-copy { opacity: 1; }
.sf-bottom .sf-copy > span, .sf-bottom .sf-copy { color: color-mix(in srgb, var(--on-navy) 75%, transparent); }

/* ---------- Instalar como app (aviso discreto acima da barra inferior) */
.app-banner { position: fixed; z-index: 30; left: 50%; bottom: calc(var(--bottom-nav-h) + var(--space-s)); transform: translateX(-50%);
  width: min(460px, calc(100% - 2 * var(--gutter))); display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: .7rem;
  padding: .7rem .6rem .7rem .7rem; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px);
  box-shadow: 0 10px 30px rgba(0,0,0,.18); animation: app-banner-in .35s var(--ease); }
.app-banner img { width: 44px; height: 44px; border-radius: 11px; }
.app-banner div { display: grid; gap: .1rem; min-width: 0; line-height: 1.3; }
.app-banner strong { font-size: var(--step--1); }
.app-banner small { color: var(--muted); font-size: var(--step--2); }
.app-banner .ios-share { width: 1.15em; height: 1.15em; vertical-align: -.2em; color: #0a84ff; }
@keyframes app-banner-in { from { opacity: 0; transform: translate(-50%, 12px); } }
@media (prefers-reduced-motion: reduce) { .app-banner { animation: none; } }
/* no app instalado (sem barra do navegador) o rodapé respeita a borda inferior do iPhone */
@media (display-mode: standalone) { .site-footer { padding-bottom: env(safe-area-inset-bottom); } }
