/* public/css/site.css */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Cores principais */
  --fundo:         #f8faf6;
  --card-bg:       #ffffff;
  --borda:         #e2e8e0;
  --verde-nav:     #ffffff;
  --verde-btn:     #5b8a52;
  --verde-hover:   #46703e;
  --verde-ativo:   #4a7a42;
  --verde-texto:   #5b8a52;
  --verde-badge:   #eaf2e8;
  --dourado:       #c9a96e;
  --dourado-escuro: #9c7c3a;
  --texto-main:    #1a2e1a;
  --texto-sub:     #5a6b58;
  --texto-light:   #8fa68c;
  --wpp-verde:     #25d366;
  --wpp-hover:     #1dba56;
  --sombra-sm:     0 2px 8px rgba(0,0,0,0.04);
  --sombra-md:     0 4px 16px rgba(60,90,55,0.08);
  --sombra-lg:     0 8px 32px rgba(60,90,55,0.12);
  --sombra-hover:  0 12px 40px rgba(60,90,55,0.16);
  --transition:    all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--fundo);
  color: var(--texto-main);
  line-height: 1.5;
  overflow-x: hidden;
}

.inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 768px) {
  .inner {
    padding: 0 16px;
  }
}

/* ========== HEADER MODERNO ========== */
.site-header {
  background: linear-gradient(135deg, #ffffff 0%, #fafcf8 100%);
  border-bottom: none;
  padding: 40px 20px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.site-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 80%;
  height: 200%;
  background: radial-gradient(circle, rgba(90,143,90,0.03) 0%, transparent 70%);
  pointer-events: none;
}

.header-inner {
  position: relative;
  z-index: 1;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.logo-img {
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.08));
  transition: var(--transition);
}

.logo-img:hover {
  transform: scale(1.05);
}

.logo-texts {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.logo-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 500;
  color: #000;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  line-height: 1.2;
}

.logo-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--texto-main);
  letter-spacing: 0.02em;
  line-height: 1.1;
  background: #000;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-sub {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    color: #000;
    font-size: 1.2rem;
    letter-spacing: 0.15em;
    margin-top: 4px;
}

@media (max-width: 600px) {
  .logo-img {
    width: 55px;
    height: 55px;
  }
  .logo-name {
    font-size: 1.8rem;
  }
  .logo-text {
    font-size: 0.8rem;
    letter-spacing: 0.2em;
  }
}

/* ========== NAVEGAÇÃO MODERNA ========== */
.categorias-nav {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--borda);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--sombra-sm);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.cat-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 40px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--texto-sub);
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
  background: transparent;
  position: relative;
}

.cat-btn::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 80%;
  height: 2px;
  background: var(--verde-btn);
  transition: transform 0.3s ease;
}

.cat-btn:hover::before {
  transform: translateX(-50%) scaleX(1);
}

.cat-btn:hover {
  color: var(--verde-btn);
  background: var(--verde-badge);
}

.cat-btn.ativo {
  background: var(--verde-btn);
  color: #fff;
  box-shadow: 0 2px 8px rgba(91,138,82,0.3);
}

.cat-btn.ativo::before {
  display: none;
}

.cat-count {
  background: rgba(0,0,0,0.08);
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
}

.cat-btn.ativo .cat-count {
  background: rgba(255,255,255,0.25);
}

@media (max-width: 768px) {
  .nav-inner {
    padding: 12px 16px;
    gap: 6px;
    overflow-x: auto;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .cat-btn {
    padding: 6px 14px;
    font-size: 0.8rem;
    white-space: nowrap;
  }
}

/* ========== SEÇÃO TÍTULO ========== */
.section-title {
  padding: 48px 0 24px;
  text-align: center;
}

.section-title h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--texto-main);
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 2px;
  background: linear-gradient(90deg, var(--dourado), var(--verde-btn));
  border-radius: 2px;
}

.section-title p {
  color: var(--texto-light);
  font-size: 0.9rem;
  margin-top: 16px;
}

@media (max-width: 768px) {
  .section-title h2 {
    font-size: 1.8rem;
  }
}

/* ========== GRID MODERNO ========== */
.plantas-grid-wrapper {
  padding: 16px 0 80px;
}

.plantas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

@media (max-width: 768px) {
  .plantas-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ========== CARD MODERNO ========== */
.planta-card {
  background: var(--card-bg);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--sombra-md);
  transition: var(--transition);
  position: relative;
}

.planta-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--sombra-hover);
}

/* FOTOS - Layout melhorado */
.planta-fotos-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--borda);
  position: relative;
}

.foto-item {
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  position: relative;
  overflow: hidden;
}

/* ZOOM WRAP */
.foto-zoom-wrap {
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
  background: #f5f5f5;
}

.foto-zoom-wrap img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.foto-zoom-wrap:hover img {
  transform: scale(1.08);
}

.zoom-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.zoom-overlay span {
  font-size: 1.8rem;
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.25s cubic-bezier(0.34, 1.2, 0.64, 1);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.foto-zoom-wrap:hover .zoom-overlay {
  background: rgba(0,0,0,0.3);
}

.foto-zoom-wrap:hover .zoom-overlay span {
  opacity: 1;
  transform: scale(1);
}

/* NOME DA FOTO */
.foto-nome {
  font-size: 0.7rem;
  color: var(--texto-sub);
  text-align: center;
  padding: 8px 6px;
  background: var(--card-bg);
  border-top: 1px solid var(--borda);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

/* FOTO 3 RESULTADO */
.foto3-resultado {
  background: linear-gradient(135deg, #fafcf8 0%, #ffffff 100%);
  border-top: 1px solid var(--borda);
  margin-top: 1px;
  position: relative;
}

.foto3-unica {
  border-top: none;
}

.foto3-zoom {
  width: 100%;
  cursor: zoom-in;
  position: relative;
  overflow: hidden;
}

.foto3-zoom img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.foto3-unica .foto3-zoom img {
  max-height: 400px;
}

.foto3-zoom:hover img {
  transform: scale(1.05);
}

.foto3-nome {
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--verde-texto);
  background: var(--verde-badge);
  padding: 8px 10px;
  border-top: 1px solid var(--borda);
}

/* INFO CARD */
.planta-info {
  padding: 20px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.planta-cat {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--dourado-escuro);
  text-transform: uppercase;
}

.planta-nome {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #000;
  line-height: 1.2;
  margin: 4px 0;
}

.planta-desc {
  font-size: 1.2rem;
  color: #000;
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* BOTÃO WHATSAPP MELHORADO */
.btn-wpp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 20px;
  background: var(--wpp-verde);
  color: #fff;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-wpp::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-wpp:hover::before {
  width: 300px;
  height: 300px;
}

.btn-wpp:hover {
  background: var(--wpp-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37,211,102,0.3);
}

.btn-wpp:active {
  transform: translateY(0);
}

.wpp-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

/* ========== LIGHTBOX MODERNA ========== */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(20px);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
  padding: 40px;
  cursor: zoom-out;
}

#lightbox.aberto {
  display: flex;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

#lightbox img {
  max-width: min(90vw, 900px);
  max-height: 85vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
  animation: zoomIn 0.25s cubic-bezier(0.34, 1.2, 0.64, 1);
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

#lb-nome {
  color: rgba(255,255,255,0.9);
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

#lb-fechar {
  position: fixed;
  top: 24px;
  right: 24px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 1.4rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  line-height: 1;
  z-index: 1001;
}

#lb-fechar:hover {
  background: rgba(255,255,255,0.2);
  transform: rotate(90deg);
}

/* ========== EMPTY STATE ========== */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--texto-light);
}

.empty-state span {
  font-size: 4rem;
  display: block;
  margin-bottom: 20px;
  opacity: 0.6;
}

.empty-state p {
  font-size: 1rem;
  margin-bottom: 24px;
  color: var(--texto-sub);
}

.empty-state a {
  color: var(--verde-btn);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 2px solid var(--verde-btn);
  padding-bottom: 4px;
  transition: var(--transition);
}

.empty-state a:hover {
  color: var(--verde-hover);
  border-bottom-color: var(--verde-hover);
}

/* ========== FOOTER MODERNO ========== */
.site-footer {
  background: linear-gradient(135deg, #1a2e1a 0%, #2a4528 100%);
  border-top: none;
  padding: 32px 20px;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
}

.site-footer .inner p {
  opacity: 0.8;
}

.site-footer a {
  color: var(--dourado);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.site-footer a:hover {
  color: var(--dourado-claro);
  text-decoration: underline;
}

/* ========== ANIMAÇÕES E UTILIDADES ========== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.planta-card {
  animation: fadeUp 0.5s ease backwards;
}

.planta-card:nth-child(1) { animation-delay: 0.05s; }
.planta-card:nth-child(2) { animation-delay: 0.1s; }
.planta-card:nth-child(3) { animation-delay: 0.15s; }
.planta-card:nth-child(4) { animation-delay: 0.2s; }
.planta-card:nth-child(5) { animation-delay: 0.25s; }
.planta-card:nth-child(6) { animation-delay: 0.3s; }

/* Scrollbar personalizada */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--fundo);
}

::-webkit-scrollbar-thumb {
  background: var(--verde-texto);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--verde-hover);
}

/* Responsividade para telas pequenas */
@media (max-width: 480px) {
  .planta-info {
    padding: 16px;
  }
  
  .planta-nome {
    font-size: 1.2rem;
  }
  
  .btn-wpp {
    padding: 10px 16px;
    font-size: 0.8rem;
  }
  
  .foto3-nome {
    font-size: 0.65rem;
  }
  
  #lightbox {
    padding: 20px;
  }
  
  #lb-fechar {
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
  }
}

/* Suporte para touch devices */
@media (hover: none) {
  .planta-card:hover {
    transform: none;
  }
  
  .foto-zoom-wrap:hover img {
    transform: none;
  }
  
  .btn-wpp:hover {
    transform: none;
  }
}