:root {
  color-scheme: light;
  --blue-900: #063a7a;
  --blue-700: #075fb8;
  --blue-500: #0d99da;
  --green-600: #48a928;
  --green-100: #eaf8e7;
  --ink: #172033;
  --muted: #68758a;
  --line: #dbe6f2;
  --surface: #ffffff;
  --soft: #f4f9fd;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--soft);
  color: var(--ink);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}

.topbar {
  width: min(1180px, calc(100% - 32px));
  min-height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(14px, 3vw, 34px);
}

.brand {
  flex: 0 1 360px;
}

.brand img {
  width: clamp(188px, 23vw, 285px);
  height: auto;
  display: block;
}

.contact-nav {
  flex: 1 1 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.contact-nav a,
.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 800;
}

.contact-nav a {
  gap: 8px;
  min-width: 172px;
  padding: 0 16px;
  border: 1px solid var(--line);
  color: #fff;
  background: #1fae57;
  box-shadow: 0 8px 20px rgba(31, 174, 87, 0.16);
}

.contact-nav a:hover {
  background: #168d46;
}

.whatsapp-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  fill: currentColor;
}

.contact-nav a span {
  white-space: nowrap;
}

.contact-nav a,
.button {
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.contact-nav a:hover,
.button:hover {
  transform: translateY(-1px);
}

.button.secondary {
  background: #fff;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  min-height: 540px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 28px;
  align-items: center;
  padding: 48px 0 34px;
}

.hero-copy h1 {
  max-width: 820px;
  margin: 10px 0 16px;
  color: var(--blue-900);
  font-size: clamp(38px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-copy p,
.section-head p,
.whatsapp-cta p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.hero-copy p {
  max-width: 700px;
  font-size: 18px;
}

.eyebrow {
  display: inline-flex;
  color: var(--green-600);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-actions,
.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  padding: 0 18px;
  border: 1px solid transparent;
}

.button.primary {
  color: #fff;
  background: var(--green-600);
}

.button.secondary {
  color: var(--blue-900);
  border-color: var(--line);
  background: #fff;
}

.hero-panel {
  display: grid;
  gap: 12px;
}

.hero-panel div,
.conditions article,
.product-card,
.whatsapp-cta {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(22, 49, 80, 0.08);
}

.hero-panel div {
  padding: 24px;
}

.hero-panel strong {
  display: block;
  color: var(--blue-900);
  font-size: 24px;
}

.hero-panel span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
}

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

.conditions article {
  padding: 24px;
}

.conditions span {
  color: var(--green-600);
  font-weight: 900;
}

.conditions h2 {
  margin: 8px 0;
  color: var(--blue-900);
  font-size: 24px;
}

.conditions p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.catalog-section {
  padding: 8px 0 56px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 18px;
}

.section-head h2,
.whatsapp-cta h2 {
  margin: 8px 0 0;
  color: var(--blue-900);
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: 0;
}

.section-head p {
  max-width: 520px;
}

.filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

label span {
  display: block;
  margin-bottom: 7px;
  color: var(--blue-900);
  font-size: 13px;
  font-weight: 900;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(13, 153, 218, 0.15);
}

.catalog-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin: 18px 0;
  color: var(--muted);
}

.catalog-status strong {
  color: var(--blue-900);
}

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

.product-card {
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-image {
  height: 178px;
  display: grid;
  place-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
}

.product-image img {
  width: 100%;
  height: 100%;
  max-width: 168px;
  max-height: 154px;
  object-fit: contain;
}

.photo-missing {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 14px;
  border: 1px dashed #b9c9dc;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
  background: #f8fbff;
}

.product-body {
  min-height: 218px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
}

.product-category {
  color: var(--green-600);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.product-card h3 {
  margin: 0;
  color: var(--blue-900);
  font-size: 18px;
  line-height: 1.2;
}

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

.meta span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  color: var(--blue-900);
  font-size: 12px;
  font-weight: 800;
  background: #eef7ff;
}

.price {
  margin-top: auto;
  color: var(--blue-900);
  font-size: 24px;
  font-weight: 900;
}

.product-card .button {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  font-size: 14px;
}

.empty-state {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  background: #fff;
}

.whatsapp-cta {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: center;
  margin-bottom: 56px;
  padding: 28px;
}

.whatsapp-cta p {
  max-width: 600px;
}

footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px 16px 34px;
  color: #fff;
  background: var(--blue-900);
}

footer span {
  color: #dceefd;
}

@media (max-width: 920px) {
  .section-head,
  .whatsapp-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar {
    align-items: center;
  }

  .hero,
  .conditions,
  .filters {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 760px) {
  .topbar {
    min-height: 0;
    padding: 10px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  /* No celular, o logo não deve reservar 360px de altura. */
  .brand {
    flex: 0 0 auto;
    width: 100%;
  }

  .contact-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .contact-nav a {
    flex: 1 1 180px;
  }

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

@media (max-width: 620px) {
  .topbar {
    width: min(100% - 24px, 1180px);
  }

  main {
    width: min(100% - 24px, 1180px);
  }

  .brand img {
    width: 216px;
  }

  .contact-nav {
    width: 100%;
    gap: 8px;
  }

  .contact-nav a,
  .hero-actions .button,
  .cta-buttons,
  .cta-buttons .button {
    width: 100%;
  }

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

  .product-image {
    height: 164px;
  }

  .product-image img {
    max-width: 150px;
    max-height: 142px;
  }

  .product-body {
    min-height: 206px;
  }
}


/* Carrinho e finalização do pedido */
.cart-trigger {
  flex: 0 0 auto;
  gap: 9px;
  border-color: var(--blue-900);
  color: #fff;
  background: var(--blue-900);
  white-space: nowrap;
  cursor: pointer;
}
.cart-trigger:hover { background: var(--blue-700); }
.cart-count {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  color: var(--blue-900);
  background: #fff;
  font-size: 13px;
}
.add-to-cart { cursor: pointer; }
.dialog-open { overflow: hidden; }
.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(9, 27, 49, .62);
  overflow-y: auto;
}
.dialog-backdrop[hidden], .cart-summary[hidden], .checkout-form[hidden] { display: none; }
.cart-dialog {
  width: min(720px, 100%);
  max-height: min(92vh, 900px);
  overflow-y: auto;
  padding: clamp(18px, 4vw, 30px);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .28);
}
.cart-dialog-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 18px; }
.cart-dialog-header h2 { margin: 5px 0 0; color: var(--blue-900); font-size: 30px; }
.icon-button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--blue-900); font-size: 28px; line-height: 1; cursor: pointer; }
.cart-items { display: grid; gap: 10px; }
.cart-item { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-item-info { display: grid; gap: 5px; min-width: 0; }
.cart-item-info strong { color: var(--blue-900); line-height: 1.3; }
.cart-item-info span { color: var(--muted); font-size: 13px; }
.cart-item-info b { color: var(--blue-900); }
.quantity-control { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; }
.quantity-control button:not(.remove-item) { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 8px; color: var(--blue-900); background: #f5f9fd; font-size: 20px; cursor: pointer; }
.quantity-control span { min-width: 18px; text-align: center; font-weight: 800; }
.quantity-control .remove-item { border: 0; padding: 6px; color: #a12b2b; background: transparent; font-size: 12px; text-decoration: underline; cursor: pointer; }
.cart-empty { padding: 20px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); text-align: center; }
.cart-summary { margin-top: 18px; padding: 16px; border-radius: 10px; background: var(--soft); }
.cart-summary div { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--blue-900); }
.cart-summary strong { font-size: 22px; }
.cart-summary p, .checkout-form > p { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.checkout-form { display: grid; gap: 14px; margin-top: 24px; }
.checkout-form h3 { margin: 0; color: var(--blue-900); font-size: 22px; }
.checkout-form > p { margin: -8px 0 0; }
.checkout-form label { display: block; }
.checkout-form textarea { width: 100%; min-height: 80px; resize: vertical; padding: 12px 13px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.checkout-submit { width: 100%; min-height: 50px; border: 0; cursor: pointer; }
.checkout-note { text-align: center; }
@media (max-width: 920px) {
  .topbar { flex-wrap: wrap; }
  .cart-trigger { align-self: flex-start; }
}
@media (max-width: 620px) {
  .cart-trigger { width: 100%; }
  .dialog-backdrop { padding: 8px; align-items: start; }
  .cart-dialog { max-height: 96vh; margin: 4px 0; padding: 18px 14px; }
  .cart-item { align-items: flex-start; flex-direction: column; }
  .quantity-control { justify-content: flex-start; }
  .cart-summary div { align-items: flex-start; flex-direction: column; }
}


/* Ajustes de rolagem e cabeçalho em telas pequenas */
@media (max-width: 760px) {
  .site-header {
    position: relative;
    top: auto;
  }
  .topbar {
    height: auto;
  }
  .brand {
    flex-basis: auto;
  }
}
