/*
Theme Name: Bites of Wellness
Theme URI: https://bitesofwellness.com
Author: Bites of Wellness
Author URI: https://bitesofwellness.com
Description: 完全克隆 bitesofwellness.com 风格的 WordPress 主题。紫色和绿色配色，顶部栏、特殊 Logo 字体、四个大图片展示区、分类图标行。
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bitesofwellness
Tags: custom-background, custom-logo, custom-menu, featured-images, full-width-template, sticky-post, theme-options, threaded-comments, translation-ready, blog, food-and-drink, one-column, two-columns, right-sidebar
*/

/* === CSS 变量（根据实际网站） === */
:root {
  --bow-purple: #6b3fa0;        /* 主紫色 */
  --bow-purple-dark: #5a2f8a;   /* 深紫色 */
  --bow-green: #7cb342;         /* Logo 绿色 */
  --bow-green-light: #8bc34a;   /* 浅绿色 */
  --bow-text: #333;
  --bow-text-light: #666;
  --bow-bg: #fff;
  --bow-bg-top: #f5f5f5;        /* 顶部栏背景 */
  --bow-border: #e0e0e0;
  --bow-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bow-font-script: "Dancing Script", "Brush Script MT", cursive; /* Logo 手写体 */
  --bow-container: 1200px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--bow-font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--bow-text);
  background: var(--bow-bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--bow-purple);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--bow-purple-dark);
}

/* === 站点容器 === */
.bow-container {
  max-width: var(--bow-container);
  margin: 0 auto;
  padding: 0 20px;
}

/* === 顶部栏（Top Bar） === */
.bow-top-bar {
  background: var(--bow-bg-top);
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--bow-border);
}

.bow-top-bar-inner {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 20px;
}

.bow-top-links {
  display: flex;
  gap: 20px;
}

.bow-top-links a {
  color: var(--bow-text);
  text-transform: uppercase;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.5px;
}

.bow-top-links a:hover {
  color: var(--bow-purple);
}

.bow-trending-btn {
  background: var(--bow-purple);
  color: #fff;
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background 0.2s;
}

.bow-trending-btn:hover {
  background: var(--bow-purple-dark);
  color: #fff;
}

/* === 主头部 === */
.bow-header {
  background: var(--bow-bg);
  padding: 20px 0;
  border-bottom: 1px solid var(--bow-border);
}

.bow-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

/* Logo === */
.bow-logo {
  display: flex;
  align-items: center;
}

.bow-logo a {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.bow-logo .logo-bites {
  font-family: var(--bow-font-script);
  font-size: 28px;
  color: var(--bow-green);
  font-weight: 400;
}

.bow-logo .logo-wellness {
  font-size: 28px;
  font-weight: 700;
  color: var(--bow-purple);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.bow-logo img {
  max-height: 50px;
  width: auto;
}

/* 主导航 === */
.bow-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.bow-nav ul {
  list-style: none;
  display: flex;
  gap: 8px 28px;
  align-items: center;
}

.bow-nav a {
  color: var(--bow-purple);
  font-weight: 500;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.bow-nav a:hover,
.bow-nav .current-menu-item > a {
  color: var(--bow-purple-dark);
}

.bow-nav .menu-item-has-children > a::after {
  content: "▼";
  font-size: 10px;
  margin-left: 4px;
}

/* 搜索图标 === */
.bow-search-icon {
  font-size: 20px;
  color: var(--bow-purple);
  cursor: pointer;
  padding: 4px;
}

.bow-search-icon:hover {
  color: var(--bow-purple-dark);
}

/* 移动端菜单开关 === */
.bow-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--bow-purple);
  cursor: pointer;
  padding: 4px;
}

@media (max-width: 768px) {
  .bow-menu-toggle { display: block; }
  .bow-nav { display: none; width: 100%; order: 3; }
  .bow-nav.toggled { display: block; }
  .bow-nav ul { flex-direction: column; align-items: flex-start; gap: 12px; }
  .bow-header-inner { flex-direction: column; }
}

/* === 首页主标题 === */
.bow-hero-title {
  text-align: center;
  padding: 60px 20px 40px;
}

.bow-hero-title h1 {
  font-size: 42px;
  font-weight: 700;
  color: var(--bow-purple);
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.2;
}

@media (max-width: 768px) {
  .bow-hero-title h1 {
    font-size: 28px;
  }
}

/* === 四个大图片展示区 === */
.bow-hero-recipes {
  padding: 0 20px 60px;
}

.bow-hero-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.bow-hero-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.bow-hero-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,.15);
}

.bow-hero-card a {
  display: block;
  color: inherit;
}

.bow-hero-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.bow-hero-card-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(107, 63, 160, 0.9);
  color: #fff;
  padding: 16px;
  text-align: center;
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

@media (max-width: 1024px) {
  .bow-hero-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .bow-hero-grid {
    grid-template-columns: 1fr;
  }
}

/* === 分类图标行 === */
.bow-category-icons {
  padding: 40px 20px 60px;
  background: var(--bow-bg);
}

.bow-category-icons-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.bow-icons-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 20px;
  text-align: center;
}

.bow-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.bow-icon-item a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--bow-text);
}

.bow-icon-item a:hover {
  color: var(--bow-purple);
}

.bow-icon-item .icon {
  width: 60px;
  height: 60px;
  background: var(--bow-bg-top);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  transition: background 0.2s;
}

.bow-icon-item a:hover .icon {
  background: var(--bow-purple);
  color: #fff;
}

.bow-icon-item .label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

@media (max-width: 1024px) {
  .bow-icons-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 600px) {
  .bow-icons-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* === 主内容区布局 === */
.bow-content-area {
  padding: 40px 0 60px;
}

.bow-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
}

.bow-main { min-width: 0; }

@media (max-width: 900px) {
  .bow-layout {
    grid-template-columns: 1fr;
  }
}

/* === 文章列表 === */
.bow-posts-list {
  margin-bottom: 40px;
}

.bow-recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 28px;
}

.bow-recipe-card {
  background: var(--bow-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

.bow-recipe-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,.12);
}

.bow-recipe-card a {
  color: inherit;
  display: block;
}

.bow-recipe-card .thumb {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bow-bg-top);
}

.bow-recipe-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bow-recipe-card h3 {
  font-size: 18px;
  font-weight: 600;
  padding: 16px 18px;
  line-height: 1.4;
  color: var(--bow-text);
}

.bow-recipe-card h3 a:hover {
  color: var(--bow-purple);
}

/* === 单篇文章 === */
.bow-single .entry-header {
  margin-bottom: 24px;
}

.bow-single .entry-title {
  font-size: 36px;
  font-weight: 700;
  color: var(--bow-purple);
  line-height: 1.25;
  margin-bottom: 12px;
}

.bow-single .entry-meta {
  color: var(--bow-text-light);
  font-size: 14px;
}

.bow-single .post-thumbnail {
  margin-bottom: 28px;
  border-radius: 8px;
  overflow: hidden;
}

.bow-single .entry-content {
  font-size: 17px;
  line-height: 1.75;
  color: var(--bow-text);
}

.bow-single .entry-content h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--bow-purple);
  margin: 1.5em 0 0.75em;
}

.bow-single .entry-content h3 {
  font-size: 22px;
  font-weight: 600;
  margin: 1.25em 0 0.5em;
}

.bow-single .entry-content img {
  border-radius: 8px;
  margin: 1.5em 0;
}

/* === 侧边栏 === */
.bow-sidebar {
  position: sticky;
  top: 100px;
}

.bow-widget {
  margin-bottom: 36px;
  padding: 24px;
  background: var(--bow-bg-top);
  border-radius: 8px;
}

.bow-widget-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--bow-purple);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--bow-purple);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* === 页脚 === */
.bow-footer {
  background: #2a2a2a;
  color: #ddd;
  padding: 48px 0 24px;
  margin-top: 60px;
}

.bow-footer a {
  color: #b8d4c4;
}

.bow-footer a:hover {
  color: #fff;
}

.bow-footer-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 36px;
}

.bow-footer .widget-title {
  color: #fff;
  font-size: 16px;
  margin-bottom: 12px;
}

.bow-footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid #444;
  font-size: 14px;
  color: #999;
}

/* === 分页 === */
.bow-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 40px;
}

.bow-pagination a,
.bow-pagination span {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid var(--bow-border);
  border-radius: 6px;
  color: var(--bow-text);
}

.bow-pagination a:hover {
  border-color: var(--bow-purple);
  color: var(--bow-purple);
}

.bow-pagination .current {
  background: var(--bow-purple);
  border-color: var(--bow-purple);
  color: #fff;
}

/* === 搜索表单 === */
.bow-search-overlay {
  background: rgba(0, 0, 0, 0.8);
  padding: 40px 20px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
}

.bow-search-form {
  display: flex;
  gap: 8px;
  max-width: 600px;
  width: 100%;
}

.bow-search-form input[type="search"] {
  flex: 1;
  padding: 16px 20px;
  border: 2px solid var(--bow-purple);
  border-radius: 8px;
  font-size: 16px;
  background: #fff;
}

.bow-search-form input[type="submit"] {
  padding: 16px 32px;
  background: var(--bow-purple);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 0.5px;
}

.bow-search-form input[type="submit"]:hover {
  background: var(--bow-purple-dark);
}

/* === 404 === */
.bow-404 {
  text-align: center;
  padding: 80px 20px;
}

.bow-404 h1 {
  font-size: 48px;
  font-weight: 700;
  color: var(--bow-purple);
  margin-bottom: 16px;
}

.bow-404 p {
  color: var(--bow-text-light);
  margin-bottom: 24px;
}

/* === 工具类 === */
.screen-reader-text {
  clip: rect(0,0,0,0);
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--bow-purple);
  color: #fff;
  padding: 12px 20px;
  z-index: 9999;
  transition: top .2s;
}

.skip-link:focus {
  top: 0;
}
