/* ═══════════════════════════════════════════════════════
   cookframes.css — CSS DÙNG CHUNG cho mọi trang
   Load trong <head> của pne-header.php
   ═══════════════════════════════════════════════════════ */

/* ── FONTAWESOME (self-hosted via CDN) ── */
@font-face {
  font-family: 'FontAwesome';
  src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/fonts/fontawesome-webfont.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
.fa {
  font-family: 'FontAwesome';
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: inline-block;
}
/* Icon map */
.fa-road::before          { content: "\f018"; }
.fa-male::before          { content: "\f183"; }
.fa-bicycle::before       { content: "\f206"; }
.fa-tint::before          { content: "\f043"; }
.fa-bolt::before          { content: "\f0e7"; }
.fa-bar-chart::before     { content: "\f080"; }
.fa-leaf::before          { content: "\f06c"; }
.fa-tree::before          { content: "\f1bb"; }
.fa-arrows-h::before      { content: "\f07e"; }
.fa-heartbeat::before     { content: "\f21e"; }
.fa-music::before         { content: "\f001"; }
.fa-soccer-ball-o::before { content: "\f1e3"; }
.fa-home::before          { content: "\f015"; }
.fa-pagelines::before     { content: "\f18c"; }
.fa-microphone::before    { content: "\f130"; }
.fa-shopping-bag::before  { content: "\f290"; }
.fa-search::before        { content: "\f002"; }
.fa-bars::before          { content: "\f0c9"; }
.fa-times::before         { content: "\f00d"; }
.fa-eye::before           { content: "\f06e"; }
.fa-star::before          { content: "\f005"; }
.fa-print::before         { content: "\f02f"; }
.fa-pencil::before        { content: "\f040"; }
.fa-clock-o::before       { content: "\f017"; }
.fa-snowflake-o::before   { content: "\f2dc"; }
.fa-fire::before          { content: "\f06d"; }
.fa-question-circle::before { content: "\f029"; }
.fa-cutlery::before       { content: "\f0f5"; }
.fa-chevron-right::before { content: "\f054"; }
.fa-heart-o::before       { content: "\f08a"; }

/* ── TOKENS ── */
:root {
  --cream:   #F7F2EA;
  --paper:   #FFFDF8;
  --ink:     #1A1208;
  --ember:   #C4401C;
  --ember-light: #E8602E;
  --gold:    #B8862A;
  --muted:   #7A6E5F;
  --border:  #E0D8CC;
  --step-bg: #F0EBE1;
  --card-radius: 6px;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'DM Mono', monospace;

  --side-pad: clamp(1.25rem, 5vw, 3rem);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ── SITE HEADER ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ink);
  padding: 0 var(--side-pad);
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--cream);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.site-logo span { color: var(--ember-light); }
.site-nav { display: flex; gap: 1.5rem; align-items: center; }
.site-nav a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--border);
  text-decoration: none;
  transition: color 0.2s;
}
.site-nav a:hover { color: #fff; }
.nav-search {
  width: 32px; height: 32px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--border);
  transition: border-color 0.2s, color 0.2s; font-size: 0.85rem;
}
.nav-search:hover { border-color: rgba(255,255,255,0.5); color: #fff; }

/* ── HEADER CONTROLS (mobile icons) ── */
.header-controls {
  display: none;
  align-items: center;
  gap: 0.25rem;
}
.hdr-btn {
  background: none; border: none; cursor: pointer;
  color: var(--border); width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px; transition: color 0.2s, background 0.2s;
}
.hdr-btn:hover { color: #fff; background: rgba(255,255,255,0.08); }

/* ── SEARCH OVERLAY ── */
.search-overlay {
  position: sticky;
  top: 52px;
  z-index: 99;
  background: var(--ink);
  border-top: 1px solid rgba(255,255,255,0.08);
  display: block !important;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s ease, padding 0.28s;
}
.search-overlay.open {
  max-height: 64px;
  padding: 0.65rem var(--side-pad);
}
.search-inner {
  display: flex; align-items: center; gap: 0.7rem;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px; padding: 0.55rem 0.9rem; color: var(--border);
}
.search-input {
  flex: 1; background: none; border: none; outline: none;
  color: #fff; font-family: var(--font-body); font-size: 0.9rem;
}
.search-input::placeholder { color: var(--muted); }
.search-clear {
  background: none; border: none; cursor: pointer; color: var(--muted);
  display: flex; align-items: center; transition: color 0.2s; padding: 0;
}
.search-clear:hover { color: #fff; }

/* ── DRAWER OVERLAY ── */
.drawer-overlay {
  display: block !important;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }

/* ── DRAWER MENU ── */
.drawer-menu {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(280px, 82vw);
  background: var(--ink);
  z-index: 201;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
  display: flex; flex-direction: column;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.drawer-menu.open { transform: translateX(0); }
.drawer-header {
  padding: 0.7rem 1.4rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; min-height: 52px;
}
.drawer-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--border);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 1rem;
  transition: color 0.2s, background 0.2s;
  margin-left: auto;
}
.drawer-close:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
}
.drawer-logo { font-family: var(--font-display); font-size: 1.1rem; color: var(--cream); }
.drawer-logo span { color: var(--ember-light); }
.drawer-nav { padding: 0.5rem 0; }
.drawer-nav li a {
  display: block; padding: 0.85rem 1.4rem;
  font-size: 0.9rem; font-weight: 500;
  color: var(--border); text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.15s, color 0.15s;
}
.drawer-nav li a:hover { background: rgba(255,255,255,0.06); color: #fff; }

/* ── CATEGORY NAV (drawer) ── */
.cnav { font-family: var(--font-body); font-size: 0.9rem; }
.cnav-l1-group { border-bottom: 1px solid #79554840; }
.cnav-l1-group:first-child { border-top: 1px solid #db3b0d; }
button.cnav-l1 {
  width: 100%; background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem; padding: 0.75rem 0; text-align: left;
}
a.cnav-l1 { display: block; padding: 0.75rem 0; text-decoration: none; }
.cnav-l1-link {
  font-weight: 600; color: #fff; text-decoration: none; flex: 1;
  transition: color 0.15s; padding: 0 15px;
}
.cnav-l1-link:hover,
button.cnav-l1:hover .cnav-l1-link { color: var(--ember); }
.cnav-l2-wrap {
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease;
  padding-left: 0.75rem;
  border-left: 2px solid #3c1b0c;
  margin-left: 0.5rem; margin-bottom: 0;
}
.cnav-l2-wrap.open { max-height: 2000px; margin-bottom: 0.5rem; }
.cnav-l2-group { border-bottom: 1px solid #79554840; }
.cnav-l2-group:last-child { border-bottom: none; }
button.cnav-l2 {
  width: 100%; background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem; padding: 0.55rem 0; text-align: left;
}
a.cnav-l2 { display: block; padding: 0.55rem 0; text-decoration: none; }
.cnav-l2-link {
  font-size: 0.88rem; font-weight: 500; color: #fff;
  text-decoration: none; flex: 1; transition: color 0.15s;
}
.cnav-l2-link:hover,
button.cnav-l2:hover .cnav-l2-link { color: var(--ember); }
.cnav-l3-wrap {
  max-height: 0; overflow: hidden;
  transition: max-height 0.25s ease;
  padding-left: 0.65rem;
  border-left: 2px solid rgba(196,64,28,0.2);
  margin-left: 0.4rem;
}
.cnav-l3-wrap.open { max-height: 1000px; margin-bottom: 0.3rem; }
.cnav-l3 {
  display: block; padding: 0.35rem 0;
  font-size: 0.82rem; color: var(--muted);
  text-decoration: none; transition: color 0.15s;
}
.cnav-l3:hover { color: var(--ember); }
.cnav-arrow {
  color: var(--muted); font-size: 0.8rem;
  transition: transform 0.25s ease; flex-shrink: 0;
}
.cnav-toggle[aria-expanded="true"] .cnav-arrow { transform: rotate(180deg); }
[data-active="1"] > .cnav-l1-link,
[data-active="1"] > a.cnav-l2,
[data-active="1"] > button.cnav-l2 .cnav-l2-link,
a.cnav-l3[data-active="1"] { color: var(--ember) !important; font-weight: 600; }

/* ── BREADCRUMB ── */
.breadcrumb {
  padding: 1.2rem 0 0;
  font-size: 0.78rem; color: var(--muted);
  font-family: var(--font-mono);
  display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--ember); }
.breadcrumb .sep { opacity: 0.4; }

/* ── SITE FOOTER ── */
.site-footer {
  margin-top: 5rem;
  border-top: 1px solid var(--border);
  background: var(--ink);
  padding: 2.5rem var(--side-pad);
  display: flex; flex-wrap: wrap; gap: 1rem;
  justify-content: space-between; align-items: center;
}
.footer-logo { font-family: var(--font-display); font-size: 1.1rem; color: var(--cream); }
.footer-logo span { color: var(--ember-light); }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a {
  font-size: 0.75rem; font-family: var(--font-mono);
  color: var(--muted); letter-spacing: 0.06em;
  text-transform: uppercase; transition: color 0.2s; text-decoration: none;
}
.footer-links a:hover { color: var(--cream); }
.footer-copy { font-size: 0.72rem; font-family: var(--font-mono); color: rgba(122,110,95,0.6); }

/* ── RECIPE GRID (dùng chung index + category) ── */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
@media (max-width: 1024px) { .recipe-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 680px)  { .recipe-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 400px)  { .recipe-grid { grid-template-columns: 1fr; } }

/* ── RECIPE CARD ── */
.recipe-card {
  border-radius: var(--card-radius);
  overflow: hidden; background: #fff;
  border: 1px solid var(--border);
  display: flex; flex-direction: column;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  cursor: pointer; text-decoration: none; color: inherit;
}
.recipe-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(26,18,8,0.1); }
.card-thumb {
  aspect-ratio: 16 / 9; background: var(--step-bg);
  overflow: hidden; position: relative; flex-shrink: 0;
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.recipe-card:hover .card-thumb img { transform: scale(1.05); }
.card-thumb-ph {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.3rem;
  background: linear-gradient(135deg, #EDE5D8 0%, #DDD4C2 100%);
}
.card-badge {
  position: absolute; top: 0.5rem; left: 0.5rem;
  font-size: 0.62rem; font-family: var(--font-mono);
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 0.2rem 0.5rem; border-radius: 2px; font-weight: 500;
}
.badge-new { background: var(--ember); color: #fff; }
.badge-hot { background: #1A1208; color: var(--ember-light); }
.card-body { padding: 0.85rem 1rem 1rem; display: flex; flex-direction: column; flex: 1; }
.card-diff {
  display: inline-flex; align-items: center; gap: 0.25rem;
  font-size: 0.65rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em;
  padding: 0.15rem 0.5rem; border-radius: 2px; margin-bottom: 0.4rem; width: fit-content;
}
.diff-easy   { background: #EAF5EC; color: #2D7A3A; }
.diff-medium { background: #FFF4E5; color: #8C5A00; }
.diff-hard   { background: #FDECEA; color: #9B2020; }
.card-title { font-family: var(--font-display); font-size: 0.98rem; font-weight: 700; line-height: 1.35; color: var(--ink); flex: 1; }
.card-meta { margin-top: 0.6rem; display: flex; gap: 0.8rem; font-size: 0.72rem; font-family: var(--font-mono); color: var(--muted); flex-wrap: wrap; }
.card-meta span { display: flex; align-items: center; gap: 0.25rem; }

/* ── PAGINATION ── */
.pagination { margin: 3rem 0; display: flex; justify-content: center; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.page-btn {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 4px;
  font-size: 0.82rem; font-family: var(--font-mono); color: var(--muted);
  cursor: pointer; transition: all 0.18s; background: #fff;
}
.page-btn:hover { border-color: var(--ember); color: var(--ember); }
.page-btn.active { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.page-btn.dots { border: none; background: none; cursor: default; }
.page-btn.dots:hover { color: var(--muted); border: none; }

/* ── PRINT ── */
@media print {
  .site-header, .search-overlay, .drawer-menu, .drawer-overlay,
  .jump-bar, .related-section, .site-footer, .print-btn, .btn-jump { display: none !important; }
  body { font-size: 12pt; }
  .article { max-width: 100%; padding: 0; }
  .step-image { break-inside: avoid; }
}

/* ── RESPONSIVE: tablet nhỏ 767px ── */
@media only screen and (max-width: 767px) {
  .site-nav { display: none; }
  .header-controls { display: flex; }
  .search-overlay { display: block; }
  .drawer-overlay { display: block; }
}

/* ── RESPONSIVE: mobile nhỏ 479px ── */
@media only screen and (max-width: 479px) {
  :root { --side-pad: 1rem; }
  .site-logo { font-size: 1.05rem; }
  .site-footer { flex-direction: column; text-align: center; gap: 0.8rem; }
  .footer-links { justify-content: center; gap: 1rem; }
}
/* ── RESPONSIVE: mobile nhỏ 479px ── */
@media only screen and (max-width: 479px) {
  :root { --side-pad: 1rem; }
  .site-logo { font-size: 1.05rem; }
  .site-footer { flex-direction: column; text-align: center; gap: 0.8rem; }
  .footer-links { justify-content: center; gap: 1rem; }

  /* Thêm các dòng này */
  body { font-size: 17px; }          /* tăng base một chút */
  .drawer-nav li a { font-size: 1rem; }
  .cnav-l1-link   { font-size: 1rem; }
  .cnav-l2-link   { font-size: 0.95rem; }
  .cnav-l3        { font-size: 0.88rem; }
  .card-title     { font-size: 1rem; }
  .card-meta      { font-size: 0.78rem; }
  .breadcrumb     { font-size: 0.82rem; }
  #search-toggle{font-size:20px;margin-right:5px}
  #menu-toggle{font-size:20px}
}