/*
Theme Name: xunmi
Theme URI: https://www.jingrui16888.com
Description: 火种仿站 - 凉果蜜饯分装厂企业主题
Author: k神
Author URI: https://www.jingrui16888.com
Version: 1.0
Tags: 火种

===========================================================================
配色说明
  本主题配色统一定义在 tailwind.config.js 中：
    brand-*    → 品牌色（Header、导航、按钮、强调元素）
    surface-*  → 中性色（背景、卡片、边框、正文文字）
    accent-*   → 点缀色（渐变搭配、CTA区域）
  请勿在模板中直接使用 amber-* / stone-* / orange-* 原生类名。
===========================================================================
*/

/* ================================================================
   全局通用样式 —— 适用于所有页面模板
   ================================================================ */

/* 平滑滚动 */
html {
  scroll-behavior: smooth;
}

/* 选中文字颜色 */
::selection {
  background-color: #b45309; /* brand-700 */
  color: #ffffff;
}

/* 焦点可见样式（无障碍） */
:focus-visible {
  outline: 2px solid #d97706;
  outline-offset: 2px;
}

/* 自定义滚动条（Webkit 浏览器） */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f5f5f4; /* surface-100 */
}
::-webkit-scrollbar-thumb {
  background: #a8a29e; /* surface-400 */
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #78716c; /* surface-500 */
}

/* 打印样式 */
@media print {
  nav,
  aside,
  footer,
  .no-print {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
}

/* ================================================================
   WordPress 默认元素修正 —— 适用于所有页面模板
   ================================================================ */

/* 清除 WordPress 自动生成的图片边距 */
figure.wp-block-image {
  margin: 0;
}
figure.wp-block-image img {
  height: auto;
}

/* ================================================================
   首页模板 (index.php) 专用样式
   ================================================================ */

/* Hero 区域装饰性微调 */
.home-hero-mark {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* ================================================================
   产品详情页模板 (single-product.php) 专用样式
   ================================================================ */

/* 产品图片缩略图悬停效果 */
.product-thumb {
  transition: border-color 0.2s ease;
}
.product-thumb:hover {
  border-color: #d97706; /* brand-600 */
}

/* 服务类型选择卡片 */
.service-card input[type="radio"]:checked + div {
  border-color: #d97706; /* brand-600 */
  background-color: #fffbeb; /* brand-50 */
}

/* 标签页切换 */
.product-tab-nav button {
  border-bottom: 2px solid transparent;
}
.product-tab-nav button.active {
  color: #b45309; /* brand-700 */
  border-bottom-color: #b45309; /* brand-700 */
}

/* ================================================================
   关于我们页面模板 (page-about.php) 专用样式
   ================================================================ */

/* 时间线节点 */
.timeline-dot {
  box-shadow: 0 0 0 4px #ffffff;
}

/* 时间线当前节点高亮 */
.timeline-dot--current {
  box-shadow: 0 0 0 4px #ffffff, 0 0 0 8px rgba(253, 230, 138, 0.6);
}

/* ================================================================
   联系我们页面模板 (page-contact.php) 专用样式
   ================================================================ */

/* FAQ 折叠面板展开动画 */
.contact-faq details[open] summary svg {
  transform: rotate(180deg);
}
.contact-faq details summary svg {
  transition: transform 0.2s ease;
}

/* 表单验证样式 */
.contact-form input:invalid:not(:placeholder-shown),
.contact-form textarea:invalid:not(:placeholder-shown) {
  border-color: #ef4444; /* red-500 */
}

/* ================================================================
   PC端右侧悬浮联系按钮（全站通用）
   ================================================================ */

.side-contact-bar {
  position: fixed;
  right: 16px;
  bottom: 160px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 移动端隐藏PC悬浮条 */
@media (max-width: 767px) {
  .side-contact-bar {
    display: none;
  }
}

.side-contact-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #b45309; /* brand-700 */
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px rgba(180, 83, 9, 0.35);
  transition: transform 0.2s ease, background 0.2s ease;
  position: relative;
  font-size: 0;
}
.side-contact-btn:hover {
  transform: scale(1.1);
  background: #92400e; /* brand-800 */
}
.side-contact-btn svg {
  width: 20px;
  height: 20px;
}

/* 回顶按钮默认隐藏 */
#side-back-top {
  display: none;
}

/* POP弹窗——电话号/二维码 */
.side-popup {
  display: none;
  position: absolute;
  right: 54px;
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  padding: 12px 16px;
  white-space: nowrap;
  z-index: 1000;
}
.side-popup.show {
  display: block;
}
/* 气泡小三角 */
.side-popup::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: #fff;
}
.side-popup .phone-number {
  font-size: 15px;
  color: #b45309; /* brand-700 */
  font-weight: 700;
  letter-spacing: 1px;
}
.side-popup .qrcode-img {
  width: 140px;
  height: 140px;
  max-width: none;
  display: block;
}

/* ================================================================
   产品分类列表页模板 (category-product.php) 专用样式
   ================================================================ */

/* 分页按钮悬停 */
.category-pagination .page-numbers.current {
  background-color: #b45309; /* brand-700 */
  color: #ffffff;
}
.category-pagination .page-numbers:hover:not(.current) {
  background-color: #f5f5f4; /* surface-100 */
}

/* ================================================================
   博客详情页模板 (single-blog.php) 专用样式
   ================================================================ */

/* 文章正文排版 */
.blog-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #292524; /* surface-800 */
}
.blog-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #292524; /* surface-800 */
}
.blog-content p {
  margin-bottom: 1rem;
  line-height: 1.75;
  color: #57534e; /* surface-600 */
}
.blog-content ul,
.blog-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}
.blog-content ul {
  list-style-type: disc;
}
.blog-content ol {
  list-style-type: decimal;
}
.blog-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 1.5rem 0;
}
.blog-content blockquote {
  border-left: 4px solid #d97706; /* brand-600 */
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: #78716c; /* surface-500 */
  font-style: italic;
}
.blog-content a {
  color: #b45309; /* brand-700 */
  text-decoration: underline;
}
.blog-content a:hover {
  color: #92400e; /* brand-800 */
}

/* ================================================================
   产品详情页模板 (single-product.php) 正文排版
   ================================================================ */
.product-detail-content {
  text-align: center;
  color: #57534e; /* surface-600 */
  line-height: 1.75;
}
.product-detail-content p {
  margin-bottom: 1.5rem;
}
.product-detail-content img {
   max-width: 100%;
   height: auto;
   border-radius: 0.75rem;
   margin: 1.5rem auto;
  display: block;
}

/* ====== 电话图标响铃跳动动画 ====== */
.phone-ring {
  animation: phoneRing 1.5s ease-in-out infinite;
  transform-origin: center;
}
@keyframes phoneRing {
  0%, 100% { transform: rotate(0deg) scale(1); }
  10% { transform: rotate(-8deg) scale(1.05); }
  20% { transform: rotate(8deg) scale(1.1); }
  30% { transform: rotate(-6deg) scale(1.05); }
  40% { transform: rotate(6deg) scale(1.1); }
  50% { transform: rotate(0deg) scale(1); }
  60% { transform: rotate(0deg) scale(1.08); }
  70% { transform: rotate(0deg) scale(1); }
  80% { transform: rotate(0deg) scale(1.05); }
  100% { transform: rotate(0deg) scale(1); }
}
