/* Loja virtual Mídia Mix.
   Sem framework e sem CDN: a vitrine precisa abrir rápido em 3G e o servidor
   não depende de recurso externo para renderizar. */
:root {
  --brand: #0b8a44;
  --brand-dark: #076032;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --ok: #059669;
  --warn: #d97706;
  --shadow: 0 1px 2px rgba(15,23,42,.06), 0 12px 32px -18px rgba(15,23,42,.35);
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
img { max-width: 100%; }

/* --------------------------------------------------------------- header */
.header {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 24px;
  padding: 14px clamp(16px, 5vw, 56px);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo-mark {
  display: grid; place-items: center; width: 36px; height: 36px;
  background: var(--brand); color: #fff; border-radius: 10px;
  font-weight: 800; font-size: 14px; letter-spacing: .5px;
}
.logo img { display: block; border-radius: 9px; }
.logo-text { font-weight: 800; font-size: 18px; letter-spacing: -.02em; line-height: 1.05; }
.logo-text b { color: var(--brand); }
.logo-text small { display: block; font-size: 9.5px; font-weight: 600; letter-spacing: .06em;
                   text-transform: uppercase; color: var(--muted); }
.menu { display: flex; gap: 22px; flex: 1; }
.menu a {
  text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 500;
  padding: 4px 0; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s;
}
.menu a:hover { color: var(--ink); border-color: var(--brand); }
.btn-header {
  padding: 9px 18px; border-radius: 999px;
  background: var(--brand); color: #fff; text-decoration: none;
  font-size: 14px; font-weight: 600; white-space: nowrap;
}
.btn-header:hover { background: var(--brand-dark); }

/* ----------------------------------------------------------------- hero */
.hero {
  padding: clamp(56px, 9vw, 110px) clamp(16px, 5vw, 56px);
  background:
    radial-gradient(1000px 480px at 78% -8%, rgba(29,78,216,.16), transparent 60%),
    linear-gradient(180deg, #fff, var(--bg-alt));
  border-bottom: 1px solid var(--line);
}
.hero-inner { max-width: 1120px; margin: 0 auto; }
.eyebrow {
  display: inline-block; margin-bottom: 16px;
  padding: 5px 14px; border-radius: 999px;
  background: #dbeafe; color: #1e40af;
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(32px, 5.4vw, 58px);
  line-height: 1.1; letter-spacing: -.03em; font-weight: 800;
  margin-bottom: 20px;
}
.hero-lead { font-size: clamp(16px, 2vw, 19px); color: #334155; max-width: 60ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 30px 0 44px; }

.btn {
  display: inline-block; padding: 13px 26px; border-radius: 10px;
  text-decoration: none; font-weight: 600; font-size: 15px;
  transition: transform .12s, background .15s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px -10px rgba(29,78,216,.9); }
.btn.primary:hover { background: var(--brand-dark); }
.btn.outline { border: 1px solid var(--line); background: #fff; color: var(--ink); }
.btn.outline:hover { border-color: var(--brand); color: var(--brand); }
.btn.whats { background: #25d366; color: #06331b; box-shadow: 0 8px 20px -10px rgba(37,211,102,.9); }
.btn.whats:hover { background: #1eb955; }

.hero-stats { display: flex; gap: clamp(24px, 5vw, 64px); flex-wrap: wrap; }
.hero-stats dt { font-size: clamp(22px, 3vw, 30px); font-weight: 800; letter-spacing: -.02em; }
.hero-stats dd { font-size: 13px; color: var(--muted); }

/* -------------------------------------------------------------- seções */
.section { padding: clamp(52px, 8vw, 96px) clamp(16px, 5vw, 56px); }
.section.alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section-head { max-width: 1120px; margin: 0 auto 36px; }
.section-head h2 {
  font-size: clamp(26px, 3.6vw, 38px); font-weight: 800;
  letter-spacing: -.02em; margin-bottom: 10px;
}
.section-head p { color: var(--muted); max-width: 62ch; }

/* ------------------------------------------------------------- filtros */
.filters { max-width: 1120px; margin: 0 auto 26px; }
#search {
  width: 100%; padding: 15px 18px; font: inherit;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
#search:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: transparent; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.chip {
  padding: 7px 15px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: #334155;
  font: inherit; font-size: 14px; font-weight: 500;
  transition: background .15s, color .15s, border-color .15s;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }

.filters-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-top: 16px;
}
.result-count { font-size: 14px; color: var(--muted); }
.sort { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.sort select {
  font: inherit; font-size: 14px; padding: 7px 10px;
  border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink);
}

/* ------------------------------------------------------------- vitrine */
.grid {
  max-width: 1120px; margin: 0 auto;
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
}
.card {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; overflow: hidden; cursor: pointer;
  transition: transform .16s, box-shadow .16s, border-color .16s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #cbd5e1; }

/* Todas as imagens ocupam a mesma caixa 4:3 com `contain`: os cards ficam com
   a mesma altura independentemente da proporção da arte ou da foto que a loja
   subir depois. */
.thumb {
  aspect-ratio: 4 / 3; width: 100%;
  display: grid; place-items: center; overflow: hidden;
  background: #fff; border-bottom: 1px solid var(--line);
}
.thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.thumb-fallback { font-size: 48px; line-height: 1; }
.modal-thumb { aspect-ratio: 16 / 9; background: #fff; border-bottom: 1px solid var(--line); }
.modal-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }

.btn-add {
  margin-top: 12px; width: 100%; padding: 10px;
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--brand); border-radius: 9px;
  background: #fff; color: var(--brand);
  transition: background .15s, color .15s;
}
.btn-add:hover { background: var(--brand); color: #fff; }
.btn-add.added { background: var(--brand); color: #fff; }
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-brand { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); }
.card-name { font-size: 15px; font-weight: 600; line-height: 1.35; }
.card-foot { margin-top: auto; padding-top: 12px; display: flex; align-items: end; justify-content: space-between; gap: 8px; }
.price { font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.price small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: 0; }

.badge {
  padding: 3px 9px; border-radius: 999px;
  font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  white-space: nowrap;
}
.badge.ok { background: #d1fae5; color: #065f46; }
.badge.low { background: #fef3c7; color: #92400e; }
.badge.out { background: #f1f5f9; color: #64748b; }
.badge.warranty { background: #dbeafe; color: #1e40af; }

.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* ------------------------------------------------------------ serviços */
.services {
  max-width: 1120px; margin: 0 auto;
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.service {
  padding: 26px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius);
}
.service-icon { font-size: 30px; display: block; margin-bottom: 12px; }
.service h3 { font-size: 17px; margin-bottom: 8px; }
.service p { color: var(--muted); font-size: 14.5px; }

/* ------------------------------------------------------------ história */
.story {
  max-width: 1120px; margin: 0 auto;
  display: grid; gap: 44px;
  grid-template-columns: 1.5fr 1fr; align-items: start;
}
.story-text h2 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; letter-spacing: -.02em; margin-bottom: 18px; }
.story-text h3 { font-size: 18px; margin: 26px 0 8px; }
.story-text p { color: #334155; margin-bottom: 14px; max-width: 62ch; }

.values { padding: 28px; background: var(--ink); color: #e2e8f0; border-radius: var(--radius); }
.values h3 { color: #fff; font-size: 17px; margin-bottom: 18px; }
.value { padding: 14px 0; border-top: 1px solid rgba(255,255,255,.1); }
.value:first-of-type { border-top: 0; padding-top: 0; }
.value strong { display: block; color: #fff; font-size: 15px; margin-bottom: 3px; }
.value span { font-size: 13.5px; color: #94a3b8; }
.value.highlight strong { color: #93c5fd; }

/* ------------------------------------------------------------- contato */
.contact {
  max-width: 1120px; margin: 0 auto;
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.contact-item {
  padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.whats-card { text-decoration: none; color: inherit; display: block; transition: border-color .15s, transform .12s; }
.whats-card:hover { border-color: #25d366; transform: translateY(-2px); }
.whats-card span { font-size: 19px; font-weight: 700; }
.whats-card em { display: block; margin-top: 4px; font-size: 12px; color: #25d366; font-style: normal; font-weight: 600; }
.footer-side { display: flex; flex-direction: column; gap: 6px; text-align: right; max-width: 52ch; }
.contact-item strong { display: block; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.contact-item span { font-size: 15px; }

/* -------------------------------------------------------------- rodapé */
.footer {
  padding: 30px clamp(16px, 5vw, 56px);
  background: var(--ink); color: #94a3b8;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 13px;
}
.footer strong { color: #fff; display: block; }
.footer-note { max-width: 46ch; }

/* --------------------------------------------------------------- modal */
.modal {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center; padding: 20px;
  background: rgba(15,23,42,.6); backdrop-filter: blur(3px);
}
.modal-card {
  position: relative; width: min(560px, 100%);
  max-height: 88dvh; overflow-y: auto;
  background: #fff; border-radius: 18px; box-shadow: var(--shadow);
}
.modal-close {
  position: absolute; top: 12px; right: 14px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.9); cursor: pointer;
  font-size: 22px; line-height: 1; color: var(--ink);
}
.modal-thumb { aspect-ratio: 16 / 9; display: grid; place-items: center; font-size: 70px; }
.modal-body { padding: 26px; }
.modal-body h3 { font-size: 22px; letter-spacing: -.02em; margin-bottom: 8px; }
.modal-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.modal-desc { color: #334155; margin-bottom: 20px; }
.modal-price { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.modal-actions { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.spec { display: flex; justify-content: space-between; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.spec span:first-child { color: var(--muted); }

@media (max-width: 860px) {
  .menu { display: none; }
  .story { grid-template-columns: 1fr; gap: 28px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
  .thumb { font-size: 40px; }
  .card-name { font-size: 14px; }
  .price { font-size: 18px; }
}


/* ------------------------------------------------- botões flutuantes */
.fab {
  position: fixed; right: 18px; z-index: 50;
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  border: 0; text-decoration: none;
  box-shadow: 0 10px 26px -8px rgba(15,23,42,.45);
  transition: transform .15s, box-shadow .15s;
}
.fab:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -8px rgba(15,23,42,.5); }
.whats-fab { bottom: 18px; background: #25d366; color: #fff; }
.cart-fab { bottom: 86px; background: var(--ink); color: #fff; font-size: 24px; }
.fab-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 23px; height: 23px; padding: 0 6px;
  display: grid; place-items: center;
  background: var(--brand); color: #fff;
  border: 2px solid #fff; border-radius: 999px;
  font-size: 12px; font-weight: 800;
}

/* ------------------------------------------------------------ carrinho */
.drawer { position: fixed; inset: 0; z-index: 70; background: rgba(15,23,42,.55); backdrop-filter: blur(3px); }
.drawer-panel {
  position: absolute; top: 0; right: 0; height: 100dvh;
  width: min(420px, 100%); background: #fff;
  display: flex; flex-direction: column;
  box-shadow: -8px 0 32px -12px rgba(15,23,42,.45);
  animation: slide-in .22s ease;
}
@keyframes slide-in { from { transform: translateX(100%); } to { transform: translateX(0); } }

.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px; border-bottom: 1px solid var(--line);
}
.drawer-head h3 { font-size: 18px; }
.drawer-close { width: 34px; height: 34px; border: 0; background: var(--bg-alt); border-radius: 50%; font-size: 22px; cursor: pointer; color: var(--ink); }
.drawer-body { flex: 1; overflow-y: auto; padding: 12px 22px; }
.drawer-foot { padding: 18px 22px; border-top: 1px solid var(--line); background: var(--bg-alt); display: grid; gap: 10px; }

.cart-line { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-line-info strong { display: block; font-size: 14px; font-weight: 600; line-height: 1.3; }
.cart-line-info span { font-size: 12px; color: var(--muted); }
.cart-line-total { font-size: 15px; white-space: nowrap; }
.qty { display: flex; align-items: center; gap: 8px; }
.qty button {
  width: 28px; height: 28px; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; font-size: 16px; line-height: 1; color: var(--ink);
}
.qty button:hover { border-color: var(--brand); color: var(--brand); }
.qty span { min-width: 20px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

.cart-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; }
.cart-total strong { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.cart-note { font-size: 12px; color: var(--muted); line-height: 1.45; }
.attendant { display: grid; gap: 5px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.attendant select, .attendant input {
  font: inherit; font-size: 14px; font-weight: 400; text-transform: none; letter-spacing: 0;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink);
}
/* Com um atendente só não há escolha a fazer — o campo vira informação. */
.attendant.single select { background: var(--bg-alt); color: var(--muted); }
.btn.whats:disabled, #send-order:disabled { opacity: .5; cursor: not-allowed; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px);
  padding: 12px 20px; border-radius: 10px;
  background: var(--ink); color: #fff; font-size: 14px; font-weight: 500;
  opacity: 0; pointer-events: none; z-index: 80;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 860px) {
  .fab { width: 52px; height: 52px; right: 14px; }
  .whats-fab { bottom: 14px; }
  .cart-fab { bottom: 76px; }
  .drawer-panel { width: 100%; }
}
