/* ============================================================
   PlantMapper — Tropical Garden
   Pairs with plantmapper.css + ecosystem.css. Adds a deep
   foliage-green theme (same mechanism as body.theme-med) and a
   few tropical-only components. Calm, premium, lush.
   ============================================================ */

/* ---- deep foliage theme ---- */
body.theme-tropical {
  --rose:      #3f7250;   /* deep foliage-green accent */
  --rose-deep: #2a4d36;
  --rose-soft: #e2ece0;   /* soft fern tint */
  --bg-cream:  #e9efe0;
  background:
    radial-gradient(1200px 620px at 86% -12%, #dde8d2 0%, transparent 60%),
    radial-gradient(900px 520px at -8% 6%, #e4ecdc 0%, transparent 55%),
    var(--bg);
}

/* ---- hero foliage illustration ---- */
.trop-hero-art {
  margin: 0;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 380px;
  box-shadow: var(--shadow-2);
  background: linear-gradient(165deg, #2f5740 0%, #244231 55%, #1e3527 100%);
}
.trop-hero-art svg { display: block; width: 100%; height: 100%; }
@media (max-width: 860px) {
  .trop-hero-art { min-height: 260px; }
}

/* ---- tropical plant cards (static) ---- */
.trop-plants {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
  gap: 16px;
}
.trop-plant {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 19px;
  box-shadow: var(--shadow-1);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .25s ease;
}
.trop-plant:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
/* Photo banner — same fixed-ratio, centre-cropped treatment as the
   Mediterranean / Plant Finder cards, so every card crops identically on
   desktop, tablet and mobile whatever shape the source photo is. The leaf
   motif shows underneath while the photo loads or if it can't be fetched. */
.trop-photo {
  position: relative;
  height: 158px;
  margin: -18px -19px 13px;
  overflow: hidden;
  background: linear-gradient(155deg, var(--rose-soft), var(--green-soft));
}
.trop-photo::before {
  content: "";
  position: absolute; inset: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  opacity: 0.85;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 130'><g fill='none' stroke='%235e8a5a' stroke-width='1.3' opacity='0.85'><path d='M100 122 C 96 84, 112 54, 150 40'/><path d='M100 122 C 104 84, 88 54, 50 40'/><path d='M100 122 L 100 64'/></g><g fill='%23c98a93' opacity='0.85'><circle cx='150' cy='40' r='9'/><circle cx='50' cy='40' r='9'/><circle cx='100' cy='58' r='10'/></g></svg>");
}
.trop-plant h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.1rem;
}
.trop-plant .latin {
  margin: 1px 0 8px;
  font-size: 0.8rem;
  font-style: italic;
  color: var(--muted);
}
.trop-plant p { margin: 0 0 11px; font-size: 0.88rem; color: var(--ink-soft); }
.trop-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.trop-tag {
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 3px 9px;
  background: var(--rose-soft);
  color: var(--rose-deep);
}
.trop-tag.is-hardy { background: var(--green-soft); color: var(--green-deep); }
.trop-tag.is-care  { background: #f3e9d3; color: #87692b; }

/* ---- hardy / needs-protection split ---- */
.trop-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.trop-split .panel {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-1);
}
.trop-split .panel h3 {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: 1.06rem;
  display: flex;
  align-items: center;
  gap: 9px;
}
.trop-split .dot { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.trop-split .dot.g { background: var(--green); }
.trop-split .dot.a { background: #c79f4a; }
.trop-split .panel ul {
  margin: 0;
  padding-left: 18px;
  color: var(--ink-soft);
  font-size: 0.9rem;
}
.trop-split .panel li { margin-bottom: 5px; }
@media (max-width: 640px) { .trop-split { grid-template-columns: 1fr; } }

/* ---- charcoal "black fence & decking" panel ---- */
.trop-dark {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, #2f352f, #222722);
  color: #e7ece4;
  padding: 38px;
}
.trop-dark .eyebrow { background: rgba(255,255,255,0.09); color: #bcdcc2; }
.trop-dark h2 {
  color: #fff;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  letter-spacing: -0.018em;
  margin: 6px 0 10px;
}
.trop-dark > p { color: #c4ccbf; max-width: 62ch; margin: 0 0 20px; }
.trop-dark-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}
.trop-dark-item {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 16px 17px;
}
.trop-dark-item h3 { margin: 0 0 5px; font-size: 0.98rem; color: #fff; }
.trop-dark-item p { margin: 0; font-size: 0.86rem; color: #b6bfb2; }
.trop-dark a { color: #c4e6c9; }
@media (max-width: 540px) { .trop-dark { padding: 26px 22px; } }

/* ---- tool validation message ---- */
.calc-msg { margin: 0; color: var(--rose-deep); font-weight: 500; }

/* ---- spacing under stacked tool cards ---- */
.trop-tools .tool-card { margin-bottom: 18px; }
.trop-tools .tool-card:last-child { margin-bottom: 0; }
