:root {
  color-scheme: light;
  --orange: #e85d04;
  --orange-dark: #c44d03;
  --green: #00a650;
  --green-dark: #008c44;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f3f4f6;
  --white: #ffffff;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

.container {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

/* Barra promocional — estilo Loja 3D */
.promo-bar {
  background: #111827;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
}

.promo-bar-inner {
  display: flex;
  min-height: 36px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 24px;
  padding: 6px 0;
}

.promo-bar a {
  color: #fbbf24;
}

.promo-bar a:hover {
  text-decoration: underline;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.header-main {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  min-height: 72px;
  padding: 10px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--orange), #fbbf24);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 1.05rem;
  color: var(--orange);
}

.brand-text small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.search-box {
  display: flex;
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}

.search-box input {
  flex: 1;
  border: 0;
  padding: 12px 14px;
  outline: none;
}

.search-box button {
  border: 0;
  background: var(--orange);
  color: #fff;
  font-weight: 700;
  padding: 0 18px;
  cursor: pointer;
}

.search-box button:hover {
  background: var(--orange-dark);
}

.nav-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 0.88rem;
  font-weight: 600;
}

.nav-menu a:hover {
  color: var(--orange);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 8px 12px;
  cursor: pointer;
}

/* Hero banner */
.hero-banner {
  background: linear-gradient(90deg, #fff7ed 0%, #fff 50%);
  border-bottom: 1px solid var(--line);
}

.hero-banner-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: center;
  padding: 36px 0;
}

.hero-tag {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(232, 93, 4, 0.12);
  color: var(--orange-dark);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hero-banner-copy h1 {
  margin: 0 0 12px;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.hero-banner-copy p {
  margin: 0 0 20px;
  color: var(--muted);
  max-width: 520px;
}

.hero-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-banner-card {
  display: grid;
  place-items: center;
  min-height: 200px;
  border-radius: 12px;
  background: linear-gradient(145deg, #1f2937, #374151);
  color: #fff;
  text-align: center;
  padding: 24px;
}

.hero-banner-card span {
  font-size: 4rem;
  font-weight: 900;
  line-height: 1;
  opacity: 0.9;
}

.hero-banner-card p {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  border: 0;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn-buy {
  background: var(--green);
  color: #fff;
}

.btn-buy:hover {
  background: var(--green-dark);
}

.btn-outline {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--orange);
  color: var(--orange);
}

/* Categorias */
.category-strip {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}

.section-title {
  margin: 0 0 14px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-subtitle {
  margin: -8px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-pill {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  font-size: 0.86rem;
  font-weight: 600;
}

.category-pill:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.category-pill-accent {
  border-color: var(--orange);
  background: #fff7ed;
  color: var(--orange-dark);
}

/* Seções da loja */
.store-section {
  padding: 32px 0;
}

.store-section-alt {
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.section-link {
  color: var(--orange);
  font-weight: 700;
  font-size: 0.9rem;
}

.section-link:hover {
  text-decoration: underline;
}

/* Grid de produtos — cards estilo Loja 3D */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.loading-message,
.empty-message {
  grid-column: 1 / -1;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-weight: 600;
}

.product-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.product-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.product-card.is-hidden {
  display: none;
}

.product-thumb {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  background: linear-gradient(180deg, #f9fafb, #f3f4f6);
  color: var(--orange);
  font-size: 2.2rem;
  font-weight: 900;
}

.product-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 14px;
}

.product-body h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  min-height: 2.7em;
}

.product-price-label {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.product-price {
  margin: 0 0 12px;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
}

.product-card .btn-buy {
  width: 100%;
  margin-top: auto;
  min-height: 40px;
  font-size: 0.88rem;
}

.product-unavailable {
  width: 100%;
  margin-top: auto;
  padding: 10px;
  border-radius: var(--radius);
  background: #f3f4f6;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
}

/* Painéis formulário */
.split-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.panel-card {
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.panel-card label {
  display: grid;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}

.optional {
  font-weight: 500;
}

.panel-card input,
.panel-card select,
.panel-card textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
}

.panel-card input:focus,
.panel-card select:focus,
.panel-card textarea:focus {
  border-color: var(--orange);
  outline: 2px solid rgba(232, 93, 4, 0.15);
}

.form-status {
  min-height: 20px;
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--green-dark);
}

.form-status.is-error {
  color: #dc2626;
}

.tracking-result {
  min-height: 24px;
  color: var(--muted);
  font-size: 0.9rem;
}

.tracking-result strong {
  display: block;
  color: var(--text);
}

.tracking-result.is-error {
  color: #dc2626;
  font-weight: 700;
}

.tracking-result ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
}

/* Footer */
.site-footer {
  margin-top: 24px;
  padding: 40px 0 0;
  background: #111827;
  color: #e5e7eb;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
}

.footer-grid h3 {
  margin: 0 0 12px;
  font-size: 0.95rem;
}

.footer-grid a {
  display: block;
  margin-bottom: 8px;
  color: #9ca3af;
  font-size: 0.9rem;
}

.footer-grid a:hover {
  color: #fff;
}

.footer-grid p {
  margin: 12px 0 0;
  color: #9ca3af;
  font-size: 0.9rem;
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding: 16px 0;
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  color: #6b7280;
  font-size: 0.82rem;
}

.floating-whatsapp {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  padding: 0 18px;
  border-radius: 999px;
  background: #25d366;
  color: #053319;
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35);
}

.floating-whatsapp:hover {
  transform: translateY(-2px);
}

/* Admin (mantido compatível) */
.admin-page {
  min-height: 100vh;
  padding: 32px 0;
  background: #111827;
  color: #f9fafb;
}

.admin-page .container {
  width: min(1100px, calc(100% - 32px));
}

.admin-page h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.admin-login {
  max-width: 480px;
}

.admin-login form,
.admin-update-form,
.admin-product-form {
  display: grid;
  gap: 14px;
}

.admin-toolbar,
.admin-order-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
}

.admin-toolbar {
  margin-bottom: 20px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.admin-tab {
  border: 1px solid #374151;
  border-radius: 999px;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  font-weight: 700;
  padding: 8px 14px;
}

.admin-tab.is-active {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

.admin-tab-panel {
  display: none;
}

.admin-tab-panel.is-active {
  display: block;
}

.admin-order-card,
.admin-product-card {
  border: 1px solid #374151;
  border-radius: var(--radius);
  padding: 18px;
}

.admin-products-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) 1.1fr;
  gap: 20px;
}

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

/* Página de catálogo */
.catalog-page {
  background: var(--bg);
}

.catalog-main {
  padding: 20px 0 48px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.breadcrumb a:hover {
  color: var(--orange);
}

.catalog-page-header {
  margin-bottom: 20px;
}

.catalog-page-header h1 {
  margin: 0 0 6px;
  font-size: clamp(1.6rem, 3vw, 2rem);
}

.catalog-page-header p {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.catalog-mobile-filters {
  display: none;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.category-chip {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 14px;
  white-space: nowrap;
}

.category-chip.is-active,
.category-chip:hover {
  border-color: var(--orange);
  background: #fff7ed;
  color: var(--orange-dark);
}

.catalog-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.catalog-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.filter-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 16px;
}

.filter-panel h2 {
  margin: 0 0 12px;
  font-size: 0.95rem;
}

.filter-panel-highlight {
  border-color: #fed7aa;
  background: linear-gradient(180deg, #fff7ed, #fff);
}

.filter-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.filter-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 6px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 10px;
}

.filter-link:hover {
  background: #f9fafb;
  color: var(--orange);
}

.filter-link.is-active {
  background: #fff7ed;
  color: var(--orange-dark);
}

.filter-count {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.filter-select-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.filter-select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 10px 12px;
}

.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  border-radius: 999px;
  background: #fff7ed;
  color: var(--orange-dark);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 12px;
}

.btn-text {
  border: 0;
  background: transparent;
  color: var(--orange);
  cursor: pointer;
  font-weight: 700;
  padding: 0;
  text-decoration: underline;
}

.catalog-empty {
  margin-top: 12px;
  padding: 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--muted);
  font-weight: 600;
  text-align: center;
}

.product-category {
  margin: 0 0 4px;
  color: var(--orange);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.product-body h3 a:hover {
  color: var(--orange);
}

.product-thumb:hover {
  background: linear-gradient(180deg, #fff7ed, #ffedd5);
}

@media (max-width: 900px) {
  .header-main {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
  }

  .search-box {
    grid-column: 1 / -1;
    order: 3;
    max-width: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-menu {
    display: none;
    position: absolute;
    right: 16px;
    top: 120px;
    flex-direction: column;
    width: min(280px, calc(100% - 32px));
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
  }

  .nav-menu.is-open {
    display: flex;
  }

  .hero-banner-inner,
  .split-panel,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .catalog-layout {
    grid-template-columns: 1fr;
  }

  .catalog-sidebar {
    display: none;
  }

  .catalog-mobile-filters {
    display: flex;
  }
}

@media (max-width: 600px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .product-body h3 {
    font-size: 0.85rem;
    min-height: auto;
  }

  .promo-bar-inner {
    font-size: 0.72rem;
  }
}

/* Página de produto */
.product-page .product-main { padding: 24px 0 48px; }
.product-detail { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(0, 1.2fr); gap: 32px; align-items: start; }
.product-detail-image { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
.product-detail-fallback { display: grid; aspect-ratio: 1; place-items: center; border-radius: var(--radius); background: linear-gradient(180deg, #fff7ed, #f3f4f6); font-size: 3rem; font-weight: 900; color: var(--orange); }
.product-detail-info h1 { margin: 0 0 12px; font-size: clamp(1.5rem, 3vw, 2rem); }
.product-detail-price { font-size: 1.5rem; font-weight: 800; margin: 0 0 8px; }
.product-detail-lead, .product-detail-desc { color: var(--muted); }
.product-detail-trust { margin: 16px 0 24px; padding-left: 18px; color: var(--text); }
.product-detail-trust a { color: var(--orange); font-weight: 600; }
.product-buy-panel { margin-top: 8px; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Páginas institucionais */
.info-page .info-main { padding: 32px 0 48px; max-width: 720px; }
.info-page .info-main h1 { margin-top: 0; }
.info-page .steps-list { padding-left: 20px; line-height: 1.7; }
.info-page .nav-menu.is-open-static { display: flex; gap: 16px; flex-wrap: wrap; }
.consent-label { display: flex; gap: 10px; align-items: flex-start; font-size: 0.88rem; color: var(--muted); }
.consent-label input { margin-top: 4px; }
.consent-label a { color: var(--orange); font-weight: 600; }

@media (max-width: 900px) {
  .product-detail { grid-template-columns: 1fr; }
}
