:root {
  --red: #e9302a;
  --red-dark: #b91c1c;
  --ink: #171717;
  --muted: #68707c;
  --line: #e4e7ec;
  --soft: #f5f6f8;
  --panel: #ffffff;
  --green: #0f766e;
  --blue: #1d4ed8;
  --amber: #b45309;
  --radius: 8px;
  --shadow: 0 18px 48px rgba(17, 24, 39, .10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.site-header {
  height: 74px;
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px clamp(18px, 4vw, 58px);
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.brand img, .site-header > a img { width: 190px; height: 62px; object-fit: contain; object-position: left center; }
.site-header nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.site-header nav a {
  padding: 9px 11px;
  border-radius: var(--radius);
  color: #374151;
  font-size: 14px;
  font-weight: 800;
}
.site-header nav a:hover { background: var(--soft); color: var(--red); }
.nav-button { border: 1px solid var(--line); }

.public-hero {
  position: relative;
  min-height: calc(100svh - 74px);
  display: grid;
  align-items: end;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(34px, 6vw, 76px);
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(0,0,0,.92), rgba(0,0,0,.66) 48%, rgba(0,0,0,.18)),
    url("assets/personalizados/personalizado-canecas.png") center right / cover no-repeat;
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 18vh;
  background: linear-gradient(0deg, #fff, rgba(255,255,255,0));
}
.hero-content {
  color: #fff;
  max-width: 820px;
  padding-bottom: min(9vh, 90px);
}
.kicker {
  margin: 0 0 10px;
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}
.hero-content h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(44px, 7vw, 92px);
  line-height: .94;
  letter-spacing: 0;
}
.hero-content p:not(.kicker) {
  max-width: 680px;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.55;
  color: rgba(255,255,255,.88);
}
.hero-actions, .toolbar, .top-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 10px 15px;
  font-weight: 900;
}
.primary { color: #fff; background: var(--red); border-color: var(--red); }
.primary:hover { background: var(--red-dark); }
.light { color: var(--ink); background: #fff; border-color: #fff; }
.ghost { color: var(--ink); background: #fff; border-color: var(--line); }
.wide { width: 100%; }

.trust-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.trust-row div { padding: 22px clamp(18px, 4vw, 58px); border-right: 1px solid var(--line); }
.trust-row div:last-child { border-right: 0; }
.trust-row strong { display: block; font-size: 30px; }
.trust-row span { color: var(--muted); font-weight: 750; }

.section { padding: clamp(48px, 7vw, 92px) clamp(18px, 4vw, 58px); }
.split {
  display: grid;
  grid-template-columns: minmax(280px, 480px) 1fr;
  gap: clamp(28px, 6vw, 90px);
}
h1, h2, h3 { letter-spacing: 0; }
h2 { margin: 0; font-size: clamp(30px, 4.5vw, 54px); line-height: 1.02; }
.copy { font-size: 18px; line-height: 1.65; color: #374151; }

.section-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 24px;
}
input, select, textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #d4d8df;
  background: #fff;
  color: var(--ink);
  border-radius: var(--radius);
  min-height: 42px;
  padding: 10px 12px;
}
.toolbar input { width: min(320px, 70vw); }
.toolbar select { width: 220px; }

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.product-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.product-card img {
  width: 100%;
  aspect-ratio: 1 / 1.08;
  object-fit: cover;
  object-position: center;
  background: var(--soft);
  border-bottom: 1px solid var(--line);
}
.product-body { padding: 14px; display: grid; gap: 8px; }
.product-body h3 { margin: 0; font-size: 16px; line-height: 1.18; min-height: 38px; }
.product-body p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.price-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.price { font-size: 18px; font-weight: 950; color: var(--red-dark); }
.tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  background: #fef2f2;
  color: var(--red-dark);
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 900;
}
.promo { color: var(--green); font-weight: 850; font-size: 12px; }

.quote-section {
  background: #191919;
  color: #fff;
  display: grid;
  grid-template-columns: minmax(280px, 460px) 1fr;
  gap: clamp(28px, 6vw, 80px);
}
.quote-info p { color: rgba(255,255,255,.78); line-height: 1.6; }
.form-panel {
  display: grid;
  gap: 14px;
  padding: clamp(18px, 3vw, 30px);
  background: #fff;
  color: var(--ink);
  border-radius: var(--radius);
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
label { display: grid; gap: 7px; color: #374151; font-size: 13px; font-weight: 850; }
textarea { resize: vertical; }
.check { grid-template-columns: auto 1fr; align-items: center; }
.result { margin: 0; color: var(--green); font-weight: 900; }
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 28px clamp(18px, 4vw, 58px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  flex-wrap: wrap;
}
.footer img { width: 150px; height: 44px; object-fit: contain; object-position: left center; }
.footer div { display: flex; gap: 14px; font-weight: 800; color: var(--ink); }

.app-page { min-height: 100vh; background: var(--soft); display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.app-sidebar img { width: 178px; height: 64px; object-fit: contain; object-position: left center; }
.app-sidebar nav { display: grid; gap: 8px; }
.app-sidebar button, .side-link {
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  border-radius: var(--radius);
  padding: 12px;
  font-weight: 900;
  color: #374151;
}
.app-sidebar button.active { background: #fff1f1; color: var(--red-dark); border-color: #fecaca; }
.side-link { margin-top: auto; border-color: var(--line); }
.app-main { min-width: 0; padding: 24px; }
.app-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.app-top h1 { margin: 0; font-size: clamp(28px, 4vw, 42px); }
.login-shell {
  max-width: 430px;
  margin: min(12vh, 90px) auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
}
.login-shell img { width: 230px; height: 124px; object-fit: contain; object-position: left center; margin-bottom: 12px; }
.login-shell form { display: grid; gap: 14px; }
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  overflow-x: auto;
}
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.metric { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.metric span { color: var(--muted); font-weight: 800; }
.metric strong { display: block; font-size: 30px; margin-top: 6px; }
.table { width: 100%; border-collapse: collapse; min-width: 760px; }
.table th, .table td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { color: var(--muted); text-transform: uppercase; font-size: 12px; letter-spacing: 0; }
.status {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 9px;
  color: #fff;
  background: var(--blue);
  font-size: 12px;
  font-weight: 900;
}
.status.green { background: var(--green); }
.status.amber { background: var(--amber); }
.product-admin { display: grid; grid-template-columns: 88px minmax(180px, 1fr) 120px 160px 140px; gap: 12px; align-items: center; min-width: 820px; border-bottom: 1px solid var(--line); padding: 12px 0; }
.product-admin img { width: 78px; height: 78px; object-fit: cover; border: 1px solid var(--line); border-radius: var(--radius); }
.product-admin h3 { margin: 0 0 6px; font-size: 15px; }
.product-admin p { margin: 0; color: var(--muted); font-size: 13px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card h3 { margin-top: 0; }

@media (max-width: 1060px) {
  .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metrics, .trust-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .site-header { height: auto; align-items: flex-start; flex-direction: column; }
  .public-hero { min-height: 720px; }
  .split, .quote-section, .form-grid { grid-template-columns: 1fr; }
  .section-top { align-items: start; flex-direction: column; }
  .catalog-grid, .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-page { grid-template-columns: 1fr; }
  .app-sidebar { position: static; height: auto; }
  .app-sidebar nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
  .catalog-grid, .metrics, .trust-row, .cards { grid-template-columns: 1fr; }
  .trust-row div { border-right: 0; border-bottom: 1px solid var(--line); }
  .app-main { padding: 16px; }
  .app-top { align-items: flex-start; flex-direction: column; }
}

/* Professional upgrade */
.auth-locked { grid-template-columns: 1fr; }
.auth-locked .app-sidebar,
.auth-locked .app-only { display: none; }
.auth-locked .app-main { padding: 24px; }
.muted { color: var(--muted); }
.compact { align-items: center; margin-bottom: 18px; }
.catalog-section.collapsed .toolbar,
.catalog-section.collapsed .catalog-grid,
.catalog-section.collapsed .cart-panel { display: none; }
.catalog-section.collapsed::after {
  content: "Clique em Catálogo no topo ou no botao da vitrine para abrir os produtos e a busca.";
  display: block;
  border: 1px dashed #f3b2b0;
  background: #fff7f7;
  color: var(--red-dark);
  border-radius: var(--radius);
  padding: 18px;
  font-weight: 900;
}
.showcase-section { padding: clamp(32px, 5vw, 58px) clamp(18px, 4vw, 58px); background: #fafafa; }
.media-showcase {
  display: grid;
  grid-template-columns: minmax(280px, 1.3fr) minmax(260px, .7fr);
  gap: 18px;
  align-items: stretch;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.showcase-media img,
.showcase-media video { width: 100%; height: 420px; object-fit: cover; background: var(--soft); }
.showcase-copy { padding: clamp(20px, 4vw, 44px); display: grid; align-content: center; gap: 12px; }
.showcase-copy h3 { margin: 0; font-size: clamp(28px, 4vw, 48px); line-height: 1; }
.product-card { cursor: pointer; }
.cart-panel {
  position: sticky;
  bottom: 16px;
  margin-top: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  z-index: 10;
}
.cart-head, .cart-item, .file-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cart-head h3 { margin: 0; }
.cart-item { padding: 10px 0; border-top: 1px solid var(--line); }
.cart-item input { width: 90px; }
.cart-item button, .link-button {
  border: 0;
  background: transparent;
  color: var(--red-dark);
  font-weight: 900;
  padding: 0;
}
.location-section { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(260px, 420px); gap: 18px; align-items: center; background: #191919; color: #fff; }
.location-section p { color: rgba(255,255,255,.78); font-size: 18px; }
.location-card { text-align: left; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08); color: #fff; border-radius: var(--radius); padding: 24px; }
.location-card strong { display: block; font-size: 28px; margin-bottom: 8px; }
.location-card span { color: rgba(255,255,255,.78); }
.social-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.social-links a { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; font-weight: 950; background: #fff; }
.modal[hidden] { display: none; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0,0,0,.62);
}
.modal-card {
  position: relative;
  width: min(680px, 96vw);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  color: var(--ink);
  border-radius: var(--radius);
  padding: clamp(20px, 4vw, 34px);
  box-shadow: var(--shadow);
}
.wide-modal { width: min(920px, 96vw); }
.modal-close {
  position: absolute;
  right: 14px;
  top: 12px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-size: 24px;
}
.form-panel.flat { padding: 0; border: 0; box-shadow: none; }
.map-frame { width: 100%; height: min(62vh, 520px); border: 0; border-radius: var(--radius); }
.detail-grid, .profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 16px 0; }
.chat-panel { display: grid; gap: 14px; }
.chat-box { display: grid; gap: 10px; padding: 14px; background: #f8fafc; border: 1px solid var(--line); border-radius: var(--radius); max-height: 420px; overflow: auto; }
.message { max-width: 76%; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.message.mine { margin-left: auto; background: #fff1f1; border-color: #fecaca; }
.message p { margin: 5px 0; }
.message span { color: var(--muted); font-size: 12px; font-weight: 800; }
.message-form { display: grid; gap: 12px; }
.file-row { padding: 12px 0; border-top: 1px solid var(--line); }
.link-card { border: 0; background: transparent; text-align: left; padding: 0; color: inherit; }
.admin-cards p { margin: 8px 0; color: #374151; }
.qr-box {
  width: min(280px, 90vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin: 18px 0;
  color: var(--ink);
  font-weight: 950;
  text-align: center;
  border: 12px solid #111;
  background:
    linear-gradient(90deg, #111 10px, transparent 10px) 0 0/28px 28px,
    linear-gradient(#111 10px, transparent 10px) 0 0/28px 28px,
    #fff;
}
@media (max-width: 820px) {
  .media-showcase, .location-section, .detail-grid, .profile-grid { grid-template-columns: 1fr; }
  .showcase-media img, .showcase-media video { height: 300px; }
  .social-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .message { max-width: 94%; }
}
@media (max-width: 540px) {
  .social-links { grid-template-columns: 1fr; }
  .cart-head, .cart-item { align-items: flex-start; flex-direction: column; }
}

/* Product image upgrade */
.product-card img,
.product-admin img {
  background: radial-gradient(circle at 50% 35%, #ffffff 0, #ffffff 34%, #f1f3f6 100%);
  padding: 10px;
  object-fit: contain;
  filter: saturate(1.06) contrast(1.04);
}
.product-card img {
  box-shadow: inset 0 -18px 36px rgba(17, 24, 39, .06);
}
.product-form-layout {
  display: grid;
  grid-template-columns: minmax(260px, 380px) 1fr;
  gap: 22px;
  align-items: start;
}
.product-photo-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, #f8fafc);
  padding: 16px;
  position: sticky;
  top: 18px;
}
.product-photo-panel img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: radial-gradient(circle at 50% 35%, #ffffff 0, #ffffff 36%, #eef1f5 100%);
  padding: 18px;
  filter: saturate(1.08) contrast(1.05);
}
@media (max-width: 820px) {
  .product-form-layout { grid-template-columns: 1fr; }
  .product-photo-panel { position: static; }
}

.media-admin-grid, .report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.media-admin-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px;
}
.media-thumb img, .media-thumb video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--soft);
}
.report-grid .panel { min-width: 0; }
@media (max-width: 820px) {
  .media-admin-grid, .report-grid { grid-template-columns: 1fr; }
}

/* PWA/mobile app layout */
.nav-install {
  border: 1px solid var(--red);
  background: var(--red);
  color: #fff;
  border-radius: var(--radius);
  padding: 9px 11px;
  font-weight: 900;
}
.mobile-appbar { display: none; }
@media (display-mode: standalone) {
  body { user-select: none; -webkit-tap-highlight-color: transparent; }
  input, textarea { user-select: text; }
}
@media (max-width: 820px) {
  .mobile-appbar {
    position: sticky;
    top: 0;
    z-index: 80;
    display: grid;
    grid-template-columns: 44px 1fr auto;
    gap: 10px;
    align-items: center;
    min-height: 58px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--line);
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(12px);
  }
  .mobile-appbar button {
    min-height: 40px;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: var(--radius);
    font-weight: 950;
  }
  .mobile-appbar span { font-weight: 950; }
  .app-page { display: block; }
  .app-page .app-sidebar {
    position: fixed;
    inset: 58px auto 0 0;
    width: min(82vw, 320px);
    height: calc(100vh - 58px);
    transform: translateX(-105%);
    transition: transform .18s ease;
    z-index: 90;
    box-shadow: var(--shadow);
    overflow: auto;
  }
  .app-page.mobile-menu-open .app-sidebar { transform: translateX(0); }
  .app-page.mobile-menu-open::after {
    content: "";
    position: fixed;
    inset: 58px 0 0;
    background: rgba(0,0,0,.38);
    z-index: 70;
  }
  .app-main { padding: 14px; }
  .app-sidebar nav { grid-template-columns: 1fr; }
  .app-top { margin-top: 0; }
  .table { min-width: 640px; }
  .panel { padding: 14px; }
  .form-grid { grid-template-columns: 1fr; }
}

.qr-real {
  width: min(280px, 90vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}
.qr-real svg { width: 100%; height: 100%; fill: #111; shape-rendering: crispEdges; }
.whatsapp-template-form { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 18px; }
.message-preview { margin-top: 14px; background: #f8fafc; }

/* Dynamic professional homepage */
.public-hero { min-height: calc(100svh - 74px); }
.hero-bg { animation: heroFloat 14s ease-in-out infinite alternate; transform-origin: center; }
@keyframes heroFloat { from { transform: scale(1); } to { transform: scale(1.06); } }
.premium-home { background: linear-gradient(180deg, #fff, #f8fafc); }
.featured-products {
  display: grid;
  grid-template-columns: 1.25fr .9fr .9fr;
  grid-auto-rows: minmax(300px, auto);
  gap: 18px;
}
.feature-tile {
  position: relative;
  display: grid;
  grid-template-rows: minmax(260px, 1fr) auto;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 24px 70px rgba(17,24,39,.10);
  transform: translateY(0);
  transition: transform .22s ease, box-shadow .22s ease;
}
.feature-tile:first-child { grid-row: span 2; }
.feature-tile:hover { transform: translateY(-5px); box-shadow: 0 32px 90px rgba(17,24,39,.16); }
.feature-tile > div:last-child { padding: 18px; display: grid; gap: 9px; }
.feature-tile h3 { margin: 0; font-size: clamp(22px, 3vw, 34px); line-height: 1; }
.feature-tile p { margin: 0; color: var(--muted); line-height: 1.45; }
.product-image-swap {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 50% 35%, #fff 0, #fff 38%, #eef1f5 100%);
}
.product-image-swap img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: contain;
  padding: 18px;
  transition: opacity .28s ease, transform .35s ease, filter .35s ease;
}
.product-image-swap .alt-img {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.05) rotate(.6deg);
}
.dynamic-product:hover .primary-img,
.feature-tile:hover .primary-img,
.product-card:hover .primary-img { opacity: 0; transform: scale(.96); }
.dynamic-product:hover .alt-img,
.feature-tile:hover .alt-img,
.product-card:hover .alt-img { opacity: 1; transform: scale(1.01); }
.impact-band {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, .9fr);
  gap: 22px;
  align-items: center;
  padding: clamp(46px, 7vw, 90px) clamp(18px, 4vw, 58px);
  color: #fff;
  background: linear-gradient(135deg, #191919, #3b0d0d 55%, #e9302a);
  overflow: hidden;
}
.impact-band h2 { color: #fff; }
.impact-steps { display: grid; gap: 12px; }
.impact-steps span {
  padding: 18px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius);
  background: rgba(255,255,255,.08);
  font-weight: 950;
}
.admin-product-thumb { position: relative; width: 78px; height: 78px; }
.admin-product-thumb img { position: absolute; inset: 0; width: 78px; height: 78px; object-fit: contain; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.admin-product-thumb img:last-child { opacity: 0; transition: opacity .2s ease; }
.product-admin:hover .admin-product-thumb img:last-child { opacity: 1; }
#productAltPhotoPreview { margin-top: 10px; }
@media (max-width: 1060px) { .featured-products { grid-template-columns: repeat(2, minmax(0, 1fr)); } .feature-tile:first-child { grid-row: span 1; } }
@media (max-width: 720px) { .featured-products, .impact-band { grid-template-columns: 1fr; } .product-image-swap img { min-height: 220px; } }

.whatsapp-connect {
  display: grid;
  grid-template-columns: minmax(220px, 340px) 1fr;
  gap: 22px;
  align-items: center;
}
.qr-real {
  width: min(340px, 100%);
  min-height: 240px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 16px;
}
.qr-real img { width: 100%; height: auto; }
.qr-loading { color: var(--muted); font-weight: 800; text-align: center; }
.whatsapp-status .alert { margin: 0; }
@media (max-width: 760px) {
  .whatsapp-connect { grid-template-columns: 1fr; }
}


/* Public layout polish: readable text and horizontal product rails */
.public-page, .public-page * { min-width: 0; }
.public-page h1,
.public-page h2,
.public-page h3,
.product-body h3,
.feature-tile h3,
.showcase-copy h3 {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  text-wrap: balance;
}
.public-page p,
.product-body p,
.feature-tile p,
.showcase-copy p,
.location-card span,
.social-links a,
.tag,
.price-row span,
.promo {
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}
.btn,
.nav-button,
.nav-install,
.social-links a,
.location-card,
.cart-item button,
.link-button {
  max-width: 100%;
  white-space: normal;
  text-align: center;
  line-height: 1.15;
  overflow-wrap: break-word;
}
.site-header nav a,
.site-header nav button { flex: 0 1 auto; }
.toolbar { max-width: 100%; }
.toolbar input { flex: 1 1 240px; width: auto; }
.toolbar select { flex: 0 1 220px; max-width: 100%; }
.section-top { align-items: flex-start; }
.section-top > div { max-width: min(760px, 100%); }
.catalog-grid,
.featured-products {
  display: flex !important;
  grid-template-columns: none !important;
  grid-auto-rows: auto !important;
  gap: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  overscroll-behavior-inline: contain;
  padding: 4px 4px 18px;
  margin-inline: -4px;
  scrollbar-width: thin;
  scrollbar-color: #e9302a #f1f5f9;
}
.catalog-grid::-webkit-scrollbar,
.featured-products::-webkit-scrollbar { height: 10px; }
.catalog-grid::-webkit-scrollbar-track,
.featured-products::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 999px; }
.catalog-grid::-webkit-scrollbar-thumb,
.featured-products::-webkit-scrollbar-thumb { background: #e9302a; border-radius: 999px; }
.product-card,
.feature-tile {
  flex: 0 0 clamp(270px, 28vw, 360px);
  scroll-snap-align: start;
  height: auto;
}
.feature-tile:first-child { grid-row: auto !important; flex-basis: clamp(310px, 38vw, 500px); }
.product-body { min-height: 238px; align-content: start; }
.product-body h3 { min-height: auto; }
.price-row { flex-wrap: wrap; align-items: flex-start; }
.product-card .btn,
.feature-tile .btn { align-self: end; }
.product-image-swap img { min-height: 240px; }
@media (max-width: 820px) {
  .site-header { height: auto; align-items: flex-start; gap: 12px; }
  .site-header nav { justify-content: flex-start; width: 100%; }
  .section-top { flex-direction: column; align-items: stretch; }
  .toolbar input,
  .toolbar select,
  .toolbar .btn { flex: 1 1 100%; width: 100%; }
  .product-card,
  .feature-tile,
  .feature-tile:first-child { flex-basis: min(82vw, 340px); }
}
@media (max-width: 540px) {
  .product-card,
  .feature-tile,
  .feature-tile:first-child { flex-basis: 86vw; }
  .product-image-swap img { min-height: 210px; }
  .product-body { min-height: 220px; }
}

.site-editor h3 {
  margin: 22px 0 4px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.site-editor h3:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.site-editor .media-admin-card label { margin-top: 10px; }
.site-editor .media-admin-card textarea { min-height: 82px; }

.status.red { background: #fee2e2; color: #991b1b; }
.quote-cart-summary { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; background: #fafafa; }
.quote-cart-summary h3 { margin: 0 0 8px; }
.quote-cart-summary p { margin: 4px 0; overflow-wrap: break-word; }
.product-card h3,
.product-card p,
.feature-tile h3,
.feature-tile p,
.card h3,
.card p,
.btn,
.cart-item span,
.table td,
.table th { overflow-wrap: anywhere; word-break: normal; hyphens: auto; }
button:disabled, .btn:disabled { opacity: .55; cursor: not-allowed; }

.cart-item span { display: grid; gap: 3px; }
.cart-item small { color: var(--muted); font-weight: 700; }
.cart-total { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 8px; flex-wrap: wrap; }
.quote-cart-summary .cart-total { margin-top: 10px; }
.quote-cart-summary p { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }


.visual-site-form {
  display: grid;
  gap: 18px;
}
.site-edit-block {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 18px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: #fff;
}
.site-edit-block.wide { grid-template-columns: 1fr; }
.site-edit-preview {
  display: grid;
  gap: 10px;
  position: sticky;
  top: 14px;
}
.site-edit-preview > span {
  color: var(--brand);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.site-edit-preview p { margin: 0; color: var(--muted); line-height: 1.45; }
.site-edit-fields { display: grid; gap: 14px; }
.site-mini {
  display: grid;
  gap: 8px;
  min-height: 130px;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fafafa;
  padding: 14px;
}
.site-mini img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  background: #eee;
}
.site-mini strong { font-size: 1.05rem; line-height: 1.15; }
.site-mini small { color: var(--muted); font-weight: 800; line-height: 1.35; }
.hero-mini {
  background: #111;
  color: #fff;
}
.hero-mini small { color: rgba(255,255,255,.78); }
.site-image-control {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}
.site-image-preview {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  min-height: 140px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #fafafa;
  color: var(--muted);
  font-weight: 800;
}
.site-image-preview img {
  width: 100%;
  height: 100%;
  min-height: 160px;
  object-fit: cover;
}
.site-add-media {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.site-add-media h3 { margin: 0 0 10px; padding: 0; border: 0; }
.site-savebar {
  position: sticky;
  bottom: 10px;
  display: flex;
  justify-content: flex-end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}
@media (max-width: 920px) {
  .site-edit-block { grid-template-columns: 1fr; }
  .site-edit-preview { position: static; }
  .site-savebar { position: static; }
}


.wa-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}
.wa-subtabs button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 900;
  cursor: pointer;
}
.wa-subtabs button.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.wa-panel { display: none; }
.wa-panel.active { display: block; }
.wa-chat-layout {
  display: grid;
  grid-template-columns: minmax(230px, 320px) 1fr;
  gap: 16px;
  min-height: 520px;
}
.wa-chat-list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}
.wa-chat-list-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  font-weight: 900;
}
.wa-chat-client {
  width: 100%;
  display: grid;
  gap: 4px;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  padding: 12px;
  cursor: pointer;
  position: relative;
}
.wa-chat-client:hover,
.wa-chat-client.active { background: #fff7f7; }
.wa-chat-client span,
.wa-chat-client small { color: var(--muted); overflow-wrap: anywhere; }
.wa-chat-client em {
  position: absolute;
  right: 10px;
  top: 10px;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
  font-style: normal;
  font-size: .75rem;
  font-weight: 900;
}
.wa-chat-conversation {
  display: grid;
  gap: 12px;
  align-content: start;
}
.wa-chat-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: #fff;
}
.wa-chat-empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background: #fafafa;
}
@media (max-width: 860px) {
  .wa-chat-layout { grid-template-columns: 1fr; }
  .wa-chat-list { max-height: 320px; overflow: auto; }
}


.wa-message-form { gap: 8px; }
.wa-compose { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: end; }
.wa-attach { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 999px; display: grid; place-items: center; background: #fff; cursor: pointer; font-size: 1.2rem; font-weight: 900; }
.wa-attach:hover { background: #fff7f7; border-color: var(--brand); }
.wa-attach input { display: none; }
.wa-compose textarea { min-height: 42px; resize: vertical; }
.chat-attachment { display: grid; gap: 6px; margin-top: 8px; color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.chat-attachment img, .chat-attachment video { max-width: min(280px, 100%); border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.chat-attachment audio { max-width: min(320px, 100%); }
.chat-attachment.file { display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 999px; background: rgba(255,255,255,.75); border: 1px solid var(--line); font-weight: 900; }
.wa-attach-name { display: block; }
@media (max-width: 620px) { .wa-compose { grid-template-columns: auto 1fr; } .wa-compose .btn { grid-column: 1 / -1; } }

.wa-chat-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.btn.danger, .btn.ghost.danger { border-color: #fecaca; color: #991b1b; background: #fff5f5; }
.btn.danger:hover, .btn.ghost.danger:hover { background: #fee2e2; }

.wa-toast-box { position: fixed; right: 18px; bottom: 18px; z-index: 9999; display: grid; gap: 10px; max-width: min(360px, calc(100vw - 32px)); }
.wa-toast { border: 1px solid var(--line); border-left: 5px solid var(--brand); border-radius: 10px; background: #fff; box-shadow: var(--shadow-soft); padding: 12px 14px; text-align: left; display: grid; gap: 3px; cursor: pointer; }
.wa-toast strong { color: var(--brand); }
.wa-toast span { font-weight: 900; }
.wa-toast small { color: var(--muted); overflow-wrap: anywhere; }

.table-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.table-actions .btn { padding: 8px 10px; }

.unmatched-list { display: grid; gap: 12px; }
.unmatched-card { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(220px, 320px) auto auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; background: #fff; }
.unmatched-card p { margin: 4px 0; }
.wa-file-preview { display: grid; grid-template-columns: minmax(90px, 160px) 1fr auto; gap: 12px; align-items: center; border: 1px dashed var(--line); border-radius: var(--radius); padding: 10px; background: #fafafa; }
.wa-file-preview img, .wa-file-preview video { width: 100%; max-height: 130px; object-fit: contain; border-radius: 8px; background: #fff; }
.wa-file-preview audio { width: 100%; }
.file-preview-icon { padding: 18px; border-radius: 8px; background: #fff; border: 1px solid var(--line); text-align: center; font-weight: 900; }
@media (max-width: 900px) { .unmatched-card, .wa-file-preview { grid-template-columns: 1fr; } }
