:root {
  --rose:       #D95A6F;
  --rose-deep:  #B8394E;
  --rose-light: #EF8FA0;
  --rose-pale:  #FDE8EF;
  --blush:      #FAE4EC;
  --petal:      #F4AABB;
  --text:       #2D1218;
  --muted:      #A07080;
  --white:      #FFFFFF;
  --radius:     14px;
  --shadow-card:0 2px 16px rgba(180,60,90,0.10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--blush);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(184,57,78,0.35);
  outline-offset: 3px;
}

/* ── PETALS ────────────────────────────────────────────── */
.petals {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.petal {
  position: absolute;
  top: -60px;
  width: clamp(14px, 3vw, 26px);
  aspect-ratio: 1.4;
  background: radial-gradient(ellipse at 40% 40%, #f9b8cb, #e88fa8 60%, #d4607a);
  border-radius: 50% 10% 50% 10%;
  opacity: 0;
  animation: fall linear infinite;
}
@keyframes fall {
  0%   { transform: translateY(0)   rotate(0deg)   scale(1);   opacity: .85; }
  80%  { opacity: .6; }
  100% { transform: translateY(110vh) rotate(360deg) scale(.7); opacity: 0; }
}
.petal:nth-child(1)  { left:  5%; animation-duration:7s;  animation-delay:0s;   width:18px; }
.petal:nth-child(2)  { left: 12%; animation-duration:9s;  animation-delay:1.5s; width:14px; }
.petal:nth-child(3)  { left: 22%; animation-duration:8s;  animation-delay:3s;   width:22px; }
.petal:nth-child(4)  { left: 33%; animation-duration:6s;  animation-delay:0.5s; width:16px; }
.petal:nth-child(5)  { left: 45%; animation-duration:10s; animation-delay:2s;   width:20px; }
.petal:nth-child(6)  { left: 55%; animation-duration:7.5s;animation-delay:4s;   width:12px; }
.petal:nth-child(7)  { left: 65%; animation-duration:9s;  animation-delay:1s;   width:24px; }
.petal:nth-child(8)  { left: 75%; animation-duration:6.5s;animation-delay:3.5s; width:15px; }
.petal:nth-child(9)  { left: 83%; animation-duration:8.5s;animation-delay:0.8s; width:19px; }
.petal:nth-child(10) { left: 92%; animation-duration:7s;  animation-delay:2.5s; width:13px; }

/* ── HERO ──────────────────────────────────────────────── */
.hero {
  background: linear-gradient(160deg, #fce8f0 0%, #f9d6e6 50%, #f5c4d8 100%);
  padding: 1.5rem 1.25rem 0;
  position: relative;
  overflow: hidden;
  z-index: 1;
}
@media (min-width: 600px) { .hero { padding: 2.25rem 2rem 0; } }

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 80% at 50% 60%,
    rgba(255,255,255,0.55) 0%,
    rgba(255,200,220,0.2) 50%,
    transparent 100%);
  pointer-events: none;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.hero-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.hero-icon {
  font-size: clamp(2.2rem, 7vw, 3.2rem);
  line-height: 1;
  flex-shrink: 0;
  animation: sway 5s ease-in-out infinite;
  filter: drop-shadow(0 2px 6px rgba(180,60,90,0.25));
}
@keyframes sway {
  0%, 100% { transform: rotate(-4deg) translateY(0); }
  50%       { transform: rotate(4deg)  translateY(-4px); }
}
.hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--rose);
  margin-bottom: 0.2rem;
}
.hero-title {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(2rem, 7vw, 3.8rem);
  font-weight: 900;
  color: var(--rose);
  line-height: 1;
  text-shadow: 0 2px 12px rgba(180,60,90,0.15);
}

.hero-subtitle {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(0.85rem, 2.5vw, 1rem);
  color: var(--rose-deep);
  font-weight: 400;
  margin-top: 0.25rem;
  letter-spacing: .01em;
}
.hero-wave {
  display: block;
  width: calc(100% + 2.5rem);
  margin-left: -1.25rem;
  height: 36px;
  margin-top: 0.75rem;
  position: relative;
  z-index: 2;
}
@media (min-width: 600px) {
  .hero-wave { width: calc(100% + 4rem); margin-left: -2rem; height: 48px; }
}

/* ── SHELL ─────────────────────────────────────────────── */
.shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 0.875rem 3rem;
  position: relative;
  z-index: 1;
}
@media (min-width: 600px) { .shell { padding: 2rem 1.25rem 4rem; } }

/* ── CONTROLS ──────────────────────────────────────────── */
.controls {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.6rem;
  margin-bottom: 1.1rem;
  align-items: center;
}
.search-wrap    { grid-column: 1; }
.filter-btn-wrap{ grid-column: 2; }
.results-count  { grid-column: 1 / -1; }
@media (min-width: 600px) {
  .controls { grid-template-columns: 1fr auto auto; grid-template-rows: auto; }
  .search-wrap, .filter-btn-wrap, .results-count { grid-column: auto; }
}

.search-wrap { position: relative; }
.search-icon {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 1rem;
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 0.8rem 5.2rem 0.8rem 2.6rem;
  border: 2px solid transparent;
  border-radius: 99px;
  background: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-card);
  -webkit-appearance: none;
}
.search-input:focus {
  outline: none;
  border-color: var(--rose-light);
  box-shadow: 0 0 0 4px rgba(217,90,111,0.12);
}
.search-input::placeholder { color: var(--muted); }
.search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  border-radius: 99px;
  padding: 0.42rem 0.75rem;
  background: var(--rose);
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.search-clear:hover,
.search-clear:focus-visible {
  background: var(--rose-deep);
  color: var(--white);
}
.search-clear:active {
  transform: translateY(-50%) scale(0.96);
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.8rem 1.1rem;
  border: none;
  border-radius: 99px;
  background: var(--rose);
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 4px 14px rgba(217,90,111,0.35);
}
.filter-btn:hover { background: var(--rose-deep); transform: translateY(-1px); }
.filter-btn:active { transform: translateY(0); }
.filter-btn.active {
  background: var(--white);
  color: var(--rose);
  box-shadow: 0 0 0 2px var(--rose);
}

.results-count {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 400;
}

/* ── FILTER PANEL ──────────────────────────────────────── */
.filter-panel {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1.1rem;
  box-shadow: var(--shadow-card);
  display: none;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  border: 1.5px solid var(--rose-pale);
}
.filter-panel.open { display: grid; }
@media (min-width: 540px) {
  .filter-panel { grid-template-columns: 1fr 1fr; padding: 1.25rem; gap: 1.5rem; }
}

.filter-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--rose);
  margin-bottom: 0.5rem;
}
.chip-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip {
  padding: 0.4rem 0.9rem;
  border-radius: 99px;
  border: 1.5px solid var(--petal);
  background: var(--rose-pale);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--rose-deep);
  font-weight: 500;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}
.chip:hover { border-color: var(--rose); background: #fbd4de; }
.chip.selected { background: var(--rose); color: var(--white); border-color: var(--rose); }

/* ── PLANT GRID ────────────────────────────────────────── */
.plant-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.875rem;
}
@media (min-width: 480px)  { .plant-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 800px)  { .plant-grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; } }
@media (min-width: 1060px) { .plant-grid { grid-template-columns: repeat(4, 1fr); } }

.plant-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  appearance: none;
  color: inherit;
  cursor: pointer;
  display: block;
  font: inherit;
  padding: 0;
  text-align: left;
  width: 100%;
  transition: transform 0.2s, box-shadow 0.2s;
  animation: fadeUp 0.3s ease both;
  -webkit-tap-highlight-color: transparent;
  border: 1.5px solid rgba(217,90,111,0.08);
}

.plant-photo {
  display: block;
  aspect-ratio: 4 / 3;
  background-color: var(--white);
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  transition: transform 0.35s ease;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (hover: hover) {
  .plant-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 32px rgba(180,60,90,0.18);
    border-color: rgba(217,90,111,0.22);
  }
  .plant-card:hover .plant-photo { transform: scale(1.04); }
}

.card-header {
  background: linear-gradient(120deg, var(--rose-pale) 0%, #fce0ea 100%);
  padding: 0.9rem 1rem 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}
.card-name {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--rose-deep);
  line-height: 1.2;
  flex: 1;
}
.badge {
  font-size: 0.68rem;
  font-weight: 500;
  padding: 0.2rem 0.55rem;
  border-radius: 99px;
  flex-shrink: 0;
  white-space: nowrap;
}
.badge-int  { background: #e8f0fd; color: #3b5bdb; }
.badge-ext  { background: #fff4e0; color: #b06820; }
.badge-both { background: var(--rose-pale); color: var(--rose-deep); }

.card-body {
  padding: 0.8rem 1rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.info-row {
  display: flex;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--text);
  align-items: flex-start;
}
.info-icon  { flex-shrink: 0; width: 1.2rem; }
.info-label { color: var(--muted); font-weight: 300; min-width: 3.25rem; }
.info-val   { flex: 1; font-weight: 400; }

/* ── MODAL ─────────────────────────────────────────────── */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(45,18,24,0.55);
  z-index: 100;
  align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(6px);
}
@media (min-width: 560px) { .overlay { align-items: center; padding: 1rem; } }
.overlay.open { display: flex; }

.modal {
  background: var(--white);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 -8px 40px rgba(180,60,90,0.2);
  animation: slideUp 0.28s cubic-bezier(.32,1,.56,1);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
@media (min-width: 560px) {
  .modal {
    border-radius: 20px;
    max-width: 560px;
    max-height: 90vh;
    box-shadow: 0 24px 80px rgba(180,60,90,0.3);
    animation: popIn 0.25s ease;
  }
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
@keyframes popIn {
  from { transform: scale(0.93); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
.modal::before {
  content: '';
  display: block;
  width: 40px; height: 4px;
  background: var(--petal);
  border-radius: 99px;
  margin: 10px auto 0;
}
@media (min-width: 560px) { .modal::before { display: none; } }

.modal-banner {
  background: linear-gradient(135deg, var(--rose-deep) 0%, var(--rose) 60%, var(--rose-light) 100%);
  padding: 1.1rem 1.25rem 1rem;
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 0.875rem;
  min-height: 90px;
}
@media (min-width: 560px) { .modal-banner { padding: 1.5rem; min-height: 105px; } }

.modal-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 100% at 80% 50%,
    rgba(255,255,255,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.modal-banner-icon {
  font-size: 3rem;
  line-height: 1;
  filter: drop-shadow(0 3px 8px rgba(0,0,0,0.2));
  position: relative; z-index: 1;
}
.modal-title {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(1.3rem, 5vw, 1.75rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
  flex: 1;
  position: relative; z-index: 1;
}
.modal-close {
  position: absolute;
  top: 0.875rem; right: 0.875rem;
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  width: 34px; height: 34px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
  z-index: 2;
}
.modal-close:hover { background: rgba(255,255,255,0.35); }

.modal-body { padding: 1.1rem 1.1rem 1.5rem; }
@media (min-width: 560px) { .modal-body { padding: 1.5rem; } }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 400px) { .detail-grid { grid-template-columns: 1fr; } }

.detail-tile {
  background: var(--rose-pale);
  border-radius: 10px;
  padding: 0.9rem;
  border-left: 4px solid var(--rose-light);
}
.detail-tile.t-rega  { border-left-color: #60b4fa; background: #edf4fe; }
.detail-tile.t-amb   { border-left-color: #82c87a; background: #edfaeb; }
.detail-tile.t-poda  { border-left-color: #f0a060; background: #fef3e6; }
.detail-tile.t-adubo { border-left-color: var(--petal); background: var(--rose-pale); }
.detail-tile-wide { grid-column: 1 / -1; }

.detail-tile-head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.detail-tile-val {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.45;
}

/* ── EMPTY ─────────────────────────────────────────────── */
.empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--muted);
}
.empty-icon { font-size: 3rem; margin-bottom: 0.75rem; }
.empty p { font-size: 0.95rem; }
.is-hidden { display: none; }

/* ── FOOTER ────────────────────────────────────────────── */
.footer {
  border-top: 1px solid rgba(217,90,111,0.15);
  padding: 1.75rem 0.875rem;
  max-width: 1100px;
  margin: 0 auto;
  position: relative; z-index: 1;
}
@media (min-width: 600px) { .footer { padding: 2rem 1.25rem; } }

.footer-title {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 0.75rem;
}
.partner-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.partner-link {
  color: var(--rose-deep);
  text-decoration: none;
  font-size: 0.83rem;
  background: var(--white);
  border: 1.5px solid var(--petal);
  padding: 0.3rem 0.75rem;
  border-radius: 99px;
  transition: all 0.15s;
  font-weight: 500;
}
.partner-link:hover { background: var(--rose); color: var(--white); border-color: var(--rose); }
.footer-ig {
  color: var(--muted);
  font-size: 0.84rem;
}
.footer-ig a { color: var(--rose); font-weight: 500; text-decoration: none; }
.footer-ig a:hover { text-decoration: underline; }
.footer-contact {
  color: var(--muted);
  font-size: 0.84rem;
  margin-top: 0.5rem;
}
.footer-contact a { color: var(--rose); font-weight: 500; text-decoration: none; }
.footer-contact a:hover { text-decoration: underline; }
.visitor-count {
  display: block;
  width: fit-content;
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

/* ── FESTIVAL BANNER ───────────────────────────────────── */
.festival-banner {
  background: linear-gradient(110deg, var(--rose-pale) 0%, #fce0ea 100%);
  border: 1.5px solid var(--petal);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}
.festival-banner-icon { font-size: 1.5rem; flex-shrink: 0; }
.festival-banner-text { flex: 1; min-width: 0; }
.festival-banner-title {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1rem;
  font-weight: 700;
  color: var(--rose-deep);
  line-height: 1.2;
}
.festival-banner-sub {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.1rem;
}
.festival-pill {
  background: var(--rose);
  color: var(--white);
  border-radius: 99px;
  padding: 0.3rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── BACK TO TOP ───────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--rose);
  color: var(--white);
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(217,90,111,0.4);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s;
  pointer-events: none;
  z-index: 50;
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.back-to-top:hover { background: var(--rose-deep); transform: translateY(-2px); }
.back-to-top:active { transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
