:root {
  --ink: #20251e;
  --muted: #687064;
  --brand: #9a6230;
  --brand-dark: #6f3f1e;
  --leaf: #1f5b35;
  --leaf-dark: #153d25;
  --line: #e7e8dc;
  --paper: #fbfaf5;
  --warm: #f5efe4;
  --white: #ffffff;
  --shadow: 0 18px 42px rgba(36, 42, 31, .11);
}

body.theme-claro {
  --ink: #1f241d;
  --muted: #5f685c;
  --brand: #9d6938;
  --brand-dark: #70431f;
  --leaf: #1d6238;
  --leaf-dark: #123f25;
  --line: #e3eadf;
  --paper: #ffffff;
  --warm: #f7faf4;
  --white: #ffffff;
  --shadow: 0 18px 42px rgba(28, 58, 34, .1);
}

body.theme-escuro {
  --ink: #f7f1e7;
  --muted: #c8c1b5;
  --brand: #d49a60;
  --brand-dark: #efbd7c;
  --leaf: #78b981;
  --leaf-dark: #a5d48f;
  --line: #303829;
  --paper: #080a07;
  --warm: #14180f;
  --white: #11150f;
  --shadow: 0 18px 42px rgba(0, 0, 0, .36);
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 150px;
}
body {
  margin: 0;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  background: var(--paper);
  line-height: 1.55;
}
body.theme-claro .site-header { background: rgba(255,255,255,.98); }
body.theme-escuro .site-header {
  background: rgba(9, 12, 8, .97);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .34);
}
body.theme-escuro .main-nav { background: rgba(11, 14, 10, .98); }
body.theme-escuro .main-nav a:hover,
body.theme-escuro .nav-dropdown:hover > button { background: #172012; color: var(--brand); }
body.theme-escuro .section--warm { background: linear-gradient(180deg, #10140d, #080a07); }
body.theme-escuro .about { background: #0d100b; }
body.theme-escuro .about-card,
body.theme-escuro .product-card,
body.theme-escuro .category-card,
body.theme-escuro .detail-copy,
body.theme-escuro .contact-box,
body.theme-escuro .admin-card,
body.theme-escuro .table,
body.theme-escuro .search,
body.theme-escuro .dropdown-panel,
body.theme-escuro .menu-toggle {
  background: var(--white);
}
body.theme-escuro .field input,
body.theme-escuro .field textarea,
body.theme-escuro .field select,
body.theme-escuro .search input {
  background: #0b0e0a;
  color: var(--ink);
  border-color: var(--line);
}
body.theme-escuro .search input::placeholder { color: #9fa893; }
body.theme-escuro .product-card__image { background: #1c2117; }
body.theme-escuro .footer { background: #071006; }
body.theme-escuro .slide p { color: #efe7dc; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,252,.97);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(31, 40, 30, .07);
  backdrop-filter: blur(14px);
}
.site-header::after {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--leaf), #b87b3d, var(--leaf), transparent);
  opacity: .75;
}
.topbar__inner {
  min-height: 118px;
  display: grid;
  grid-template-columns: minmax(230px, 300px) 1fr minmax(280px, 390px) auto;
  align-items: center;
  gap: 28px;
}
.brand img {
  width: 270px;
  height: 104px;
  object-fit: contain;
}
.contact-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  color: var(--muted);
  font-size: 14px;
}
.contact-strip a {
  border-bottom: 1px solid transparent;
}
.contact-strip a:hover, .footer a:hover {
  color: var(--leaf);
  border-color: rgba(31,91,53,.35);
}
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.social-link svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.instagram-link { color: var(--leaf); }
.footer .instagram-link { color: #f6f4ec; }
.footer .instagram-link:hover { color: #d8e4cf; }
.search {
  display: grid;
  grid-template-columns: 1fr auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 8px 22px rgba(36, 42, 31, .06);
}
.search input, .search button {
  border: 0;
  min-height: 42px;
  font: inherit;
}
.search input { padding: 0 14px; min-width: 0; }
.search button {
  padding: 0 18px;
  color: var(--white);
  background: var(--leaf);
  cursor: pointer;
}
.search button:hover { background: var(--leaf-dark); }
.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--white);
  font-size: 22px;
  color: var(--leaf);
}
.main-nav {
  border-top: 1px solid var(--line);
  background: rgba(255,255,252,.98);
  color: var(--ink);
}
.nav-scroll {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 52px;
}
.main-nav a, .nav-dropdown > button {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 16px;
  border: 0;
  color: var(--leaf-dark);
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.main-nav a:hover, .nav-dropdown:hover > button {
  background: #eff5ed;
  color: var(--brand-dark);
}
.nav-dropdown { position: relative; }
.dropdown-panel {
  position: absolute;
  left: 0;
  top: 100%;
  width: min(920px, calc(100vw - 32px));
  display: none;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 20px;
  padding: 22px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--leaf);
  border-radius: 0 0 8px 8px;
  box-shadow: var(--shadow);
}
.nav-dropdown:hover .dropdown-panel { display: grid; }
.dropdown-group a {
  display: block;
  min-height: 0;
  padding: 5px 0;
  color: var(--muted);
  font-size: 13px;
}
.dropdown-group .dropdown-title {
  color: var(--leaf);
  font-size: 14px;
  font-weight: 700;
}

.hero { min-height: 540px; background: var(--paper); }
.carousel { position: relative; height: min(70vh, 620px); min-height: 520px; overflow: hidden; }
.slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  background-position: center;
  background-size: cover;
  transition: opacity .7s ease;
}
.slide.is-active { opacity: 1; z-index: 1; }
.slide__content {
  color: var(--ink);
  text-shadow: 0 2px 20px rgba(255, 253, 248, .86);
}
.slide__content span {
  color: var(--leaf);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.slide h1 {
  width: min(720px, 100%);
  margin: 12px 0 18px;
  font-size: clamp(38px, 6vw, 74px);
  line-height: 1.02;
  letter-spacing: 0;
}
.slide p {
  width: min(600px, 100%);
  color: #283024;
  font-size: 19px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 7px;
  color: var(--white);
  background: var(--leaf);
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(31, 91, 53, .16);
}
.btn:hover { background: var(--leaf-dark); }
.btn--light {
  color: var(--white);
  background: var(--leaf);
}
.carousel-dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 24px;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}
.carousel-dot {
  width: 34px;
  height: 5px;
  border: 0;
  border-radius: 8px;
  background: rgba(31,91,53,.24);
  cursor: pointer;
}
.carousel-dot.is-active { background: var(--leaf); }

.section {
  padding: 76px 0;
  scroll-margin-top: 150px;
}
.section--warm { background: linear-gradient(180deg, #f8f4ed, #fffdf8); }
.section-heading { margin-bottom: 28px; }
.section-heading span {
  color: var(--leaf);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}
.section-heading h2 {
  max-width: 760px;
  margin: 8px 0 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
}
.section-heading p { max-width: 760px; color: var(--muted); }
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}
.product-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--white);
  box-shadow: 0 12px 28px rgba(36, 42, 31, .07);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.product-card:hover {
  transform: translateY(-2px);
  border-color: rgba(31,91,53,.25);
  box-shadow: var(--shadow);
}
.product-card__image {
  display: block;
  aspect-ratio: 4 / 3;
  background: #eee2d1;
  overflow: hidden;
}
.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.product-card:hover img { transform: scale(1.04); }
.product-card__body { padding: 18px; }
.product-card span, .detail-copy > span {
  color: var(--leaf);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
.product-card h3 {
  min-height: 52px;
  margin: 6px 0 8px;
  font-size: 18px;
  line-height: 1.25;
}
.product-card p {
  display: -webkit-box;
  min-height: 66px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--muted);
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.product-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.product-meta small { color: var(--muted); }
.product-meta a { color: var(--brand); font-weight: 700; }
.product-card--empty { opacity: .72; }
.product-card--empty .product-card__image { background: repeating-linear-gradient(135deg, #eadccd, #eadccd 10px, #f6eee4 10px, #f6eee4 20px); }
.product-card--empty h3, .product-card--empty p { padding: 0 18px; }

.category-block {
  padding: 24px 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 150px;
}
.category-block h3 { margin: 0 0 12px; color: var(--brand-dark); }
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.category-card {
  display: grid;
  align-content: center;
  min-height: 120px;
  padding: 22px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--leaf);
  border-radius: 7px;
  background: var(--white);
  box-shadow: 0 10px 22px rgba(45, 31, 20, .06);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.category-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  box-shadow: var(--shadow);
}
.category-card span {
  color: var(--brand-dark);
  font-size: 18px;
  font-weight: 700;
}
.category-card small {
  margin-top: 6px;
  color: var(--muted);
}
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips a, .chips span {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--white);
  color: var(--brand-dark);
}
.chips a:hover { border-color: var(--brand); color: var(--brand); }

.about { background: #fff; }
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 46px;
  align-items: start;
}
.about p { color: var(--muted); }
.about-card {
  display: grid;
  gap: 12px;
  padding: 28px;
  border-left: 4px solid var(--leaf);
  background: var(--warm);
  border-radius: 7px;
}
.about-card strong { font-size: 20px; }
.map-frame {
  height: 420px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: var(--shadow);
}
.map-frame iframe { width: 100%; height: 100%; border: 0; }

.product-detail__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, .98fr);
  gap: 44px;
  align-items: center;
}
.detail-image {
  overflow: hidden;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--white);
}
.detail-image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.detail-copy h1 {
  margin: 8px 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}
.detail-copy p { color: var(--muted); font-size: 18px; }
.detail-copy dl {
  display: grid;
  gap: 10px;
  margin: 26px 0;
}
.detail-copy dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.detail-copy dt { color: var(--muted); }
.detail-copy dd { margin: 0; font-weight: 700; }

.footer {
  padding: 46px 0;
  color: #f6f4ec;
  background: #183b27;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 220px 1fr;
  gap: 36px;
}
.footer-logo {
  width: 210px;
  height: 76px;
  object-fit: contain;
  margin-bottom: 16px;
  background: #fff;
  border-radius: 7px;
  padding: 6px;
}
.footer-nav { display: grid; gap: 10px; align-content: start; }

.admin-body { background: #f6f2ec; }
.admin-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.admin-sidebar {
  padding: 28px;
  color: #fff;
  background: var(--leaf-dark);
}
.admin-sidebar img {
  width: 160px;
  height: 58px;
  object-fit: contain;
  margin-bottom: 26px;
  background: #fff;
  border-radius: 8px;
  padding: 6px;
}
.admin-sidebar a {
  display: block;
  padding: 11px 0;
  color: #f4e7d7;
}
.admin-main { padding: 34px; }
.admin-card {
  margin-bottom: 22px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 7px; margin-bottom: 14px; }
.field label { font-weight: 700; }
.field input, .field textarea, .field select {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #d7cbbd;
  border-radius: 8px;
  font: inherit;
}
.field textarea { min-height: 130px; resize: vertical; }
.table { width: 100%; border-collapse: collapse; background: #fff; }
.table th, .table td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; }
.notice { padding: 12px 14px; border-radius: 8px; background: #e8f3df; color: #31511e; }
.notice-error { background: #fff0e5; color: #8a3a13; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 940px) {
  .topbar__inner {
    grid-template-columns: 1fr auto;
    min-height: 132px;
  }
  .brand img { width: 250px; height: 94px; }
  .contact-strip, .search { grid-column: 1 / -1; }
  .menu-toggle { display: inline-grid; place-items: center; justify-self: end; }
  .main-nav { display: none; }
  .main-nav.is-open {
    display: block;
    box-shadow: 0 18px 32px rgba(31, 40, 30, .08);
  }
  .nav-scroll { align-items: stretch; flex-direction: column; padding: 8px 0; }
  .main-nav a, .nav-dropdown > button { width: 100%; }
  .dropdown-panel {
    position: static;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    box-shadow: none;
    border-top: 1px solid var(--line);
  }
  .nav-dropdown:hover .dropdown-panel { display: grid; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-grid, .product-detail__grid, .footer-grid, .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; }
}

@media (max-width: 620px) {
  html { scroll-padding-top: 190px; }
  .container { width: min(100% - 22px, 1180px); }
  .topbar__inner { gap: 14px; min-height: 126px; }
  .brand {
    justify-self: center;
    grid-column: 1 / -1;
  }
  .brand img { width: 230px; height: 86px; }
  .menu-toggle {
    grid-column: 1 / -1;
    justify-self: center;
  }
  .contact-strip { font-size: 13px; }
  .carousel { min-height: 490px; height: 68vh; }
  .slide h1 { font-size: 39px; }
  .slide p { font-size: 16px; }
  .section {
    padding: 52px 0;
    scroll-margin-top: 190px;
  }
  .category-block { scroll-margin-top: 190px; }
  .product-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: 1fr; }
  .dropdown-panel { grid-template-columns: 1fr; }
  .map-frame { height: 340px; }
  .admin-main { padding: 18px; }
  .admin-grid { grid-template-columns: 1fr; }
  .table { display: block; overflow-x: auto; }
}
