/* 全局重置与基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Arial", sans-serif;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* 顶部导航栏 */
.main-header {
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.main-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: inline-flex; /* 使图标与文字并排并垂直居中 */
  align-items: center;
  gap: 8px; /* 图标与文字间距，可调整为 4px 或 0 */
  font-size: 1.8rem;
  font-weight: bold;
  text-decoration: none;
  color: #f0d879;
}

.logo span {
  color: #1d3557;
}

/* 本地图标大小与对齐（紧贴文字） */
.logo-icon {
  width: 28px;
  height: 28px;
  display: inline-block;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 0;
}

@media (max-width: 480px) {
  .logo-icon { width: 20px; height: 20px; }
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: #457b9d;
  font-weight: 600;
  transition: color 0.3s;
}

.nav-links a.active,
.nav-links a:hover {
  color: #f0d879;
}

/* 英雄横幅 */
.hero {
  background-color: #f2eec7;/*主页底色*/
  padding: 6rem 0;
}

.hero .container {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 3rem;
}

.hero-img {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.hero-content {
  text-align: center;
}

.hero-content h1 {
  font-size: 2.5rem;
  font-weight: bold;
  color: #1d3557;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero-content p {
  font-size: 1.125rem;
  color: #457b9d;
  margin-bottom: 2rem;
  max-width: 500px;
}

.btn {
  background-color: #e78089c4;
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s;
  display: inline-block;
}

.btn:hover {
  background-color: #d77eaf;
}

/* 响应式：桌面端横幅左右布局 */
@media (min-width: 768px) {
  .hero .container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  .hero-content {
    text-align: left;
    max-width: 50%;
  }
  .hero-content h1 {
    font-size: 3rem;
  }
  .hero-img {
    max-width: 45%;
  }
}

/* 特色板块 */
.features {
  padding: 6rem 0;
  background-color: #fff;
}

.features h2 {
  font-size: 2rem;
  text-align: center;
  color: #1d3557;
  margin-bottom: 3rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 2rem;
}

.feature-card {
  text-align: center;
  padding: 2rem;
  background-color: #f2eec7;  /*三个子选项底色*/
  border-radius: 8px;
  transition: transform 0.3s;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-card img {
  width: 100%; /* 让图片宽度充满父容器 */
  height: auto; /* 高度自动计算，保持原始比例 */
  object-fit: cover; /* 可选：如果图片比例与容器不符，裁剪多余部分（保持比例不变形） */
  max-width: 100%; /* 限制图片最大宽度不超过原始尺寸（避免过度放大模糊） */
}

.feature-card h3 {
  font-size: 1.25rem;
  color: #1d3557;
  margin-bottom: 1rem;
}

.feature-card p {
  color: #457b9d;
  margin-bottom: 1.5rem;
}

.btn-sm {
  background-color: #e78089c4;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: background-color 0.3s;
}

.btn-sm:hover {
  background-color: #3a6b87;
}

/* 响应式：桌面端3列布局 */
@media (min-width: 768px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 美食分类 */
.food-categories {
  padding: 6rem 0;
  background-color: #f8f9fa;
}

.food-categories h2 {
  font-size: 2rem;
  text-align: center;
  color: #1d3557;
  margin-bottom: 3rem;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.category-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.category-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.5s;
}

.category-card:hover img {
  transform: scale(1.1);
}

.category-card h3 {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(226, 231, 139, 0.632);
  color: white;
  padding: 1rem;
  font-size: 1.25rem;
}

/* 响应式：桌面端4列布局 */
@media (min-width: 768px) {
  .category-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* 分支页面通用样式 */
.page-content {
  padding: 6rem 0;
}

.page-content h2 {
  font-size: 2rem;
  text-align: center;
  color: #1d3557;
  margin-bottom: 2rem;
}

.page-content p {
  font-size: 1.125rem;
  color: #457b9d;
  text-align: center;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.sharing-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

.sharing-card {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}

.sharing-card:hover {
  transform: translateY(-5px);
}

.sharing-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.sharing-card h3 {
  padding: 1rem;
  color: #1d3557;
  font-size: 1.25rem;
}

.sharing-card p {
  padding: 0 1rem 1rem 1rem;
  text-align: left;
  margin-bottom: 0;
}

.share-form {
  max-width: 600px;
  margin: 0 auto;
}

.share-form h3 {
  font-size: 1.5rem;
  color: #1d3557;
  margin-bottom: 1.5rem;
  text-align: center;
}

.form-input,
.form-textarea,
.form-file {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.form-textarea {
  min-height: 150px;
  resize: vertical;
}

/* 响应式：桌面端分享卡片3列布局 */
@media (min-width: 768px) {
  .sharing-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 页脚 */
.main-footer {
  background-color: #f2eec7;
  color: white;
  padding: 2rem 0;
  text-align: center;
}

/* 产品页面标题样式--食谱 */
.products-title {
  text-align: center;
  margin: 40px 0 60px;
  padding: 0 20px;
}

.products-title h2 {
  font-size: 2rem;
  color: #333;
  margin-bottom: 15px;
  position: relative;
  display: inline-block;
  padding-left: 20px; /* 给左侧线条留空间 */
}

/* 标题前的标志性竖线 */
.products-title h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 5px;
  height: 80%;
  width: 4px;
  background-color: #FF7A00; /* 橙色线条 */
}

.products-title .subtitle {
  color: #666;
  font-size: 1rem;
  margin: 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* 产品网格布局 */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3列布局 */
  gap: 30px; /* 产品间距 */
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

/* 产品项样式 */
.product-item {
  text-align: center;
  transition: transform 0.3s ease;
}

.product-item:hover {
  transform: translateY(-5px); /* 悬停轻微上浮 */
}

/* 产品图片样式（核心调整） */
.product-img {
  width: 100%;
  height: 220px; /* 固定图片高度，保持统一 */
  object-fit: cover; /* 裁剪图片保持比例，不拉伸 */
  border-radius: 8px; /* 圆角效果 */
  margin-bottom: 15px;
  display: block; /* 去除图片底部间隙 */
  box-shadow: 0 2px 8px rgba(0,0,0,0.1); /* 轻微阴影增强层次感 */
}

/* 产品名称样式 */
.product-name {
  color: #333;
  font-size: 1.1rem;
  margin: 0;
  padding: 5px 0;
  font-weight: 500;
}

/* 响应式适配 */
@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr); /* 平板显示2列 */
  }
  .product-img {
    height: 180px; /* 平板缩小图片高度 */
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr; /* 手机显示1列 */
  }
  .product-img {
    height: 200px; /* 手机保持合适高度 */
  }
}

/* ...existing code... */
/* Lightbox / 模态查看 */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  gap: 16px;
}

.lightbox .lb-image {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 6px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.6);
}

.lightbox button {
  position: relative;
  background: transparent;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  padding: 8px 12px;
  line-height: 1;
  user-select: none;
}

/* 关闭按钮放右上角 */
.lightbox .lb-close {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 2.2rem;
  background: rgba(0,0,0,0.4);
  border-radius: 6px;
}

/* 上一张/下一张按钮 */
.lightbox .lb-prev,
.lightbox .lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  background: rgba(0,0,0,0.35);
  border-radius: 6px;
  width: 48px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox .lb-prev { left: 20px; }
.lightbox .lb-next { right: 20px; }

/* 在小屏上调整按钮大小 */
@media (max-width: 480px) {
  .lightbox .lb-prev,
  .lightbox .lb-next {
    width: 40px;
    height: 56px;
    font-size: 2rem;
  }
}
/* ...existing code... */


/* Guide 页面：标题与正文居中竖向排布 */
.page-content.guide-page {
  display: flex;
  align-items: center;    /* 垂直方向居中 */
  justify-content: center;/* 水平方向居中 */
  min-height: 60vh;       /* 根据需要调整占据的高度 */
  padding: 4rem 0;
}

.page-content.guide-page .container {
  display: flex;
  flex-direction: column; /* 竖向排列：标题在上，正文在下 */
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  width: 100%;
}

/* 标题保持黑色居中 */
.page-content.guide-page h2 {
  color: #000;
  text-align: center;
}

/* 段落每行两端对齐，最后一行居中 */
.page-content.guide-page p,
.guide-info p {
  color: #1d3557;
  line-height: 1.75;
  max-width: 900px;
  white-space: pre-wrap;
  margin: 0;
  text-align: justify;             /* 每行对齐 */
  text-justify: inter-word;
  text-align-last: center;         /* 最后一行居中 */
  -webkit-text-align-last: center; /* Safari/Chrome 前缀兼容 */
}
/* ...existing code... */