/* ═══════════════════════════════════════════════════════
   cookframes-cat.css — CSS riêng trang DANH MỤC
   Chỉ load trên pne-danhmuc.php
   ═══════════════════════════════════════════════════════ */

/* ── max-width danh mục ── */
:root { --max-w: 1180px; }

/* ── WRAP ── */
.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--side-pad); }

/* ── CATEGORY HERO ── */
.cat-hero {
  padding: 2rem 0 2.5rem;
  display: grid; grid-template-columns: 1fr auto;
  gap: 1.5rem 3rem; align-items: end;
}
@media (max-width: 640px) { .cat-hero { grid-template-columns: 1fr; } }

h1.cat-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700; line-height: 1.15; letter-spacing: -0.01em;
}
h1.cat-title em { font-style: italic; color: var(--ember); }
.cat-desc {
  margin-top: 0.9rem; font-size: 0.97rem; color: #3D3528; line-height: 1.8;
  max-width: 580px; border-left: 3px solid var(--ember); padding-left: 1rem;
}
.cat-hero-right { display: flex; flex-direction: column; align-items: flex-end; gap: 0.4rem; }
.cat-count { font-family: var(--font-display); font-size: 3rem; font-weight: 700; color: var(--ink); line-height: 1; }
.cat-count-label { font-size: 0.72rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }

/* ── TOOLBAR ── */
.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.2rem 0; gap: 1rem; flex-wrap: wrap;
  border-bottom: 1px solid var(--border); margin-bottom: 1.8rem;
}
.filter-group { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.filter-label { font-size: 0.7rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-right: 0.3rem; }
.filter-pill {
  font-size: 0.75rem; font-weight: 500; padding: 0.3rem 0.8rem; border-radius: 20px;
  border: 1px solid var(--border); background: #fff; color: var(--muted);
  cursor: pointer; transition: all 0.18s; white-space: nowrap;
}
.filter-pill:hover { border-color: var(--ember); color: var(--ember); }
.filter-pill.active { background: var(--ember); border-color: var(--ember); color: #fff; }
.sort-group { display: flex; align-items: center; gap: 0.5rem; }
.sort-label { font-size: 0.7rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.sort-select {
  font-size: 0.78rem; font-family: var(--font-mono);
  border: 1px solid var(--border); border-radius: 4px; padding: 0.3rem 0.7rem;
  background: #fff; color: var(--ink); cursor: pointer; appearance: none;
  padding-right: 1.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%237A6E5F'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.5rem center;
}

/* ── SIDEBAR ── */
.layout-with-sidebar { display: grid; grid-template-columns: 1fr 260px; gap: 3rem; align-items: start; }
@media (max-width: 900px) { .layout-with-sidebar { grid-template-columns: 1fr; } }
.sidebar { padding-top: 0; }
.sidebar-block { background: var(--cream); border: 1px solid var(--border); border-radius: var(--card-radius); padding: 1.2rem; margin-bottom: 1.5rem; }
.sidebar-title { font-family: var(--font-display); font-size: 1rem; font-weight: 700; margin-bottom: 1rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--border); }
.cat-list { display: flex; flex-direction: column; gap: 0.25rem; }
.cat-list-item { display: flex; align-items: center; justify-content: space-between; padding: 0.45rem 0.6rem; border-radius: 4px; font-size: 0.88rem; transition: background 0.18s; }
.cat-list-item:hover { background: rgba(196,64,28,0.07); }
.cat-list-item.active { background: rgba(196,64,28,0.1); color: var(--ember); font-weight: 500; }
.cat-list-item .cat-name { display: flex; align-items: center; gap: 0.5rem; }
.cat-list-item .cat-num { font-size: 0.7rem; font-family: var(--font-mono); color: var(--muted); background: rgba(0,0,0,0.05); padding: 0.1rem 0.4rem; border-radius: 10px; }
.difficulty-list { display: flex; flex-direction: column; gap: 0.5rem; }
.diff-bar-item { display: flex; align-items: center; gap: 0.6rem; font-size: 0.82rem; }
.diff-bar-item .diff-name { width: 70px; flex-shrink: 0; color: var(--muted); font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; }
.diff-bar { flex: 1; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.diff-bar-fill { height: 100%; border-radius: 3px; background: var(--ember); }
.diff-bar-num { font-size: 0.72rem; font-family: var(--font-mono); color: var(--muted); }

/* ── BOTTOM BLOCKS ── */
.bottom-sections { background: var(--cream); border-top: 1px solid var(--border); padding: 3rem var(--side-pad); }
.bottom-inner { max-width: var(--max-w); margin: 0 auto; }
.bottom-block { margin-bottom: 3rem; }
.bottom-block:last-child { margin-bottom: 0; }
.bottom-heading { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: var(--ink); margin-bottom: 1.2rem; display: flex; align-items: center; gap: 0.6rem; }
.bottom-heading .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ember); display: inline-block; flex-shrink: 0; }
.bottom-divider { height: 1px; background: var(--border); margin: 2.5rem 0; }

/* ── ANIMATIONS (card) ── */
@media (prefers-reduced-motion: no-preference) {
  .recipe-card { opacity: 0; animation: cardIn 0.35s forwards; }
  .recipe-card:nth-child(1)  { animation-delay: 0.04s; }
  .recipe-card:nth-child(2)  { animation-delay: 0.08s; }
  .recipe-card:nth-child(3)  { animation-delay: 0.12s; }
  .recipe-card:nth-child(4)  { animation-delay: 0.16s; }
  .recipe-card:nth-child(5)  { animation-delay: 0.20s; }
  .recipe-card:nth-child(6)  { animation-delay: 0.24s; }
  .recipe-card:nth-child(7)  { animation-delay: 0.28s; }
  .recipe-card:nth-child(8)  { animation-delay: 0.32s; }
  .recipe-card:nth-child(9)  { animation-delay: 0.36s; }
  .recipe-card:nth-child(10) { animation-delay: 0.40s; }
  @keyframes cardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}