/*
Theme Name: Comfort Food
Theme URI: https://www.carnivorecomfortfood.com
Author: Comfort Food
Description: Clean recipe website theme with deep purple design.
Version: 5.0.0
License: GNU General Public License v2 or later
Text Domain: comfortfood
*/

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { margin: 0 !important; padding: 0 !important; width: 100%; }
html { margin-top: 0 !important; }
body { font-family: 'Inter', sans-serif; background: #f9f5ff; color: #2d2d2d; line-height: 1.6; -webkit-text-size-adjust: 100%; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
h1, h2, h3, h4 { font-family: 'Playfair Display', serif; line-height: 1.3; }
#wpadminbar { position: fixed !important; }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

:root {
  --purple: #be94c8;
  --purple-light: #e8d5f0;
  --purple-dark: #8a5f9a;
  --purple-deeper: #5c3a6b;
  --warm: #f9f5ff;
  --text: #2d2d2d;
  --text-light: #666;
  --white: #ffffff;
  --border: #e0cce8;
}

/* ── HEADER ── */
.site-header {
  background: var(--purple-deeper);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 65px;
  position: sticky;
  top: 0;
  z-index: 999;
  border-bottom: 3px solid var(--purple);
  width: 100%;
  left: 0;
  right: 0;
}
.site-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  flex-shrink: 0;
}
.site-logo span { color: var(--purple); }
.header-search {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 25px;
  padding: 0.4rem 1rem;
  gap: 0.5rem;
  width: 320px;
}
.header-search input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  width: 100%;
}
.header-search input::placeholder { color: rgba(255,255,255,0.5); }

/* ── HERO ── */
.site-hero {
  background: linear-gradient(135deg, var(--purple-deeper) 0%, var(--purple-dark) 60%, #9b6aac 100%);
  padding: 3.5rem 2rem;
  text-align: center;
  width: 100%;
}
.site-hero h1 { font-size: 2.6rem; color: #fff; margin-bottom: 0.75rem; font-weight: 700; }
.site-hero p { color: rgba(255,255,255,0.75); font-size: 1rem; max-width: 500px; margin: 0 auto 1.5rem; }
.hero-btn {
  display: inline-block;
  background: var(--purple);
  color: #fff;
  padding: 0.7rem 2rem;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  transition: background 0.2s;
}
.hero-btn:hover { background: var(--purple-dark); }

/* ── CATEGORY BAR ── */
.category-bar {
  background: #fff;
  padding: 1rem 2rem;
  border-bottom: 2px solid var(--purple-light);
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
}
.cat-btn {
  padding: 0.45rem 1.1rem;
  border-radius: 20px;
  border: 2px solid var(--purple-light);
  background: #fff;
  color: var(--purple-dark);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
}
.cat-btn:hover, .cat-btn.current-cat {
  background: var(--purple-deeper);
  border-color: var(--purple-deeper);
  color: #fff;
}

/* ── CATEGORY PAGE HEADER ── */
.category-header {
  background: linear-gradient(135deg, var(--purple-deeper) 0%, var(--purple-dark) 100%);
  padding: 2.5rem 2rem;
  text-align: center;
  width: 100%;
}
.category-header h1 { font-size: 2rem; color: #fff; margin-bottom: 0.4rem; }
.category-header p { color: rgba(255,255,255,0.7); font-size: 0.95rem; }

/* ── MAIN WRAPPER ── */
.site-main {
  width: 100%;
  padding: 2.5rem 2rem;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--purple-dark);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--purple-light);
  font-family: 'Inter', sans-serif;
}

/* ── RECIPE GRID ── */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  width: 100%;
}

/* ── RECIPE CARD ── */
.recipe-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid var(--purple-light);
  transition: transform 0.2s, box-shadow 0.2s;
}
.recipe-card:hover { transform: translateY(-5px); box-shadow: 0 12px 30px rgba(92,58,107,0.15); }
.recipe-card-img {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  position: relative;
  background: var(--purple-light);
}
.recipe-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.recipe-card:hover .recipe-card-img img { transform: scale(1.04); }
.no-img { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 3rem; background: var(--purple-light); }
.card-category {
  position: absolute; top: 10px; left: 10px;
  background: var(--purple-deeper); color: #fff;
  font-size: 0.68rem; font-weight: 700;
  padding: 4px 10px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 0.8px;
  font-family: 'Inter', sans-serif;
}
.recipe-card-body { padding: 1rem 1.1rem 1.25rem; }
.recipe-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem; font-weight: 600;
  color: var(--purple-deeper); margin-bottom: 0.3rem; line-height: 1.3;
}
.recipe-card-meta { font-size: 0.78rem; color: var(--text-light); font-family: 'Inter', sans-serif; }

/* ── SINGLE POST ── */
.single-wrap {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
}
.single-post-cat {
  display: inline-block; background: var(--purple-deeper); color: #fff;
  font-size: 0.72rem; font-weight: 600; padding: 4px 12px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 1rem;
  font-family: 'Inter', sans-serif;
}
.single-post-title { font-size: 2.2rem; color: var(--purple-deeper); margin-bottom: 0.75rem; }
.single-post-meta { font-size: 0.85rem; color: var(--text-light); font-family: 'Inter', sans-serif; margin-bottom: 1.75rem; }
.single-post-img { width: 100%; border-radius: 14px; overflow: hidden; margin-bottom: 2rem; }
.single-post-img img { width: 100%; height: auto; }
.single-post-content { font-size: 1rem; line-height: 1.85; color: var(--text); }
.single-post-content h2 { font-size: 1.5rem; color: var(--purple-deeper); margin: 2rem 0 0.75rem; }
.single-post-content h3 { font-size: 1.2rem; color: var(--purple-dark); margin: 1.5rem 0 0.5rem; }
.single-post-content p { margin-bottom: 1rem; }
.single-post-content ul, .single-post-content ol { margin: 1rem 0 1rem 1.5rem; }
.single-post-content ul { list-style: disc; }
.single-post-content ol { list-style: decimal; }
.single-post-content li { margin-bottom: 0.4rem; }
.single-post-content strong { font-weight: 700; }
.back-link {
  display: inline-block; margin-top: 2.5rem; padding-top: 1.5rem;
  border-top: 1px solid var(--border); color: var(--purple-dark);
  font-size: 0.9rem; font-family: 'Inter', sans-serif;
}

/* ── PAGES ── */
.page-wrap {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
}
.page-wrap h1 { font-size: 2rem; color: var(--purple-deeper); margin-bottom: 1.5rem; }
.page-wrap p { margin-bottom: 1rem; line-height: 1.85; color: var(--text); font-size: 1rem; }
.page-wrap h2 { font-size: 1.4rem; color: var(--purple-dark); margin: 2rem 0 0.75rem; }
.page-wrap ul { margin: 1rem 0 1rem 1.5rem; list-style: disc; }
.page-wrap li { margin-bottom: 0.4rem; font-size: 1rem; }
.page-wrap a { color: var(--purple-dark); text-decoration: underline; }

/* ── SEARCH ── */
.search-wrap { width: 100%; padding: 2rem 2rem 0; }
.search-wrap h1 { font-size: 1.5rem; color: var(--purple-deeper); margin-bottom: 1.5rem; font-family: 'Playfair Display', serif; }

/* ── PAGINATION ── */
.pagination {
  display: flex; justify-content: center; gap: 0.5rem;
  margin-top: 3rem; flex-wrap: wrap; font-family: 'Inter', sans-serif;
}
.pagination a, .pagination span {
  padding: 0.5rem 1rem; border-radius: 8px;
  border: 2px solid var(--purple-light);
  color: var(--purple-dark); font-size: 0.9rem; transition: all 0.2s;
}
.pagination a:hover, .pagination .current {
  background: var(--purple-deeper); border-color: var(--purple-deeper); color: #fff;
}

/* ── NO POSTS ── */
.no-posts {
  grid-column: 1/-1; text-align: center;
  padding: 3rem 0; color: var(--text-light); font-family: 'Inter', sans-serif;
}

/* ── FOOTER ── */
.site-footer {
  background: var(--purple-deeper);
  padding: 2.5rem 2rem;
  margin-top: 3rem;
  border-top: 3px solid var(--purple);
  width: 100%;
}
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}
.footer-logo { font-family: 'Playfair Display', serif; font-size: 1.5rem; color: #fff; margin-bottom: 0.5rem; }
.footer-logo span { color: var(--purple); }
.footer-desc { font-size: 0.85rem; color: rgba(255,255,255,0.6); line-height: 1.6; }
.footer-col h4 {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--purple);
  margin-bottom: 0.85rem; font-family: 'Inter', sans-serif;
}
.footer-col a { display: block; color: rgba(255,255,255,0.65); font-size: 0.85rem; margin-bottom: 0.45rem; transition: color 0.2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  max-width: 1400px; margin: 1.5rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.8rem; color: rgba(255,255,255,0.4);
  font-family: 'Inter', sans-serif; flex-wrap: wrap; gap: 0.5rem;
}
.footer-bottom a { color: rgba(255,255,255,0.4); }
.footer-bottom a:hover { color: #fff; }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .recipe-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .site-header { padding: 0 1rem; height: 58px; }
  .site-logo { font-size: 1.3rem; }
  .header-search { width: auto; flex: 1; margin-left: 1rem; }
  .site-hero { padding: 2.5rem 1rem; }
  .site-hero h1 { font-size: 1.9rem; }
  .category-bar { padding: 0.75rem 1rem; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .category-bar::-webkit-scrollbar { display: none; }
  .cat-btn { flex-shrink: 0; }
  .site-main { padding: 1.5rem 1rem; }
  .recipe-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .single-wrap { padding: 1.5rem 1rem; }
  .single-post-title { font-size: 1.6rem; }
  .page-wrap { padding: 1.5rem 1rem; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .recipe-grid { grid-template-columns: 1fr; }
  .site-hero h1 { font-size: 1.6rem; }
}
