/**
 * Archive / All Recipes / Category / Search — search, sort, grid
 * Clean version: no filter dropdowns, no list view — just search + sort + grid.
 */
.rb-page {
  --primary: #ee7c2b;
  --primary-dk: #c9611a;
  --primary-lt: rgba(238, 124, 43, 0.1);
  --primary-sh: rgba(238, 124, 43, 0.25);
  --ink: #1c1410;
  --ink-2: #4a3b32;
  --muted: #8b7e74;
  --border: #e8e2dc;
  --bg: #f9f7f5;
  --white: #ffffff;
  --r-card: 1rem;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --font-d: 'Work Sans', system-ui, sans-serif;
  --font-b: 'Work Sans', system-ui, sans-serif;
}
.rb-page { background: var(--bg); font-family: var(--font-b); color: var(--ink-2); min-height: 100vh; }

/* ── Hero ── */
.rb-hero { position: relative; background: var(--ink); color: var(--white); padding: 6rem 1.5rem 5rem; overflow: hidden; text-align: center; }
.rb-hero__inner { position: relative; z-index: 2; max-width: 620px; margin: 0 auto; }
.rb-hero__eyebrow { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--primary); margin-bottom: 1rem; display: block; }
.rb-hero__title { font-family: var(--font-d); font-size: clamp(2.6rem, 7vw, 4.8rem); font-weight: 900; line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 1.2rem; }
.rb-hero__sub { font-size: 1rem; color: rgba(255, 255, 255, 0.55); line-height: 1.65; }
.rb-hero__bg-shapes { position: absolute; inset: 0; pointer-events: none; }
.rb-shape { position: absolute; border-radius: 50%; }
.rb-shape--1 { width: 500px; height: 500px; background: radial-gradient(circle, rgba(238, 124, 43, 0.18), transparent 70%); top: -150px; right: -100px; }
.rb-shape--2 { width: 320px; height: 320px; background: radial-gradient(circle, rgba(238, 124, 43, 0.1), transparent 70%); bottom: -80px; left: -60px; }
.rb-shape--3 { width: 160px; height: 160px; border: 1px solid rgba(238, 124, 43, 0.12); top: 50%; left: 5%; transform: translateY(-50%); }
.rb-hero--archive { padding: 4.5rem 1.5rem 4rem; }

/* ── Layout ── */
.rb-wrap { max-width: 1340px; margin: 0 auto; padding: 2.5rem 1.5rem 5rem; }
.rb-breadcrumb { display: flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; color: var(--muted); margin-bottom: 1.5rem; flex-wrap: wrap; }
.rb-breadcrumb a { color: var(--primary); text-decoration: none; font-weight: 600; }
.rb-breadcrumb a:hover { text-decoration: underline; }

/* ── Controls Bar (search + sort) ── */
.rb-controls { background: var(--white); border: 1px solid var(--border); border-radius: 1rem; padding: 1rem 1.25rem; margin-bottom: 1.5rem; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04); }
.rb-controls__row { display: flex; align-items: center; gap: 0.65rem; flex-wrap: wrap; }
.rb-controls__spacer { flex: 1; min-width: 0; }

/* Search bar */
.rb-search-form { flex: 1; min-width: 200px; max-width: 400px; }
.rb-search-wrap { position: relative; display: flex; align-items: center; }
.rb-search-icon { position: absolute; left: 0.85rem; color: var(--muted); pointer-events: none; }
.rb-search-input { width: 100%; padding: 0.55rem 0.9rem 0.55rem 2.5rem; background: var(--bg); border: 1.5px solid var(--border); border-radius: 0.625rem; font-family: var(--font-b); font-size: 0.84rem; color: var(--ink); transition: border-color 0.2s, box-shadow 0.2s; }
.rb-search-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(238,124,43,0.12); }
.rb-search-input::placeholder { color: var(--muted); }

/* Sort */
.rb-sort-group { display: flex; align-items: center; gap: 0.5rem; }
.rb-sort-label { display: flex; align-items: center; gap: 0.35rem; font-size: 0.82rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.rb-sort-select { padding: 0.5rem 0.85rem; border: 1.5px solid var(--border); border-radius: 0.625rem; font-family: var(--font-b); font-size: 0.84rem; font-weight: 600; color: var(--ink-2); background: var(--bg); cursor: pointer; outline: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238b7e74' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.65rem center; padding-right: 2rem; transition: border-color 0.2s; }
.rb-sort-select:focus { border-color: var(--primary); outline: none; }

/* ── Results bar ── */
.rb-results-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; min-height: 1.8rem; }
.rb-results-count { font-size: 0.85rem; color: var(--muted); }
.rb-results-count span { font-weight: 700; color: var(--ink-2); }
.rb-loading-dots { display: flex; gap: 0.35rem; align-items: center; }
.rb-loading-dots span { width: 0.45rem; height: 0.45rem; background: var(--primary); border-radius: 50%; animation: rbDot 1.1s infinite ease-in-out; }
.rb-loading-dots span:nth-child(2) { animation-delay: 0.18s; }
.rb-loading-dots span:nth-child(3) { animation-delay: 0.36s; }
@keyframes rbDot { 0%, 80%, 100% { transform: scale(0.65); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } }

/* ── Grid ── */
.rb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; transition: opacity 0.22s; }
.rb-grid.rb-loading { opacity: 0.45; pointer-events: none; }

/* ── Card ── */
.rb-card { background: var(--white); border-radius: var(--r-card); border: 1px solid var(--border); overflow: hidden; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04); transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease); }
.rb-card:hover { transform: translateY(-5px); box-shadow: 0 14px 40px rgba(0, 0, 0, 0.1); }
.rb-card__img-wrap { position: relative; display: block; overflow: hidden; height: 210px; }
.rb-card__img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s var(--ease); }
.rb-card:hover .rb-card__img { transform: scale(1.06); }
.rb-card__img--placeholder { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #f0ebe6, #e8e2dc); color: var(--border); height: 100%; }
.rb-card__badges { position: absolute; top: 0.75rem; left: 0.75rem; display: flex; gap: 0.35rem; flex-wrap: wrap; pointer-events: none; }
.rb-badge { padding: 0.22rem 0.6rem; border-radius: 999px; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.02em; backdrop-filter: blur(8px); }
.rb-badge--cat { background: rgba(28, 20, 16, 0.65); color: var(--white); }
.rb-badge--green { background: rgba(22, 163, 74, 0.85); color: var(--white); }
.rb-badge--amber { background: rgba(217, 119, 6, 0.85); color: var(--white); }
.rb-badge--red { background: rgba(220, 38, 38, 0.85); color: var(--white); }
.rb-badge--gray { background: rgba(107, 114, 128, 0.85); color: var(--white); }
.rb-card__save { position: absolute; top: 0.75rem; right: 0.75rem; width: 2.1rem; height: 2.1rem; background: rgba(255, 255, 255, 0.92); border: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--muted); backdrop-filter: blur(8px); transition: color 0.2s, transform 0.2s, background 0.2s; }
.rb-card__save:hover { color: var(--primary); transform: scale(1.12); background: var(--white); }
.rb-card__body { padding: 1.15rem 1.2rem 1.35rem; }
.rb-card__title-link { text-decoration: none; }
.rb-card__title { font-family: var(--font-d); font-size: 1.12rem; font-weight: 700; color: var(--ink); line-height: 1.3; margin-bottom: 0.48rem; transition: color 0.2s; }
.rb-card__title-link:hover .rb-card__title { color: var(--primary); }
.rb-card__desc { font-size: 0.87rem; color: var(--muted); line-height: 1.65; margin-bottom: 0.9rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rb-card__meta { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1rem; flex-wrap: wrap; }
.rb-meta-item { display: flex; align-items: center; gap: 0.28rem; font-size: 0.77rem; font-weight: 600; color: var(--muted); }
.rb-meta-item svg { color: var(--primary); flex-shrink: 0; }
.rb-card__btn { display: inline-flex; align-items: center; gap: 0.42rem; font-size: 0.82rem; font-weight: 700; color: var(--primary); text-decoration: none; border: 1.5px solid rgba(238, 124, 43, 0.35); border-radius: 0.5rem; padding: 0.48rem 0.95rem; transition: background 0.22s, color 0.22s, border-color 0.22s, gap 0.22s; }
.rb-card__btn:hover { background: var(--primary); color: var(--white); border-color: var(--primary); gap: 0.65rem; }

/* ── No results ── */
.rb-no-results { grid-column: 1 / -1; text-align: center; padding: 5rem 2rem; color: var(--muted); }
.rb-no-results__icon { font-size: 3.5rem; margin-bottom: 1rem; }
.rb-no-results h3 { font-family: var(--font-d); font-size: 1.5rem; color: var(--ink); margin-bottom: 0.5rem; }

/* ── Pagination ── */
.rb-pagination { display: flex; justify-content: center; margin-top: 3rem; }
.rb-load-more { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.82rem 2.2rem; background: var(--white); border: 2px solid var(--primary); border-radius: 999px; font-family: var(--font-b); font-size: 0.9rem; font-weight: 700; color: var(--primary); cursor: pointer; transition: background 0.22s, color 0.22s, transform 0.22s, box-shadow 0.22s; }
.rb-load-more:hover:not(:disabled) { background: var(--primary); color: var(--white); transform: translateY(-2px); box-shadow: 0 6px 20px var(--primary-sh); }
.rb-load-more:disabled { opacity: 0.55; cursor: not-allowed; }
.rb-load-more__spinner { animation: rbSpin 0.85s linear infinite; }
@keyframes rbSpin { to { transform: rotate(360deg); } }
.rb-hidden { display: none !important; }

/* ── Skeletons ── */
.rb-skeleton { background: var(--white); border-radius: var(--r-card); border: 1px solid var(--border); overflow: hidden; }
.rb-skeleton__img, .rb-skeleton__line { background: linear-gradient(90deg, #f0ebe6 25%, #e8e2dc 50%, #f0ebe6 75%); background-size: 400% 100%; animation: rbShimmer 1.4s infinite; }
.rb-skeleton__img { height: 210px; }
.rb-skeleton__body { padding: 1.15rem; }
.rb-skeleton__line { height: 0.8rem; border-radius: 0.25rem; margin-bottom: 0.6rem; }
.rb-skeleton__line--title { width: 68%; height: 1.05rem; }
.rb-skeleton__line--md { width: 85%; }
.rb-skeleton__line--sm { width: 45%; }
.rb-skeleton__line--xs { width: 30%; margin-bottom: 0; }
@keyframes rbShimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ── Responsive ── */
@media (max-width: 768px) {
  .rb-hero { padding: 4rem 1.25rem 3.5rem; }
  .rb-wrap { padding: 1.5rem 1rem 4rem; }
  .rb-controls__spacer { display: none; }
  .rb-search-form { max-width: none; }
  .rb-sort-group { width: 100%; order: 10; }
  .rb-sort-select { flex: 1; }
}
@media (max-width: 540px) {
  .rb-grid { grid-template-columns: 1fr 1fr; gap: 0.9rem; }
  .rb-card__body { padding: 0.85rem; }
  .rb-card__desc { display: none; }
}
@media (max-width: 380px) {
  .rb-grid { grid-template-columns: 1fr; }
}