:root {
  --background: #ffffff;
  --foreground: #1b2430;
  --card: #ffffff;
  --primary: #008f3d;
  --primary-hover: #007432;
  --primary-deep: #066b30;
  --primary-foreground: #ffffff;
  --muted: #f4faf6;
  --muted-foreground: #5d6b7a;
  --accent: #727274;
  --accent-hover: #5e5e60;
  --accent-foreground: #ffffff;
  --border: #e4ebf1;
  --soft: #f3faf6;
  --radius: 0.85rem;
  --radius-lg: 1.35rem;
  --shadow: 0 16px 40px rgba(16, 42, 28, 0.08);
  --font-heading: 'Archivo', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --header-h: 5rem;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; background: var(--background); }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
button, input { font: inherit; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: 76rem;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.muted { color: var(--muted-foreground); }
.text-accent { color: var(--primary); }

.icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-fill { fill: currentColor; stroke: none; }
.icon-primary { color: var(--primary); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.75rem;
  font-family: inherit;
  font-weight: 700;
  text-align: center;
  padding: 0.85rem 1.15rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, transform 0.15s;
}

.btn-sm { padding: 0.62rem 1.05rem; font-size: 0.92rem; border-radius: 0.7rem; }
.btn-lg { width: 100%; padding: 0.95rem 1.2rem; font-size: 1.02rem; }
.btn-accent { background: var(--accent); color: var(--accent-foreground); box-shadow: 0 8px 18px rgba(114, 114, 116, 0.28); }
.btn-accent:hover { background: var(--accent-hover); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline-primary {
  border-color: var(--primary);
  color: var(--primary);
  background: #fff;
}
.btn-outline-primary:hover { background: var(--soft); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #edf1f5;
  backdrop-filter: blur(10px);
  padding-top: env(safe-area-inset-top);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: var(--header-h);
}

.logo { display: flex; align-items: center; min-width: 0; margin-right: auto; }
.logo img { height: 2.7rem; width: auto; max-width: min(13.5rem, 52vw); }

.nav-toggle {
  display: inline-flex;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  background: #fff;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.nav-bar {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: var(--foreground);
  border-radius: 2px;
}

.main-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.4rem 1rem 0.9rem;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 16px 30px rgba(19, 28, 46, 0.06);
}

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

.main-nav a {
  padding: 0.75rem 0.2rem;
  font-weight: 600;
  color: #334155;
}

.main-nav a:hover { color: var(--primary); }

.header-actions { display: flex; align-items: center; gap: 0.55rem; }
.header-call {
  background: #727274;
  color: #fff;
  box-shadow: 0 8px 18px rgba(114, 114, 116, 0.28);
  white-space: nowrap;
}
.header-call:hover { background: #5e5e60; }
.header-call .icon { width: 1.05rem; height: 1.05rem; }

.hero {
  position: relative;
  overflow: hidden;
  background: #fff;
  color: var(--foreground);
}

.hero-decor { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.hero-wave {
  position: absolute;
  left: -100%;
  bottom: 0;
  width: 300%;
  height: 108px;
  animation: wave-sway var(--wave-time, 14s) ease-in-out infinite;
  animation-delay: var(--wave-delay, 0s);
}
.hero-wave-back { --wave-time: 17s; --wave-shift: -8%; --wave-lift: 7px; }
.hero-wave-mid { --wave-time: 13s; --wave-shift: 10%; --wave-lift: -9px; --wave-delay: -5s; }
.hero-wave-front { --wave-time: 15s; --wave-shift: -5%; --wave-lift: 0px; --wave-delay: -2s; }

@keyframes wave-sway {
  0%, 100% { transform: translate3d(0, 0, 0); }
  34% { transform: translate3d(var(--wave-shift, -8%), var(--wave-lift, 0px), 0); }
  68% { transform: translate3d(calc(var(--wave-shift, -8%) * -0.62), calc(var(--wave-lift, 0px) * -0.45), 0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-wave { animation: none; }
}

.hero-visual { position: relative; }
.hero-banner { position: relative; z-index: 2; }

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1.75rem;
  align-items: center;
  padding-top: 1.75rem;
  padding-bottom: 7.25rem;
}

.hero-text { display: flex; flex-direction: column; gap: 1rem; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow .icon { width: 1rem; height: 1rem; }

#hero-titulo { white-space: pre-line; }

.hero h1 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2.05rem, 7.2vw, 4.05rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: #17202b;
}

.hero-lead {
  max-width: 36rem;
  color: #5c6b7a;
  font-size: 1.05rem;
  line-height: 1.6;
}

.order-label {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8b97a3;
}

.wa-row { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }

.btn-wa {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 4.15rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.95rem;
  background: linear-gradient(180deg, #12a34c 0%, #078338 100%);
  color: #fff;
  box-shadow: 0 10px 22px rgba(8, 110, 48, 0.18);
}

.btn-wa:hover { filter: brightness(1.06); }

.wa-badge {
  display: grid;
  place-items: center;
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 50%;
  background: #fff;
  color: #078338;
  flex-shrink: 0;
}

.wa-badge .icon { width: 1.45rem; height: 1.45rem; }
.wa-label { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.wa-label small { font-size: 0.78rem; font-weight: 600; }
.wa-label strong { font-family: var(--font-heading); font-size: 1.15rem; font-weight: 800; }
.wa-chevron { margin-left: auto; width: 1.15rem; height: 1.15rem; }

.hero-banner {
  position: relative;
  border-radius: 1.6rem;
  overflow: hidden;
  background: transparent;
  box-shadow: 0 22px 50px rgba(0, 80, 40, 0.12);
  aspect-ratio: 1024 / 778;
}

.hero-banner img { width: 100%; height: 100%; object-fit: contain; object-position: center center; }

.section { scroll-margin-top: calc(var(--header-h) + 0.5rem); padding: 3.25rem 0; }
.section-about { background: #fff; }
.section-branches { background: var(--soft); }
.section-products { background: #f6fbf8; }

.section-head { display: flex; flex-direction: column; gap: 0.55rem; margin-bottom: 1.5rem; }

.section-head h2,
.about-inner h2,
.cart h2 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.section-head p { max-width: 38rem; color: var(--muted-foreground); line-height: 1.6; }

.about-inner { max-width: 46rem; display: flex; flex-direction: column; gap: 0.8rem; }
.about-text { white-space: pre-line; font-size: 1.08rem; line-height: 1.7; color: #3d4b5c; max-width: 40rem; }

.city-block + .city-block { margin-top: 2rem; }

.city-heading {
  margin: 0 0 0.85rem;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
}

.branch-grid, .product-grid { display: grid; gap: 1rem; }

.branch-card, .product-card, .cart {
  background: #fff;
  border: 1px solid #e6eee9;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.branch-card { display: flex; flex-direction: column; overflow: hidden; }

.branch-photo { aspect-ratio: 16 / 10; background: #e5f4eb; }
.branch-photo img, .branch-photo iframe { width: 100%; height: 100%; border: 0; object-fit: cover; }

.branch-info { display: flex; flex-direction: column; gap: 0.35rem; padding: 1rem 1rem 0.35rem; }
.branch-city { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--primary); }
.branch-name { font-family: var(--font-heading); font-size: 1.3rem; font-weight: 800; }
.branch-address { display: flex; gap: 0.45rem; align-items: flex-start; color: var(--muted-foreground); line-height: 1.5; }
.branch-address .icon { width: 1rem; height: 1rem; margin-top: 0.2rem; color: var(--primary); }

.branch-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.45rem; padding: 0.9rem 1rem 1rem; }
.branch-actions.is-two { grid-template-columns: 1fr 1fr; }

.branch-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  border-radius: 0.8rem;
  padding: 0.7rem 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid var(--border);
  text-align: center;
  background: #fff;
}

.branch-action .icon { color: var(--primary); }
.branch-action.is-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.branch-action.is-primary .icon { color: #fff; }

.product-card { display: flex; flex-direction: column; overflow: hidden; }
.product-media { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; background: #f3f7f4; }
.product-media img { width: 100%; height: 100%; object-fit: contain; padding: 0.8rem; }
.product-media .icon { width: 3.5rem; height: 3.5rem; color: #8aa094; }

.product-body > .product-tag { position: static; align-self: flex-start; }

.product-tag {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  border-radius: 999px;
  padding: 0.22rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 800;
}

.tag-gas { background: var(--accent); color: var(--accent-foreground); }
.tag-agua { background: var(--primary); color: #fff; }
.tag-outro { background: var(--foreground); color: #fff; }

.product-body { display: flex; flex: 1; flex-direction: column; gap: 0.75rem; padding: 1rem 1rem 1.05rem; }
.product-body > .btn,
.product-body > .qty { width: 100%; }
.product-top { display: flex; justify-content: space-between; gap: 0.75rem; align-items: flex-start; }
.product-name { font-family: var(--font-heading); font-size: 1.2rem; font-weight: 800; }
.product-price { font-family: var(--font-heading); font-weight: 800; color: var(--primary); white-space: nowrap; }
.product-desc { flex: 1; color: var(--muted-foreground); line-height: 1.55; }

.qty {
  display: grid;
  grid-template-columns: 2.6rem 1fr 2.6rem;
  align-items: center;
  min-height: 2.8rem;
  border: 2px solid var(--primary);
  border-radius: 0.8rem;
  overflow: hidden;
  color: var(--primary);
  font-weight: 800;
}

.qty button {
  height: 100%;
  border: 0;
  background: var(--soft);
  color: var(--primary);
  font-size: 1.25rem;
  cursor: pointer;
}

.qty button:hover { background: #dff3e6; }
.qty span { text-align: center; }

.product-layout { display: grid; gap: 1.25rem; align-items: start; }

.cart {
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  scroll-margin-top: calc(var(--header-h) + 0.5rem);
}

.cart-empty { color: var(--muted-foreground); background: var(--soft); border-radius: 0.8rem; padding: 0.9rem; }

.cart-line {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px solid #edf2ef;
}

.cart-line:first-child { padding-top: 0; }
.cart-name { font-weight: 700; }
.cart-meta { color: var(--muted-foreground); font-size: 0.88rem; }
.cart-line .qty { width: 7.4rem; min-height: 2.4rem; }

.coupon-form { display: flex; flex-direction: column; gap: 0.4rem; }
.coupon-form label { font-size: 0.82rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: #607080; }
.coupon-row { display: flex; gap: 0.5rem; }
.coupon-row input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.75rem 0.8rem;
  background: #fff;
}
.coupon-row .btn { flex-shrink: 0; }
.coupon-msg { min-height: 1.2rem; font-size: 0.92rem; }
.coupon-ok { color: var(--primary-deep); font-weight: 700; }
.text-button {
  border: 0;
  background: none;
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.cart-totals { display: flex; flex-direction: column; gap: 0.3rem; }
.total-line { display: flex; justify-content: space-between; gap: 1rem; }
.total-line.is-discount { color: var(--primary-deep); }
.total-line.is-grand { font-family: var(--font-heading); font-size: 1.15rem; font-weight: 800; padding-top: 0.25rem; }
.cart-note { color: var(--muted-foreground); font-size: 0.88rem; }
.cart-error { color: #9d2c2c; font-weight: 700; min-height: 1.2rem; }
.cart-send .icon { width: 1.2rem; height: 1.2rem; }

.address-field { display: flex; flex-direction: column; gap: 0.4rem; }
.address-field span { font-size: 0.82rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: #607080; }
.address-field textarea {
  width: 100%;
  min-height: 4.6rem;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.75rem 0.8rem;
  background: #fff;
  font: inherit;
}

.city-fieldset { display: flex; flex-direction: column; gap: 0.55rem; }
.city-fieldset legend { font-size: 0.82rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: #607080; margin-bottom: 0.45rem; }
.city-options { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }

.city-choice {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.1rem;
  border: 2px solid var(--border);
  border-radius: 0.85rem;
  background: #fff;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
  padding: 0.4rem 0.5rem;
}

.city-choice.is-selected { background: var(--primary); border-color: var(--primary); color: #fff; }
.city-choice { position: relative; }
.city-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.city-choice:focus-within { outline: 3px solid var(--primary); outline-offset: 2px; }

.empty-box {
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
  padding: 1.1rem;
  color: var(--muted-foreground);
}

.site-footer {
  background: #064422;
  color: #fff;
  padding-bottom: 6.2rem;
}

.footer-grid {
  display: grid;
  gap: 1.5rem;
  padding-top: 2.4rem;
  padding-bottom: 1.4rem;
}

.footer-brand { font-family: var(--font-heading); font-weight: 800; font-size: 1.25rem; margin-bottom: 0.35rem; }
.footer-muted { color: rgba(255, 255, 255, 0.78); max-width: 22rem; }
.footer-label { margin-top: 0.15rem; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.62); }
.footer-link { display: block; font-weight: 700; padding: 0.15rem 0; }
.footer-link:hover { text-decoration: underline; }

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-bottom: 1.4rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.footer-bottom a { font-weight: 700; color: #fff; }

.mobile-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 0.5rem;
  padding: 0.7rem;
  padding-bottom: calc(0.7rem + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--border);
}

.install-banner {
  position: fixed;
  left: 0.75rem;
  right: 0.75rem;
  bottom: calc(5.25rem + env(safe-area-inset-bottom));
  z-index: 50;
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.install-banner[hidden] { display: none; }
.install-banner img { width: 3rem; height: 3rem; border-radius: 0.7rem; }
.install-banner strong { display: block; font-family: var(--font-heading); margin-bottom: 0.15rem; }
.install-banner p { font-size: 0.875rem; color: var(--muted-foreground); }
.install-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.7rem; }

@media (max-width: 420px) {
  .header-call { padding: 0.48rem 0.65rem; font-size: 0.78rem; gap: 0.3rem; }
}

@media (min-width: 640px) {
  .wa-row { grid-template-columns: 1fr 1fr; }
  .branch-grid { grid-template-columns: 1fr 1fr; }
  .product-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1.3fr 1fr 0.8fr; }
  .footer-bottom { flex-direction: row; justify-content: space-between; align-items: center; }
}

@media (min-width: 980px) {
  .header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }
  .logo { margin-right: 0; justify-self: start; }
  .logo img { height: 3.35rem; max-width: 16rem; }
  .nav-toggle { display: none; }
  .main-nav {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2.4rem;
    margin-left: 0;
    justify-self: center;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
  }
  .main-nav a { padding: 0.3rem 0; font-size: 0.95rem; }
  .header-actions { margin-left: 0; justify-self: end; }
  .hero-inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 2.5rem;
    align-items: center;
    padding-top: 1.4rem;
    padding-bottom: 8.5rem;
  }
  .hero-text { padding-top: 0; padding-bottom: 0; }
  .hero-visual {
    display: block;
    width: 100%;
    max-width: 100%;
    margin-right: 0;
  }
  .hero-banner {
    flex: none;
    width: 100%;
    height: auto;
    aspect-ratio: auto;
    margin-bottom: 0;
    border-radius: 1.6rem;
    box-shadow: none;
    overflow: hidden;
  }
  .hero-banner img {
    position: static;
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center center;
  }
  .hero-wave { height: 128px; }
  .section { padding: 4.5rem 0; }
  .product-layout { grid-template-columns: minmax(0, 1fr) 23.5rem; }
  .cart { position: sticky; top: calc(var(--header-h) + 0.8rem); }
  .site-footer { padding-bottom: 0; }
  .mobile-bar { display: none; }
  .install-banner {
    left: auto;
    width: min(24rem, calc(100% - 2rem));
    right: 1rem;
    bottom: calc(1rem + env(safe-area-inset-bottom));
  }
}

@media (max-width: 979px) {
  .hero-inner { padding-bottom: 5.25rem; }
  .hero-visual {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
  .hero-banner {
    border-radius: 1.25rem;
    box-shadow: none;
    overflow: hidden;
    aspect-ratio: 1024 / 681;
  }
  .hero-wave { height: 84px; }
}

@media (max-width: 420px) {
  .branch-actions, .branch-actions.is-two { grid-template-columns: 1fr; }
  .city-options, .coupon-row { grid-template-columns: 1fr; }
  .coupon-row { display: grid; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
