:root {
  --green: #0f5132;
  --green-dark: #0b3d2a;
  --yellow: #f2b705;
  --cream: #fff8ea;
  --white: #ffffff;
  --text: #18212f;
  --muted: #667085;
  --border: #e6e0d4;
  --error: #b42318;
  --success: #067647;
  --shadow: 0 18px 50px rgba(24, 33, 47, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

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

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

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

a:hover {
  text-decoration: underline;
}

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text);
  padding: 0.85rem 0.95rem;
}

textarea {
  resize: vertical;
}

button,
.btn {
  min-height: 44px;
}

:focus-visible {
  outline: 3px solid rgba(242, 183, 5, 0.65);
  outline-offset: 3px;
}

.skip-link,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.skip-link:focus {
  z-index: 99;
  width: auto;
  height: auto;
  clip: auto;
  top: 1rem;
  left: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: var(--yellow);
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

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

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 210px;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: var(--green);
  color: var(--white);
  flex: 0 0 auto;
}

.brand-mark svg {
  width: 25px;
  height: 25px;
  fill: currentColor;
}

.brand-mark-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  line-height: 1.05;
}

.brand small {
  color: var(--muted);
  font-size: 0.8rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  font-weight: 650;
  font-size: 0.92rem;
}

.main-nav a {
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius);
}

.main-nav a:hover,
.nav-pill {
  background: var(--white);
  text-decoration: none;
  color: var(--green-dark);
}

.hero,
.search-header,
.page-title,
.store-hero,
.product-page,
.auth-page {
  padding: clamp(2.6rem, 7vw, 5.5rem) 0;
}

.hero-grid,
.store-hero-grid,
.product-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: clamp(1.4rem, 4vw, 3rem);
  align-items: center;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.15rem, 5vw, 4.8rem);
  line-height: 0.97;
  letter-spacing: 0;
  margin-bottom: 1rem;
  color: var(--green-dark);
}

h2 {
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.12;
  letter-spacing: 0;
  margin-bottom: 0.85rem;
}

h3 {
  font-size: 1.08rem;
  line-height: 1.22;
  margin-bottom: 0.35rem;
}

.lead {
  font-size: clamp(1.05rem, 2vw, 1.24rem);
  color: var(--muted);
  max-width: 680px;
}

.muted,
.meta {
  color: var(--muted);
}

.search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  box-shadow: var(--shadow);
  margin: 1.5rem 0 1rem;
}

.search-box input {
  min-height: 54px;
  border: 0;
  background: #fffdf8;
  font-size: 1rem;
}

.search-box button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px solid var(--green);
  border-radius: var(--radius);
  background: var(--green);
  color: var(--white);
  font-weight: 750;
  padding: 0.8rem 1rem;
  cursor: pointer;
  text-align: center;
}

.search-box button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
}

.btn:hover,
.search-box button:hover {
  background: var(--green-dark);
  text-decoration: none;
}

.search-filters {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.15rem;
}

.search-filters select {
  min-width: 180px;
  min-height: 42px;
  padding: 0.55rem 0.7rem;
}

.check-control {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  color: var(--green-dark);
  font-weight: 750;
}

.check-control input {
  width: 18px;
  height: 18px;
}

.btn.outline {
  background: transparent;
  color: var(--green-dark);
}

.btn.outline:hover {
  background: var(--white);
}

.btn.whatsapp,
.whatsapp {
  background: #128c4a;
  border-color: #128c4a;
}

.btn.small {
  min-height: 40px;
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
}

.text-link {
  color: var(--green-dark);
  font-weight: 750;
}

.hero-actions,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
}

.store-banner {
  aspect-ratio: 5 / 1;
  min-height: 150px;
  max-height: 280px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #f7eedb;
  margin-bottom: 1.2rem;
}

.store-banner img,
.admin-banner-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.store-title-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.85rem;
}

.store-title-row h1 {
  margin-bottom: 0;
}

.store-logo-large {
  display: grid;
  place-items: center;
  width: clamp(76px, 12vw, 112px);
  aspect-ratio: 1 / 1;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  color: var(--green-dark);
  font-size: 2rem;
  font-weight: 850;
}

.store-logo-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.item-tabs a {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  color: var(--green-dark);
  font-weight: 800;
  padding: 0.55rem 0.8rem;
}

.item-tabs a:hover {
  background: var(--yellow);
  color: var(--text);
  text-decoration: none;
}

.local-panel,
.info-panel,
.auth-card,
.panel-card,
.plan,
.step,
.metric {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
}

.local-panel {
  padding: 1.2rem;
  box-shadow: var(--shadow);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--border);
}

.panel-header span {
  color: var(--muted);
  font-size: 0.92rem;
}

.quick-list,
.category-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.quick-list {
  padding-top: 1rem;
}

.quick-list a,
.category-chip {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fffdf8;
  color: var(--green-dark);
  padding: 0.58rem 0.78rem;
  font-weight: 700;
  font-size: 0.92rem;
}

.category-chip.active,
.category-chip:hover,
.quick-list a:hover {
  background: var(--yellow);
  color: var(--text);
  text-decoration: none;
}

.section {
  padding: clamp(2rem, 5vw, 4rem) 0;
}

.band {
  background: #f7eedb;
  border-block: 1px solid var(--border);
}

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

.section-head a {
  color: var(--green-dark);
  font-weight: 750;
}

.steps-grid {
  display: grid;
  grid-template-columns: 1fr repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.step {
  padding: 1rem;
}

.step span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--yellow);
  font-weight: 850;
  margin-bottom: 0.8rem;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.result-card {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  padding: 0.75rem;
  min-width: 0;
}

.media-frame {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--radius);
  background: #f7eedb;
}

.media-frame.large {
  min-height: 420px;
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder-art {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--green-dark);
  font-weight: 850;
  font-size: 2rem;
  background:
    linear-gradient(135deg, rgba(15, 81, 50, 0.12), rgba(242, 183, 5, 0.22)),
    #fff8ea;
}

.card-body {
  min-width: 0;
}

.card-body p {
  margin-bottom: 0.45rem;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
}

.badge {
  border-radius: 999px;
  padding: 0.18rem 0.48rem;
  font-size: 0.72rem;
  line-height: 1.3;
  font-weight: 800;
  background: #f2f4f7;
  color: var(--muted);
}

.badge.success {
  background: #ecfdf3;
  color: var(--success);
}

.badge.warning,
.badge.accent {
  background: #fff4bf;
  color: #7a4b00;
}

.badge.neutral {
  background: #f2f4f7;
  color: var(--muted);
}

.price {
  color: var(--green-dark);
  font-weight: 850;
}

.price.big {
  font-size: 1.8rem;
}

.status {
  color: var(--green-dark);
  font-weight: 700;
  font-size: 0.92rem;
}

.result-count {
  font-weight: 750;
}

.empty-state,
.notice {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: #fffdf8;
  padding: 1rem;
}

.notice {
  color: var(--green-dark);
}

.store-hero {
  background: #f7eedb;
  border-bottom: 1px solid var(--border);
}

.info-panel {
  padding: 1.2rem;
}

.product-grid {
  align-items: start;
}

.plans-grid,
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.plan,
.metric {
  padding: 1rem;
}

.check-list {
  padding-left: 1.2rem;
}

.check-list li {
  margin-bottom: 0.45rem;
}

.prose .shell {
  max-width: 760px;
}

.auth-page {
  display: grid;
  place-items: center;
}

.auth-card {
  width: min(440px, calc(100% - 32px));
  padding: 1.4rem;
  box-shadow: var(--shadow);
}

.form-stack,
.form-grid {
  display: grid;
  gap: 0.8rem;
}

.form-grid p {
  margin: 0;
}

.form-grid label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 750;
}

.panel-shell {
  padding: 1.4rem 0 3rem;
}

.panel-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.panel-nav {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 0.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  padding: 1rem;
}

.panel-nav a,
.link-button {
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--green-dark);
  text-align: left;
  padding: 0.6rem;
  font-weight: 700;
  cursor: pointer;
}

.panel-nav a:hover,
.link-button:hover {
  background: #f7eedb;
  text-decoration: none;
}

.panel-content {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  padding: 1rem;
}

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

.metric-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric span {
  display: block;
  color: var(--green-dark);
  font-size: 1.8rem;
  font-weight: 850;
}

.metric small {
  display: block;
  color: var(--muted);
}

.panel-card {
  padding: 1rem;
}

.panel-grid.two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 1rem;
  align-items: start;
}

.store-assets-preview {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 0.9rem;
  align-items: end;
  margin: 0.8rem 0 1rem;
}

.admin-logo-preview {
  width: 96px;
  min-width: 96px;
}

.admin-banner-preview {
  display: grid;
  place-items: center;
  min-height: 96px;
  aspect-ratio: 3 / 1;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #f7eedb;
}

.admin-actions {
  margin-top: 1rem;
}

.notice {
  margin: 0.65rem 0 0;
  border: 1px solid rgba(242, 183, 5, 0.45);
  border-radius: var(--radius);
  background: #fff7d7;
  padding: 0.7rem 0.85rem;
  color: #6b4e00;
}

.auth-card.wide {
  max-width: 760px;
}

fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 0;
  padding: 1rem;
}

legend {
  color: var(--green-dark);
  font-weight: 850;
  padding: 0 0.35rem;
}

.inline-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.inline-form select {
  min-width: 132px;
}

.btn.small {
  min-height: 38px;
  padding: 0.45rem 0.7rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

th,
td {
  padding: 0.8rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--green-dark);
  font-size: 0.88rem;
}

.row-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.row-actions button {
  border: 0;
  background: transparent;
  color: var(--green-dark);
  font-weight: 750;
  cursor: pointer;
}

.messages {
  padding-top: 1rem;
}

.message {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--white);
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
}

.message.success {
  border-color: rgba(6, 118, 71, 0.25);
  color: var(--success);
}

.message.error {
  border-color: rgba(180, 35, 24, 0.25);
  color: var(--error);
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--green-dark);
  color: var(--white);
  padding: 2rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr auto;
  gap: 1.5rem;
}

.site-footer p,
.site-footer a {
  color: rgba(255, 255, 255, 0.78);
}

.site-footer nav {
  display: grid;
  gap: 0.45rem;
}

.install-button {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  border: 1px solid var(--yellow);
  border-radius: var(--radius);
  background: var(--yellow);
  color: var(--text);
  font-weight: 800;
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow);
}

@media (max-width: 900px) {
  .header-inner,
  .main-nav {
    flex-wrap: wrap;
  }

  .header-inner {
    padding: 0.65rem 0;
  }

  .main-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.2rem;
  }

  .hero-grid,
  .store-hero-grid,
  .product-grid,
  .steps-grid,
  .panel-layout,
  .panel-grid.two,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .panel-nav {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .results-grid,
  .plans-grid,
  .metric-grid,
  .metric-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 24px, 1120px);
  }

  h1 {
    font-size: 2.35rem;
  }

  .search-box {
    grid-template-columns: 1fr;
    position: relative;
  }

  .search-filters,
  .store-title-row,
  .store-assets-preview {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .search-filters select {
    min-width: 100%;
  }

  .store-banner {
    aspect-ratio: 16 / 7;
    min-height: 128px;
  }

  .result-card {
    grid-template-columns: 92px minmax(0, 1fr);
    padding: 0.6rem;
  }

  .results-grid,
  .plans-grid,
  .metric-grid,
  .metric-grid.compact {
    grid-template-columns: 1fr;
  }

  .panel-heading,
  .section-head {
    align-items: start;
    flex-direction: column;
  }

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

  .brand {
    min-width: 0;
  }

  .brand small {
    display: none;
  }
}
