/* Botanische Bibliothek — Katalog-Styles */
.cat-hero { padding-top: calc(var(--header-h) + 54px); padding-bottom: 28px; background: var(--pink); }
.cat-hero .eyebrow { margin-bottom: 14px; }
.cat-hero h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(34px, 6vw, 64px); color: var(--ink); letter-spacing: -0.02em; line-height: 1; }
.cat-hero p { color: var(--ink-soft); max-width: 62ch; margin-top: 14px; font-size: clamp(15px,1.6vw,17px); }

/* Filter / search */
.cat-filters { position: sticky; top: var(--header-h); z-index: 40; background: color-mix(in srgb, var(--pink) 94%, transparent);
  backdrop-filter: saturate(150%) blur(12px); -webkit-backdrop-filter: saturate(150%) blur(12px);
  border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.cat-filters__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding-block: 12px; }
.cat-filters__drops { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.fdrop { position: relative; }
.fdrop__btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; font-family: var(--font-body); font-size: 13px; color: var(--ink);
  background: var(--cream); border: 1px solid var(--line); border-radius: 999px; cursor: pointer; transition: border-color .2s, background .2s; white-space: nowrap; }
.fdrop__btn:hover { border-color: var(--ink-soft); }
.fdrop.active .fdrop__btn { border-color: var(--coral); background: color-mix(in srgb, var(--coral) 10%, var(--cream)); }
.fdrop__badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--coral); color: var(--white); font-family: var(--font-mono); font-size: 11px; line-height: 1; }
.fdrop__chev { font-size: 9px; color: var(--ink-soft); transition: transform .2s; }
.fdrop.open .fdrop__chev { transform: rotate(180deg); }

.fdrop__panel { position: absolute; top: calc(100% + 8px); left: 0; z-index: 60; min-width: 210px; max-width: min(260px, calc(100vw - 32px));
  max-height: 320px; overflow-y: auto; padding: 7px; background: var(--white); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 18px 44px -18px rgba(40,20,10,.32); display: none; }
.fdrop.open .fdrop__panel { display: block; animation: fdropIn .16s ease; }
.fdrop__panel--right { left: auto; right: 0; }
@keyframes fdropIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.fdrop__opt { display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 10px; border: 0; background: transparent;
  font-family: var(--font-body); font-size: 13.5px; color: var(--ink); text-align: left; cursor: pointer; border-radius: 10px; transition: background .15s; }
.fdrop__opt:hover { background: var(--pink); }
.fdrop__box { flex-shrink: 0; width: 18px; height: 18px; border: 1.5px solid var(--line); border-radius: 6px; position: relative; transition: all .15s; }
.fdrop__opt[aria-selected="true"] .fdrop__box { background: var(--coral); border-color: var(--coral); }
.fdrop__opt[aria-selected="true"] .fdrop__box::after { content: ""; position: absolute; left: 5px; top: 1.5px; width: 5px; height: 9px;
  border: solid var(--white); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.fdrop__clear { width: 100%; margin-top: 4px; padding: 8px 10px; border: 0; border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  background: transparent; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); cursor: pointer; }
.fdrop__clear:hover { color: var(--coral); }
.fdrop__resetall { padding: 9px 12px; border: 0; background: transparent; font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); cursor: pointer; }
.fdrop__resetall:hover { color: var(--coral); }

.cat-searchwrap { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 220px; justify-content: flex-end; }
.cat-search { flex: 1; max-width: 320px; font-family: var(--font-body); font-size: 14px; color: var(--ink);
  background: var(--cream); border: 1px solid var(--line); border-radius: 999px; padding: 11px 18px; outline: none; }
.cat-search:focus { border-color: var(--coral); }
.cat-count { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--ink-soft); white-space: nowrap; }

.cat-sort { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.cat-sort__lbl { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.cat-sort__sel { font-family: var(--font-body); font-size: 13px; color: var(--ink);
  background: var(--cream); border: 1px solid var(--line); border-radius: 999px; padding: 9px 32px 9px 14px; outline: none; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; }
.cat-sort__sel:focus { border-color: var(--coral); }

@media (max-width: 640px) {
  .cat-filters__drops { width: 100%; }
  .fdrop { flex: 1 1 calc(50% - 4px); }
  .fdrop__btn { width: 100%; justify-content: center; }
  .fdrop__resetall { flex: 1 1 100%; order: 9; text-align: center; }
  .cat-searchwrap { width: 100%; min-width: 0; justify-content: flex-start; flex-wrap: wrap; }
  .cat-search { max-width: none; flex: 1 1 100%; order: 2; }
  .cat-sort { order: 1; }
  .cat-count { order: 3; }
}

/* Grid */
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; padding-block: 30px 90px; }
@media (min-width: 600px) { .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
@media (min-width: 900px) { .cat-grid { grid-template-columns: repeat(4, 1fr); gap: 22px; } }
@media (min-width: 1200px) { .cat-grid { grid-template-columns: repeat(5, 1fr); } }

.plant { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.plant__media { position: relative; width: 100%; aspect-ratio: 4/5; background: #FAF8F2; border: 1px solid var(--line);
  border-radius: 8px; overflow: hidden; transition: border-color .2s, transform .25s var(--ease); }
.plant:hover .plant__media { border-color: color-mix(in srgb, var(--coral) 50%, var(--line)); transform: translateY(-2px); }
.plant__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; opacity: 0; transition: opacity .5s ease; }
.plant__media img.loaded { opacity: 1; }
.plant__media img.missing { display: none; }
.plant__ph { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; text-align: center; padding: 16px; background: #FAF8F2; }
.plant__ph::before { content: ""; position: absolute; inset: 11px; border: 1px solid color-mix(in srgb, var(--coral) 20%, transparent); border-radius: 4px; }
.plant__ph .ph-mark { font-size: 20px; color: color-mix(in srgb, var(--coral) 70%, transparent); line-height: 1; }
.plant__ph .ph-name { font-family: var(--font-display); font-weight: 500; font-size: clamp(14px,1.3vw,18px); color: var(--ink); line-height: 1.15; padding: 0 4px; }
.plant__ph .ph-bot { font-style: italic; font-family: var(--font-display); font-size: 12px; color: var(--ink-soft); }
.plant__ph .ph-spec { font-family: var(--font-mono); font-size: 8px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--coral); opacity: .75; margin-top: 6px; }

.plant__name { font-family: var(--font-display); font-weight: 600; font-size: clamp(15px,1.5vw,19px); color: var(--ink); margin-top: 12px; line-height: 1.12; }
.plant__bot { font-style: italic; font-family: var(--font-display); font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.plant__meta { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.plant__meta .dot { opacity: .5; }
.plant__meta .swatch { width: 11px; height: 11px; border-radius: 50%; margin-left: auto; border: 1px solid rgba(0,0,0,.12); flex-shrink: 0; }

/* color swatches */
.sw-white{background:#FBF7F0;} .sw-blush{background:#E9AEBD;} .sw-peach{background:#E8A878;} .sw-coral{background:#E2674A;}
.sw-burgundy{background:#7B2D33;} .sw-blue{background:#8EA7C4;} .sw-green{background:#8FA67E;} .sw-neutral{background:#D8C3A0;}
.sw-mixed{background:conic-gradient(#E9AEBD,#E8A878,#8FA67E,#8EA7C4,#E9AEBD);}

.cat-empty { padding: 60px 0; text-align: center; color: var(--ink-soft); font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.1em; grid-column: 1/-1; }

/* ---- Detailansicht ---- */
.pd { position: fixed; inset: 0; z-index: 200; display: none; align-items: flex-start; justify-content: center;
  background: rgba(26,19,16,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); overflow-y: auto; padding: 0; }
.pd.open { display: flex; }
.pd__inner { position: relative; background: var(--cream); width: 100%; max-width: 940px; margin: auto; min-height: 100%;
  display: grid; grid-template-columns: 1fr; }
.pd__close { position: absolute; top: 14px; right: 14px; z-index: 5; width: 42px; height: 42px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.85); color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer; }
.pd__media { position: relative; width: 100%; aspect-ratio: 4/5; background: #FAF8F2; }
.pd__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s; z-index: 2; }
.pd__media img.loaded { opacity: 1; }
.pd__media img.missing { display: none; }
.pd__info { padding: 30px 26px 50px; }
.pd__info .eyebrow { color: var(--coral); margin-bottom: 8px; }
.pd__name { font-family: var(--font-display); font-weight: 600; font-size: clamp(28px,4vw,42px); color: var(--ink); line-height: 1.02; letter-spacing: -0.015em; }
.pd__bot { font-style: italic; font-family: var(--font-display); font-size: 17px; color: var(--ink-soft); margin: 4px 0 16px; }
.pd__desc { font-family: var(--font-display); font-size: 15.5px; line-height: 1.55; color: var(--ink); margin: 0 0 22px; }
.pd__row { display: flex; align-items: center; gap: 10px; padding: 13px 0; border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent); font-size: 14px; color: var(--ink); }
.pd__label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); width: 96px; flex-shrink: 0; }
.pd__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pd__chip { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); background: var(--pink-soft); border-radius: 999px; padding: 5px 10px; }
.pd__row .swatch { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.12); }
.pips { display: inline-flex; gap: 4px; }
.pip { width: 8px; height: 8px; border-radius: 50%; background: color-mix(in srgb, var(--line) 80%, transparent); }
.pip.on { background: var(--coral); }
.pd__works { display: flex; flex-wrap: wrap; gap: 8px; }
.pd__works a { color: var(--coral); text-decoration: none; }
.pd__cta { margin-top: 26px; }
@media (min-width: 760px) {
  .pd { align-items: center; padding: 30px; }
  .pd__inner { grid-template-columns: 1fr 1fr; min-height: auto; border-radius: 14px; overflow: hidden; }
  .pd__media { aspect-ratio: auto; height: 100%; min-height: 520px; }
  .pd__info { padding: 46px 40px; max-height: 86vh; overflow-y: auto; }
}

/* Lightbox-Navigation */
.pd__counter { position: absolute; top: 16px; left: 16px; z-index: 5; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em;
  color: var(--ink); background: rgba(255,255,255,.85); border-radius: 999px; padding: 6px 12px; }
.pd__nav { position: fixed; top: 50%; transform: translateY(-50%); z-index: 210; width: 54px; height: 54px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.9); color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 8px 24px -10px rgba(0,0,0,.5); transition: background .2s, transform .2s; }
.pd__nav:hover { background: #fff; transform: translateY(-50%) scale(1.06); }
.pd__nav--prev { left: 20px; }
.pd__nav--next { right: 20px; }
@media (max-width: 759px) {
  .pd__nav { display: none; }
}
