/* ================================================
   RECETAS AIR FRYER — Hoja de estilos principal
   recetasairfryer.es
   ================================================ */

:root {
  --bg:        #faf9f6;
  --bg-card:   #ffffff;
  --text:      #1a1a18;
  --muted:     #5a5a55;
  --accent:    #e8520a;
  --accent-h:  #c94508;
  --green:     #4a7c59;
  --border:    #e8e6e0;
  --shadow:    rgba(0,0,0,0.08);
  --heading:   'Fraunces', Georgia, serif;
  --body:      'Inter', system-ui, -apple-system, sans-serif;
  --r:         8px;
  --rl:        16px;
  --max:       1200px;
  --t:         0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--accent-h); }
ul, ol { padding-left: 1.5rem; }

/* ====== LAYOUT ====== */
.container { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }

.page-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  max-width: var(--max);
  margin: 2rem auto;
  padding: 0 1.25rem;
}
.main-col { min-width: 0; }

/* ====== HEADER ====== */
#header {
  background: #fff;
  border-bottom: 3px solid var(--accent);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px var(--shadow);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: .75rem 1.25rem;
}
.logo a { color: var(--text); text-decoration: none; }
.logo-title {
  font-family: var(--heading);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
}
.logo-tag { font-size: .7rem; color: var(--muted); }

#nav { margin-left: auto; }
#nav ul { display: flex; gap: .2rem; list-style: none; padding: 0; }
#nav a {
  display: block;
  padding: .45rem .85rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text);
  border-radius: var(--r);
  transition: background var(--t), color var(--t);
}
#nav a:hover, #nav .active > a {
  background: var(--accent);
  color: #fff;
}

.header-search input {
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: .35rem .85rem;
  font-size: .85rem;
  width: 180px;
  background: var(--bg);
  transition: width var(--t), border-color var(--t);
}
.header-search input:focus { outline: none; border-color: var(--accent); width: 220px; }

.menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
  flex-direction: column;
  gap: 5px;
}
.menu-btn span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--t);
}

/* ====== FOOTER ====== */
footer {
  background: var(--text);
  color: #aaa;
  margin-top: 4rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 1.5rem;
}
footer h4 { color: #fff; font-family: var(--heading); font-size: .95rem; margin-bottom: .75rem; }
footer ul { list-style: none; padding: 0; }
footer li { margin-bottom: .4rem; }
footer a { color: #888; font-size: .875rem; }
footer a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid #2a2a28;
  text-align: center;
  padding: 1rem 1.25rem;
  font-size: .78rem;
  color: #666;
}
.affiliate-note { margin-top: .4rem; font-size: .72rem; color: #555; }

/* ====== BOTONES ====== */
.btn {
  display: inline-block;
  padding: .65rem 1.35rem;
  border-radius: var(--r);
  font-weight: 600;
  font-size: .875rem;
  cursor: pointer;
  border: none;
  transition: background var(--t), transform var(--t);
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-h); color: #fff; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--accent); border: 2px solid var(--accent); }
.btn-outline:hover { background: var(--accent); color: #fff; }
.btn-green { background: var(--green); color: #fff; }

/* ====== HERO ====== */
.hero {
  background: linear-gradient(135deg, #1a1a18 0%, #2d2d2a 100%);
  color: #fff;
  padding: 4.5rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  right: -5%;
  top: 50%;
  transform: translateY(-50%);
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(232,82,10,.18) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 640px; }
.hero h1 {
  font-family: var(--heading);
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.1;
  margin-bottom: 1rem;
  color: #fff;
}
.hero p { font-size: 1.05rem; color: rgba(255,255,255,.8); margin-bottom: 2rem; line-height: 1.65; }
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ====== SECCIÓN CATEGORÍAS ====== */
.cat-section { padding: 3rem 0; }
.section-title {
  font-family: var(--heading);
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.see-all { font-size: .875rem; font-weight: 600; color: var(--accent); }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
}
.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  padding: 1.25rem .5rem;
  background: #fff;
  border-radius: var(--rl);
  color: var(--text);
  font-weight: 600;
  font-size: .8rem;
  box-shadow: 0 2px 8px var(--shadow);
  transition: transform var(--t), box-shadow var(--t), color var(--t);
  text-decoration: none;
  text-align: center;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,.1); color: var(--accent); }
.cat-icon { font-size: 2rem; }

/* ====== GRID DE RECETAS ====== */
.recipes-section { padding: 2.5rem 0; }
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.recipe-card {
  background: var(--bg-card);
  border-radius: var(--rl);
  overflow: hidden;
  box-shadow: 0 2px 12px var(--shadow);
  transition: transform var(--t), box-shadow var(--t);
}
.recipe-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.recipe-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}
.card-body { padding: 1rem 1.1rem 1.25rem; }
.card-title {
  font-family: var(--heading);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: .5rem;
  line-height: 1.3;
  color: var(--text);
}
.card-title a { color: inherit; }
.card-title a:hover { color: var(--accent); }
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  font-size: .78rem;
  color: var(--muted);
  margin-bottom: .5rem;
}
.card-excerpt { font-size: .85rem; color: var(--muted); line-height: 1.5; }

/* ====== CTA TABLA TIEMPOS ====== */
.temp-cta { padding: 2.5rem 0; }
.temp-cta-box {
  background: var(--green);
  color: #fff;
  border-radius: var(--rl);
  padding: 2.5rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
}
.temp-cta-box h2 { font-family: var(--heading); font-size: 1.75rem; margin-bottom: .75rem; color: #fff; }
.temp-cta-box p { color: rgba(255,255,255,.85); margin-bottom: 1.25rem; }
.mini-table { border-collapse: collapse; font-size: .85rem; background: rgba(255,255,255,.12); border-radius: var(--r); overflow: hidden; }
.mini-table th, .mini-table td { padding: .5rem .9rem; text-align: left; }
.mini-table th { background: rgba(255,255,255,.2); font-weight: 600; }
.mini-table tr:nth-child(even) { background: rgba(255,255,255,.06); }

/* ====== AD SPACES ====== */
.ad-box {
  background: #f0ede8;
  border: 1px dashed var(--border);
  border-radius: var(--r);
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  font-size: .78rem;
  margin: 1.5rem 0;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ====== BREADCRUMBS ====== */
.breadcrumbs {
  font-size: .8rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  padding: .5rem 0;
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { margin: 0 .4rem; }

/* ====== RECIPE SUMMARY BOX ====== */
.recipe-box {
  background: #fff;
  border: 2px solid var(--accent);
  border-radius: var(--rl);
  padding: 1.5rem;
  margin: 1.75rem 0;
  box-shadow: 0 4px 16px rgba(232,82,10,.08);
}
.recipe-box-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 1rem;
}
.recipe-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 1rem;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: .75rem .5rem;
  background: var(--bg);
  border-radius: var(--r);
}
.stat-icon { font-size: 1.4rem; margin-bottom: .2rem; }
.stat-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: .2rem; }
.stat-val { font-weight: 700; font-size: 1rem; }

/* ====== INGREDIENTES ====== */
.recipe-ingredients {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--rl);
  padding: 1.5rem;
  margin: 1.75rem 0;
}
.section-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: .5rem;
}
.section-head-row h2 { font-family: var(--heading); font-size: 1.3rem; margin: 0; }
.copy-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: .35rem .8rem;
  font-size: .78rem;
  cursor: pointer;
  transition: background var(--t), color var(--t);
}
.copy-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.copy-btn.copied { background: var(--green); color: #fff; border-color: var(--green); }

.ing-list {
  list-style: none;
  padding: 0;
  columns: 2;
  column-gap: 1.5rem;
}
.ing-list li {
  padding: .4rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .95rem;
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  break-inside: avoid;
}
.ing-list li::before { content: '✓'; color: var(--green); font-weight: 700; flex-shrink: 0; }

/* ====== PASOS ====== */
.recipe-steps h2 { font-family: var(--heading); font-size: 1.3rem; margin-bottom: 1rem; }
.steps-list {
  list-style: none;
  padding: 0;
  counter-reset: steps;
}
.steps-list li {
  counter-increment: steps;
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .95rem;
  line-height: 1.6;
  align-items: flex-start;
}
.steps-list li::before {
  content: counter(steps);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  min-width: 32px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-size: .85rem;
  flex-shrink: 0;
}

/* ====== AMAZON BOX ====== */
.amazon-box {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: #fff;
  border: 2px solid #f0ad4e;
  border-radius: var(--rl);
  padding: 1.25rem;
  margin: 2rem 0;
}
.amazon-box img { width: 110px; height: 110px; object-fit: contain; border-radius: var(--r); border: 1px solid var(--border); flex-shrink: 0; }
.amazon-info { flex: 1; }
.amazon-tag { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.amazon-info h4 { font-family: var(--heading); font-size: 1rem; margin: .3rem 0 .5rem; line-height: 1.3; }
.amazon-price { font-size: 1.25rem; font-weight: 700; margin-bottom: .75rem; }
.amazon-btn {
  display: inline-block;
  background: #f0ad4e;
  color: #1a1a18;
  padding: .55rem 1.1rem;
  border-radius: var(--r);
  font-weight: 700;
  font-size: .875rem;
  transition: background var(--t);
}
.amazon-btn:hover { background: #e09800; color: #1a1a18; }

/* ====== RELATED ====== */
.related { margin-top: 3rem; padding-top: 2rem; border-top: 2px solid var(--border); }
.related h3 { font-family: var(--heading); font-size: 1.4rem; margin-bottom: 1.25rem; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

/* ====== SIDEBAR ====== */
.sidebar { position: sticky; top: 80px; }
.widget {
  background: var(--bg-card);
  border-radius: var(--rl);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px var(--shadow);
}
.widget-title {
  font-family: var(--heading);
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: .75rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--accent);
}
.widget ul { list-style: none; padding: 0; }
.widget li { padding: .35rem 0; border-bottom: 1px solid var(--border); font-size: .875rem; }
.widget li:last-child { border-bottom: none; }
.widget input[type="search"] {
  width: 100%;
  padding: .5rem .75rem;
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-size: .875rem;
}

/* ====== CATEGORY PAGE ====== */
.cat-header { margin-bottom: 2rem; padding-bottom: 1.25rem; border-bottom: 2px solid var(--border); }
.cat-header h1 { font-family: var(--heading); font-size: 2rem; margin-bottom: .5rem; }
.cat-desc { color: var(--muted); margin-bottom: .4rem; }
.cat-count { font-size: .82rem; color: var(--muted); }

/* ====== ENTRY (article) ====== */
.entry-title {
  font-family: var(--heading);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.15;
  margin-bottom: .75rem;
}
.entry-meta {
  font-size: .82rem;
  color: var(--muted);
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1.25rem;
}
.entry-meta .sep { color: var(--border); }
.featured-img {
  border-radius: var(--rl);
  overflow: hidden;
  margin-bottom: 1.75rem;
}
.featured-img img { width: 100%; height: auto; }
.entry-content h2 { font-family: var(--heading); font-size: 1.55rem; margin: 2rem 0 .75rem; }
.entry-content h3 { font-family: var(--heading); font-size: 1.2rem; margin: 1.5rem 0 .5rem; }
.entry-content p { margin-bottom: 1.25rem; }
.entry-content table { border-collapse: collapse; width: 100%; margin: 1.25rem 0; }
.entry-content th, .entry-content td { border: 1px solid var(--border); padding: .6rem .85rem; text-align: left; font-size: .9rem; }
.entry-content th { background: var(--bg); font-weight: 600; }

/* ====== PAGINACIÓN ====== */
.pagination { display: flex; justify-content: center; gap: .5rem; margin: 2.5rem 0; }
.pagination a, .pagination span {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--r);
  font-size: .875rem; font-weight: 500;
  border: 1px solid var(--border);
  color: var(--text);
}
.pagination a:hover, .pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ====== 404 ====== */
.error-page { text-align: center; padding: 5rem 1.25rem; }
.error-code { font-family: var(--heading); font-size: 8rem; color: var(--accent); line-height: 1; }
.error-page h1 { font-family: var(--heading); font-size: 2rem; margin: 1rem 0; }
.error-page p { color: var(--muted); max-width: 460px; margin: 0 auto 2rem; }
.error-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ====== RESPONSIVE ====== */
@media (max-width: 1024px) {
  .recipe-grid { grid-template-columns: repeat(2, 1fr); }
  .page-wrap { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; }
  #nav { display: none; width: 100%; order: 10; }
  #nav.open { display: block; }
  #nav ul { flex-direction: column; gap: 0; }
  #nav a { border-radius: 0; border-bottom: 1px solid var(--border); }
  .menu-btn { display: flex; }
  .recipe-grid, .related-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .temp-cta-box { grid-template-columns: 1fr; }
  .temp-cta-box .mini-table-wrap { display: none; }
  .ing-list { columns: 1; }
  .amazon-box { flex-direction: column; align-items: center; text-align: center; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .hero { padding: 3rem 0; }
  .logo-title { font-size: 1.2rem; }
}
