.herb-index{
  --hfc-bg:#F1F6F4;
  --hfc-surface:#FFFFFF;
  --hfc-surface2:#BFD9CF;
  --hfc-gold:#027E7F;
  --hfc-gold-light:#4EAAAB;
  --hfc-gold-dim:#014B4C;
  --hfc-green:#027E7F;
  --hfc-green-light:#4EAAAB;
  --hfc-red:#D81757;
  --hfc-red-light:#E45D89;
  --hfc-text:#11221C;
  --hfc-text-dim:#88908D;
  --hfc-text-muted:#ABB1AF;

  --bg: var(--hfc-bg);
  --surface: var(--hfc-surface);
  --surface2: var(--hfc-surface2);
  --accent: var(--hfc-gold);
  --accent-light: var(--hfc-gold-light);
  --accent-dim: var(--hfc-gold-dim);
  --heat: var(--hfc-red);
  --heat-light: var(--hfc-red-light);
  --text: var(--hfc-text);
  --text-dim: var(--hfc-text-dim);
  --text-muted: var(--hfc-text-muted);
  --card-shadow: 0 1px 2px rgba(1,75,76,.06), 0 8px 24px -12px rgba(1,75,76,.18);
  --heading: 'Heebo', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Arial Hebrew', sans-serif;
  --sans: 'Assistant', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Arial Hebrew', 'Noto Sans Hebrew', sans-serif;
  --mono: ui-monospace, 'Cascadia Code', 'SF Mono', Consolas, monospace;

  /* design is intentionally light-only, regardless of viewer theme preference */
  color-scheme: light;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  direction: rtl;
}

.herb-index *{box-sizing:border-box;}

.herb-index .container{
  max-width:1180px;
  margin:0 auto;
  padding: 40px 24px 80px;
}

/* ---------- header ---------- */
.herb-index .masthead{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:24px;
  flex-wrap:wrap;
  padding-bottom:22px;
  margin-bottom:26px;
  border-bottom:1px solid var(--surface2);
}
.herb-index .masthead-title{
  display:flex;
  align-items:baseline;
  gap:14px;
  flex-wrap:wrap;
}
.herb-index .masthead h1{
  font-family: var(--heading);
  font-weight:600;
  font-size:clamp(28px,4vw,40px);
  margin:0;
  letter-spacing:.2px;
  text-wrap:balance;
}
.herb-index .masthead .cat-tag{
  font-size:13px;
  color:var(--accent-dim);
  background:var(--surface2);
  border-radius:999px;
  padding:5px 14px;
  font-weight:600;
  white-space:nowrap;
}
.herb-index .masthead p{
  margin:6px 0 0;
  color:var(--text-dim);
  font-size:14.5px;
}
.herb-index .count-badge{
  font-family:var(--mono);
  font-size:13px;
  color:var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  border:1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius:8px;
  padding:8px 12px;
  text-align:center;
  min-width:96px;
}
.herb-index .count-badge b{display:block; font-size:20px; font-family:var(--sans); font-weight:700; color:var(--text);}

/* ---------- controls ---------- */
.herb-index .controls{
  display:flex;
  flex-direction:column;
  gap:14px;
  margin-bottom:30px;
}
.herb-index .search-row{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}
.herb-index .search-box{
  position:relative;
  flex:1;
  max-width:420px;
}
.herb-index .search-box svg{
  position:absolute;
  top:50%; right:14px;
  transform:translateY(-50%);
  width:16px;height:16px;
  color:var(--text-muted);
  pointer-events:none;
}
.herb-index .search-box input{
  width:100%;
  padding:11px 40px 11px 14px;
  border-radius:10px;
  border:1px solid var(--surface2);
  background:var(--surface);
  color:var(--text);
  font-size:14.5px;
  font-family:var(--sans);
  outline:none;
  transition:border-color .15s, box-shadow .15s;
}
.herb-index .search-box input:focus-visible{
  border-color:var(--accent);
  box-shadow:0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.herb-index .sort-select{
  padding:10px 12px;
  border-radius:10px;
  border:1px solid var(--surface2);
  background:var(--surface);
  color:var(--text);
  font-size:13.5px;
  font-family:var(--sans);
  outline:none;
  cursor:pointer;
}
.herb-index .sort-select:focus-visible{ border-color:var(--accent); }

.herb-index .filter-groups{
  display:flex;
  gap:22px;
  flex-wrap:wrap;
}
.herb-index .filter-group{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.herb-index .filter-group .fg-label{
  font-size:12px;
  color:var(--text-muted);
  font-weight:600;
  letter-spacing:.03em;
  margin-inline-end:2px;
}
.herb-index .chip{
  font-family:var(--mono);
  font-size:12.5px;
  letter-spacing:.02em;
  padding:6px 11px;
  border-radius:8px;
  border:1px solid var(--surface2);
  background:var(--surface);
  color:var(--text-dim);
  cursor:pointer;
  transition: background .15s, color .15s, border-color .15s, transform .1s;
}
.herb-index .chip:hover{ border-color: var(--accent-light); color:var(--text); }
.herb-index .chip:active{ transform:scale(.96); }
.herb-index .chip.on{
  background: var(--accent);
  border-color: var(--accent);
  color:#fff;
}
.herb-index .chip.heat.on{ background:var(--heat); border-color:var(--heat); }
.herb-index .chip.tastechip{ font-family:var(--sans); }

.herb-index .clear-btn{
  font-family:var(--sans);
  font-size:12.5px;
  color:var(--accent-dim);
  background:none;
  border:none;
  text-decoration:underline;
  cursor:pointer;
  padding:0;
}
.herb-index .clear-btn:disabled{ color:var(--text-muted); text-decoration:none; cursor:default; }

/* ---------- grid ---------- */
.herb-index .grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(240px,1fr));
  gap:16px;
}
.herb-index .card{
  background:var(--surface);
  border:1px solid var(--surface2);
  border-radius:14px;
  padding:18px 18px 16px;
  text-align:right;
  cursor:pointer;
  box-shadow: var(--card-shadow);
  transition: transform .15s ease, border-color .15s ease;
  opacity:0;
  transform: translateY(6px);
  animation: herbIndexCardIn .38s ease forwards;
}
.herb-index .card:hover{ transform: translateY(-2px); border-color: var(--accent-light); }
.herb-index .card:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
@keyframes herbIndexCardIn{ to{ opacity:1; transform:translateY(0);} }

.herb-index .card-top{
  margin-bottom:10px;
}
.herb-index .card h3{
  font-family:var(--heading);
  font-size:21px;
  font-weight:600;
  margin:0;
  direction:ltr;
  text-align:right;
  color:var(--text);
}

.herb-index .card .taste-nature{
  font-size:12.5px;
  color:var(--text);
  font-weight:600;
  margin-bottom:12px;
}

.herb-index .channel-row{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  margin-bottom:12px;
}
.herb-index .channel-pill{
  font-family:var(--mono);
  font-size:11.5px;
  padding:3px 8px;
  border-radius:6px;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--accent-dim);
  border:1px solid color-mix(in srgb, var(--accent) 20%, transparent);
}

.herb-index .card .props-preview{
  font-size:13px;
  line-height:1.6;
  color:var(--text-dim);
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.herb-index .no-results{
  grid-column:1/-1;
  text-align:center;
  padding:60px 20px;
  color:var(--text-muted);
  font-size:14px;
}

.herb-index .group-header{
  grid-column:1/-1;
  font-family:var(--heading);
  font-size:13px;
  font-weight:700;
  letter-spacing:.03em;
  color:var(--accent-dim);
  padding:18px 2px 6px;
  border-bottom:1px solid var(--surface2);
  margin-bottom:2px;
}
.herb-index .group-header:first-child{ padding-top:0; }

/* ---------- panel ---------- */
.herb-index .scrim{
  position:fixed; inset:0;
  background: color-mix(in srgb, var(--hfc-gold-dim) 45%, transparent);
  backdrop-filter: blur(2px);
  opacity:0;
  pointer-events:none;
  transition:opacity .2s ease;
  z-index:100040;
}
.herb-index .scrim.open{ opacity:1; pointer-events:auto; }

.herb-index .panel{
  position:fixed;
  top:0; right:0;
  height:100%;
  width:min(460px, 92vw);
  background:var(--surface);
  box-shadow:-18px 0 40px -12px rgba(1,34,28,.35);
  transform: translateX(102%);
  transition: transform .28s cubic-bezier(.2,.8,.2,1);
  z-index:100041;
  display:flex;
  flex-direction:column;
  direction:rtl;
  font-family: var(--sans);
  color: var(--text);
}
.herb-index .panel.open{ transform:translateX(0); }

.herb-index .panel-head{
  padding:22px 24px 18px;
  border-bottom:1px solid var(--surface2);
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
}
.herb-index .panel-head h2{
  font-family:var(--heading);
  font-size:27px;
  margin:0 0 8px;
  direction:ltr;
  text-align:right;
  color:var(--text);
}
.herb-index .panel-head .cat-tag{
  font-size:12px;
  color:var(--accent-dim);
  background:var(--surface2);
  border-radius:999px;
  padding:4px 12px;
  display:inline-block;
  font-weight:600;
}
.herb-index .panel-close{
  border:none;
  background:var(--bg);
  color:var(--text-dim);
  width:32px;height:32px;
  border-radius:50%;
  font-size:16px;
  cursor:pointer;
  flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  transition: background .15s, color .15s;
}
.herb-index .panel-close:hover{ background:var(--surface2); color:var(--text); }

.herb-index .panel-body{
  padding:22px 24px 32px;
  overflow-y:auto;
  flex:1;
}
.herb-index .attr-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  margin-bottom:22px;
}
.herb-index .attr{
  background:var(--bg);
  border:1px solid var(--surface2);
  border-radius:10px;
  padding:10px 12px;
}
.herb-index .attr .attr-label{
  font-size:11px;
  color:var(--text-muted);
  font-weight:600;
  letter-spacing:.03em;
  margin-bottom:4px;
}
.herb-index .attr .attr-value{ font-size:14px; color:var(--text); font-weight:600; }
.herb-index .attr .attr-value.channels{ font-family:var(--mono); direction:ltr; text-align:right; font-weight:500; }

.herb-index .panel-body h4{
  font-size:12px;
  color:var(--text-muted);
  font-weight:700;
  letter-spacing:.04em;
  margin:0 0 8px;
}
.herb-index .panel-body .props-full{
  font-size:15px;
  line-height:1.85;
  color:var(--text);
  white-space:pre-line;
}

@media (prefers-reduced-motion: reduce){
  .herb-index *{ animation-duration:.001ms !important; transition-duration:.001ms !important; }
}
