/* ===========================================================
   Madeireira Madalena — estilo compartilhado
   Paleta e espaçamentos ficam em variáveis: troque aqui para
   ajustar cores/marca em todo o site de uma vez.
   =========================================================== */

:root {
  --color-bg: #f7f8fb;
  --color-surface: #ffffff;
  --color-text: #16213a;
  --color-text-muted: #5c6577;
  --color-border: #e2e5ec;
  --color-accent: #c9973e;
  --color-accent-dark: #123a8f;
  --color-accent-light: #fbeed6;
  --color-whatsapp: #25d366;
  --color-whatsapp-dark: #1da851;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(31, 26, 21, 0.06);
  --shadow-hover: 0 8px 24px rgba(31, 26, 21, 0.12);
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-accent-dark);
  border-bottom: 3px solid var(--color-accent);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 76px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
}

.logo-mark {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 8px;
  object-fit: cover;
}

.logo small {
  display: block;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 22px;
  margin: 0;
  padding: 0;
}

.main-nav ul a {
  font-size: 0.94rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.main-nav ul a:hover,
.main-nav ul a[aria-current="page"] {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  border: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

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

.btn-whatsapp:hover {
  background: var(--color-whatsapp-dark);
}

.btn-outline {
  background: transparent;
  color: var(--color-accent-dark);
  border: 1.5px solid var(--color-accent);
}

.btn-outline:hover {
  background: var(--color-accent-light);
}

.btn-whatsapp svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.site-header .btn-whatsapp {
  padding: 11px 26px;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .site-header .container {
    gap: 10px;
  }

  .logo-mark {
    width: 36px;
    height: 36px;
  }

  .logo {
    font-size: 1.05rem;
  }

  .site-header .btn-whatsapp {
    padding: 10px;
    gap: 0;
  }

  .site-header .btn-whatsapp .btn-label {
    display: none;
  }
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: #ffffff;
}

.nav-toggle svg {
  width: 26px;
  height: 26px;
}

/* ---------- Hero ---------- */

.hero {
  background: linear-gradient(135deg, var(--color-accent-light) 0%, var(--color-bg) 65%);
  padding: 64px 0 56px;
  border-bottom: 1px solid var(--color-border);
}

.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  line-height: 1.15;
  margin: 0 0 16px;
}

.hero p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  margin: 0 0 28px;
  max-width: 46ch;
}

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

.hero-art {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  background: repeating-linear-gradient(
    45deg,
    var(--color-accent-dark),
    var(--color-accent-dark) 14px,
    var(--color-accent) 14px,
    var(--color-accent) 28px
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  text-align: center;
  padding: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-art.has-photo {
  padding: 0;
  background: var(--color-surface);
}

.hero-art.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- Section headings ---------- */

.section {
  padding: 56px 0;
}

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

.section-head h2 {
  font-size: 1.6rem;
  margin: 0;
}

.section-head p {
  color: var(--color-text-muted);
  margin: 0;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 8px;
}

/* ---------- Category grid (home) ---------- */

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

.category-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.category-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: var(--color-accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--color-accent-dark);
}

.category-card h3 {
  margin: 4px 0 0;
  font-size: 1.1rem;
}

.category-card p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.92rem;
  flex-grow: 1;
}

.category-card .card-link {
  font-weight: 600;
  color: var(--color-accent-dark);
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ---------- Breadcrumb ---------- */

.breadcrumb {
  padding: 18px 0;
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

.breadcrumb a {
  color: var(--color-accent-dark);
  font-weight: 600;
}

.breadcrumb span {
  margin: 0 6px;
}

/* ---------- Category page header ---------- */

.category-header {
  padding: 20px 0 40px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 40px;
}

.category-header h1 {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  margin: 0 0 10px;
}

.category-header p {
  color: var(--color-text-muted);
  max-width: 60ch;
  margin: 0;
}

/* ---------- Subsection heading (used to split a category into groups) ---------- */

.subsection-title {
  font-size: 1.25rem;
  margin: 0 0 20px;
  padding-top: 8px;
}

.subsection-title:not(:first-child) {
  margin-top: 12px;
  padding-top: 40px;
  border-top: 1px solid var(--color-border);
}

/* ---------- Product grid ---------- */

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

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

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

.product-photo {
  aspect-ratio: 4 / 3;
  background: var(--color-accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent-dark);
  position: relative;
}

.product-photo svg {
  width: 40px;
  height: 40px;
  opacity: 0.55;
}

.product-photo.has-photo {
  background: #ffffff;
}

.product-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
}

.product-photo .photo-note {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  font-size: 0.68rem;
  text-align: center;
  color: var(--color-accent-dark);
  opacity: 0.75;
  font-weight: 600;
}

.product-body {
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1;
}

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

.product-body p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  flex-grow: 1;
}

.product-body .btn {
  align-self: flex-start;
  padding: 9px 16px;
  font-size: 0.85rem;
}

/* ---------- About / Contact ---------- */

.about-section {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.about-grid h2 {
  font-size: 1.6rem;
  margin: 0 0 14px;
}

.about-grid p {
  color: var(--color-text-muted);
  margin: 0 0 14px;
}

.about-facts {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.about-facts li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.94rem;
}

.about-facts svg {
  width: 20px;
  height: 20px;
  stroke: var(--color-accent);
  flex-shrink: 0;
  margin-top: 2px;
}

.map-frame {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.map-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.contact-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.contact-card h2 {
  margin: 0 0 16px;
  font-size: 1.35rem;
}

.contact-list {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  gap: 14px;
}

.contact-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.95rem;
}

.contact-list svg {
  width: 20px;
  height: 20px;
  stroke: var(--color-accent-dark);
  flex-shrink: 0;
  margin-top: 2px;
}

.contact-list a {
  font-weight: 600;
  color: var(--color-accent-dark);
}

/* ---------- CTA banner ---------- */

.cta-banner {
  background: var(--color-accent-dark);
  color: #fff;
  padding: 46px 0;
  text-align: center;
}

.cta-banner h2 {
  margin: 0 0 10px;
  font-size: 1.5rem;
}

.cta-banner p {
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.85);
}

.cta-banner .btn-whatsapp {
  background: var(--color-whatsapp);
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--color-accent-dark);
  color: rgba(255, 255, 255, 0.82);
  padding: 44px 0 26px;
  font-size: 0.9rem;
}

.footer-logo {
  width: 150px;
  max-width: 100%;
  border-radius: 10px;
  margin-bottom: 16px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 28px;
}

.footer-grid h4 {
  color: #fff;
  margin: 0 0 14px;
  font-size: 0.95rem;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.82rem;
}

/* ---------- Responsive ---------- */

/* Header nav needs more room than the layout breakpoints below because
   it holds 8 links plus a CTA button — it switches to the hamburger
   menu earlier than everything else on the page. */
@media (max-width: 1180px) {
  .main-nav ul {
    display: none;
  }

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

  .main-nav.open ul {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: absolute;
    top: 79px;
    left: 0;
    right: 0;
    background: var(--color-surface);
    padding: 16px 24px 20px;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow);
  }

  .main-nav.open ul a {
    color: var(--color-text);
  }

  .main-nav.open ul a:hover,
  .main-nav.open ul a[aria-current="page"] {
    color: var(--color-accent-dark);
  }
}

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

  .hero .container,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-art {
    order: -1;
  }

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

@media (max-width: 640px) {
  .category-grid,
  .product-grid {
    grid-template-columns: 1fr;
  }

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

  .hero {
    padding: 44px 0 40px;
  }
}
