/*
Theme Name: 云享印品官网主题
Theme URI: https://www.yx360.cn/
Author: 武汉云享信息技术服务有限公司
Author URI: https://www.yx360.cn/
Description: 武汉云享信息技术服务有限公司官方官网主题。面向 C 端的印刷定制产品展示与企业官网，主色为橙 #ff5216，橙色系 #ff8f23/#ffb26b 作强调色，配奶油底色。内置首页、产品中心、为什么选择云享、定制流程、关于我们、联系我们等模块，支持 WooCommerce 商品与订单管理、在线报价表单与自定义联系方式。
Version: 1.0.0
Requires at least: 5.9
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: yunxiang
Tags: business, one-column, custom-menu, custom-logo, featured-images, custom-background, translation-ready
*/

/* ==========================================================================
   1. 基础变量与重置
   ========================================================================== */
:root {
  --yx-red: #ff5216;
  --yx-red-dark: #e84900;
  --yx-red-deep: #c23800;
  --yx-orange: #ff8f23;
  --yx-orange-light: #ffb26b;
  --yx-cream: #f9f4f0;
  --yx-ink: #1f1f1f;
  --yx-text: #3a3a3a;
  --yx-muted: #8c8c8c;
  --yx-border: #ececee;
  --yx-bg: #faf7f4;
  --yx-white: #ffffff;
  --yx-shadow: 0 10px 30px rgba(31, 31, 31, .06);
  --yx-shadow-lg: 0 20px 50px rgba(255, 82, 22, .12);
  --yx-radius: 16px;
  --yx-radius-sm: 10px;
  --yx-font: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, "Noto Sans SC", sans-serif;
  --yx-container: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--yx-font);
  font-size: 15px;
  line-height: 1.7;
  color: var(--yx-text);
  background: var(--yx-white);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--yx-red); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--yx-red-dark); }

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 .5em;
  color: var(--yx-ink);
  font-weight: 700;
  line-height: 1.25;
}

p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }

.container {
  width: 100%;
  max-width: var(--yx-container);
  margin: 0 auto;
  padding: 0 20px;
}

.section { padding: 72px 0; }
.section--alt { background: var(--yx-bg); }
.section--cream { background: var(--yx-cream); }

.section__head { text-align: center; max-width: 680px; margin: 0 auto 44px; }
.section__eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--yx-red);
  text-transform: uppercase;
}
.section__title { font-size: clamp(24px, 3vw, 31px); margin: 10px 0 12px; }
.section__sub { color: var(--yx-muted); font-size: 15px; margin: 0; }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .22s ease;
  white-space: nowrap;
}
.btn--primary { background: var(--yx-red); color: #fff; box-shadow: 0 8px 20px rgba(255, 82, 22, .25); }
.btn--primary:hover { background: var(--yx-red-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 12px 26px rgba(255, 82, 22, .32); }
.btn--ghost { background: transparent; color: var(--yx-ink); border-color: #d7d7dc; }
.btn--ghost:hover { border-color: var(--yx-red); color: var(--yx-red); }
.btn--light { background: #fff; color: var(--yx-red); }
.btn--light:hover { background: #ffe9d6; color: var(--yx-red-dark); }
.btn--lg { padding: 16px 34px; font-size: 16px; }
.btn--block { width: 100%; }

/* ==========================================================================
   2. 顶部工具条 + 页头
   ========================================================================== */
.topbar {
  background: var(--yx-red);
  color: #fff;
  font-size: 13px;
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 38px; flex-wrap: wrap; }
.topbar__item { display: inline-flex; align-items: center; gap: 6px; }
.topbar__item a { color: #fff; }
.topbar__item a:hover { color: #ffe5d4; }
.topbar__item b { color: #fff; font-weight: 700; }
.topbar__item svg { width: 15px; height: 15px; flex: none; }
.topbar__links a { padding: 0 12px; border-left: 1px solid rgba(255, 255, 255, .35); }
.topbar__links a:first-child { padding-left: 0; border-left: 0; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--yx-border);
}
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(31, 31, 31, .08); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }

.site-brand { display: inline-flex; align-items: center; gap: 12px; }
.site-brand img { width: auto; height: 44px; }
.site-brand__text { line-height: 1.1; }
.site-brand__name { font-size: 22px; font-weight: 800; color: var(--yx-ink); letter-spacing: .02em; }
.site-brand__slogan { font-size: 12px; color: var(--yx-muted); letter-spacing: .08em; }

.main-nav { display: flex; align-items: center; }
.main-nav ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-nav li { position: relative; }
.main-nav a {
  display: inline-block;
  padding: 10px 16px;
  color: var(--yx-ink);
  font-size: 15px;
  font-weight: 500;
  border-radius: 8px;
}
.main-nav a:hover { color: var(--yx-red); background: #fff3e9; }
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a { color: var(--yx-red); }
.main-nav .sub-menu {
  position: absolute; top: 100%; left: 0;
  min-width: 180px;
  background: #fff;
  border: 1px solid var(--yx-border);
  border-radius: 12px;
  box-shadow: var(--yx-shadow);
  padding: 8px;
  display: none;
}
.main-nav li:hover > .sub-menu { display: block; }
.main-nav .sub-menu a { display: block; padding: 9px 14px; }

.header-cta { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--yx-border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  color: var(--yx-ink);
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }

/* ==========================================================================
   3. Hero
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1100px 520px at 85% -10%, rgba(255, 143, 35, .18), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(255, 82, 22, .10), transparent 55%),
    linear-gradient(180deg, #fff 0%, #fdf5ef 100%);
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 48px;
  align-items: center;
  padding: 76px 0 84px;
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #ffddc9;
  color: var(--yx-red);
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.hero__title {
  font-size: clamp(30px, 4.6vw, 47px);
  font-weight: 800;
  margin: 20px 0 16px;
  letter-spacing: .01em;
}
.hero__title .accent { color: var(--yx-red); }
.hero__sub { font-size: 16px; color: #5c5c5c; max-width: 520px; margin-bottom: 26px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__trust { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 28px; color: var(--yx-muted); font-size: 13.5px; }
.hero__trust span { display: inline-flex; align-items: center; gap: 6px; }
.hero__trust svg { width: 16px; height: 16px; color: var(--yx-orange); }

.hero__visual { position: relative; min-height: 420px; }
.hero__card {
  position: absolute;
  background: #fff;
  border: 1px solid var(--yx-border);
  border-radius: 18px;
  box-shadow: var(--yx-shadow-lg);
  overflow: hidden;
}
.hero__card--main {
  width: 72%; left: 0; top: 20px;
  transform: rotate(-3deg);
}
.hero__card--main .hero__thumb {
  height: 260px;
  background: linear-gradient(135deg, #ff5216, #ff7a3d);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 64px;
}
.hero__card--main .hero__meta { padding: 16px 18px; }
.hero__card--main .hero__meta strong { display: block; font-size: 17px; color: var(--yx-ink); }
.hero__card--main .hero__meta span { font-size: 13px; color: var(--yx-muted); }
.hero__card--float {
  width: 46%; right: 0; bottom: 24px;
  transform: rotate(4deg);
  padding: 18px;
}
.hero__card--float .hero__thumb {
  height: 150px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff8f23, #ffc46b);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 46px;
}
.hero__badge {
  position: absolute;
  right: 6%; top: 4px;
  background: #fff;
  border: 1px solid var(--yx-border);
  border-radius: 50%;
  width: 96px; height: 96px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: var(--yx-shadow);
  color: var(--yx-red);
  z-index: 2;
}
.hero__badge strong { font-size: 20px; line-height: 1; }
.hero__badge span { font-size: 11px; color: var(--yx-muted); margin-top: 4px; }

/* ==========================================================================
   4. 优势
   ========================================================================== */
.adv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.adv-card {
  background: #fff;
  border: 1px solid var(--yx-border);
  border-radius: var(--yx-radius);
  padding: 28px 24px;
  transition: all .25s ease;
}
.adv-card:hover { transform: translateY(-6px); box-shadow: var(--yx-shadow); border-color: #ffd9bd; }
.adv-card__icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff1e6, #ffe4cf);
  color: var(--yx-red);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.adv-card__icon svg { width: 28px; height: 28px; }
.adv-card h3 { font-size: 18px; margin-bottom: 8px; }
.adv-card p { color: var(--yx-muted); font-size: 14.5px; margin: 0; }

/* 为什么选择云享（编号要点式，参考 cpct-copycat） */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.why-item {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--yx-border);
  border-radius: var(--yx-radius);
  padding: 26px 24px;
  transition: all .25s ease;
}
.why-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--yx-shadow-lg);
  border-color: #ffd9bd;
}
.why-item__num {
  flex: none;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--yx-red), var(--yx-orange));
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 18px rgba(255, 82, 22, .25);
}
.why-item__body h3 { font-size: 18px; margin-bottom: 8px; }
.why-item__body p { color: var(--yx-muted); font-size: 14.5px; margin: 0; }

/* ==========================================================================
   5. 产品中心
   ========================================================================== */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cat-card {
  display: block;
  background: #fff;
  border: 1px solid var(--yx-border);
  border-radius: var(--yx-radius);
  overflow: hidden;
  transition: all .25s ease;
  color: inherit;
}
.cat-card:hover { transform: translateY(-6px); box-shadow: var(--yx-shadow); border-color: #ffd9bd; color: inherit; }
.cat-card__img { height: 150px; overflow: hidden; background: #faf7f4; }
.cat-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; display: block; }
.cat-card:hover .cat-card__img img { transform: scale(1.06); }
.cat-card__body { padding: 14px 16px 16px; }
.cat-card__body h3 { font-size: 16px; margin-bottom: 4px; }
.cat-card__body p { font-size: 13px; color: var(--yx-muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cat-card__more { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--yx-red); font-weight: 600; margin-top: 8px; }
.cat-card__more svg { width: 14px; height: 14px; }

/* ==========================================================================
   6. 定制流程
   ========================================================================== */
.flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; counter-reset: flow; }
.flow-step { text-align: center; padding: 8px 14px; position: relative; }
.flow-step__num {
  width: 64px; height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #ffd9bd;
  color: var(--yx-red);
  font-size: 22px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  z-index: 1;
}
.flow-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 32px; left: calc(50% + 40px);
  width: calc(100% - 80px); height: 2px;
  background: repeating-linear-gradient(90deg, #ffd9bd 0 6px, transparent 6px 12px);
}
.flow-step h3 { font-size: 16px; margin-bottom: 6px; }
.flow-step p { font-size: 13px; color: var(--yx-muted); margin: 0; }

/* ==========================================================================
   7. 数据带
   ========================================================================== */
.stats {
  background: linear-gradient(120deg, var(--yx-red) 0%, #f14a00 55%, var(--yx-red-dark) 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.stats::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 300px at 80% 0%, rgba(255,143,35,.35), transparent 60%); }
.stats__inner { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding: 48px 0; text-align: center; }
.stat__num { font-size: clamp(30px, 4vw, 44px); font-weight: 800; line-height: 1; }
.stat__num .suffix { font-size: 22px; color: #ffddc9; }
.stat__label { margin-top: 10px; font-size: 14px; color: #ffe5d4; }

/* ==========================================================================
   8. 关于我们
   ========================================================================== */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.about__media { position: relative; }
.about__media .main { border-radius: 20px; overflow: hidden; box-shadow: var(--yx-shadow-lg); min-height: 320px; }
.about__media .main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.about__media .plate {
  position: absolute; right: -18px; bottom: -18px;
  background: #fff; border: 1px solid var(--yx-border);
  border-radius: 16px; box-shadow: var(--yx-shadow);
  padding: 16px 22px;
  display: flex; align-items: center; gap: 12px;
}
.about__media .plate strong { font-size: 22px; color: var(--yx-red); display: block; line-height: 1.1; }
.about__media .plate span { font-size: 12.5px; color: var(--yx-muted); }
.about__body .section__head { text-align: left; margin-left: 0; }
.about__list { list-style: none; padding: 0; margin: 20px 0 28px; }
.about__list li { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; color: #4a4a4a; }
.about__list svg { width: 20px; height: 20px; color: var(--yx-red); flex: none; margin-top: 2px; }

/* ==========================================================================
   9. 联系我们
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 36px; }
.contact-info { display: flex; flex-direction: column; gap: 16px; }
.contact-item {
  display: flex; align-items: flex-start; gap: 16px;
  background: #fff; border: 1px solid var(--yx-border);
  border-radius: var(--yx-radius); padding: 20px;
}
.contact-item__icon {
  width: 48px; height: 48px; flex: none;
  border-radius: 12px; background: linear-gradient(135deg, #fff1e6, #ffe4cf);
  color: var(--yx-red);
  display: flex; align-items: center; justify-content: center;
}
.contact-item__icon svg { width: 24px; height: 24px; }
.contact-item h4 { font-size: 14px; color: var(--yx-muted); font-weight: 600; margin-bottom: 4px; }
.contact-item p { margin: 0; font-size: 16px; color: var(--yx-ink); font-weight: 600; }
.contact-item p a { color: inherit; }
.contact-address { white-space: nowrap; }
.contact-item--wechat { align-items: center; }
.contact-item__text { flex: 1; min-width: 0; }
.contact-item__text p a { color: var(--yx-red); }
.wechat-qr {
  width: 72px; height: 72px; flex: none;
  border: 1px solid var(--yx-border);
  border-radius: 10px;
  object-fit: cover;
}

.contact-form {
  background: #fff; border: 1px solid var(--yx-border);
  border-radius: var(--yx-radius); padding: 32px;
  box-shadow: var(--yx-shadow);
}
.contact-form h3 { font-size: 20px; margin-bottom: 6px; }
.contact-form .form-hint { font-size: 13.5px; color: var(--yx-muted); margin-bottom: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-size: 13.5px; font-weight: 600; color: var(--yx-ink); margin-bottom: 7px; }
.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid #dcdce0;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--yx-ink);
  background: #fafafa;
  transition: border-color .2s, background .2s;
}
.form-field input:focus,
.form-field textarea:focus { outline: none; border-color: var(--yx-red); background: #fff; }
.form-field textarea { min-height: 120px; resize: vertical; }
.form-msg { margin-top: 12px; padding: 12px 16px; border-radius: 10px; font-size: 14px; display: none; }
.form-msg.is-success { display: block; background: #e8f8ef; color: #157a46; }
.form-msg.is-error { display: block; background: #fdeee3; color: #c23800; }

/* ==========================================================================
   10. 页面通用头部
   ========================================================================== */
.page-hero {
  background: linear-gradient(120deg, var(--yx-red), var(--yx-red-dark));
  color: #fff;
  padding: 56px 0;
  text-align: center;
}
.page-hero h1 { color: #fff; font-size: clamp(26px, 4vw, 38px); margin-bottom: 8px; }
.page-hero p { color: #ffddc9; margin: 0; font-size: 15px; }

/* 面包屑 */
.breadcrumb { font-size: 13px; color: var(--yx-muted); padding: 16px 0 0; }
.breadcrumb a { color: var(--yx-muted); }
.breadcrumb a:hover { color: var(--yx-red); }
.breadcrumb .sep { margin: 0 8px; color: #c8c8cd; }

/* ==========================================================================
   11. 文章 / 产品网格
   ========================================================================== */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.product-card {
  background: #fff; border: 1px solid var(--yx-border);
  border-radius: var(--yx-radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: all .25s ease;
}
.product-card:hover { border-color: #ffd9bd; }
.product-card__thumb { aspect-ratio: 1 / 1; overflow: hidden; background: #f3f3f5; }
.product-card__thumb img { width: 100%; height: 100%; object-fit: contain; }
.product-card__thumb .product-card__placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, #ff5216, #ff7a3d); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 44px; }
.product-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.product-card__body h3.product-card__title {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.45;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(2 * 1.45em + 2px);
}
.product-card__body h3 a { color: var(--yx-ink); }
.product-card__body h3 a:hover { color: var(--yx-red); }
.product-card__body .excerpt { font-size: 14px; color: var(--yx-muted); flex: 1; margin-bottom: 14px; }
.product-card__foot { display: flex; align-items: center; justify-content: space-between; }
.product-card__link { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 600; color: var(--yx-red); white-space: nowrap; }
.product-card__link .woocommerce-Price-amount { font-size: 18px; font-weight: 700; }
.product-card__link svg { width: 15px; height: 15px; }
.product-card .tag { font-size: 12px; color: var(--yx-orange); font-weight: 600; }

/* 文章卡片 */
.post-card {
  background: #fff; border: 1px solid var(--yx-border);
  border-radius: var(--yx-radius); overflow: hidden;
  transition: all .25s ease;
}
.post-card:hover { transform: translateY(-5px); box-shadow: var(--yx-shadow); }
.post-card__thumb { height: 190px; overflow: hidden; background: #f3f3f5; }
.post-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card__body { padding: 20px; }
.post-card__meta { font-size: 12.5px; color: var(--yx-muted); margin-bottom: 10px; }
.post-card__body h2 { font-size: 18px; }
.post-card__body h2 a { color: var(--yx-ink); }
.post-card__body h2 a:hover { color: var(--yx-red); }
.post-card__body p { font-size: 14px; color: var(--yx-muted); margin: 0; }

/* ==========================================================================
   12. 单品详情
   ========================================================================== */
.single-product__media { border-radius: var(--yx-radius); overflow: hidden; border: 1px solid var(--yx-border); background: #f7f7f8; }
.single-product__media img { width: 100%; }
.single-product__body h1 { font-size: 28px; margin-bottom: 12px; }
.single-product__meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13.5px; color: var(--yx-muted); margin-bottom: 18px; }
.single-product__meta a { color: var(--yx-red); }
.single-product__content { color: #4a4a4a; }
.single-product__sidebar {
  background: #fff; border: 1px solid var(--yx-border);
  border-radius: var(--yx-radius); padding: 26px;
}
.single-product__sidebar h4 { font-size: 16px; margin-bottom: 14px; }
.single-product__sidebar ul { list-style: none; padding: 0; margin: 0 0 18px; }
.single-product__sidebar li { display: flex; gap: 9px; align-items: flex-start; font-size: 14px; color: #4a4a4a; padding: 7px 0; border-bottom: 1px dashed var(--yx-border); }
.single-product__sidebar li:last-child { border-bottom: 0; }
.single-product__sidebar svg { width: 17px; height: 17px; color: var(--yx-red); flex: none; margin-top: 3px; }

/* --- 产品详情页（电商版 · 左图右信息） --- */
.yx-product { display: grid; grid-template-columns: 440px minmax(0, 1fr); gap: 44px; align-items: start; }

/* 图区 */
.yx-product__gallery .gallery-main {
  border-radius: var(--yx-radius); overflow: hidden; border: 1px solid var(--yx-border);
  background: #fff; box-shadow: var(--yx-shadow);
}
.yx-product__gallery .gallery-main img { width: 100%; display: block; }
.gallery-none {
  height: 420px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #ff5216, #ff7a3d); color: #fff; font-size: 88px;
}
.gallery-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 12px; }
.gallery-thumbs button {
  border: 2px solid transparent; border-radius: 12px; overflow: hidden; padding: 0;
  background: #fff; cursor: pointer; transition: border-color .2s, transform .2s;
}
.gallery-thumbs button:hover { transform: translateY(-2px); }
.gallery-thumbs button.is-active { border-color: var(--yx-red); box-shadow: 0 6px 14px rgba(255, 82, 22, .18); }
.gallery-thumbs img { width: 100%; height: 78px; object-fit: cover; display: block; }

/* 信息区 */
.yx-product__info h1 { font-size: 30px; line-height: 1.3; margin: 10px 0 12px; }
.yx-product__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.yx-product__chips .chip {
  font-size: 12.5px; font-weight: 600; color: var(--yx-red); background: #fff0e5;
  border: 1px solid #ffd9bd; border-radius: 999px; padding: 4px 13px; text-decoration: none;
}
.yx-product__chips .chip:hover { background: var(--yx-red); color: #fff; border-color: var(--yx-red); }
.yx-product__price { display: flex; align-items: baseline; gap: 12px; margin: 16px 0 4px; }
.yx-product__price .amount { font-size: 36px; font-weight: 800; color: var(--yx-red); }
.yx-product__price .woocommerce-Price-currencySymbol { font-size: 22px; margin-right: 2px; }
.yx-product__price del { color: var(--yx-muted); font-size: 19px; font-weight: 600; }
.yx-product__price del .amount { font-size: 19px; color: var(--yx-muted); font-weight: 600; }
.yx-product__price ins { text-decoration: none; }
.yx-product__price--custom { font-size: 22px; font-weight: 700; color: var(--yx-orange); }
.yx-product__desc { color: #4a4a4a; font-size: 15px; margin: 14px 0 22px; }
.yx-product__desc p { margin: 0 0 8px; }
.yx-product__buy { margin: 4px 0 6px; }
.yx-buy { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; }
.yx-qty {
  display: flex; align-items: center; gap: 10px; background: #fff;
  border: 1.5px solid var(--yx-border); border-radius: 14px; padding: 8px 16px;
}
.yx-qty:focus-within { border-color: var(--yx-red); }
.yx-qty label { font-size: 13.5px; color: var(--yx-muted); }
.yx-qty input {
  width: 56px; border: 0; outline: 0; text-align: center; font-size: 17px;
  font-weight: 700; color: var(--yx-ink); background: transparent;
}
.yx-product__meta { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 13.5px; color: var(--yx-muted); margin: 20px 0; padding: 14px 0; border-top: 1px dashed var(--yx-border); border-bottom: 1px dashed var(--yx-border); }
.yx-product__meta a { color: var(--yx-red); }
.yx-product__promise {
  background: #fff; border: 1px solid var(--yx-border); border-radius: var(--yx-radius);
  padding: 22px 24px; box-shadow: var(--yx-shadow);
}
.yx-product__promise h4 { font-size: 16px; margin: 0 0 14px; }
.yx-product__promise ul { list-style: none; padding: 0; margin: 0 0 16px; }
.yx-product__promise li { display: flex; gap: 9px; align-items: flex-start; font-size: 14px; color: #4a4a4a; padding: 7px 0; border-bottom: 1px dashed var(--yx-border); }
.yx-product__promise li:last-child { border-bottom: 0; }
.yx-product__promise svg { width: 17px; height: 17px; color: var(--yx-red); flex: none; margin-top: 3px; }
.yx-product__promise-foot { margin-top: 6px; }

/* 产品详情块 */
.yx-block-title { font-size: 26px; margin-bottom: 18px; position: relative; padding-left: 16px; }
.yx-block-title::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 5px; border-radius: 4px; background: linear-gradient(180deg, var(--yx-red), var(--yx-orange)); }
.yx-product-detail { max-width: 860px; margin: 0 auto; }
.yx-product-detail .entry-content { color: #3f3f3f; font-size: 15px; line-height: 1.85; }

/* 可变商品（多规格）默认表单做圆角化 */
.yx-product__buy .variations_form { margin: 0; }
.yx-product__buy .variations { border: 0; }

/* 文章正文 */
.entry-content { color: #3f3f3f; }
.entry-content h2, .entry-content h3 { margin-top: 1.4em; }
.entry-content img { border-radius: 12px; }
.entry-content blockquote { border-left: 4px solid var(--yx-red); background: #fff5ec; padding: 14px 18px; border-radius: 0 10px 10px 0; margin: 1.2em 0; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.2em 0; border-radius: 12px; overflow: hidden; box-shadow: var(--yx-shadow); }
.entry-content th, .entry-content td { border: 1px solid #f3d9c6; padding: 10px 14px; font-size: 14.5px; text-align: center; }
.entry-content th { background: var(--yx-red); color: #fff; font-weight: 600; }
.entry-content tbody tr:nth-child(even) td { background: #fff6ef; }
.entry-content tbody tr:hover td { background: #ffe9d6; }
.entry-content table caption { caption-side: top; font-size: 13.5px; color: var(--yx-muted); padding-bottom: 8px; }

/* 产品卖点（短描述中的 • 列表） */
.yx-product__desc ul { list-style: none; margin: 8px 0 0; padding: 0; }
.yx-product__desc ul li { position: relative; padding-left: 18px; margin: 5px 0; }
.yx-product__desc ul li::before { content: "•"; position: absolute; left: 2px; color: var(--yx-red); font-weight: 700; }

/* 服务承诺行 */
.yx-svc { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 14px 0 18px; font-size: 13.5px; color: #5a5a5a; }
.yx-svc span { display: inline-flex; align-items: center; gap: 5px; background: #fff; border: 1px solid var(--yx-border); border-radius: 999px; padding: 5px 13px; }
.yx-svc svg { width: 15px; height: 15px; color: var(--yx-orange); flex: none; }
@media (max-width: 640px) {
  .yx-svc { gap: 6px 10px; }
  .yx-svc span { font-size: 12.5px; padding: 4px 10px; }
}

/* 价格「最低 … / 起」 */
.yx-product__price .price-from {
  font-size: 13px; font-weight: 700; color: #fff; background: var(--yx-orange);
  border-radius: 6px; padding: 3px 9px; align-self: center;
}
.yx-product__price .price-unit { font-size: 15px; font-weight: 600; color: var(--yx-muted); }
@media (max-width: 640px) {
  .yx-product__price { flex-wrap: wrap; row-gap: 6px; }
}

/* --- 产品上部·电商参考版式 --- */

/* 画廊主图左右箭头 */
.gallery-main { position: relative; }
.gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .9); color: #333; font-size: 22px; line-height: 1;
  cursor: pointer; box-shadow: var(--yx-shadow); display: flex; align-items: center; justify-content: center;
}
.gallery-nav:hover { background: var(--yx-red); color: #fff; }
.gallery-nav--prev { left: 10px; }
.gallery-nav--next { right: 10px; }

/* 价格行 */
.yx-price-row {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding: 16px 18px; margin: 8px 0 14px; border-radius: 12px;
  background: #fff6ef; border: 1px solid #ffe3cd;
}
.yx-price-left { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.yx-price-label { font-size: 14px; color: var(--yx-text); font-weight: 500; }
.yx-price-value .amount { font-size: 34px; font-weight: 800; color: var(--yx-red); }
.yx-price-value .woocommerce-Price-currencySymbol { font-size: 20px; margin-right: 2px; }
.yx-price-value del { color: var(--yx-muted); font-size: 19px; font-weight: 600; }
.yx-price-value del .amount { font-size: 19px; color: var(--yx-muted); font-weight: 600; }
.yx-price-value ins { text-decoration: none; }
.yx-price--custom { font-size: 26px; font-weight: 800; color: var(--yx-red); }
.yx-price-right { display: flex; gap: 16px; font-size: 12.5px; color: var(--yx-muted); flex-wrap: wrap; }

/* 规格区（属性选择） */
.yx-attrs { margin: 14px 0 4px; }
.yx-attr-row { display: flex; gap: 16px; padding: 8px 0; align-items: flex-start; }
.yx-attr-vals { display: flex; flex-wrap: wrap; gap: 8px; }
.yx-attr-val {
  font-size: 13.5px; padding: 5px 14px; border: 1px solid var(--yx-border);
  border-radius: 8px; background: #fff; cursor: pointer; color: #4a4a4a;
}
.yx-attr-val:hover { border-color: var(--yx-red); color: var(--yx-red); }
.yx-attr-val.is-active { border-color: var(--yx-red); background: #fff3ea; color: var(--yx-red); font-weight: 600; }
.yx-attr-val:focus { outline: 2px solid rgba(255, 82, 22, .35); outline-offset: 1px; }
.yx-vari { margin: 6px 0 0; }
.yx-buy .btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.yx-buy--variation { margin-top: 10px; }

/* 采购数量 + 购买按钮 */
.yx-product__buy { margin: 6px 0 4px; }
.yx-buy { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.yx-buy .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px;
}
.btn--buy-now {
  background: linear-gradient(135deg, #ffb43a, #ff8f23); color: #fff; border-radius: 10px;
  box-shadow: 0 8px 18px rgba(255, 143, 35, .35);
}
.btn--buy-now:hover { background: linear-gradient(135deg, #ff9f1a, #ff7a00); color: #fff; transform: translateY(-1px); }
.btn--add-cart { background: var(--yx-red); border-radius: 10px; box-shadow: 0 8px 18px rgba(255, 82, 22, .3); }
.btn--add-cart:hover { background: var(--yx-red-dark); color: #fff; transform: translateY(-1px); }


/* ==========================================================================
   13. 分页 / 404 / 搜索
   ========================================================================== */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 10px;
  border: 1px solid var(--yx-border); border-radius: 10px;
  color: var(--yx-text); font-size: 14px;
}
.pagination .page-numbers.current { background: var(--yx-red); border-color: var(--yx-red); color: #fff; }
.pagination .page-numbers:hover { border-color: var(--yx-red); color: var(--yx-red); }

.error-404 { text-align: center; padding: 80px 0; }
.error-404 .code { font-size: 120px; font-weight: 800; color: var(--yx-red); line-height: 1; }
.error-404 h1 { margin: 10px 0 12px; }
.error-404 p { color: var(--yx-muted); }

.search-form { display: flex; gap: 10px; max-width: 480px; margin: 20px auto; }
.search-form input[type="search"] { flex: 1; border: 1px solid #dcdce0; border-radius: 999px; padding: 12px 18px; font-size: 15px; }
.search-form button { border: 0; }

/* ==========================================================================
   14. 页脚
   ========================================================================== */
.site-footer { background: #161616; color: #b9b9be; font-size: 13px; }
.site-footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding: 60px 0 40px; }
.site-footer h4 { color: #fff; font-size: 16px; margin-bottom: 18px; }
.site-footer a { color: #b9b9be; }
.site-footer a:hover { color: #fff; }
.footer-about .site-brand__name { color: #fff; }
.footer-about p { margin-top: 16px; line-height: 1.8; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-cats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 12px; }
.footer-cats li { margin-bottom: 10px; }
.footer-cats a { font-size: 12.5px; color: #b9b9be; }
.footer-cats a:hover { color: #fff; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.footer-contact svg { width: 17px; height: 17px; color: var(--yx-red); flex: none; margin-top: 4px; }
.footer-contact a, .footer-contact span { color: #e6e6e9; }
.site-footer__bottom { border-top: 1px solid #2b2b2b; padding: 18px 0; font-size: 13px; color: #77777d; text-align: center; }
.site-footer__bottom a { color: #77777d; }

/* 回到顶部 */
.to-top {
  position: fixed; right: 24px; bottom: 24px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--yx-red); color: #fff;
  border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: all .25s ease;
  box-shadow: 0 8px 22px rgba(255, 82, 22, .35);
  z-index: 90;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top svg { width: 20px; height: 20px; }

/* ==========================================================================
   15. 响应式
   ========================================================================== */
@media (max-width: 1024px) {
  .adv-grid { grid-template-columns: repeat(3, 1fr); }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .post-grid, .product-grid { grid-template-columns: repeat(2, 1fr); }
  .site-footer__top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; padding: 52px 0 60px; }
  .hero__visual { min-height: 360px; max-width: 520px; margin: 0 auto; width: 100%; }
  .flow { grid-template-columns: 1fr 1fr; gap: 28px 0; }
  .flow-step:not(:last-child)::after { display: none; }
  .about { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .yx-product { grid-template-columns: 1fr; gap: 28px; }
  .gallery-none { height: 320px; }

  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--yx-border);
    box-shadow: var(--yx-shadow);
    max-height: 0; overflow: hidden;
    transition: max-height .3s ease;
  }
  .main-nav.is-open { max-height: 80vh; overflow-y: auto; }
  .main-nav ul { flex-direction: column; align-items: stretch; padding: 12px 20px 20px; }
  .main-nav a { display: block; padding: 12px 14px; }
  .main-nav .sub-menu { position: static; box-shadow: none; border: 0; padding: 0 0 0 14px; display: block; }
  .header-cta .btn { display: none; }
}

@media (max-width: 640px) {
  .section { padding: 52px 0; }
  .adv-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .why-grid { grid-template-columns: 1fr; }
  .post-grid, .product-grid { grid-template-columns: 1fr; }
  .stats__inner { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .form-row { grid-template-columns: 1fr; }
  .site-footer__top { grid-template-columns: 1fr; gap: 28px; }
  .hero__actions .btn { width: 100%; }
  .topbar__inner { justify-content: center; }
  .hero__card--main .hero__thumb { height: 200px; }
  .hero__badge { width: 76px; height: 76px; right: 2%; }
  .about__media .plate { right: 8px; bottom: -16px; }
  .yx-product__info h1 { font-size: 24px; }
  .yx-product__price .amount { font-size: 30px; }
  .gallery-none { height: 240px; font-size: 60px; }
  .gallery-thumbs { grid-template-columns: repeat(4, 1fr); }
  .gallery-thumbs img { height: 64px; }
  .yx-buy .btn { flex: 1 1 100%; }
  .yx-price-row { flex-wrap: wrap; }
  .yx-price-value .amount { font-size: 28px; }
  .yx-price-right { gap: 12px; }
  .yx-info-key { width: 56px; }
  .yx-buy .yx-qty { flex: 1 1 auto; }
  .yx-block-title { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ==========================================================================
   16. WooCommerce 覆盖（商品与订单由 WooCommerce 管理）
   ========================================================================== */
/* 按钮 */
.woocommerce .button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce button.single_add_to_cart_button {
  background: var(--yx-red);
  color: #fff;
  border: 0;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.4;
  padding: 10px 22px;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.woocommerce .button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover,
.woocommerce button.single_add_to_cart_button:hover {
  background: var(--yx-red-dark);
  color: #fff;
  transform: translateY(-1px);
}
.woocommerce a.added_to_cart { color: var(--yx-red); font-weight: 600; }

/* 价格与促销角标 */
.woocommerce span.price,
.woocommerce p.price,
.woocommerce ul.products li.product .price,
.woocommerce div.product .price { color: var(--yx-red); }
.woocommerce span.onsale {
  background: var(--yx-orange);
  color: #fff;
  border-radius: 8px;
  min-width: 0; min-height: 0;
  line-height: 1.4; padding: 4px 10px;
  top: 10px; left: 10px;
}

/* 商品列表卡片 */
.woocommerce ul.products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin: 0;
}
.woocommerce ul.products li.product {
  float: none;
  width: auto;
  margin: 0;
  background: #fff;
  border: 1px solid var(--yx-border);
  border-radius: var(--yx-radius);
  overflow: hidden;
  padding: 0 0 16px;
  text-align: left;
  transition: all .25s ease;
}
.woocommerce ul.products li.product:hover {
  transform: translateY(-6px);
  box-shadow: var(--yx-shadow);
  border-color: #ffd9bd;
}
.woocommerce ul.products li.product a img {
  margin: 0;
  width: 100%;
  height: 210px;
  object-fit: cover;
  background: #f3f3f5;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  padding: 14px 16px 4px;
  font-size: 16px;
  color: var(--yx-ink);
}
.woocommerce ul.products li.product .price { padding: 0 16px; font-weight: 600; }
.woocommerce ul.products li.product .button { margin: 10px 16px 0; }

/* 单品页 */
.woocommerce div.product .summary .woocommerce-Price-amount { font-weight: 700; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active { background: #fff; }
.woocommerce div.product .related.products > h2,
.woocommerce div.product .upsells.products > h2 { font-size: 24px; }

/* 面包屑与通知 */
.woocommerce .woocommerce-breadcrumb { color: var(--yx-muted); font-size: 13px; }
.woocommerce .woocommerce-message,
.woocommerce .woocommerce-info { border-top-color: var(--yx-red); }

/* 分页 */
.woocommerce nav.woocommerce-pagination ul { border: 0; }
.woocommerce nav.woocommerce-pagination ul li { border: 0; }
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
  border: 1px solid var(--yx-border);
  border-radius: 10px;
  margin-right: 6px;
  padding: 8px 14px;
  color: var(--yx-text);
}
.woocommerce nav.woocommerce-pagination ul li a:hover,
.woocommerce nav.woocommerce-pagination ul li span.current {
  background: var(--yx-red);
  border-color: var(--yx-red);
  color: #fff;
}

/* 购物车 / 结账基础 */
.woocommerce .cart_totals .cart-subtotal,
.woocommerce .cart_totals .order-total { color: var(--yx-red); }
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button { background: var(--yx-red); border-radius: 999px; }
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover { background: var(--yx-red-dark); }

@media (max-width: 900px) {
  .woocommerce ul.products { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .woocommerce ul.products { grid-template-columns: 1fr; }
}

/* ============ 电商增强（参照 WPCOM Sage 商城） ============ */

/* 商品页：选项卡（详情 / 评价） */
.yx-tabs { margin-top: 8px; }
.yx-tabs-nav {
  display: flex; gap: 4px; border-bottom: 2px solid var(--yx-border);
  margin-bottom: 22px; flex-wrap: wrap;
}
.yx-tab-btn {
  appearance: none; background: none; border: 0; cursor: pointer;
  padding: 12px 20px; font-size: 16px; font-weight: 600; color: var(--yx-muted);
  border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.yx-tab-btn:hover { color: var(--yx-red); }
.yx-tab-btn.is-active { color: var(--yx-red); border-bottom-color: var(--yx-red); }
.yx-tab-panel { display: none; }
.yx-tab-panel.is-active { display: block; }
.yx-tab-count { font-weight: 400; color: var(--yx-muted); }

/* 商品页：用户评价区（WooCommerce 评论模板） */
#reviews #comments { margin: 0 0 24px; }
#reviews .commentlist { list-style: none; margin: 0; padding: 0; }
#reviews .commentlist li { padding: 18px 0; border-bottom: 1px dashed var(--yx-border); }
#reviews .commentlist .meta,
#reviews .commentlist .woocommerce-review__published-date { color: var(--yx-muted); font-size: 13px; }
#reviews .commentlist .description { margin: 6px 0 0; color: var(--yx-text); }
#reviews .star-rating { color: #ffb400; }
#review_form { margin-top: 24px; padding: 20px; border: 1px solid var(--yx-border); border-radius: 12px; background: #fafafa; }
#review_form .comment-reply-title { font-size: 18px; font-weight: 700; margin-bottom: 14px; display: block; }
#review_form .comment-form label { display: block; font-size: 14px; margin: 12px 0 6px; }
#review_form .comment-form input[type=text],
#review_form .comment-form input[type=email],
#review_form .comment-form textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--yx-border); border-radius: 8px; font-size: 14px;
}
#review_form .comment-form input:focus,
#review_form .comment-form textarea:focus { border-color: var(--yx-red); outline: none; }
#review_form .comment-form .stars { margin: 4px 0 0; }
#review_form .submit { background: var(--yx-red); color: #fff; border: 0; border-radius: 8px; padding: 10px 24px; font-size: 15px; cursor: pointer; margin-top: 14px; }
#review_form .submit:hover { background: var(--yx-red-dark); }

/* 列表页：工具条（分类 + 排序） */
.yx-shop-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin: -6px 0 22px;
}
.yx-shop-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.yx-cat-chip {
  display: inline-block; padding: 7px 16px; border: 1px solid var(--yx-border);
  border-radius: 999px; font-size: 13.5px; color: var(--yx-text); background: #fff;
}
.yx-cat-chip:hover { border-color: var(--yx-red); color: var(--yx-red); }
.yx-cat-chip.is-active { background: var(--yx-red); border-color: var(--yx-red); color: #fff; font-weight: 600; }
.yx-shop-sort select {
  padding: 8px 14px; border: 1px solid var(--yx-border); border-radius: 999px;
  font-size: 13.5px; color: var(--yx-text); background: #fff; cursor: pointer;
}
.yx-shop-sort select:focus { border-color: var(--yx-red); outline: none; }

/* 购物车 / 结算页主题化（橙主题统一） */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce button.button.alt,
.woocommerce a.button.alt,
.woocommerce input.button.alt {
  background: var(--yx-red); color: #fff; border-radius: 8px; font-weight: 600;
  box-shadow: none;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce button.button.alt:hover { background: var(--yx-red-dark); color: #fff; }
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
  padding: 10px 12px; border: 1px solid var(--yx-border); border-radius: 8px; font-size: 14px;
}
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus { border-color: var(--yx-red); outline: none; }
.woocommerce table.shop_table { border: 1px solid var(--yx-border); border-radius: 10px; overflow: hidden; }
.woocommerce table.shop_table th { background: #fff7f2; color: var(--yx-text); }
.woocommerce-cart table.cart td,
.woocommerce-cart table.cart th { padding: 14px 12px; }
.woocommerce-cart .cart_totals { border: 1px solid var(--yx-border); border-radius: 10px; padding: 20px; background: #fff; }
.woocommerce-cart .cart_totals h2 { font-size: 18px; margin-bottom: 12px; }
.woocommerce form.checkout_coupon { border: 1px dashed var(--yx-border); border-radius: 10px; }
.woocommerce #payment { background: #fafafa; border-radius: 10px; }
.woocommerce #payment ul.payment_methods { border-bottom: 1px solid var(--yx-border); }
.woocommerce-checkout #order_review_heading { font-size: 20px; }

@media (max-width: 640px) {
  .yx-shop-bar { flex-direction: column; align-items: flex-start; }
  .yx-tab-btn { padding: 10px 14px; font-size: 15px; }
}

/* ===== 会员中心 - 配送地址（参考 WPCOM 卡片样式） ===== */
.yx-address-wrap { max-width: 760px; }
.yx-address-list { display: flex; flex-direction: column; gap: 16px; }
.yx-address-card {
  position: relative;
  padding: 22px 26px;
  border: 2px dashed #d4d4d8;
  border-radius: 10px;
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.yx-address-card:hover { border-color: var(--yx-red); box-shadow: 0 6px 18px rgba(255, 82, 22, .08); }
.yx-address-card.is-default { border-color: #c9c9cf; }
.yx-address-badge {
  position: absolute;
  top: -1px; right: -1px;
  padding: 5px 14px;
  background: #5b5b63;
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
  border-radius: 0 8px 0 10px;
  letter-spacing: .04em;
}
.yx-address-name { font-size: 16px; font-weight: 600; color: var(--yx-text); margin-bottom: 8px; }
.yx-address-name .yx-address-phone { color: var(--yx-muted); font-weight: 400; margin-left: 12px; }
.yx-address-detail { font-size: 14px; color: var(--yx-muted); line-height: 1.7; }
.yx-address-actions { margin-top: 14px; }
.yx-addr-edit { color: var(--yx-red); font-size: 13px; cursor: pointer; }
.yx-addr-edit:hover { color: var(--yx-red-dark); text-decoration: underline; }
.yx-address-add {
  padding: 30px;
  border: 1px solid var(--yx-border);
  border-radius: 10px;
  text-align: center;
  color: var(--yx-muted);
  font-size: 15px;
  cursor: pointer;
  background: #fff;
  transition: all .2s ease;
  user-select: none;
}
.yx-address-add:hover { border-color: var(--yx-red); color: var(--yx-red); background: #fff7f2; }
.yx-address-form-title { font-size: 18px; font-weight: 700; color: var(--yx-text); margin: 0 0 18px; }
.yx-address-form .woocommerce-address-fields { margin-bottom: 18px; }
.yx-addr-cancel { display: inline-block; margin-top: 8px; color: var(--yx-muted); font-size: 14px; cursor: pointer; }
.yx-addr-cancel:hover { color: var(--yx-red); }
@media (max-width: 640px) {
  .yx-address-card { padding: 18px 18px; }
  .yx-address-name .yx-address-phone { display: block; margin: 4px 0 0; }
}

/* ===== 会员中心 - 配送地址弹窗表单（参考 WPCOM 样式） ===== */
.yx-modal-overlay {
  position: fixed; inset: 0; z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .45);
  padding: 20px;
}
.yx-modal {
  width: 100%; max-width: 580px;
  background: #fff; border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .22);
  max-height: 92vh; display: flex; flex-direction: column;
  animation: yxModalIn .22s ease;
}
@keyframes yxModalIn { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.yx-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; border-bottom: 1px solid var(--yx-border);
}
.yx-modal-title { font-size: 18px; font-weight: 700; color: var(--yx-text); margin: 0; }
.yx-modal-close { font-size: 28px; line-height: 1; color: var(--yx-muted); cursor: pointer; padding: 0 4px; }
.yx-modal-close:hover { color: var(--yx-red); }
.yx-modal-body { padding: 24px 24px 20px; overflow-y: auto; }
.yx-modal-body form { margin-bottom: 26px; }
.yx-modal-body form:last-of-type { margin-bottom: 0; }
.yx-modal-body .woocommerce-address-fields__field-wrapper {
  display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; row-gap: 4px;
}
/* 每个字段恢复单列块级（压过全局 .form-row{display:grid} 与 WC 的 width:47%/float），
   label 在上、输入框在下；作为 grid item 占满所在列。 */
.yx-modal-body .form-row,
.yx-modal-body .form-row-first,
.yx-modal-body .form-row-last {
  display: block !important; float: none !important;
  width: 100% !important; margin: 0 0 14px; padding: 0;
}
.yx-modal-body .form-row-wide { grid-column: 1 / -1; }
.yx-modal-body .woocommerce-input-wrapper { display: block; width: 100%; }
.yx-modal-body input[type="text"], .yx-modal-body input[type="tel"],
.yx-modal-body input[type="email"], .yx-modal-body select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--yx-border);
  border-radius: 8px; background: #f7f7fa; font-size: 14px; color: var(--yx-text);
  outline: none; box-sizing: border-box; transition: border-color .2s ease, background .2s ease;
  -webkit-appearance: none; appearance: none;
}
.yx-modal-body select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238c8c8c' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px;
}
.yx-modal-body input:focus, .yx-modal-body select:focus { border-color: var(--yx-red); background-color: #fff; }
.yx-modal-body label { font-size: 14px; color: #6b6b76; margin-bottom: 6px; display: block; }
.yx-modal-body label .required { color: var(--yx-red); border: none; }
.yx-modal-footer {
  display: flex; justify-content: flex-end; align-items: center; gap: 12px;
  margin: 0; padding-top: 16px;
}
.yx-modal-footer.yx-modal-footer { } /* WC 的 <p> 容器兼容 */
.yx-btn {
  display: inline-block; padding: 10px 28px; border-radius: 8px;
  font-size: 14px; line-height: 1.4; cursor: pointer; text-align: center;
  border: none; text-decoration: none;
}
.yx-btn--primary { background: var(--yx-red); color: #fff; }
.yx-btn--primary:hover, .yx-btn--primary:focus { background: var(--yx-red-dark); color: #fff; }
.yx-btn--ghost { background: #fff; color: #6b6b76; border: 1px solid var(--yx-border); }
.yx-btn--ghost:hover { color: var(--yx-red); border-color: var(--yx-red); }
body.yx-modal-open { overflow: hidden; }
@media (max-width: 640px) {
  .yx-modal-overlay { padding: 10px; }
  .yx-modal-body { padding: 16px 14px; }
  .yx-modal-body .woocommerce-address-fields__field-wrapper { grid-template-columns: 1fr; }
}

/* ===== 结算页：配送地址卡片选择 ===== */
.yx-checkout-addresses { margin-bottom: 8px; }
.yx-checkout-addresses-title { font-size: 18px; font-weight: 700; color: var(--yx-text); margin: 0 0 14px; }
.yx-checkout-addresses .yx-address-list { display: grid; grid-template-columns: 1fr; gap: 16px; }
.yx-checkout-addresses .yx-address-add { grid-column: 1 / -1; }
.yx-checkout-addresses .yx-address-card { cursor: pointer; }
.yx-checkout-addresses .yx-address-card.is-selected {
  border-color: var(--yx-red);
  background: #fffaf7;
  box-shadow: inset 0 0 0 1px var(--yx-red);
}
.yx-address-check {
  position: absolute; bottom: 14px; right: 14px;
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid #d4d4d8; background: #fff;
  transition: all .2s ease;
}
.yx-address-card.is-selected .yx-address-check { border-color: var(--yx-red); background: var(--yx-red); }
.yx-address-card.is-selected .yx-address-check::after {
  content: ""; position: absolute; left: 6px; top: 2px;
  width: 6px; height: 11px;
  border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
/* 会员中心地址操作链接 */
.yx-addr-set-default, .yx-addr-delete { color: var(--yx-muted); font-size: 13px; cursor: pointer; margin-left: 14px; }
.yx-addr-set-default:hover { color: var(--yx-red); text-decoration: underline; }
.yx-addr-delete:hover { color: #e02424; text-decoration: underline; }
/* 结账两列布局 */
.yx-checkout-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 36px; align-items: start; margin-top: 28px; }
.yx-checkout-notes-title { font-size: 18px; font-weight: 700; color: var(--yx-text); margin: 30px 0 14px; }
/* 左栏表单行：覆盖主题全局 .form-row 的两列 grid，保证备注等占满整行 */
.yx-checkout-col-left .form-row,
.yx-checkout-col-left .woocommerce-form-row { display: block !important; float: none !important; width: 100% !important; }
.yx-checkout-col-left .form-row textarea,
.yx-checkout-col-left .woocommerce-form-row textarea {
  width: 100%; min-height: 92px; padding: 12px;
  border: 1px solid var(--yx-border); border-radius: 8px;
  font-size: 14px; color: var(--yx-text); outline: none; resize: vertical; box-sizing: border-box;
}
.yx-checkout-col-left .form-row textarea:focus,
.yx-checkout-col-left .woocommerce-form-row textarea:focus { border-color: var(--yx-red); }
.yx-checkout-col-left .form-row label,
.yx-checkout-col-left .woocommerce-form-row label { font-size: 14px; color: var(--yx-muted); margin-bottom: 6px; display: block; }
/* 右侧订单摘要卡片 */
.yx-checkout-col-right #order_review_heading { font-size: 18px; font-weight: 700; color: var(--yx-text); margin: 0 0 14px; }
.yx-checkout-col-right #order_review {
  background: #fff; border: 1px solid var(--yx-border); border-radius: 12px; padding: 24px;
  width: 100%; box-sizing: border-box;
}
.yx-checkout-col-right #order_review table.shop_table { border: 0; table-layout: fixed; width: 100%; }
.yx-checkout-col-right #order_review table.shop_table th, 
.yx-checkout-col-right #order_review table.shop_table td {
  padding: 12px 0; border: 0; border-bottom: 1px dashed var(--yx-border);
  font-size: 14px; color: var(--yx-text); width: 50%; vertical-align: top; word-break: break-word;
}
.yx-checkout-col-right #order_review table.shop_table tfoot th { font-weight: 600; }
.yx-checkout-col-right #order_review table.shop_table .order-total th,
.yx-checkout-col-right #order_review table.shop_table .order-total td {
  font-size: 17px; font-weight: 700; color: var(--yx-red); border-bottom: 0;
}
.yx-checkout-col-right #payment { background: transparent; border-radius: 0; width: 100%; box-sizing: border-box; margin-top: 20px; }
.yx-checkout-col-right #payment ul.payment_methods { border: 0; padding: 4px 0 0; }
.yx-checkout-col-right #payment .wc_payment_method {
  border: 1px solid var(--yx-border); border-radius: 8px;
  margin-bottom: 10px; padding: 12px 14px; background: #fafafb;
}
.yx-checkout-col-right #payment .wc_payment_method:hover { border-color: var(--yx-red); }
.yx-checkout-col-right #payment .place-order { display: block !important; width: 100%; padding: 18px 0 0; box-sizing: border-box; }
.yx-checkout-col-right #payment .woocommerce-terms-and-conditions-wrapper,
.yx-checkout-col-right #payment .woocommerce-privacy-policy-text { width: 100%; }
.yx-checkout-col-right #payment .woocommerce-privacy-policy-text { font-size: 13px; color: var(--yx-muted); line-height: 1.7; }
.yx-checkout-col-right #payment .woocommerce-privacy-policy-text p { margin: 0 0 14px; text-align: left; }
.yx-checkout-col-right #payment .place-order .button {
  display: block; width: 100% !important; max-width: none; margin: 0;
  padding: 14px 20px; border-radius: 8px; box-sizing: border-box;
  background: var(--yx-red); color: #fff; font-size: 16px; font-weight: 600; text-align: center;
}
.yx-checkout-col-right #payment .place-order .button:hover { background: var(--yx-red-dark); }
/* 结账页卡片 hover 显示编辑按钮 */
.yx-address-card { position: relative; }
.yx-address-hover-edit {
  position: absolute; top: 10px; right: 40px; z-index: 2;
  opacity: 0; visibility: hidden; transition: opacity .18s, visibility .18s;
  font-size: 13px; color: var(--yx-red); background: #fff;
  border: 1px solid #f5c2bd; border-radius: 5px; padding: 2px 10px; cursor: pointer;
}
.yx-address-card:hover .yx-address-hover-edit { opacity: 1; visibility: visible; }
.yx-address-hover-edit:hover { background: var(--yx-red); color: #fff; }
/* 配送方式对齐 */
.yx-checkout-col-right #order_review table.shop_table .woocommerce-shipping-methods { margin: 0; padding: 0; list-style: none; }
.yx-checkout-col-right #order_review table.shop_table .woocommerce-shipping-methods li {
  display: flex; align-items: center; gap: 6px; margin: 4px 0;
}
.yx-checkout-col-right #order_review table.shop_table .woocommerce-shipping-methods li label { margin: 0; cursor: pointer; }
/* 支付方式对齐 */
.yx-checkout-col-right #payment .wc_payment_method label {
  display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; margin: 0;
}
.yx-checkout-col-right #payment .wc_payment_method label img { max-height: 24px; width: auto; }
.yx-checkout-col-right #payment .wc_payment_method .payment_box {
  background: transparent; padding: 10px 0 0; font-size: 13px; color: var(--yx-muted); line-height: 1.6;
}
.yx-checkout-col-right #payment .wc_payment_method .payment_box p { margin: 0; }
@media (max-width: 900px) {
  .yx-checkout-grid { grid-template-columns: 1fr; gap: 24px; }
  .yx-checkout-addresses .yx-address-list { grid-template-columns: 1fr; }
}

/* ===== 地址弹窗 - 自定义表单（地址簿模式） ===== */
.yx-address-form { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
.yx-address-form .yx-form-row { margin: 0 0 16px; }
.yx-address-form .yx-form-row:last-of-type { margin-bottom: 0; }
.yx-form-row label { font-size: 14px; color: #6b6b76; margin-bottom: 6px; display: block; }
.yx-form-row .req { color: var(--yx-red); }
.yx-form-row input[type="text"], .yx-form-row input[type="tel"], .yx-form-row select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--yx-border);
  border-radius: 8px; background: #f7f7fa; font-size: 14px; color: var(--yx-text);
  outline: none; box-sizing: border-box;
  -webkit-appearance: none; appearance: none;
}
.yx-form-row input:focus, .yx-form-row select:focus { border-color: var(--yx-red); background: #fff; }
.yx-form-row select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238c8c8c' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px;
}
@media (max-width: 640px) { .yx-address-form { grid-template-columns: 1fr; } }
