:root {
  --background: 120 18% 97%;
  --foreground: 145 28% 9%;
  --card: 0 0% 100%;
  --card-foreground: 145 28% 9%;
  --popover: 0 0% 100%;
  --popover-foreground: 145 28% 9%;
  --primary: 143 43% 43%;
  --primary-foreground: 0 0% 100%;
  --secondary: 142 32% 91%;
  --secondary-foreground: 145 35% 18%;
  --muted: 126 18% 93%;
  --muted-foreground: 145 10% 39%;
  --accent: 143 43% 43%;
  --accent-foreground: 0 0% 100%;
  --border: 135 16% 86%;
  --input: 135 16% 86%;
  --ring: 143 43% 43%;
  --emerald: 143 43% 43%;
  --emerald-light: 139 47% 59%;
  --emerald-dark: 146 48% 20%;
  --slate-dark: 145 30% 8%;
  --slate-medium: 145 24% 13%;
  --cream: 90 22% 96%;
  --radius: 1rem;
  --gradient-hero: linear-gradient(115deg, hsl(146 49% 10% / .92), hsl(145 42% 18% / .73) 52%, hsl(140 37% 25% / .4));
  --gradient-card: linear-gradient(180deg, hsl(0 0% 100%), hsl(120 18% 97%));
  --gradient-button: linear-gradient(135deg, hsl(144 45% 35%), hsl(139 48% 51%));
  --gradient-button-hover: linear-gradient(135deg, hsl(144 48% 29%), hsl(139 50% 45%));
  --shadow-sm: 0 4px 14px hsl(145 35% 12% / .07);
  --shadow-md: 0 12px 34px hsl(145 35% 12% / .1);
  --shadow-lg: 0 24px 64px hsl(145 40% 8% / .16);
  --shadow-glow: 0 0 40px hsl(143 43% 43% / .2);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 7rem;
}

body {
  background:
    radial-gradient(circle at 8% 18%, hsl(141 46% 72% / .12), transparent 25rem),
    radial-gradient(circle at 92% 58%, hsl(142 38% 70% / .1), transparent 28rem),
    hsl(var(--background));
  color: hsl(var(--foreground));
  font-feature-settings: "kern" 1, "liga" 1;
}

::selection {
  background: hsl(var(--primary) / .22);
  color: hsl(var(--foreground));
}

/* Cabeçalho: mantém a navegação atual com acabamento mais leve e premium. */
header > .container {
  max-width: 94rem;
}

header .h-24 {
  height: 5.75rem;
}

header nav {
  gap: clamp(.7rem, 1.25vw, 1.35rem) !important;
}

header nav a {
  white-space: nowrap;
  letter-spacing: -.01em;
}

/* A lupa acompanha o contraste branco do menu escuro. */
header button:has(svg.lucide-search),
header button:has(svg.lucide-search) svg,
.site-mobile-search-button {
  color: hsl(0 0% 100%) !important;
  stroke: currentColor;
}

header img[alt="Saltéres Store"] {
  background: #0b0d0c;
  border: 3px solid hsl(0 0% 100% / .92);
  box-shadow: 0 14px 38px hsl(145 50% 4% / .28), 0 0 0 1px hsl(var(--primary) / .35);
}

header img[alt="Saltéres Store"].h-44 {
  height: 7.5rem !important;
}

header img[alt="Saltéres Store"].h-20 {
  height: 4.5rem !important;
}

header[class*="bg-background"] {
  background: hsl(140 32% 86% / .96) !important;
  border-color: hsl(var(--border) / .7) !important;
  box-shadow: 0 8px 30px hsl(145 30% 8% / .08) !important;
}

/* Quando o cabeçalho fica claro ao rolar, a lupa acompanha o texto do menu. */
header[class*="bg-background"] button:has(svg.lucide-search),
header[class*="bg-background"] button:has(svg.lucide-search) svg,
header[class*="bg-background"] .site-mobile-search-button {
  color: hsl(var(--foreground)) !important;
  stroke: currentColor;
}

/* Fundo geral levemente esverdeado, alinhado à identidade da marca. */
body {
  background-color: hsl(140 32% 88%) !important;
}

/* Hero */
main > section:first-child {
  min-height: min(52rem, 100svh);
}

main > section:first-child h1 {
  max-width: 62rem;
  margin-inline: auto;
  letter-spacing: -.045em;
  line-height: .98;
  text-wrap: balance;
  text-shadow: 0 8px 34px hsl(145 60% 4% / .4);
}

main > section:first-child p {
  line-height: 1.7;
  text-wrap: balance;
}

main > section:first-child .inline-flex.rounded-full {
  background: hsl(0 0% 100% / .12);
  border-color: hsl(0 0% 100% / .32);
  box-shadow: inset 0 1px 0 hsl(0 0% 100% / .2), 0 10px 30px hsl(145 60% 4% / .16);
}

main > section:first-child button {
  min-height: 3.25rem;
  padding-inline: 1.65rem;
  border-radius: 999px;
  background: hsl(0 0% 100% / .12);
  box-shadow: 0 14px 34px hsl(145 60% 4% / .22);
}

/* Benefícios e títulos */
main > section:nth-child(2) {
  position: relative;
  background: hsl(0 0% 100% / .72);
  backdrop-filter: blur(12px);
}

main > section:nth-child(2) .group > div:first-child {
  box-shadow: inset 0 0 0 1px hsl(var(--primary) / .12);
}

section h2 {
  letter-spacing: -.035em;
  line-height: 1.08;
  text-wrap: balance;
}

section .text-primary.uppercase {
  letter-spacing: .18em;
  font-weight: 700;
}

/* Categorias */
#categories {
  background: linear-gradient(180deg, hsl(125 20% 94% / .82), hsl(120 18% 97%));
}

#categories > .container > .grid > .group {
  border: 1px solid hsl(0 0% 100% / .7);
  border-radius: 1.75rem;
  box-shadow: 0 18px 50px hsl(145 35% 12% / .13);
  isolation: isolate;
}

#categories > .container > .grid > .group:hover {
  transform: translateY(-7px);
  box-shadow: 0 26px 64px hsl(145 40% 10% / .2);
}

#categories > .container > .grid > .group > div:nth-child(2) {
  background: linear-gradient(to top, hsl(145 30% 12% / .68), hsl(145 25% 20% / .08) 70%, transparent);
  opacity: 1;
}

#categories > .container > .grid > .group .text-primary {
  color: hsl(138 52% 68%);
}

/* Produtos */
#products {
  position: relative;
  background-color: #d7eadf !important;
}

#products .group.bg-card.rounded-2xl {
  overflow: hidden;
  border: 1px solid hsl(var(--border) / .8);
  border-radius: 1.5rem;
  background: hsl(var(--card) / .96);
  box-shadow: 0 10px 30px hsl(145 35% 12% / .08);
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}

#products .group.bg-card.rounded-2xl:hover {
  transform: translateY(-7px);
  border-color: hsl(var(--primary) / .35);
  box-shadow: 0 24px 56px hsl(145 38% 10% / .15);
}

#products .admin-added-product {
  margin-top: 1.5rem;
}

#products .group.bg-card.rounded-2xl > .relative.aspect-square {
  background:
    radial-gradient(circle at 50% 44%, hsl(0 0% 100%), hsl(130 18% 94%) 72%);
  border-bottom: 1px solid hsl(var(--border) / .65);
}

#products .group.bg-card.rounded-2xl h3 {
  letter-spacing: -.015em;
  line-height: 1.3;
}

#products .group.bg-card.rounded-2xl > .p-5 > .flex:last-child button {
  border-radius: 999px;
  padding-inline: 1rem;
  background: hsl(var(--primary) / .09);
}

#products .group.bg-card.rounded-2xl > .p-5 > .flex:last-child button:hover {
  background: hsl(var(--primary));
}

/* Cards informativos */
#products + section .bg-card,
#products ~ section .bg-card {
  border-radius: 1.5rem;
}

/* Rodapé alinhado ao fundo preto e verde da marca. */
footer#contact {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 5%, hsl(143 45% 35% / .22), transparent 25rem),
    linear-gradient(135deg, hsl(145 31% 8%), hsl(145 29% 12%));
  border-color: hsl(143 30% 28% / .45);
  color: white;
}

footer#contact::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(hsl(0 0% 100% / .018) 1px, transparent 1px), linear-gradient(90deg, hsl(0 0% 100% / .018) 1px, transparent 1px);
  background-size: 36px 36px;
}

footer#contact > .container {
  position: relative;
}

footer#contact h4,
footer#contact .text-foreground {
  color: white;
}

footer#contact .text-muted-foreground,
footer#contact a.text-muted-foreground {
  color: hsl(120 12% 76%);
}

footer#contact a:hover {
  color: hsl(139 48% 65%);
}

footer#contact ul.space-y-3 li:last-child {
  display: none;
}

footer#contact img[alt="Saltéres Store"] {
  height: 6.5rem;
  border: 2px solid hsl(0 0% 100% / .15);
  box-shadow: 0 14px 36px hsl(0 0% 0% / .3);
}

footer#contact .bg-muted {
  background: hsl(0 0% 100% / .09);
  color: hsl(0 0% 100% / .78);
}

/* Botão flutuante */
body > #root > div > button.fixed,
body > #root button[aria-label="Fazer pedido pelo WhatsApp"] {
  border: 4px solid hsl(0 0% 100% / .9);
  box-shadow: 0 16px 38px hsl(145 40% 10% / .25);
}

@media (max-width: 1023px) {
  header .h-24 {
    height: 5.25rem;
  }

  header img[alt="Saltéres Store"].h-44 {
    height: 6.5rem !important;
  }

  header img[alt="Saltéres Store"].h-20 {
    height: 4.25rem !important;
  }

  header .lg\:hidden.bg-background\/98 {
    border-radius: 0 0 1.25rem 1.25rem;
    box-shadow: 0 18px 40px hsl(145 35% 8% / .12);
  }

  #categories,
  #products {
    padding-block: 5rem;
  }
}

@media (max-width: 639px) {
  main > section:first-child h1 {
    font-size: clamp(2.75rem, 13vw, 4rem);
    line-height: 1;
  }

  main > section:first-child p {
    font-size: 1rem;
  }

  section h2 {
    font-size: 2.35rem !important;
  }

  #categories > .container > .grid > .group,
  #products .group.bg-card.rounded-2xl {
    border-radius: 1.35rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Busca de produtos */
.site-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: start center;
  padding: clamp(1rem, 7vh, 5rem) 1rem 1rem;
  background: hsl(145 35% 5% / .68);
  backdrop-filter: blur(12px);
}

.site-search-overlay[hidden] {
  display: none;
}

.site-search-dialog {
  width: min(42rem, 100%);
  max-height: min(46rem, calc(100svh - 2rem));
  overflow: hidden;
  border: 1px solid hsl(0 0% 100% / .65);
  border-radius: 1.5rem;
  background: hsl(var(--card));
  box-shadow: 0 35px 100px hsl(145 55% 3% / .38);
}

.site-search-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.25rem .8rem;
}

.site-search-header h2 {
  font-family: "Playfair Display", serif;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -.025em;
}

.site-search-close,
.site-mobile-search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
  color: hsl(var(--foreground) / .75);
  transition: color .2s ease, background .2s ease;
}

.site-search-close:hover,
.site-mobile-search-button:hover {
  color: hsl(var(--primary));
  background: hsl(var(--primary) / .09);
}

.site-search-field-wrap {
  position: relative;
  margin: 0 1.25rem 1rem;
}

.site-search-field-wrap svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  width: 1.15rem;
  height: 1.15rem;
  transform: translateY(-50%);
  color: hsl(var(--muted-foreground));
  pointer-events: none;
}

.site-search-input {
  width: 100%;
  height: 3.35rem;
  padding: 0 1rem 0 2.85rem;
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  outline: none;
  background: hsl(var(--muted) / .62);
  color: hsl(var(--foreground));
  font-size: 1rem;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.site-search-input:focus {
  border-color: hsl(var(--primary));
  background: hsl(var(--card));
  box-shadow: 0 0 0 4px hsl(var(--primary) / .13);
}

.site-search-status {
  min-height: 1.25rem;
  padding: 0 1.25rem .75rem;
  color: hsl(var(--muted-foreground));
  font-size: .82rem;
}

.site-search-results {
  max-height: min(31rem, calc(100svh - 15rem));
  overflow-y: auto;
  padding: 0 .75rem 1rem;
}

.site-search-result {
  display: grid;
  grid-template-columns: 4.25rem 1fr auto;
  align-items: center;
  width: 100%;
  gap: 1rem;
  padding: .7rem;
  border-radius: 1rem;
  text-align: left;
  transition: background .2s ease, transform .2s ease;
}

.site-search-result:hover,
.site-search-result:focus-visible {
  background: hsl(var(--primary) / .08);
  outline: none;
  transform: translateX(3px);
}

.site-search-result img {
  width: 4.25rem;
  height: 4.25rem;
  object-fit: contain;
  border: 1px solid hsl(var(--border) / .7);
  border-radius: .85rem;
  background: hsl(var(--muted) / .55);
}

.site-search-result strong {
  display: block;
  color: hsl(var(--foreground));
  font-family: "Playfair Display", serif;
  font-size: 1rem;
  line-height: 1.25;
}

.site-search-result span {
  display: -webkit-box;
  margin-top: .25rem;
  overflow: hidden;
  color: hsl(var(--muted-foreground));
  font-size: .78rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.site-search-result > svg {
  width: 1rem;
  color: hsl(var(--primary));
}

.site-search-empty {
  padding: 2.5rem 1rem 3rem;
  color: hsl(var(--muted-foreground));
  text-align: center;
}

.site-search-highlight {
  animation: site-search-highlight 1.5s ease;
}

@keyframes site-search-highlight {
  0%, 100% { box-shadow: 0 10px 30px hsl(145 35% 12% / .08); }
  35% { box-shadow: 0 0 0 5px hsl(var(--primary) / .28), 0 24px 56px hsl(145 38% 10% / .18); }
}

@media (min-width: 1024px) {
  .site-mobile-search-button {
    display: none;
  }

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

/* Nova logomarca: preserva as proporções e dá presença sem recortar a arte. */
.salteres-logo-refined {
  object-fit: contain !important;
  filter: drop-shadow(0 5px 12px rgba(8, 48, 29, .28));
}

header .salteres-logo-refined {
  transform: scale(1.08);
}

@media (max-width: 639px) {
  .site-search-overlay {
    padding: .5rem;
  }

  .site-search-dialog {
    max-height: calc(100svh - 1rem);
    border-radius: 1.2rem;
  }

  .site-search-result {
    grid-template-columns: 3.75rem 1fr auto;
    gap: .75rem;
  }

  .site-search-result img {
    width: 3.75rem;
    height: 3.75rem;
  }
}
