.recipes-page { min-height: 60vh; }
.recipes-hero { padding: 62px 24px 50px; background: var(--page); text-align: center; }
.recipes-hero { position: relative; z-index: 5; }
.recipes-kicker, .shelf-kicker { display: block; margin-bottom: 10px; color: var(--emerald); font-family: var(--font-ui); font-size: .72rem; font-weight: 600; letter-spacing: 1.8px; }
.recipes-hero h1 { margin: 0; color: var(--forest); font-family: var(--font-display); font-size: clamp(2.35rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -1.5px; line-height: 1.1; }
.recipes-hero > p { margin: 14px 0 25px; color: #65776a; font-family: var(--font-ui); font-size: 1rem; }
.advanced-search-container { position: relative; z-index: 15; width: min(100%, 760px); margin: 0 auto; text-align: left; }
.advanced-search-bar { display: flex; align-items: center; gap: 10px; padding: 7px; border: 1px solid rgba(2,44,34,.08); border-radius: 18px; background: #fff; box-shadow: 0 12px 30px rgba(22,53,35,.1); }
.advanced-search-bar:focus-within { border-color: rgba(22,163,74,.5); box-shadow: 0 12px 30px rgba(22,53,35,.1), 0 0 0 3px rgba(22,163,74,.1); }
.search-field { position: relative; display: flex; min-width: 0; height: 48px; flex: 1; align-items: center; gap: 11px; padding: 0 14px; }
.search-field > svg { width: 20px; height: 20px; flex: 0 0 20px; fill: none; stroke: #9ca3af; stroke-linecap: round; stroke-width: 1.8; }
#search-input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-family: var(--font-ui); font-size: .94rem; }
#search-input::placeholder { color: #9ca3af; }
.filters-toggle { display: inline-flex; height: 46px; flex: 0 0 auto; align-items: center; gap: 8px; padding: 0 19px; border: 1px solid rgba(2,44,34,.12); border-radius: 13px; background: #fff; color: var(--forest); font-family: var(--font-ui); font-size: .88rem; font-weight: 600; cursor: pointer; transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.filters-toggle:hover, .filters-toggle[aria-expanded="true"] { border-color: var(--emerald); background: var(--forest); color: #fff; }
.search-suggestions { position: absolute; top: calc(100% + 10px); right: 0; left: 0; z-index: 30; margin: 0; padding: 7px; border: 1px solid rgba(2,44,34,.08); border-radius: 16px; background: #fff; box-shadow: 0 16px 38px rgba(10,39,25,.16); list-style: none; }
.search-suggestions[hidden], .filters-dropdown[hidden] { display: none; }
.search-suggestions li + li { border-top: 1px solid rgba(2,44,34,.06); }
.search-suggestions button { width: 100%; padding: 12px 13px; border: 0; border-radius: 10px; background: transparent; color: var(--forest); font-family: var(--font-ui); text-align: left; cursor: pointer; }
.search-suggestions button:hover, .search-suggestions button:focus-visible { outline: 0; background: rgba(22,163,74,.1); color: var(--emerald); }
.recipes-search { display: flex; width: min(100%, 660px); height: 60px; align-items: center; gap: 12px; margin: 0 auto; padding: 7px 8px 7px 22px; border-radius: 50px; background: #fff; box-shadow: 0 12px 30px rgba(22,53,35,.1); }
.recipes-search svg { width: 20px; height: 20px; flex: 0 0 20px; fill: none; stroke: #9ca3af; stroke-linecap: round; stroke-width: 1.8; }
.recipes-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-family: var(--font-ui); font-size: .9rem; }
.recipes-search input::placeholder { color: #9ca3af; }
.recipes-search button { height: 46px; padding: 0 27px; border: 0; border-radius: 40px; background: var(--emerald); color: #fff; font-family: var(--font-ui); font-size: .9rem; font-weight: 600; cursor: pointer; transition: filter .2s ease, transform .2s ease; }
.recipes-search button:hover { filter: brightness(.94); transform: translateY(-1px); }
.recipes-search button:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; }
.recipes-content { max-width: 1320px; margin: 0 auto; padding: 15px 32px 80px; }
.recipe-catalog { scroll-margin-top: 24px; }
.catalog-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.catalog-heading h2 { margin: 0; color: var(--forest); font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2rem); }
.catalog-count { color: #768579; font-family: var(--font-ui); font-size: .85rem; }
.recipe-catalog .recipe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 24px; }
.recipe-catalog .recipe-card { min-width: 0; flex: initial; max-width: 360px; }
.recipe-catalog .recipe-card > a { color: inherit; text-decoration: none; }
.recipe-catalog .card-image { position: relative; overflow: hidden; }
.recipe-catalog .card-tag { margin: 0 0 7px; color: var(--emerald); font-family: var(--font-ui); font-size: .72rem; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; }
.recipe-catalog .card-description { margin: -5px 0 14px; color: #69796e; font-family: var(--font-ui); font-size: .84rem; line-height: 1.55; }
.photo-credit { display: block; margin-top: 10px; color: #6f7c72; font: 400 .66rem/1.45 var(--font-ui); }
.recipe-catalog .recipe-tags .tag-time { background: rgba(2,44,34,.08); color: var(--forest); }
.recipe-catalog .rating span { color: #d99b28; }
.recipe-shelf { margin-bottom: 34px; }
.shelf-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 17px; }
.shelf-kicker { margin: 0 0 4px; font-size: .65rem; }
.shelf-heading h2 { color: var(--forest); font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; line-height: 1.25; }
.shelf-heading h2 span { font-family: var(--font-ui); font-size: 1.15rem; }
.shelf-count { padding-bottom: 4px; color: #768579; font-family: var(--font-ui); font-size: .78rem; white-space: nowrap; }
.carousel-wrapper { position: relative; display: flex; align-items: center; }
.recipe-row { display: flex; min-width: 0; flex: 1 1 auto; gap: 20px; overflow-x: auto; padding: 2px 2px 20px; scroll-behavior: smooth; scrollbar-width: none; scroll-snap-type: x mandatory; }
.recipe-row::-webkit-scrollbar { display: none; }
.recipes-page .recipe-card { min-width: 260px; flex: 0 0 calc((100% - 60px) / 4); overflow: hidden; border: 1px solid rgba(2,44,34,.06); border-radius: 20px; background: #fff; box-shadow: 0 8px 24px rgba(24,54,34,.07); scroll-snap-align: start; }
.recipes-page .recipe-card:hover { box-shadow: 0 14px 30px rgba(24,54,34,.12); }
.recipes-page .recipe-card > a { display: block; height: 100%; color: inherit; }
.recipes-page .recipe-card > .recipe-card-link { display: flex; flex-direction: column; }
.recipes-page .card-image { height: 180px; }
.recipes-page .card-image img { width: 100%; height: 100%; object-fit: cover; }
.recipes-page .rating { top: 12px; right: 12px; padding: 6px 10px; background: rgba(255,255,255,.88); backdrop-filter: blur(8px); color: #28362b; font-family: var(--font-ui); font-size: .75rem; }
.recipes-page .card-body { padding: 15px; }
.recipes-page .card-body h3 { display: -webkit-box; min-height: 0; height: 3.15em; overflow: hidden; margin: 0 0 13px; color: var(--forest); font-family: var(--font-ui); font-size: 1.1rem; font-weight: 600; line-height: 1.42; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.recipe-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.recipe-tags span { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 20px; font-family: var(--font-ui); font-size: .68rem; font-weight: 500; line-height: 1.4; white-space: nowrap; }
.recipe-tags .tag-category { background: rgba(22,163,74,.1); color: #168341; }
.recipe-tags .tag-time { background: #fff1e9; color: #a8532e; }
.recipe-tags .tag-level { background: #edf2f3; color: #516269; }
.recipe-tags .recipe-tag { padding: 4px 8px; font-size: .64rem; }
.recipe-tags .tag-continent,
.recipe-tags .tag-origin { background: #e8f2eb; color: #145b35; }
.recipe-tags .tag-ingredient { background: #e9f4f0; color: #17634b; }
.recipe-tags .tag-meal { background: #f4f0e8; color: #75613c; }
.recipe-tags .tag-method { background: #edf1f3; color: #52636b; }
.recipe-tags .tag-type { background: #f0edf7; color: #62517e; }
.recipe-tags .tag-profile { background: #f6edf0; color: #805064; }
.recipe-tags .tag-event { border: 1px solid rgba(205, 171, 101, .38); background: #174b37; color: #f5dda2; }
.carousel-btn { position: absolute; top: calc(50% - 10px); z-index: 10; display: grid; width: 45px; height: 45px; place-items: center; padding: 0; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 5px 15px rgba(0,0,0,.15); color: var(--emerald); font-size: 1.25rem; line-height: 1; cursor: pointer; transform: translateY(-50%); transition: background-color .25s ease, color .25s ease, transform .25s ease; }
.prev-btn { left: -20px; }
.next-btn { right: -20px; }
.carousel-btn:hover { transform: translateY(-50%) scale(1.06); background: var(--emerald); color: #fff; }
.carousel-btn:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; }
@media (max-width: 720px) {
  .recipes-hero { padding: 48px 20px 38px; }
  .recipes-hero h1 { letter-spacing: -1px; }
  .recipes-content { padding: 12px 18px 56px; }
  .recipe-catalog .recipe-grid { grid-template-columns: 1fr; }
  .recipe-shelf { margin-bottom: 25px; }
  .shelf-heading { align-items: flex-start; }
  .shelf-heading h2 { font-size: 1.28rem; }
  .recipe-row { gap: 14px; }
  .recipes-page .recipe-card { min-width: 260px; }
  .carousel-btn { width: 40px; height: 40px; font-size: 1.1rem; }
  .prev-btn { left: -12px; }
  .next-btn { right: -12px; }
}
@media (max-width: 420px) {
  .recipes-hero { padding: 40px 18px 32px; }
  .recipes-hero > p { font-size: .9rem; }
  .advanced-search-bar { gap: 4px; padding: 5px; }
  .search-field { gap: 7px; padding: 0 8px; }
  #search-input { font-size: .82rem; }
  .filters-toggle { gap: 5px; padding: 0 10px; font-size: .78rem; }
  .shelf-heading h2 { font-size: 1.12rem; }
  .shelf-count { font-size: .7rem; }
}

/* Navegación rápida y secciones del catálogo */
.recipe-quick-filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 30px; }
.quick-filter { padding: 9px 16px; border: 1px solid #d8e6da; border-radius: 999px; background: #f4f8f3; color: #244b35; font-family: var(--font-ui); font-size: .84rem; font-weight: 600; cursor: pointer; transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease; }
.quick-filter:hover { transform: translateY(-1px); border-color: var(--emerald); }
.quick-filter[aria-pressed="true"] { border-color: var(--emerald); background: var(--emerald); color: #fff; }
.quick-filter:focus-visible { outline: 3px solid rgba(22,163,74,.3); outline-offset: 3px; }
.recipe-section { margin: 0 0 42px; scroll-margin-top: 24px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 0 0 18px; }
.section-title { margin: 0; color: var(--forest); font-family: var(--font-display); font-size: clamp(1.4rem, 2.6vw, 1.85rem); line-height: 1.2; }
.section-description { margin: 7px 0 0; color: #6b7d70; font-family: var(--font-ui); font-size: .9rem; line-height: 1.5; }
@supports selector(:has(*)) {
  .recipe-section:not(:has(.recipe-card:not([hidden]))) { display: none; }
}
@media (max-width: 600px) {
  .recipe-quick-filters { gap: 8px; margin-bottom: 24px; }
  .quick-filter { padding: 8px 12px; font-size: .78rem; }
  .section-heading { margin-bottom: 14px; }
  .section-description { font-size: .84rem; }
}
.recipe-section[hidden] { display: none; }

.recipes-page .recipe-card[data-quick-hidden] { display: none; }

/* Panel profesional de filtros del catálogo */
.recipes-page .filters-toggle { gap: 10px; padding-inline: 16px; border-color: rgba(255,255,255,.72); box-shadow: 0 4px 12px rgba(2,44,34,.06); }
.recipes-page .filters-toggle > svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.filters-toggle-chevron { margin-left: 2px; font-size: 1.15rem; line-height: 1; transition: transform .2s ease; }
.filters-toggle[aria-expanded="true"] .filters-toggle-chevron { transform: rotate(180deg); }
.recipes-page .filters-dropdown { display: flex; max-height: min(78vh, 720px); flex-direction: column; overflow: hidden; padding: 0; border-color: rgba(10,69,44,.14); border-radius: 24px; background: #f5f8f5; box-shadow: 0 26px 70px rgba(4,35,24,.23); }
.recipes-page .filters-dropdown[hidden] { display: none; }
.filters-panel-header { display: flex; flex: 0 0 auto; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 22px 25px 19px; background: linear-gradient(115deg, #063b2c 0%, #145c3d 100%); color: #fff; }
.filters-panel-header h2 { margin: 0; color: #fff; font-family: var(--font-display); font-size: 1.25rem; line-height: 1.25; }
.filters-panel-header p:last-child { margin: 6px 0 0; color: rgba(255,255,255,.76); font-family: var(--font-ui); font-size: .8rem; }
.filters-panel-kicker { margin: 0 0 6px; color: #a8e2b7; font-family: var(--font-ui); font-size: .62rem; font-weight: 700; letter-spacing: .13em; }
.filters-close { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border: 1px solid rgba(255,255,255,.28); border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; font-size: 1.35rem; line-height: 1; cursor: pointer; transition: background-color .2s ease, transform .2s ease; }
.filters-close:hover { transform: rotate(90deg); background: rgba(255,255,255,.2); }
.filters-close:focus-visible { outline: 3px solid rgba(255,255,255,.55); outline-offset: 2px; }
.recipes-page .filters-dropdown .filter-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-height: min(55vh, 500px); overflow-y: auto; padding: 18px 20px; overscroll-behavior: contain; }
.recipes-page .filters-dropdown .filter-group { min-width: 0; padding: 13px 14px 10px; border: 1px solid #e4ebe4; border-radius: 15px; background: #fff; box-shadow: 0 3px 10px rgba(16,52,30,.035); }
.recipes-page .filters-dropdown .filter-group h3 { margin: 0 0 8px; color: #183e2b; font-family: var(--font-display); font-size: .86rem; font-weight: 700; letter-spacing: .01em; }
.recipes-page .filters-dropdown .filter-group label { min-height: 32px; margin: 2px 0; padding: 5px 7px; border-radius: 8px; color: #4c5b51; font-size: .76rem; transition: background-color .16s ease, color .16s ease; }
.recipes-page .filters-dropdown .filter-group label:hover { background: #f0f7f1; color: #145c3d; }
.recipes-page .filters-dropdown .filter-group input[type="checkbox"] { width: 15px; height: 15px; flex-basis: 15px; accent-color: #168448; }
.filter-option-note { margin-left: auto; color: #89968c; font-size: .67rem; white-space: nowrap; }
.recipes-page .filter-dropdown-footer { flex: 0 0 auto; margin: 0; padding: 13px 22px; border-top: 1px solid #e3ebe3; background: #fff; }
.recipes-page .filter-reset { padding: 8px 13px; border: 1px solid #d8e7db; border-radius: 999px; background: #f5faf6; text-decoration: none; transition: background-color .2s ease, color .2s ease; }
.recipes-page .filter-reset:hover { background: #e8f4eb; color: #075d31; }
@media (max-width: 820px) {
  .recipes-page .filters-dropdown .filter-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
  .recipes-page .filters-dropdown { right: -4px; left: -4px; max-height: 82vh; border-radius: 19px; }
  .filters-panel-header { padding: 18px 17px 15px; }
  .filters-panel-header h2 { font-size: 1.08rem; }
  .recipes-page .filters-dropdown .filter-columns { grid-template-columns: 1fr; gap: 9px; max-height: 58vh; padding: 12px; }
  .recipes-page .filters-dropdown .filter-group { padding: 11px 12px 8px; }
  .recipes-page .filter-dropdown-footer { padding: 11px 14px; }
}

/* Panel completo de categorías bajo el encabezado del catálogo */
.recipes-page .recipe-catalog > .filters-dropdown {
  position: static;
  z-index: auto;
  width: 100%;
  max-height: none;
  margin: 0 0 34px;
  overflow: hidden;
  border: 1px solid #dfe9e0;
  border-radius: 22px;
  box-shadow: 0 16px 40px rgba(4, 35, 24, .1);
}
.recipes-page .recipe-catalog > .filters-dropdown[hidden] { display: none; }
.recipes-page .recipe-catalog .filter-columns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-height: none;
  overflow: visible;
  padding: 18px;
}
.recipes-page .recipe-catalog details.filter-facet {
  align-self: start;
  padding: 0;
  overflow: hidden;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.recipes-page .recipe-catalog details.filter-facet[open] {
  border-color: #b9d8c0;
  box-shadow: 0 7px 18px rgba(16, 82, 43, .08);
}
.recipes-page .recipe-catalog .filter-facet > summary {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  color: #183e2b;
  font-family: var(--font-ui);
  font-size: .88rem;
  font-weight: 700;
  line-height: 1.3;
  list-style: none;
  cursor: pointer;
}
.recipes-page .recipe-catalog .filter-facet > summary::-webkit-details-marker { display: none; }
.recipes-page .recipe-catalog .filter-facet > summary:focus-visible { outline: 3px solid rgba(22, 132, 72, .25); outline-offset: -3px; }
.facet-chevron { color: #168448; font-size: 1.1rem; transition: transform .18s ease; }
.filter-facet[open] .facet-chevron { transform: rotate(180deg); }
.recipes-page .recipe-catalog .filter-facet-options {
  display: grid;
  gap: 3px;
  padding: 0 10px 10px;
  border-top: 1px solid #edf2ed;
}
.recipes-page .recipe-catalog .filter-facet-options label {
  min-height: 36px;
  margin: 0;
  padding: 7px 8px;
  border-radius: 9px;
  font-family: var(--font-ui);
  font-size: .79rem;
  cursor: pointer;
}
.recipes-page .recipe-catalog .filter-facet-options label:has(input:checked) {
  background: #eaf5ed;
  color: #105c32;
  font-weight: 600;
}
.recipes-page .filter-menu-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.recipes-page .filter-menu-actions { display: flex; align-items: center; gap: 10px; }
.recipes-page .filter-reset-all {
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: #147a43;
  color: #fff;
  font-family: var(--font-ui);
  font-size: .84rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .18s ease, transform .18s ease;
}
.recipes-page .filter-reset-all:hover { transform: translateY(-1px); background: #0c6034; }
.recipes-page .filter-reset-all:focus-visible { outline: 3px solid rgba(22, 132, 72, .3); outline-offset: 3px; }
.recipes-page .filters-toggle {
  min-height: 46px;
  border: 1px solid #0d6037;
  background: linear-gradient(135deg, #167b44, #0b5d35);
  color: #fff;
  box-shadow: 0 7px 17px rgba(11, 93, 53, .2);
}
.recipes-page .filters-toggle:hover,
.recipes-page .filters-toggle[aria-expanded="true"] {
  border-color: #064729;
  background: #064729;
  box-shadow: 0 9px 22px rgba(11, 93, 53, .28);
}
.recipes-page .filters-toggle:focus-visible { outline: 3px solid rgba(22, 132, 72, .32); outline-offset: 3px; }
@media (max-width: 820px) {
  .recipes-page .recipe-catalog .filter-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
  .recipes-page .recipe-catalog > .filters-dropdown { right: auto; left: auto; max-height: none; margin-bottom: 26px; }
  .recipes-page .recipe-catalog .filter-columns { grid-template-columns: 1fr; gap: 9px; max-height: none; padding: 12px; }
  .recipes-page .filter-menu-footer { align-items: flex-start; }
}

/* Despliegue compacto, integrado al flujo del catálogo (sin ventana modal) */
.recipes-page .recipe-catalog > .filters-dropdown {
  margin-top: 14px;
  margin-bottom: 25px;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(4, 35, 24, .08);
}
.recipes-page .filters-panel-header { padding: 14px 18px; }
.recipes-page .filters-panel-header h2 { font-size: 1.05rem; }
.recipes-page .filters-panel-header p:last-child { display: none; }
.recipes-page .filters-panel-kicker { margin-bottom: 3px; font-size: .58rem; }
.recipes-page .recipe-catalog .filter-columns {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
}
.recipes-page .recipe-catalog details.filter-facet { padding: 0; border-radius: 11px; }
.recipes-page .recipe-catalog .filter-facet > summary {
  min-height: 40px;
  padding: 9px 11px;
  font-size: .8rem;
}
.recipes-page .recipe-catalog .filter-facet-options { padding: 5px 8px 8px; }
.recipes-page .recipe-catalog .filter-facet-options label { min-height: 31px; padding: 5px 7px; font-size: .74rem; }
.recipes-page .filter-menu-footer { padding: 10px 16px; }
.recipes-page .filter-count { font-size: .77rem; }
.recipes-page .filter-reset-all { min-height: 36px; padding-inline: 15px; }
.recipes-page .filters-close { width: 32px; height: 32px; flex-basis: 32px; }
@media (max-width: 900px) {
  .recipes-page .recipe-catalog .filter-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .recipes-page .recipe-catalog .filter-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .recipes-page .recipe-catalog .filter-columns { gap: 7px; padding: 10px; }
  .recipes-page .recipe-catalog .filter-facet > summary { padding-inline: 9px; font-size: .76rem; }
}

/* Navegación por categorías: mecanismo independiente del buscador y sus filtros */
.recipes-page .category-browser {
  margin: 0 0 22px;
  padding: clamp(18px, 2.4vw, 26px);
  border: 1px solid #dce9df;
  border-radius: 22px;
  background: radial-gradient(ellipse at 8% 0%, rgba(211, 238, 218, .56), transparent 42%), #fbfdfb;
  box-shadow: 0 14px 34px rgba(20, 63, 38, .07);
}
.category-browser-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.category-browser-kicker { color: #168448; font: 700 .64rem/1.3 var(--font-ui); letter-spacing: .14em; }
.category-browser-heading h2 { margin: 4px 0 4px; color: var(--forest); font: 700 clamp(1.1rem, 2vw, 1.35rem)/1.25 var(--font-display); letter-spacing: -.02em; }
.category-browser-heading p { margin: 0; color: #718075; font: 400 .82rem/1.5 var(--font-ui); }
.category-browser-reset { display: inline-flex; flex: 0 0 auto; min-height: 40px; align-items: center; justify-content: center; gap: 7px; padding: 0 17px; border: 1px solid #c9ddcd; border-radius: 999px; background: #fff; color: #24583a; font: 600 .8rem var(--font-ui); cursor: pointer; box-shadow: 0 2px 5px rgba(20,63,38,.04); transition: background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.category-browser-reset:hover, .category-browser-reset[aria-pressed="true"] { transform: translateY(-1px); border-color: #147a43; background: #147a43; color: #fff; box-shadow: 0 5px 13px rgba(20,122,67,.18); }
.category-browser-reset:focus-visible, .category-choice:focus-visible { outline: 3px solid rgba(22, 132, 72, .28); outline-offset: 2px; }
.category-browser-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.category-browser-group { min-width: 0; align-self: start; overflow: hidden; border: 1px solid #e1eae2; border-radius: 14px; background: rgba(255,255,255,.9); box-shadow: 0 2px 7px rgba(20,63,38,.025); transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease; }
.category-browser-group:hover { border-color: #c7ddcc; }
.category-browser-group[open] { grid-column: span 2; border-color: #a9d0b2; background: #fff; box-shadow: 0 8px 22px rgba(16, 82, 43, .08); }
.category-browser-group > summary { display: flex; min-height: 44px; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 13px; color: #244b35; font: 600 .8rem/1.3 var(--font-ui); list-style: none; cursor: pointer; }
.category-browser-group > summary::-webkit-details-marker { display: none; }
.category-browser-group > summary::after { content: ''; width: 8px; height: 8px; flex: 0 0 8px; margin-right: 3px; border-right: 1.7px solid #168448; border-bottom: 1.7px solid #168448; transform: rotate(45deg) translateY(-2px); transition: transform .18s ease; }
.category-browser-group[open] > summary::after { transform: rotate(225deg) translate(-1px, -1px); }
.category-browser-options { display: flex; flex-wrap: wrap; gap: 7px; padding: 12px; border-top: 1px solid #edf2ed; }
.category-choice { display: inline-flex; min-height: 34px; align-items: center; gap: 8px; padding: 6px 10px 6px 12px; border: 1px solid #e1e9e2; border-radius: 999px; background: #f8faf8; color: #4d6252; font: 500 .73rem/1.2 var(--font-ui); cursor: pointer; transition: border-color .16s ease, background-color .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease; }
.category-choice:hover { transform: translateY(-1px); border-color: #b4d4bb; background: #eff8f1; color: #0b6336; }
.category-choice[aria-pressed="true"] { border-color: #147a43; background: #147a43; color: #fff; box-shadow: 0 4px 10px rgba(20,122,67,.17); }
.category-choice-count { display: inline-grid; min-width: 19px; height: 19px; place-items: center; padding: 0 5px; border-radius: 999px; background: rgba(28,77,47,.08); color: #627267; font-size: .64rem; line-height: 1; }
.category-choice[aria-pressed="true"] .category-choice-count { background: rgba(255,255,255,.18); color: #fff; }
@media (max-width: 900px) { .category-browser-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .recipes-page .category-browser { padding: 16px; border-radius: 18px; }
  .category-browser-heading { align-items: flex-start; }
  .category-browser-groups { grid-template-columns: 1fr; gap: 8px; }
  .category-browser-group[open] { grid-column: 1 / -1; }
  .category-browser-heading p { max-width: 250px; }
  .category-browser-reset { min-height: 36px; padding: 0 13px; font-size: .75rem; }
}
@media (max-width: 380px) {
  .category-browser-heading h2 { font-size: 1rem; }
  .category-browser-heading p { max-width: 220px; font-size: .72rem; }
}

/* Consistent recipe-card preview metadata and official tags. */
.recipe-card .card-image { position: relative; }
.recipe-card .card-meta-badges { position: absolute; top: 12px; left: 12px; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px; max-width: calc(100% - 68px); }
.recipe-card .card-meta-badge { display: inline-flex; align-items: center; padding: 6px 9px; border: 1px solid rgba(255,255,255,.72); border-radius: 999px; background: rgba(255,255,255,.92); box-shadow: 0 2px 8px rgba(0,0,0,.08); color: #173c2a; font: 600 .68rem/1.2 var(--font-ui); backdrop-filter: blur(8px); }
.recipe-card .card-meta-difficulty { background: rgba(23,75,55,.92); color: #fff; }
.recipe-card .recipe-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.recipe-card .recipe-tags .recipe-tag { display: inline-flex; align-items: center; padding: 5px 9px; border: 1px solid rgba(22,163,74,.12); border-radius: 999px; background: #edf7ef; color: #145b35; font-size: .67rem; line-height: 1.35; }
.recipe-card .recipe-tags .tag-event { border-color: rgba(205,171,101,.38); background: #174b37; color: #f5dda2; }
.recipe-card .card-body h3 { font-weight: 700; }
