:root {
  --primary: #146c43;
  --accent: #f5b301;
  --background: #f7f8f5;
  --surface: #ffffff;
  --text: #17211b;
  --muted: #66736b;
  --border: #dfe5dd;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea,
select,
a {
  font: inherit;
}

button {
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.shell {
  min-height: 100vh;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-inner,
.hero,
.content,
.admin-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar-inner {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-height: 68px;
}

.brand {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.topbar-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.topbar-actions .secondary-button.active {
  background: var(--primary);
  color: #fff;
}

.master-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.catalog-admin .secondary-button.active-tab {
  background: var(--primary);
  color: #fff;
}

.admin-shell {
  display: grid;
  gap: 18px;
  margin: 0 auto;
  padding: 22px 0 48px;
  width: min(1180px, calc(100% - 32px));
}

.auth-panel {
  max-width: 420px;
}

.brand-mark {
  align-items: center;
  background: var(--primary);
  border-radius: 8px;
  color: #fff;
  display: grid;
  font-weight: 800;
  height: 42px;
  place-items: center;
  width: 42px;
}

.brand-logo {
  border-radius: 4px;
  display: block;
  height: 30px;
  object-fit: contain;
  width: auto;
}

.store-logo {
  border-radius: 6px;
  display: block;
  height: 42px;
  object-fit: contain;
  width: auto;
}

.brand h1,
.brand p {
  margin: 0;
}

.brand h1 {
  font-size: 1.05rem;
}

.brand p {
  color: var(--muted);
  font-size: 0.86rem;
}

.cart-button,
.primary-button,
.secondary-button,
.danger-button {
  align-items: center;
  display: inline-flex;
  font-weight: 700;
  gap: 8px;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  text-decoration: none;
}

.catalog-admin .primary-button,
.catalog-admin .secondary-button,
.catalog-admin .danger-button {
  min-height: 46px;
  padding: 0 16px;
}

.cart-button,
.primary-button {
  background: var(--primary);
  color: #fff;
}

.secondary-button {
  background: #eef3ef;
  color: var(--text);
}

.danger-button {
  background: #8f1d1d;
  color: #fff;
}

.hero {
  display: grid;
  gap: 18px;
  padding: 34px 0 20px;
}

.store-hero {
  background-position: center right;
  background-repeat: no-repeat;
  background-size: cover;
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  border-radius: 8px;
  margin-top: 22px;
  padding: 34px;
}

.hero h2 {
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1;
  margin: 0;
  max-width: 850px;
}

.hero p {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.55;
  margin: 0;
  max-width: 740px;
}

.store-meta {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.store-meta span {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 11px;
}

.store-meta a {
  color: inherit;
  text-decoration: none;
}

.store-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.store-link {
  align-items: center;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 800;
  gap: 8px;
  padding: 8px 12px 8px 8px;
  text-decoration: none;
}

.store-link span {
  align-items: center;
  background: #fff;
  border-radius: 999px;
  color: var(--primary);
  display: inline-flex;
  height: 28px;
  justify-content: center;
  min-width: 28px;
  padding: 0;
}

.store-link:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.store-link svg {
  display: block;
  height: 17px;
  width: 17px;
}

.store-link-instagram span { color: #d62976; }
.store-link-facebook span { color: #1877f2; }
.store-link-tiktok span { color: #111111; }
.store-link-shopee span { color: #ee4d2d; }
.store-link-youtube span { color: #ff0000; }

.filters {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr auto;
  margin: 18px 0;
}

.search,
.select,
.field {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  min-height: 42px;
  padding: 10px 12px;
  width: 100%;
}

.grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  padding-bottom: 42px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: 0.16s ease;
}

.product-card:hover {
  border-color: color-mix(in srgb, var(--primary) 50%, var(--border));
  transform: translateY(-2px);
}

.product-image {
  align-items: center;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 20%, #fff), #f4f2eb);
  color: var(--primary);
  display: flex;
  font-size: 0.9rem;
  font-weight: 800;
  justify-content: center;
  overflow: hidden;
  text-align: center;
}

.product-image img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

body[data-pattern="dots"] {
  background-image: radial-gradient(color-mix(in srgb, var(--primary) 18%, transparent) 1px, transparent 1px);
  background-size: 22px 22px;
}

body[data-pattern="lines"] {
  background-image: repeating-linear-gradient(135deg, color-mix(in srgb, var(--primary) 8%, transparent) 0 1px, transparent 1px 18px);
}

body[data-pattern="grid"] {
  background-image:
    linear-gradient(color-mix(in srgb, var(--primary) 8%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--primary) 8%, transparent) 1px, transparent 1px);
  background-size: 28px 28px;
}

.product-body {
  display: grid;
  flex: 1;
  gap: 10px;
  padding: 14px;
}

.product-body h3 {
  font-size: 1rem;
  margin: 0;
}

.product-body p {
  color: var(--muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-height: 1.4;
  margin: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.product-description-link {
  color: var(--primary);
  font-weight: 700;
  text-decoration: underline;
}

.product-body h3,
.product-footer,
.product-detail-copy,
.product-detail-copy h2,
.product-detail-copy p { min-width: 0; overflow-wrap: anywhere; }

.product-footer {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  margin-top: auto;
}

.product-footer .primary-button {
  flex: 0 0 auto;
  margin-left: auto;
}

.price {
  font-size: 1.08rem;
  font-weight: 800;
}

.price small {
  color: var(--muted);
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: line-through;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  background: color-mix(in srgb, var(--accent) 25%, #fff);
  border-radius: 999px;
  color: #5b4200;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 5px 8px;
  width: fit-content;
}

.promo-badge {
  background: color-mix(in srgb, #e10600 16%, #fff);
  color: #8f1d1d;
}

.drawer {
  background: rgba(0, 0, 0, 0.32);
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  transition: opacity 0.18s ease;
  z-index: 50;
}

.drawer.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer-panel {
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: grid;
  gap: 14px;
  grid-template-rows: auto 1fr auto;
  height: 100%;
  margin-left: auto;
  max-width: 420px;
  padding: 18px;
  width: min(100%, 420px);
}

.drawer-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.drawer-head h2 {
  font-size: 1.2rem;
  margin: 0;
}

.cart-items {
  display: grid;
  gap: 10px;
  overflow: auto;
}

.cart-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.cart-item strong {
  display: block;
}

.cart-row {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.qty {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.qty button,
.icon-button {
  background: #eef3ef;
  color: var(--text);
  height: 34px;
  min-width: 34px;
}

.cart-total {
  align-items: center;
  border-top: 1px solid var(--border);
  display: flex;
  font-size: 1.15rem;
  justify-content: space-between;
  padding-top: 12px;
}

.admin-layout {
  display: grid;
  gap: 22px;
  grid-template-columns: 280px 1fr;
  padding: 22px 0 48px;
}

.admin-layout.tenant-admin-focus {
  grid-template-columns: 1fr;
}

.admin-layout.master-admin-focus {
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
}

.admin-layout.master-admin-focus #tenantsPanel {
  grid-column: 1 / -1;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
}

.panel h2,
.panel h3 {
  margin: 0 0 16px;
}

.form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.full {
  grid-column: 1 / -1;
}

label {
  color: var(--muted);
  display: grid;
  font-size: 0.88rem;
  gap: 7px;
  line-height: 1.35;
}

.products-admin {
  display: grid;
  gap: 30px;
}

.products-admin.product-view-grid {
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}

.product-view-grid .product-editor {
  gap: 14px;
  padding: 14px;
}

.product-view-grid .product-editor-actions {
  justify-content: flex-start;
}

.product-editor-thumbnail {
  align-items: center;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  flex: 0 0 72px;
  height: 72px;
  justify-content: center;
  object-fit: cover;
  overflow: hidden;
  width: 72px;
}

.product-editor-thumbnail-empty {
  color: var(--muted);
  font-size: 1.5rem;
  font-weight: 800;
}

.view-mode-control {
  display: grid;
  gap: 5px;
  min-width: 130px;
}

.view-mode-buttons { display: flex; gap: 5px; }
.icon-button { background: var(--surface); border: 1px solid var(--border); border-radius: 7px; color: var(--muted); cursor: pointer; font-size: 1.25rem; height: 40px; line-height: 1; width: 42px; }
.icon-button.active, .icon-button:hover { background: var(--primary); color: #fff; }
.product-status-manager { display: grid; gap: 8px; margin-bottom: 10px; }
.product-status-row { align-items: center; display: grid; gap: 8px; grid-template-columns: minmax(0,1fr) minmax(150px,220px) auto; }
@media (max-width: 520px) { .product-status-row { grid-template-columns: 1fr 1fr; } .product-status-row button { grid-column: 1 / -1; } .product-editor { padding: 12px; } .product-editor-header { align-items: flex-start; flex-wrap: wrap; padding: 10px; } .product-editor-actions { width: 100%; } }

.settings-save-footer {
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
  padding-top: 18px;
}

.admin-page-heading {
  align-items: start;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 22px;
  padding-bottom: 18px;
}

.admin-page-heading h2 {
  margin: 0;
}

.admin-page-heading p {
  color: var(--muted);
  margin: 0;
  max-width: 520px;
}

.store-summary-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 240px);
  margin-bottom: 22px;
}

.store-active-toggle {
  align-self: start;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
}

.products-toolbar {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d8e0e6;
  border-radius: 8px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 16px;
}

.products-toolbar strong {
  color: var(--text);
  display: block;
  margin-bottom: 4px;
}

.settings-grid {
  display: grid;
  gap: 20px;
}

.store-user-list {
  display: grid;
  gap: 12px;
}

.store-user-row {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #d8e0e6;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(140px, 220px) 1fr;
  padding: 14px;
}

.store-user-row strong {
  color: var(--text);
}

.store-user-actions {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(160px, 1fr) auto auto;
}

.product-editor {
  background: #f7f9fb;
  border: 2px solid #b9c4cf;
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(23, 32, 51, 0.08);
  display: grid;
  gap: 22px;
  padding: 22px;
}

.product-main-grid {
  grid-template-columns: minmax(220px, 1.2fr) minmax(150px, 0.8fr) minmax(140px, 0.65fr) minmax(140px, 0.65fr);
}

.product-price-grid {
  grid-template-columns: minmax(130px, 0.7fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr) minmax(130px, 0.7fr) minmax(150px, 0.8fr);
}

.product-main-grid .field,
.product-price-grid .field {
  min-height: 40px;
}

.product-editor.product-dirty {
  border-color: #d59b00;
  box-shadow: 0 14px 34px rgba(213, 155, 0, 0.2);
}

.product-editor.product-dirty .product-save-button {
  background: #ffe08a;
  border-color: #d59b00;
  color: #4d3700;
}

.product-editor-header,
.tenant-row-header {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d7e0e7;
  border-left: 6px solid var(--primary);
  border-radius: 8px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 14px 16px;
}

.maintenance-page {
  align-items: center;
  background: var(--background);
  display: grid;
  min-height: 100vh;
  padding: 24px;
}

.maintenance-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.16);
  margin: auto;
  max-width: 620px;
  padding: 34px;
  text-align: center;
}

.maintenance-panel h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  margin: 0 0 10px;
}

.maintenance-panel p {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.6;
  margin: 0;
}


.product-editor-header strong,
.tenant-row-header strong {
  color: var(--text);
  display: block;
  font-size: 1.05rem;
  line-height: 1.3;
}

.eyebrow {
  color: var(--muted);
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.editor-section,
.admin-subsection {
  background: #ffffff;
  border: 1px solid #d8e0e6;
  border-radius: 8px;
  display: grid;
  gap: 18px;
  padding: 18px;
}

.editor-section h4,
.admin-subsection h4 {
  border-bottom: 1px solid #e8edf1;
  color: var(--text);
  font-size: 0.95rem;
  margin: 0;
  padding-bottom: 10px;
}

.dashboard-mini-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.dashboard-columns {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 18px;
}

.metric-card,
.stat-row,
.product-rank-item,
.product-click-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.metric-card {
  display: grid;
  gap: 6px;
  min-height: 110px;
  padding: 14px;
}

.metric-card span,
.tenant-card-grid span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.metric-card strong {
  font-size: 1.55rem;
  line-height: 1.05;
}

.metric-card small,
.stat-row span,
.product-rank-item small,
.tenant-card-head span {
  color: var(--muted);
  line-height: 1.35;
}

.metric-card.tone-good {
  box-shadow: inset 4px 0 0 color-mix(in srgb, var(--primary) 80%, #fff);
}

.metric-card.tone-warn {
  box-shadow: inset 4px 0 0 #d39e00;
}

.stats-stack,
.product-rank-list,
.product-click-grid {
  display: grid;
  gap: 12px;
}

.stat-row {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 14px;
}

.stat-row strong {
  font-size: 1.45rem;
}

.product-rank-item {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 34px 1fr auto;
  padding: 12px;
}

.product-rank-item > strong {
  align-items: center;
  background: color-mix(in srgb, var(--primary) 12%, #fff);
  border-radius: 999px;
  color: var(--primary);
  display: grid;
  height: 34px;
  place-items: center;
  width: 34px;
}

.product-rank-item span,
.product-rank-item small {
  display: block;
}

.product-rank-item em {
  color: var(--primary);
  font-style: normal;
  font-weight: 800;
}

.product-click-grid {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.product-click-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.tenant-card-head {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.product-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.readiness-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.readiness-card.ready {
  background: #eef8f1;
  border-color: #b9dfc3;
}

.readiness-card.attention {
  background: #fff8e8;
  border-color: #ead49c;
}

.readiness-header {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.readiness-header strong {
  color: var(--text);
}

.readiness-header span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.readiness-list {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.readiness-list span {
  border-radius: 8px;
  display: block;
  font-size: 0.86rem;
  line-height: 1.35;
  padding: 9px 10px;
}

.readiness-list .ok {
  background: #ffffff;
  color: #1f6f3b;
}

.readiness-list .warn {
  background: #fff;
  color: #8f5d00;
}

.image-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.image-chip {
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: grab;
  display: grid;
  gap: 6px;
  padding: 8px;
  width: 112px;
}

.image-chip.dragging {
  opacity: 0.55;
}

.image-chip small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
}

.image-chip img {
  aspect-ratio: 1;
  border-radius: 6px;
  object-fit: cover;
  width: 100%;
}

.image-chip button {
  background: #eef3ef;
  color: var(--text);
  font-size: 0.78rem;
  min-height: 30px;
}

.admin-toast {
  background: #172033;
  border-radius: 8px;
  bottom: 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
  color: #fff;
  left: 50%;
  opacity: 0;
  padding: 12px 16px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 18px);
  transition: 0.18s ease;
  z-index: 120;
}

.admin-toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.admin-toast[data-tone="danger"] {
  background: #8f1d1d;
}

.switch-row {
  align-content: center;
  align-self: end;
  min-height: 44px;
}

.modal {
  align-items: center;
  background: rgba(0, 0, 0, 0.42);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: fixed;
  z-index: 80;
}

.modal-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
  max-height: min(92vh, 860px);
  overflow: auto;
  padding: 22px;
  position: relative;
  width: min(1040px, 100%);
}

.modal-close {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 2;
}

.product-detail {
  display: grid;
  align-items: stretch;
  gap: 18px 24px;
  grid-template-columns: minmax(300px, 1.05fr) minmax(300px, 0.95fr);
}

.gallery {
  align-items: center;
  aspect-ratio: 4 / 3;
  background: color-mix(in srgb, var(--primary) 12%, #fff);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-column: 1;
  grid-row: 1;
  overflow: hidden;
}

.gallery img {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.gallery span {
  color: var(--primary);
  font-weight: 800;
  text-align: center;
}

.gallery-nav {
  align-self: stretch;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 0;
  color: var(--text);
  font-size: 2rem;
  min-width: 42px;
}

.gallery-dots {
  display: flex;
  gap: 8px;
  grid-column: 1;
  grid-row: 2;
  justify-content: center;
}

.gallery-dots button {
  background: var(--border);
  border-radius: 999px;
  height: 9px;
  padding: 0;
  width: 9px;
}

.gallery-dots button.active {
  background: var(--primary);
}

.gallery-thumbnails {
  display: flex;
  gap: 8px;
  grid-column: 1;
  grid-row: 3;
  justify-content: center;
  overflow-x: auto;
  padding: 2px;
}

.gallery-thumbnails button {
  background: var(--surface);
  border: 2px solid transparent;
  border-radius: 6px;
  flex: 0 0 58px;
  height: 58px;
  overflow: hidden;
  padding: 0;
}

.gallery-thumbnails button.active {
  border-color: var(--primary);
}

.gallery-thumbnails img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.product-detail-copy {
  align-content: start;
  border-left: 1px solid var(--border);
  display: grid;
  gap: 16px;
  grid-column: 2;
  grid-row: 1 / span 2;
  min-height: 100%;
  padding-left: 24px;
}

.product-detail-copy h2 {
  font-size: clamp(1.55rem, 2.4vw, 2.35rem);
  line-height: 1.12;
  margin: 0;
}

.product-detail-copy p {
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
  max-height: min(28vh, 280px);
  overflow: auto;
  padding-right: 6px;
  white-space: pre-wrap;
}

.field-hint { color: var(--muted); display: block; font-size: .78rem; line-height: 1.4; margin-top: 6px; }
.product-description-field { min-height: 150px; resize: vertical; }

.notice {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.hidden {
  display: none !important;
}

/* Evita o flash do formulário de login durante a confirmação da sessão. */
.auth-pending #loginPanel,
.auth-pending #tenantLoginPanel {
  visibility: hidden;
}

.full-width {
  width: 100%;
}

.product-home,
.catalog-admin {
  --primary: #e10600;
  --accent: #e10600;
  --background: #f6f7f8;
  --surface: #ffffff;
  --text: #111111;
  --muted: #5d6875;
  --border: #e2e6ea;
}

.product-home .topbar,
.catalog-admin .topbar {
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(6px);
}

.product-home .secondary-button,
.catalog-admin .secondary-button {
  background: transparent;
  border: 1px solid #cfd5dc;
  color: var(--text);
}

.catalog-admin .panel,
.catalog-admin .product-editor,
.catalog-admin .tenant-row,
.catalog-admin .field {
  background: var(--surface);
  border-color: var(--border);
}

.catalog-admin .field {
  color: var(--text);
}

.catalog-admin .product-editor {
  background: #f7f9fb;
  border-color: #b9c4cf;
}

.catalog-admin .product-editor .eyebrow {
  color: var(--primary);
  margin: 0 0 4px;
}

.catalog-admin .editor-section {
  background: #ffffff;
  border-color: #d8e0e6;
}

.product-hero {
  align-items: center;
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(0, 0.82fr) minmax(360px, 1fr);
  min-height: 640px;
  padding: 54px 0 28px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.eyebrow {
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.product-hero h2 {
  font-size: clamp(2.7rem, 4.7rem, 4.7rem);
  line-height: 0.95;
  margin: 0;
  max-width: 780px;
}

.product-hero p {
  color: var(--muted);
  font-size: 1.18rem;
  line-height: 1.55;
  max-width: 720px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-points span {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 8px 12px;
}

.demo-showcase {
  min-height: 460px;
  position: relative;
}

.demo-desktop,
.demo-phone,
.live-store-frame {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: block;
  object-fit: cover;
}

.demo-desktop {
  aspect-ratio: 16 / 11;
  box-shadow: 0 18px 44px rgba(17, 17, 17, 0.16);
  object-position: top center;
  width: 100%;
}

.live-store-viewport {
  aspect-ratio: 16 / 11;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(17, 17, 17, 0.16);
  overflow: hidden;
  min-height: 460px;
  width: 100%;
}

.live-store-frame {
  border: 0;
  height: 147%;
  min-height: 0;
  transform: scale(.68);
  transform-origin: top left;
  width: 147%;
}

.demo-phone {
  aspect-ratio: 9 / 16;
  bottom: -18px;
  box-shadow: 0 18px 36px rgba(17, 17, 17, 0.2);
  max-height: 340px;
  object-position: top center;
  position: absolute;
  right: 18px;
  width: min(34%, 176px);
}

.showcase-badge {
  align-items: center;
  background: #111111;
  border-radius: 8px;
  bottom: 18px;
  color: #ffffff;
  display: flex;
  gap: 10px;
  left: 18px;
  padding: 10px 12px;
  position: absolute;
}

.showcase-badge span {
  color: #cbd5e1;
  font-size: 0.9rem;
}

.product-preview {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  display: grid;
  gap: 16px;
  padding: 18px;
}

.preview-bar {
  background: var(--primary);
  border-radius: 6px;
  height: 56px;
}

.preview-row,
.preview-grid span {
  background: #e9edf2;
  border-radius: 6px;
  display: block;
}

.preview-row {
  height: 24px;
  width: 74%;
}

.preview-row.strong {
  height: 36px;
}

.preview-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, 1fr);
}

.preview-grid span {
  aspect-ratio: 1;
}

.preview-total {
  align-items: center;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  padding-top: 14px;
}

.preview-total strong {
  color: var(--primary);
}

.preview-head,
.sale-line {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.preview-head {
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.preview-head span {
  color: var(--muted);
  font-size: 0.9rem;
}

.preview-head strong {
  background: color-mix(in srgb, var(--primary) 12%, #fff);
  border-radius: 999px;
  color: var(--primary);
  padding: 6px 10px;
}

.sale-line {
  background: #f6f7f8;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
}

.preview-note {
  color: var(--muted);
  line-height: 1.45;
}

.feature-band {
  background: #ffffff;
  color: var(--text);
  padding: 20px 0;
}

.feature-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 auto;
  width: min(1180px, calc(100% - 32px));
}

.feature-item {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  min-height: 88px;
  padding: 14px;
}

.product-copy {
  padding: 34px 0 54px;
}

.product-copy h2 {
  font-size: 2.35rem;
  margin: 0 0 12px;
  max-width: 760px;
}

.product-copy p {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.6;
  max-width: 820px;
}

.commercial-section {
  background: #ffffff;
  border-top: 1px solid var(--border);
  padding: 42px 0;
}

.flow-section {
  border-bottom: 1px solid var(--border);
}

.commercial-inner,
.cta-band {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1fr);
  margin: 0 auto;
  width: min(1180px, calc(100% - 32px));
}

.commercial-inner h2,
.manage-section h2,
.cta-band h2 {
  font-size: 2.35rem;
  line-height: 1.05;
  margin: 0 0 12px;
}

.commercial-inner p,
.manage-section p,
.cta-band p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.sales-steps,
.manage-grid {
  display: grid;
  gap: 12px;
}

.sales-steps article,
.manage-grid article,
.example-grid article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 16px;
}

.sales-steps strong,
.manage-grid strong,
.example-grid strong {
  color: var(--text);
}

.sales-steps span,
.manage-grid span,
.example-grid p {
  color: var(--muted);
  line-height: 1.45;
}

.sales-steps b,
.admin-tools-section b {
  color: var(--text);
}

.sales-examples {
  padding: 48px 0;
}

.section-heading {
  margin-bottom: 20px;
  max-width: 780px;
}

.section-heading h2 {
  font-size: 2.35rem;
  line-height: 1.05;
  margin: 0;
}

.example-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.example-grid article {
  align-content: start;
  min-height: 210px;
}

.example-grid article > span {
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.example-grid strong {
  font-size: 1.08rem;
  line-height: 1.2;
}

.example-grid p {
  margin: 0;
}

.manage-section {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1fr);
  padding: 44px 0;
}

.manage-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-tools-section {
  background: #ffffff;
  border-top: 1px solid var(--border);
  padding: 48px 0;
}

.admin-tools-inner {
  align-items: center;
  display: grid;
  gap: 30px;
  grid-template-columns: minmax(340px, 1fr) minmax(0, 0.82fr);
  margin: 0 auto;
  width: min(1180px, calc(100% - 32px));
}

.admin-tools-inner h2 {
  font-size: 2.35rem;
  line-height: 1.05;
  margin: 0 0 12px;
}

.admin-tools-inner p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.admin-panel-preview {
  background: #f7f9fb;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(17, 17, 17, 0.1);
  display: grid;
  gap: 14px;
  padding: 16px;
}

.panel-preview-top {
  align-items: center;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  padding-bottom: 12px;
}

.panel-preview-top span {
  color: var(--muted);
  font-weight: 700;
}

.panel-preview-top strong {
  background: var(--primary);
  border-radius: 999px;
  color: #ffffff;
  padding: 7px 10px;
}

.panel-preview-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.panel-preview-grid span {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  min-height: 42px;
  padding: 10px;
  text-align: center;
}

.panel-preview-list {
  display: grid;
  gap: 10px;
}

.panel-preview-list div {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.panel-preview-list strong {
  color: var(--text);
}

.panel-preview-list span {
  color: var(--muted);
  font-size: 0.92rem;
}

.cta-band {
  align-items: center;
  background: #111111;
  border-radius: 0;
  color: #ffffff;
  margin-bottom: 48px;
  padding: 28px;
}

.cta-band p {
  color: #cbd5e1;
}

.cta-band .primary-button {
  justify-self: end;
}

.stores-hero,
.stores-content {
  margin: 0 auto;
  width: min(1180px, calc(100% - 32px));
}

.stores-hero {
  padding: 46px 0 20px;
}

.stores-hero h2 {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
  margin: 0 0 12px;
}

.stores-hero p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
  max-width: 680px;
}

.stores-content {
  padding: 18px 0 56px;
}

.stores-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.store-tile {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  display: flex;
  gap: 14px;
  min-height: 96px;
  padding: 16px;
  transition: 0.16s ease;
}

.store-tile:hover {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
  transform: translateY(-2px);
}

.store-icon {
  align-items: center;
  background: color-mix(in srgb, var(--primary) 10%, #fff);
  border-radius: 8px;
  color: var(--primary);
  display: grid;
  flex: 0 0 auto;
  font-weight: 800;
  height: 48px;
  overflow: hidden;
  place-items: center;
  width: 48px;
}

.store-icon img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.store-tile strong,
.store-tile small {
  display: block;
}

.store-tile small {
  color: var(--muted);
  line-height: 1.35;
  margin-top: 4px;
}

.tenant-list {
  display: grid;
  gap: 26px;
}

.master-section-heading {
  align-items: start;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 16px;
}

.master-section-heading h2 {
  margin: 0;
}

.master-section-heading p {
  color: var(--muted);
  margin: 0;
  max-width: 440px;
}

.tenant-summary {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  margin-bottom: 18px;
}

.tenant-summary-card {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 14px;
}

.tenant-summary-card strong {
  color: var(--text);
  font-size: 1.45rem;
  line-height: 1;
}

.tenant-summary-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.tenant-letter-nav {
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  padding-bottom: 16px;
}

.tenant-letter {
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  display: grid;
  font-size: 0.9rem;
  font-weight: 800;
  height: 34px;
  min-width: 34px;
  place-items: center;
  text-decoration: none;
}

.tenant-letter:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.tenant-letter-group {
  scroll-margin-top: 92px;
}

.tenant-letter-heading {
  align-items: center;
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.tenant-letter-heading span {
  align-items: center;
  background: var(--primary);
  border-radius: 8px;
  color: #fff;
  display: grid;
  font-weight: 900;
  height: 38px;
  place-items: center;
  width: 38px;
}

.tenant-letter-heading strong {
  color: var(--text);
  font-size: 1rem;
}

.tenant-card-grid {
  display: grid;
  gap: 18px;
}

.tenant-row {
  background: #fbfcfd;
  border: 1px solid #dfe5e8;
  border-radius: 8px;
  display: grid;
  gap: 16px;
  padding: 18px;
}

.tenant-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tenant-card-meta span {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 7px 10px;
}

.tenant-row strong,
.tenant-row span {
  display: block;
}

.tenant-row span {
  color: var(--muted);
  font-size: 0.9rem;
}

.tenant-actions,
.password-reset {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.password-reset {
  align-items: end;
}

.password-reset label {
  min-width: min(240px, 100%);
}

.tenant-status-grid {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tenant-plan-grid {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.check-row {
  align-items: center;
  color: var(--text);
  display: flex;
  gap: 8px;
}

.check-row input[type="checkbox"] {
  height: 18px;
  width: 18px;
}

.status-box {
  background: #f6f7f8;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 12px;
  padding: 10px 12px;
}

.usage-pill {
  align-self: end;
  background: #f6f7f8;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  min-height: 44px;
  padding: 12px;
}

.section-divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 18px 0;
}

.danger-text {
  color: #8f1d1d;
}

.password-reset .field {
  min-width: 160px;
  width: auto;
}

@media (max-width: 980px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .tenantPasswordPanel,
  .panel {
    min-width: 0;
  }
}

@media (max-width: 760px) {
  body {
    overflow-x: hidden;
  }

  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 0;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .modal {
    align-items: flex-end;
    padding: 8px;
  }

  .modal-panel {
    border-radius: 8px 8px 0 0;
    display: flex;
    flex-direction: column;
    height: calc(100dvh - 16px);
    max-height: calc(100dvh - 16px);
    min-height: 0;
    overflow: hidden;
    padding: 16px;
    width: 100%;
  }

  .filters,
  .admin-layout,
  .form-grid,
  .compact-grid,
  .product-main-grid,
  .product-price-grid,
  .store-summary-grid,
  .store-user-row,
  .store-user-actions,
  .product-detail,
  .product-hero,
  .feature-grid,
  .commercial-inner,
  .manage-section,
  .manage-grid,
  .example-grid,
  .admin-tools-inner,
  .panel-preview-grid,
  .tenant-status-grid,
  .tenant-plan-grid,
  .dashboard-mini-grid,
  .dashboard-columns,
  .cta-band {
    grid-template-columns: 1fr;
  }

  .product-detail {
    gap: 14px;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .gallery,
  .gallery-dots,
  .gallery-thumbnails,
  .product-detail-copy {
    grid-column: 1;
    grid-row: auto;
  }

  .gallery {
    aspect-ratio: 1 / 1;
  }

  .product-detail-copy {
    border-left: 0;
    border-top: 1px solid var(--border);
    min-height: 0;
    padding-left: 0;
    padding-top: 16px;
  }

  .product-detail-copy h2 {
    font-size: 1.5rem;
  }

  .product-hero {
    min-height: auto;
    padding-top: 34px;
  }

  .product-hero h2,
  .product-copy h2,
  .commercial-inner h2,
  .manage-section h2,
  .section-heading h2,
  .admin-tools-inner h2,
  .cta-band h2 {
    font-size: 2rem;
  }

  .demo-showcase {
    min-height: 0;
    padding-bottom: 78px;
  }

  .demo-phone {
    max-height: 260px;
    right: 12px;
    width: 36%;
  }

  .showcase-badge {
    bottom: 12px;
    left: 12px;
  }

  .password-reset .field {
    width: 100%;
  }

  .product-editor-header,
  .tenant-row-header {
    align-items: stretch;
    flex-direction: column;
  }

  .tenant-actions,
  .password-reset,
  .product-editor-actions,
  .products-toolbar,
  .admin-page-heading,
  .master-section-heading {
    display: grid;
  }

  .catalog-admin .primary-button,
  .catalog-admin .secondary-button,
  .catalog-admin .danger-button {
    width: 100%;
  }

  .catalog-admin .product-editor-actions .secondary-button,
  .catalog-admin .product-editor-actions .danger-button {
    width: 100%;
  }

  .image-chip {
    width: min(150px, calc(50% - 8px));
  }

  .readiness-list {
    grid-template-columns: 1fr;
  }

  .admin-toast {
    bottom: 12px;
    left: 12px;
    right: 12px;
    text-align: center;
    transform: translateY(18px);
  }

  .admin-toast.visible {
    transform: translateY(0);
  }

  .cta-band .primary-button {
    justify-self: stretch;
  }
}

.app-version-footer {
  border-top: 1px solid rgba(23, 33, 27, 0.08);
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
  margin-top: 28px;
  padding: 14px 18px 18px;
  text-align: center;
}

.platform-notice { background: #f5f7f5; border: 1px solid var(--border); border-radius: 10px; color: var(--muted); font-size: .86rem; line-height: 1.5; margin: 24px auto 0; max-width: 1180px; padding: 12px 16px; width: calc(100% - 32px); }
.platform-notice a, .institutional-footer a { color: var(--primary); font-weight: 700; text-underline-offset: 3px; }
.institutional-footer { align-items: center; color: var(--muted); display: flex; flex-wrap: wrap; font-size: .78rem; gap: 12px 24px; justify-content: space-between; margin: 0 auto; max-width: 1180px; padding: 20px 16px 28px; }
.institutional-footer nav { display: flex; flex-wrap: wrap; gap: 12px 18px; }
.legal-page { margin: 0 auto; max-width: 820px; padding: 48px 16px 64px; }
.legal-page h1 { font-size: clamp(2rem, 5vw, 3.4rem); margin: 10px 0 16px; }
.legal-page h2 { margin-top: 32px; }
.legal-page p, .legal-page li { color: var(--muted); line-height: 1.7; }
.legal-nav { border-bottom: 1px solid var(--border); padding: 16px; text-align: center; }
@media (max-width: 600px) { .institutional-footer { align-items: flex-start; flex-direction: column; } }

.catalog-admin .app-version-footer {
  margin-top: 0;
  padding-bottom: 22px;
}
.admin-loading { margin: 16px auto; max-width: 1180px; text-align: center; }

/* Landing page: compact, conversion-first presentation. */
.product-home .topbar-inner { min-height: 66px; }
.product-home .brand { color: var(--text); text-decoration: none; }
.product-home .brand span { display: grid; gap: 2px; }
.product-home .brand strong { font-size: 1.05rem; }
.product-home .brand small { color: var(--muted); font-size: .78rem; }
.product-home .brand-logo { height: 38px; width: 122px; }
.product-home .compact-cta { min-height: 38px; }
.landing-hero { min-height: 600px; padding-top: 58px; }
.landing-hero h1 { font-size: clamp(2.55rem, 5vw, 4.7rem); line-height: .98; margin: 0; max-width: 700px; }
.landing-hero .hero-copy > p:not(.eyebrow) { max-width: 650px; }
.landing-hero .secondary-button { background: #fff; border: 1px solid #cfd5dc; }
.landing-proof { align-items: center; background: #111; color: #fff; display: flex; gap: 12px; justify-content: center; padding: 18px 16px; }
.landing-proof strong { color: #f7c948; font-size: 1.7rem; }
.landing-proof span { font-weight: 700; }
.landing-proof a { color: #fff; margin-left: 10px; text-underline-offset: 3px; }
.landing-section { padding-bottom: 62px; padding-top: 62px; }
.demo-section { display: grid; gap: 28px; grid-template-columns: .75fr 1.25fr; }
.demo-card { color: var(--text); display: grid; gap: 12px; text-decoration: none; }
.demo-card img { border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 16px 36px rgba(17,17,17,.12); display: block; width: 100%; }
.demo-card span { display: flex; gap: 8px; justify-content: space-between; }
.demo-card small { color: var(--muted); }
.pain-section, .soft-section { background: #fff; border-bottom: 1px solid var(--border); border-top: 1px solid var(--border); }
.pain-grid { display: grid; gap: 32px; grid-template-columns: 1fr 1fr; }
.pain-grid h2 { font-size: clamp(2rem, 3.5vw, 3.1rem); line-height: 1.02; margin: 0; }
.pain-grid > p { color: var(--muted); font-size: 1.15rem; line-height: 1.6; margin: 32px 0 0; }
.step-grid { display: grid; gap: 12px; grid-template-columns: repeat(4, 1fr); }
.step-grid article { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 18px; }
.step-grid b { color: var(--primary); font-size: .84rem; }
.step-grid h3 { font-size: 1.1rem; margin: 18px 0 8px; }
.step-grid p, .feature-item span, .commercial-note { color: var(--muted); line-height: 1.45; margin: 0; }
.feature-grid-compact { grid-template-columns: repeat(4, 1fr); }
.feature-grid-compact .feature-item { display: grid; gap: 8px; min-height: 130px; }
.plans-grid { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); }
.plan-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; display: grid; gap: 16px; min-width: 0; padding: 22px; position: relative; }
.plan-card-featured { border: 2px solid var(--primary); box-shadow: 0 14px 28px rgba(20,108,67,.12); }
.plan-label { background: var(--primary); border-radius: 999px; color: #fff; font-size: .75rem; font-weight: 800; padding: 6px 10px; position: absolute; right: 14px; top: 14px; }
.plan-card h3 { font-size: 1.25rem; margin: 0; }
.plan-price { display: grid; gap: 3px; margin: 0; }
.plan-price small, .plan-price span { color: var(--muted); }
.plan-price strong { font-size: 2.35rem; line-height: 1; }
.plan-card ul { color: var(--muted); display: grid; gap: 9px; margin: 0; padding-left: 18px; }
.plan-card .secondary-button { border: 1px solid var(--border); margin-top: auto; }
.commercial-note { font-size: .9rem; margin: 18px 0 0; }
.included-panel { align-items: center; background: color-mix(in srgb, var(--primary) 8%, #fff); border-left: 3px solid var(--primary); display: grid; gap: 8px; grid-template-columns: minmax(150px, .35fr) 1fr; margin-top: 18px; padding: 16px 18px; }
.included-panel span { color: var(--muted); line-height: 1.5; }
.before-after-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
.before-after-grid article { border: 1px solid var(--border); border-radius: 10px; padding: 24px; }
.before-after-grid h3 { font-size: 1.25rem; margin: 14px 0 8px; }
.before-after-grid p { color: var(--muted); line-height: 1.55; margin: 0; }
.comparison-label { color: var(--muted); font-size: .75rem; font-weight: 800; letter-spacing: .08em; }
.comparison-after { background: color-mix(in srgb, var(--primary) 8%, #fff); border-color: color-mix(in srgb, var(--primary) 40%, var(--border)) !important; }
.comparison-after .comparison-label { color: var(--primary); }
.category-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 18px; }
.category-chip { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; color: var(--muted); cursor: pointer; font: inherit; font-size: .88rem; font-weight: 700; padding: 7px 12px; }
.category-chip:hover, .category-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.faq-section { padding-bottom: 72px; }
.faq-grid { display: grid; gap: 10px 28px; grid-template-columns: repeat(2, 1fr); }
.faq-grid details { border-bottom: 1px solid var(--border); padding: 14px 0; }
.faq-grid summary { cursor: pointer; font-weight: 800; padding-right: 20px; }
.faq-grid p { color: var(--muted); line-height: 1.5; margin: 10px 0 0; }
.landing-cta { margin-left: auto; margin-right: auto; max-width: 1180px; width: calc(100% - 32px); }
.landing-cta .eyebrow { color: #f7c948; }
.landing-cta .primary-button { background: #f7c948; color: #111; }
.faq-extra { display: none; }
.faq-section.show-all .faq-extra { display: block; }
@media (max-width: 900px) {
  .product-home .product-hero { grid-template-columns: 1fr; }
  .product-home .plans-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .product-home {
    overflow-x: clip;
  }

  .product-home .topbar-inner { align-items: center; flex-direction: row; }
  .product-home .topbar-inner { gap: 10px; min-height: 58px; width: calc(100% - 24px); }
  .product-home .brand { gap: 8px; }
  .product-home .brand-logo { height: 30px; width: 74px; }
  .product-home .brand strong { font-size: .94rem; }
  .product-home .brand small { display: none; }
  .product-home .compact-cta { flex: 0 0 auto; font-size: .78rem; min-height: 36px; padding: 0 9px; }
  .product-home .product-hero { gap: 22px; width: calc(100% - 24px); }
  .product-home .hero-copy, .product-home .demo-showcase { min-width: 0; }
  .product-home .plans-grid { grid-template-columns: 1fr; }
  .landing-hero { min-height: 0; padding-top: 28px; }
  .landing-hero h1 { font-size: clamp(2.15rem, 10.5vw, 2.8rem); line-height: 1.02; overflow-wrap: anywhere; }
  .landing-hero .hero-copy > p:not(.eyebrow) { font-size: 1rem; line-height: 1.48; }
  .landing-hero .eyebrow { font-size: .72rem; margin-bottom: 10px; }
  .product-home .hero-points { gap: 7px; margin-top: 16px; }
  .product-home .hero-points span { font-size: .78rem; padding: 7px 9px; }
  .landing-proof { align-items: flex-start; flex-wrap: wrap; gap: 5px 10px; justify-content: flex-start; }
  .landing-proof a { flex-basis: 100%; margin-left: 0; }
  .landing-section { padding-bottom: 42px; padding-top: 42px; }
  .demo-section, .pain-grid, .step-grid, .feature-grid-compact, .plans-grid, .faq-grid { grid-template-columns: 1fr; }
  .before-after-grid, .included-panel { grid-template-columns: 1fr; }
  .pain-grid > p { margin-top: 0; }
  .step-grid article { min-height: 0; }
  .plan-card-featured { order: -1; }
  .demo-card span { align-items: flex-start; flex-direction: column; }
  .product-home .demo-showcase { min-height: 0; padding-bottom: 0; }
  .product-home .demo-desktop { aspect-ratio: auto; height: auto; object-fit: contain; }
  .product-home .demo-phone { display: none; }
  /* Renderiza o layout desktop em largura interna de 780 px e o reduz de forma proporcional no quadro. */
  .product-home .live-store-viewport { aspect-ratio: 4 / 5; height: auto; min-height: 0; }
  .product-home .live-store-frame { height: 200%; transform: scale(.5); transform-origin: top left; width: 200%; }
  .product-home .showcase-badge { bottom: auto; left: auto; margin-top: 10px; position: static; width: fit-content; }
  .product-home .hero-actions > a { justify-content: center; width: 100%; }
  .product-home .landing-cta .primary-button { width: 100%; }
}

/* Mobile hardening: the live preview must not define the landing grid width. */
@media (max-width: 760px) {
  .product-home .product-hero { grid-template-columns: minmax(0, 1fr); max-width: calc(100% - 24px); }
  .product-home .hero-copy, .product-home .demo-showcase, .product-home .live-store-viewport { min-width: 0; max-width: 100%; }
  .product-home .hero-copy > *, .product-home .landing-section, .product-home .landing-proof, .product-home .landing-cta, .product-home .platform-notice, .product-home .institutional-footer { max-width: 100%; }
  .product-home .landing-hero h1, .product-home .landing-hero p, .product-home .hero-points span, .product-home .primary-button, .product-home .secondary-button { overflow-wrap: anywhere; }
}

/* Layout responsivo do detalhe do produto: evita concorrência entre galeria, texto e ações. */
@media (min-width: 761px) and (max-width: 1100px) {
  .modal { align-items: flex-start; overflow-y: auto; }
  .modal-panel { margin: 18px 0; }
  .product-main-grid, .product-price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-detail { grid-template-columns: minmax(0, 1fr); }
  .gallery, .gallery-dots, .gallery-thumbnails, .product-detail-copy { grid-column: 1; grid-row: auto; }
  .product-detail-copy { border-left: 0; border-top: 1px solid var(--border); min-height: 0; padding-left: 0; padding-top: 16px; }
}

@media (min-width: 1101px) {
  .product-detail-copy { grid-row: 1 / span 3; }
}

/* Storefront mobile: preserve the desktop layout while making the first paint
   compact, stable and easier to use with one hand. */
@media (max-width: 760px) {
  .storefront-page .topbar-inner {
    align-items: center;
    flex-direction: row;
    min-height: 58px;
    padding: 8px 0;
  }

  .storefront-page .brand {
    gap: 8px;
    min-width: 0;
  }

  .storefront-page .brand h1,
  .storefront-page .brand p {
    max-width: calc(100vw - 150px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .storefront-page .cart-button {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0 11px;
  }

  .storefront-page .store-hero {
    margin-top: 12px;
    padding: 22px 18px;
  }

  .storefront-page .hero h2 {
    font-size: clamp(1.85rem, 9vw, 2.6rem);
    line-height: 1.05;
  }

  .storefront-page .hero p {
    font-size: 1rem;
  }

  .storefront-page .content {
    width: min(1180px, calc(100% - 24px));
  }

  .storefront-page .filters {
    gap: 8px;
    margin: 12px 0;
  }

  .storefront-page .grid {
    gap: 12px;
    grid-template-columns: minmax(0, 1fr);
  }

  .storefront-page .product-card:hover {
    transform: none;
  }

  .storefront-page .platform-notice,
  .storefront-page .institutional-footer {
    width: calc(100% - 24px);
  }
}
