/* ============================================================
   БИЛКИ БЪЛГАРИЯ — стилове
   ============================================================ */

:root {
  --green-900: #1b3a2b;
  --green-700: #2f6f4e;
  --green-500: #4a9d6f;
  --green-300: #8fcea8;
  --green-100: #e6f4ec;
  --gold: #d9a441;
  --cream: #f7f4ec;
  --ink: #233027;
  --muted: #6b7d72;
  --danger: #b3402f;
  --danger-bg: #fbeae7;
  --card-bg: #ffffff;
  --shadow: 0 6px 22px rgba(27, 58, 43, 0.10);
  --radius: 16px;
}

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

body {
  font-family: "Segoe UI", Tahoma, system-ui, sans-serif;
  background:
    radial-gradient(1200px 500px at 80% -10%, #eaf6ef 0%, transparent 60%),
    var(--cream);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--green-700); }

/* ---------- Header ---------- */
header.site {
  background: linear-gradient(135deg, var(--green-900), var(--green-700));
  color: #fff;
  padding: 28px 20px 22px;
  box-shadow: var(--shadow);
}
header.site .wrap { max-width: 1200px; margin: 0 auto; }
header.site h1 {
  font-size: 2rem;
  letter-spacing: .5px;
  display: flex; align-items: center; gap: 12px;
}
header.site h1 .leaf { font-size: 2.2rem; }
header.site p.tagline { opacity: .9; margin-top: 4px; font-size: .98rem; }

/* ---------- Controls ---------- */
.controls {
  max-width: 1200px;
  margin: 22px auto 6px;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.search-box {
  flex: 1 1 320px;
  position: relative;
}
.search-box input {
  width: 100%;
  padding: 13px 16px 13px 44px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow);
  font-size: 1rem;
  outline: none;
  transition: border-color .2s;
}
.search-box input:focus { border-color: var(--green-500); }
.search-box .icon {
  position: absolute; left: 16px; top: 22px; transform: translateY(-50%);
  opacity: .5;
}

/* ---------- Autocomplete предложения ---------- */
.suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(27,58,43,.22);
  overflow: hidden;
  z-index: 40;
  display: none;
  max-height: 360px;
  overflow-y: auto;
}
.suggest.open { display: block; }
.suggest .sg {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--green-100);
}
.suggest .sg:last-child { border-bottom: none; }
.suggest .sg:hover, .suggest .sg.active { background: var(--green-100); }
.suggest .sg .ico { font-size: 1.3rem; width: 26px; text-align: center; flex: 0 0 auto; }
.suggest .sg .txt { min-width: 0; }
.suggest .sg .nm { font-weight: 600; color: var(--green-900); }
.suggest .sg .nm mark { background: #fdeeb8; color: inherit; border-radius: 3px; padding: 0 1px; }
.suggest .sg .sub { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest .sg-empty { padding: 16px; color: var(--muted); text-align: center; }
.suggest .sg-head { padding: 8px 16px 4px; font-size: .72rem; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
select.filter {
  padding: 12px 16px;
  border-radius: 999px;
  border: none;
  background: #fff;
  box-shadow: var(--shadow);
  font-size: .95rem;
  cursor: pointer;
  color: var(--ink);
}
.count {
  color: var(--muted);
  font-size: .9rem;
  margin-left: auto;
}

/* ---------- Chips (категории) ---------- */
.chips {
  max-width: 1200px;
  margin: 12px auto;
  padding: 0 20px;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.chip {
  border: 1px solid var(--green-300);
  background: #fff;
  color: var(--green-700);
  padding: 5px 13px;
  border-radius: 999px;
  font-size: .82rem;
  cursor: pointer;
  transition: all .15s;
}
.chip:hover { background: var(--green-100); }
.chip.active { background: var(--green-700); color: #fff; border-color: var(--green-700); }

/* ---------- Grid ---------- */
.grid {
  max-width: 1200px;
  margin: 18px auto 60px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .18s, box-shadow .18s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(27,58,43,.18); }
.card .thumb {
  height: 170px;
  background: linear-gradient(135deg, var(--green-100), #d6ebdd);
  position: relative;
  overflow: hidden;
}
.card .thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.card .thumb .ph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; opacity: .5;
}
.card .body { padding: 14px 16px 18px; }
.card .body h3 { font-size: 1.15rem; color: var(--green-900); }
.card .body .latin { font-style: italic; color: var(--muted); font-size: .85rem; }
.card .tags { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.card .tag {
  font-size: .72rem;
  background: var(--green-100);
  color: var(--green-700);
  padding: 3px 9px;
  border-radius: 999px;
}

.empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding: 60px 20px;
}

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(27, 58, 43, .55);
  backdrop-filter: blur(3px);
  display: none;
  align-items: flex-start; justify-content: center;
  padding: 30px 16px;
  z-index: 50;
  overflow-y: auto;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--cream);
  border-radius: 20px;
  max-width: 820px;
  width: 100%;
  box-shadow: 0 30px 70px rgba(0,0,0,.35);
  overflow: hidden;
  animation: pop .22s ease;
}
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.modal .hero {
  position: relative;
  height: 260px;
  background: linear-gradient(135deg, var(--green-700), var(--green-500));
}
.modal .hero img { width: 100%; height: 100%; object-fit: cover; }
.modal .hero .ph {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 5rem; color: rgba(255,255,255,.6);
}
.modal .hero .titles {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 40px 26px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,.65));
  color: #fff;
}
.modal .hero .titles h2 { font-size: 1.8rem; }
.modal .hero .titles .latin { font-style: italic; opacity: .9; }
.modal .close {
  position: absolute; top: 14px; right: 14px;
  width: 38px; height: 38px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.9);
  font-size: 1.3rem; cursor: pointer; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.modal .content { padding: 22px 26px 30px; }

.modal .alt { color: var(--muted); font-size: .9rem; margin-bottom: 6px; }
.modal .desc { font-size: 1.02rem; margin: 10px 0 18px; }

.section { margin: 18px 0; }
.section h4 {
  color: var(--green-700);
  font-size: 1.05rem;
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px;
  border-bottom: 2px solid var(--green-100);
  padding-bottom: 5px;
}
.section ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.section ul li {
  background: #fff;
  border: 1px solid var(--green-100);
  padding: 5px 12px;
  border-radius: 10px;
  font-size: .9rem;
}
.section.text p { font-size: .98rem; }

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.meta-item {
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
}
.meta-item .label { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.meta-item .value { font-weight: 600; color: var(--green-900); margin-top: 2px; }

.warn { background: var(--danger-bg); border-left: 4px solid var(--danger); border-radius: 10px; padding: 12px 16px; }
.warn h4 { color: var(--danger); border: none; }
.warn ul li { border-color: #f0cfc9; }

.seasons-row { display: flex; gap: 8px; flex-wrap: wrap; }
.season-pill {
  padding: 6px 14px; border-radius: 999px; font-size: .85rem;
  background: #eee; color: #888;
}
.season-pill.on { color: #fff; font-weight: 600; }
.season-pill.s-spring.on { background: #7cc77c; }
.season-pill.s-summer.on { background: var(--gold); }
.season-pill.s-autumn.on { background: #c8742f; }
.season-pill.s-winter.on { background: #5b9bd5; }

.combo-good a, .combo-good span { color: var(--green-700); }

footer.site {
  text-align: center;
  padding: 26px 20px 40px;
  color: var(--muted);
  font-size: .85rem;
}
footer.site .disclaimer {
  max-width: 760px; margin: 0 auto 12px;
  background: #fff7e6; border: 1px solid #f0d9a0;
  border-radius: 12px; padding: 12px 18px;
  color: #8a6d2f;
}

@media (max-width: 600px) {
  header.site h1 { font-size: 1.5rem; }
  .modal .hero { height: 190px; }
}
