/* AVELTRIM_LOJA_20261124_V1 — Loja Aveltrim (vitrine, comprador e administração). */
:root {
  --green: #279a34; --green-dark: #1d7a28; --green-soft: #e8f5ea; --ink: #121a1d; --ink-2: #3b4a50; --muted: #6b7a80;
  --line: #e2e8e5; --bg: #f5f7f6; --card: #fff; --warn: #b26a00; --warn-soft: #fff4e0; --danger: #b3261e; --danger-soft: #fdecea;
  --info: #1f5fa8; --info-soft: #e8f0fb; --radius: 14px; --shadow: 0 1px 2px rgba(18,26,29,.06), 0 6px 24px rgba(18,26,29,.06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--green-dark); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.announce { background: var(--ink); color: #fff; font-size: 13px; text-align: center; padding: 7px 12px; }
.announce a { color: #b9f0c0; }
.announce span + span::before { content: "•"; margin: 0 10px; opacity: .5; }
header.top { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
header.top .wrap { display: flex; align-items: center; gap: 18px; height: 64px; }
header.top .logo img { height: 34px; width: auto; }
header.top nav { display: flex; gap: 6px; margin-left: auto; align-items: center; }
header.top nav a { text-decoration: none; color: var(--ink-2); padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: 14px; }
header.top nav a:hover, header.top nav a.on { background: var(--green-soft); color: var(--green-dark); }
.cart-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--green); color: #fff; font-size: 12px; margin-left: 4px; }
main { min-height: 70vh; padding: 24px 0 60px; }
footer.bottom { background: var(--ink); color: #c7d0d3; font-size: 13px; padding: 28px 0; }
footer.bottom a { color: #fff; }
footer.bottom .wrap { display: flex; flex-wrap: wrap; gap: 16px 40px; justify-content: space-between; }
h1 { font-size: 28px; line-height: 1.2; margin: 0 0 12px; letter-spacing: -.01em; }
h2 { font-size: 21px; margin: 28px 0 12px; }
h3 { font-size: 16px; margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.grid { display: grid; gap: 18px; }
.cols-2 { grid-template-columns: 1fr 1fr; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-side { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
@media (max-width: 900px) { .cols-2, .cols-3, .cols-side { grid-template-columns: 1fr; } header.top .wrap { height: auto; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; gap: 8px; } header.top nav { margin-left: 0; width: 100%; overflow-x: auto; } header.top nav a { padding: 6px 9px; font-size: 13px; white-space: nowrap; } }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; background: var(--green); color: #fff; font-weight: 700;
  padding: 11px 18px; border-radius: 11px; cursor: pointer; text-decoration: none; font-size: 15px; transition: background .15s; }
.btn:hover { background: var(--green-dark); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--bg); }
.btn.danger { background: #fff; color: var(--danger); border-color: #f1c7c3; }
.btn.small { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.btn.block { width: 100%; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 0 0 5px; }
.field { margin-bottom: 14px; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=date], input[type=datetime-local], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #cfd8d4; border-radius: 10px; background: #fff; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(39,154,52,.15); }
textarea { min-height: 90px; resize: vertical; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; font-size: 14px; color: var(--ink); }
.check input { margin-top: 3px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--bg); color: var(--ink-2); white-space: nowrap; }
.badge.green { background: var(--green-soft); color: var(--green-dark); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--info-soft); color: var(--info); }
.notice { padding: 12px 14px; border-radius: 11px; background: var(--info-soft); color: #173f70; font-size: 14px; margin: 0 0 14px; }
.notice.warn { background: var(--warn-soft); color: #6d4300; }
.notice.ok { background: var(--green-soft); color: #145a1c; }
.notice.err { background: var(--danger-soft); color: #7a1a14; }
.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; margin-bottom: 26px; }
.banner { position: relative; border-radius: 18px; overflow: hidden; min-height: 240px; background: linear-gradient(120deg, #121a1d 0%, #1d3a24 60%, #279a34 130%); color: #fff;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 28px; text-decoration: none; }
.banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.banner > * { position: relative; }
.banner h2 { margin: 0 0 6px; font-size: 26px; }
.banner p { margin: 0; opacity: .9; }
.hero-side { display: grid; gap: 18px; }
.hero-side .banner { min-height: 111px; padding: 18px; }
.hero-side .banner h2 { font-size: 18px; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; } }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip { border: 1px solid var(--line); background: #fff; padding: 7px 14px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 14px; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.product { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: box-shadow .15s, transform .15s; }
.product:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.product .ph { aspect-ratio: 4/3; background: #eef2f0; display: grid; place-items: center; overflow: hidden; }
.product .ph img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.product .ph .noimg { font-size: 44px; opacity: .3; }
.product .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product .name { font-weight: 700; font-size: 16px; line-height: 1.3; }
.product .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.price { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.price-old { text-decoration: line-through; color: var(--muted); font-size: 14px; font-weight: 500; margin-right: 6px; }
.inst { font-size: 13px; color: var(--green-dark); font-weight: 600; }
.gallery { display: grid; gap: 10px; }
.gallery .main { aspect-ratio: 4/3; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); display: grid; place-items: center; overflow: hidden; }
.gallery .main img { width: 100%; height: 100%; object-fit: contain; padding: 16px; }
.gallery .thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.gallery .thumbs img { width: 70px; height: 56px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; padding: 4px; }
table.specs, table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.specs td { padding: 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.specs td:first-child { color: var(--muted); width: 42%; padding-right: 12px; }
table.list th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); font-weight: 700; }
table.list td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list tr.click { cursor: pointer; }
table.list tr.click:hover td { background: #fafcfb; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.totals div { display: flex; justify-content: space-between; padding: 5px 0; font-size: 14px; }
.totals .total { font-size: 18px; font-weight: 800; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }
.qty { display: inline-flex; border: 1px solid #cfd8d4; border-radius: 10px; overflow: hidden; }
.qty button { border: 0; background: #fff; width: 34px; cursor: pointer; font-size: 17px; }
.qty input { width: 46px; border: 0; text-align: center; padding: 8px 0; border-radius: 0; }
.option { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; cursor: pointer; background: #fff; }
.option.on { border-color: var(--green); background: #f6fbf6; }
.option input { margin-top: 4px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 22px; font-size: 14px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.timeline li::after { content: ""; position: absolute; left: 8px; top: 18px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.qr { display: grid; justify-items: center; gap: 10px; text-align: center; }
.qr img { width: 240px; height: 240px; }
.copy { display: flex; gap: 6px; width: 100%; }
.copy input { font-size: 12px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.tabs button { border: 0; background: none; padding: 10px 14px; font-weight: 700; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.tabs button.on { color: var(--green-dark); border-color: var(--green); }
.price-plan { font-size: 40px; font-weight: 800; letter-spacing: -.02em; }
.price-plan small { font-size: 16px; font-weight: 600; color: var(--muted); }
ul.ticks { list-style: none; padding: 0; margin: 0; }
ul.ticks li { padding: 5px 0 5px 26px; position: relative; }
ul.ticks li::before { content: "✓"; position: absolute; left: 4px; color: var(--green); font-weight: 800; }
ul.ticks li.no::before { content: "×"; color: var(--danger); }
.stat { font-size: 26px; font-weight: 800; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpis .card { padding: 14px 16px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 11px; z-index: 50; box-shadow: var(--shadow); max-width: 90vw; }
.toast.err { background: var(--danger); }
.spinner { width: 22px; height: 22px; border: 3px solid var(--green-soft); border-top-color: var(--green); border-radius: 50%; animation: spin 1s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.swatch { width: 44px; height: 38px; padding: 2px; border: 1px solid #cfd8d4; border-radius: 9px; background: #fff; }
dialog { border: 0; border-radius: 16px; padding: 0; max-width: 680px; width: calc(100% - 32px); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(18,26,29,.45); }
dialog .dlg-head { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
dialog .dlg-head h3 { margin: 0; flex: 1; }
dialog .dlg-body { padding: 20px; max-height: 70vh; overflow: auto; }
dialog .dlg-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }
.admin-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
.admin-nav { background: var(--ink); color: #c7d0d3; padding: 18px 12px; }
.admin-nav img { height: 30px; margin: 4px 8px 18px; }
.admin-nav button { display: block; width: 100%; text-align: left; background: none; border: 0; color: #c7d0d3; padding: 9px 12px; border-radius: 9px; cursor: pointer; font-weight: 600; }
.admin-nav button.on, .admin-nav button:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-nav .who { font-size: 12px; padding: 18px 12px 0; border-top: 1px solid rgba(255,255,255,.1); margin-top: 18px; }
.admin-main { padding: 26px 28px 60px; }
@media (max-width: 800px) { .admin-layout { grid-template-columns: 1fr; } .admin-nav { display: flex; flex-wrap: wrap; gap: 4px; } .admin-nav button { width: auto; } .admin-nav img, .admin-nav .who { display: none; } .admin-main { padding: 18px 14px; } }
