/* ============================================================
   YY Mall v2.0 — 全部好物 & 购物车 页面样式
   严格遵循主题设计系统（CSS Variables from style.css）
   v2.2 修复：WooCommerce冲突重置 + 选择器优先级提升
   ============================================================ */

/* ============================================================
   一、页面容器通用
   ============================================================ */
.yy-page-container {
  width: calc(100% - 48px);
  max-width: 1272px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
}

/* ============================================================
   二、「全部好物」页面样式
   ============================================================ */

/* ---- 2.1 页面标题区 ---- */
.yy-shop-header {
  text-align: center;
  padding: var(--space-2xl) 0 var(--space-xl);
}
.yy-shop-header-inner {
  max-width: 600px;
  margin: 0 auto;
}
.yy-shop-title {
  font-family: var(--font-sans);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.01em;
}
.yy-shop-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  font-weight: 400;
}
.yy-shop-divider {
  margin-top: var(--space-md);
}

/* ---- 2.2 分类筛选标签 ---- */
.yy-shop-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: var(--space-md) var(--space-lg) 0;
  max-width: 900px;
  margin: 0 auto var(--space-md);
}
.yy-cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 20px;
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(8px);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
  text-decoration: none;
}
.yy-cat-chip:hover {
  color: var(--sage-dark);
  border-color: var(--sage-light);
  background: var(--bg-soft-green);
  transform: translateY(-1px);
}
.yy-cat-chip.active {
  color: #fff;
  background: var(--sage);
  border-color: var(--sage);
  box-shadow: var(--shadow-sm);
}
.yy-cat-icon { font-size: 15px; }

/* 分类详情子标题 */
.yy-shop-header-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  max-width: 1272px;
  margin: 0 auto var(--space-sm);
  flex-wrap: wrap;
  gap: 8px;
}
.yy-breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
}
.yy-cat-info-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}
.yy-cat-emoji { font-size: 18px; }
.yy-cat-count-badge {
  background: var(--coral-light);
  color: var(--coral-dark);
  font-size: 12px;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-weight: 600;
}

/* ---- 2.3 工具栏（统计 + 排序）---- */
.yy-shop-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
  gap: 12px;
}
.yy-shop-count {
  font-size: 14px;
  color: var(--text-secondary);
}
.yy-shop-count strong {
  color: var(--coral);
  font-weight: 600;
}
.yy-shop-count-icon {
  color: var(--honey);
  font-size: 13px;
  margin-right: 4px;
}
.yy-shop-sort {
  display: flex;
  align-items: center;
  gap: 6px;
}
.yy-shop-sort-label {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}
/* 覆盖 WooCommerce 默认排序下拉框 */
.yy-shop-sort .orderby {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color, #ece5dd) !important;
  border-radius: var(--radius-pill, 50px) !important;
  padding: 8px 36px 8px 16px !important;
  font-family: var(--font-sans) !important;
  font-size: 13px !important;
  color: var(--text-secondary) !important;
  cursor: pointer !important;
  transition: all var(--transition) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 4.5L11 1' stroke='%23a89e94' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  min-width: 160px !important;
  height: 38px !important;
}
.yy-shop-sort .orderby:hover {
  border-color: var(--sage-light) !important;
}
.yy-shop-sort .orderby:focus {
  outline: none !important;
  border-color: var(--sage) !important;
  box-shadow: 0 0 0 3px rgba(122,158,126,0.15) !important;
}
.yy-shop-sort .orderby::-ms-expand { display: none; }

/* ---- 2.4 商品网格 ---- */
.yy-products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg, 24px);
  margin-bottom: var(--space-2xl, 60px);
}

/* 商品卡片 */
.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-md, 14px);
  border: 1px solid var(--border-light, #ece5dd);
  overflow: hidden;
  transition: all var(--transition);
  opacity: 0;
  transform: translateY(20px);
}
.product-card.card-visible {
  opacity: 1;
  transform: translateY(0);
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--sage-light);
}

.product-image-wrap {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--bg-soft);
}
.product-link-img {
  display: block;
  height: 100%;
  overflow: hidden;
}
.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}
.product-card:hover .product-image {
  transform: scale(1.06);
}

/* Hover 浮层 */
.product-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(61, 53, 48, 0.35) 0%,
    rgba(61, 53, 48, 0.08) 40%,
    transparent 70%
  );
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 24px;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.product-card:hover .product-overlay {
  opacity: 1;
}
.overlay-text {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  background: rgba(255,255,255,0.22);
  backdrop-filter: blur(6px);
  padding: 7px 18px;
  border-radius: var(--radius-pill);
}

/* 标签 */
.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
}
.featured-badge {
  background: linear-gradient(135deg, #e8a87c, #d4895f);
  color: #fff;
  box-shadow: 0 2px 8px rgba(232,168,124,0.30);
}
.sold-out-badge {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(250,247,242,0.75);
  backdrop-filter: blur(4px);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* 加入购物车按钮（卡片内） */
.yy-cart-form {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.product-card:hover .yy-cart-form {
  opacity: 1;
}
.yy-add-to-cart {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: var(--coral-dark, #d4895f);
  border: none;
  border-radius: var(--radius-pill);
  padding: 9px 20px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm, 0 4px 16px rgba(122,110,100,0.06));
  transition: all var(--transition);
}
.yy-add-to-cart:hover {
  background: var(--coral);
  color: #fff;
  transform: scale(1.03);
  box-shadow: var(--shadow-md);
}
.btn-icon {
  font-size: 16px;
  line-height: 1;
}

/* 卡片信息区域 */
.product-body {
  padding: 16px 18px 20px;
}
.product-title-link {
  text-decoration: none;
  color: inherit;
  display: block;
}
.product-title {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition);
}
.product-title-link:hover .product-title {
  color: var(--coral-dark);
}
.product-excerpt {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.product-price-row {
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.price-symbol {
  font-size: 14px;
  color: var(--coral);
  font-weight: 500;
}
.price-value {
  font-size: 19px;
  color: var(--coral);
  font-weight: 700;
  line-height: 1;
}
.btn-add-mini {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-soft-green);
  border-radius: 50%;
  font-size: 15px;
  transition: all var(--transition);
  text-decoration: none;
}
.btn-add-mini:hover {
  background: var(--sage);
  transform: scale(1.1);
}

/* ---- 2.5 分页导航 ---- */
.yy-shop-pagination {
  display: flex;
  justify-content: center;
  padding: var(--space-xl) 0 var(--space-2xl);
}
.yy-shop-pagination .page-numbers {
  list-style: none !important;
  display: flex;
  gap: 6px;
  align-items: center;
}
.yy-shop-pagination .page-numbers li,
.yy-shop-pagination .page-numbers > * {
  display: inline-block !important;
}
.yy-shop-pagination .page-numbers > a,
.yy-shop-pagination .page-numbers > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1.5px solid var(--border-light, #ece5dd);
  border-radius: var(--radius-sm, 10px);
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition);
}
.yy-shop-pagination .page-numbers > a:hover {
  border-color: var(--sage-light);
  background: var(--bg-soft-green);
  color: var(--sage-dark);
}
.yy-shop-pagination .page-numbers > span.current,
.yy-shop-pagination .page-numbers > .current {
  background: var(--sage);
  color: #fff;
  border-color: var(--sage);
  font-weight: 600;
}
.yy-shop-pagination .page-numbers > .prev,
.yy-shop-pagination .page-numbers > .next {
  border-radius: var(--radius-sm, 10px);
  font-size: 13px;
}

/* ---- 2.6 空状态 ---- */
.yy-empty-state {
  text-align: center;
  padding: var(--space-3xl) var(--space-lg) 80px;
}
.yy-empty-icon {
  font-size: 56px;
  margin-bottom: var(--space-md);
  filter: grayscale(0.25) opacity(0.55);
}
.yy-empty-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}
.yy-empty-desc {
  font-size: 14.5px;
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
}
.yy-empty-btn {
  display: inline-block;
  padding: 11px 28px;
}

/* 按钮基础样式复用 */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--sage);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  padding: 12px 28px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}
.btn-primary:hover {
  background: var(--sage-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-ghost {
  display: inline-block;
  border: 1.5px solid var(--border-color, #ece5dd);
  border-radius: var(--radius-pill);
  padding: 10px 26px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  transition: all var(--transition);
  text-decoration: none;
  cursor: pointer;
}
.btn-ghost:hover {
  border-color: var(--sage-light);
  color: var(--sage-dark);
  background: var(--bg-soft-green);
}

/* ---- 2.7 回到顶部 ---- */
.yy-back-top-btn {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 98;
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.80);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-light, #ece5dd);
  border-radius: 50%;
  color: var(--sage);
  font-size: 18px;
  cursor: pointer;
  box-shadow: var(--shadow-sm, 0 4px 16px rgba(122,110,100,0.06));
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  display: none;
}
.yy-back-top-btn.visible {
  display: flex;
}
.yy-back-top-btn:hover {
  background: var(--sage);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}


/* ============================================================
   三、「购物车」页面样式
   ============================================================ */

/*
 * ⚠️ WooCommerce 冲突重置
 * WC默认的 woocommerce.css 会干扰自定义Grid布局，必须重置：
 * - .woocommerce table.shop_table → 改为非table显示
 * - .woocommerce .col2-set → 取消float布局  
 * - .woocommerce-cart form → 重置为无特殊样式
 * - .cart-collaterals → 取消float/width限制
 */
.woocommerce-cart .yy-page-container table.shop_table,
.woocommerce-cart .yy-page-container .shop_table,
.woocommerce-cart .yy-page-container form.woocommerce-cart-form,
.woocommerce-cart .yy-page-container .cart-collaterals,
.woocommerce-cart .yy-page-container .col2-set {
  display: contents !important;
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* 确保我们的布局容器不受WC影响 */
.woocommerce-cart .yy-page-container .yy-cart-layout,
.woocommerce .yy-page-container .yy-cart-layout {
  display: grid !important;
  grid-template-columns: 1fr 360px !important;
  gap: var(--space-xl, 32px) !important;
  align-items: start !important;
}

/* ---- 3.1 页面标题区 ---- */
.yy-cart-header {
  text-align: center;
  padding: var(--space-2xl) 0 var(--space-xl);
}
.yy-cart-header-inner {
  max-width: 520px;
  margin: 0 auto;
}
.yy-cart-title {
  font-family: var(--font-sans);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}
.yy-cart-subtitle {
  font-size: 15px;
  color: var(--text-muted);
}

/* ---- 3.2 进度指示条 ---- */
.yy-checkout-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: var(--space-2xl);
  padding: 20px 0;
}
.yy-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
}
.yy-step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  background: var(--bg-soft);
  color: var(--text-muted);
  border: 2px solid var(--border-light, #ece5dd);
  transition: all var(--transition);
}
.yy-step-label {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
  transition: color var(--transition);
}
.yy-step.active .yy-step-number {
  background: var(--sage);
  color: #fff;
  border-color: var(--sage);
  box-shadow: 0 2px 10px rgba(122,158,126,0.25);
}
.yy-step.active .yy-step-label {
  color: var(--sage-dark);
  font-weight: 600;
}
.yy-step-connector {
  width: 60px;
  height: 2px;
  background: var(--border-light, #ece5dd);
  margin: 0 12px;
  margin-bottom: 24px;
  border-radius: 1px;
  position: relative;
  top: -10px;
}

/* ---- 3.3 主布局：商品列表 + 汇总侧边栏 ---- */
.yy-cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: var(--space-xl, 32px);
  align-items: start;
}

/* 左侧商品列表区 */
.yy-cart-items-section {
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-lg, 18px);
  border: 1px solid var(--border-light, #ece5dd);
  padding: var(--space-lg, 24px);
  box-shadow: var(--shadow-xs);
}

/* 单个购物车项 */
.yy-cart-item {
  display: grid;
  grid-template-columns: 90px 1fr auto auto auto auto 44px;
  gap: 16px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-soft, #f0ebe3);
  transition: all 0.35s ease;
}
.yy-cart-item:last-child {
  border-bottom: none;
}
.yy-cart-item.item-removing {
  opacity: 0;
  transform: translateX(40px);
  height: 0;
  padding: 0;
  overflow: hidden;
  margin: 0;
}

/* 商品图片 */
.yy-item-image {
  width: 90px;
  height: 110px;
  border-radius: var(--radius-sm, 10px);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-soft);
  border: 1px solid var(--border-light, #ece5dd);
}
.yy-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.yy-item-image:hover img {
  transform: scale(1.05);
}

/* 商品信息 */
.yy-item-info {
  min-width: 0;
}
.yy-item-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.4;
}
.yy-item-name a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}
.yy-item-name a:hover {
  color: var(--coral);
}
.yy-item-meta {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 单价 */
.yy-item-unit-price {
  text-align: right;
  min-width: 64px;
  font-size: 14px;
  color: var(--text-secondary);
}
.unit-symbol { font-size: 12px; }
.unit-value { font-weight: 600; }

/* 数量控制 */
.yy-item-qty-wrap {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--border-light, #ece5dd);
  border-radius: var(--radius-sm, 10px);
  overflow: hidden;
}
.yy-qty-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  font-size: 17px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}
.yy-qty-btn:hover {
  background: var(--bg-soft-green);
  color: var(--sage-dark);
}
.yy-qty-input {
  width: 46px;
  height: 34px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--border-light, #ece5dd);
  border-right: 1px solid var(--border-light, #ece5dd);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  background: transparent;
  -moz-appearance: textfield;
}
.yy-qty-input::-webkit-inner-spin-button,
.yy-qty-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* 小计 */
.yy-item-subtotal {
  text-align: right;
  min-width: 76px;
}
.subtotal-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.subtotal-symbol { font-size: 12px; color: var(--text-muted); }
.subtotal-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--coral-dark, #d4895f);
}

/* 删除按钮 */
.yy-item-remove {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1.5px solid var(--border-light, #ece5dd);
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}
.yy-item-remove:hover {
  background: #fef2f0;
  border-color: var(--coral-light, #f0c4a4);
  color: var(--coral-dark, #d4895f);
  transform: rotate(90deg);
}

/* 底部操作栏 */
.yy-cart-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-md);
  margin-top: var(--space-md);
  border-top: 1px solid var(--border-soft, #f0ebe3);
}
.btn-continue-shopping {
  padding: 10px 24px;
  font-size: 14px;
}
.btn-update-cart {
  padding: 10px 24px;
  font-size: 14px;
}

/* 右侧订单汇总 */
.yy-cart-sidebar {
  position: sticky;
  top: 84px;
}
.yy-order-summary {
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg, 18px);
  border: 1px solid var(--border-light, #ece5dd);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm, 0 4px 16px rgba(122,110,100,0.06));
}
.summary-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-soft, #f0ebe3);
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-size: 14px;
  color: var(--text-secondary);
}
.summary-row strong { color: var(--text-primary); }

/* 优惠券区域 */
.yy-coupon-area {
  margin: 16px 0;
}
.coupon-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--bg-soft);
  border-radius: var(--radius-sm, 10px);
  font-size: 13.5px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}
.coupon-toggle:hover {
  background: var(--bg-soft-pink, rgba(253,246,242,0.75));
  color: var(--coral-dark, #d4895f);
}
.toggle-icon { font-size: 16px; }
.toggle-arrow {
  margin-left: auto;
  font-size: 12px;
  transition: transform var(--transition);
}
.coupon-form {
  margin-top: 12px;
  animation: slideDown 0.25s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.coupon-form-inner {
  display: flex;
  gap: 8px;
}
.coupon-form-inner input {
  flex: 1;
  height: 38px;
  border: 1.5px solid var(--border-light, #ece5dd);
  border-radius: var(--radius-sm, 10px);
  padding: 0 14px;
  font-size: 14px;
  color: var(--text-primary);
  background: rgba(255,255,255,0.85);
  transition: all var(--transition);
}
.coupon-form-inner input:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(122,158,126,0.12);
}
.btn-coupon-apply {
  height: 38px;
  padding: 0 18px;
  background: var(--honey, #d4a574);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm, 10px);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-coupon-apply:hover {
  background: var(--apricot, #f2c8a0);
  color: var(--text-primary);
}

.applied-coupons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.coupon-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--bg-soft-green);
  color: var(--sage-dark);
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 500;
}
.remove-coupon-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 0 2px;
  transition: color var(--transition);
}
.remove-coupon-btn:hover {
  color: var(--coral-dark, #d4895f);
}

.discount-row { color: var(--sage); }

.summary-divider {
  height: 1px;
  background: var(--border-soft, #f0ebe3);
  margin: 14px 0;
}
.summary-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}
.total-amount {
  font-size: 23px;
  font-weight: 800;
  color: var(--coral-dark, #d4895f);
  letter-spacing: -0.01em;
}

.btn-checkout {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 15px 28px;
  background: linear-gradient(135deg, var(--sage), var(--sage-dark, #5d8462));
  color: #fff;
  border-radius: var(--radius-md, 14px);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  margin-top: 20px;
  transition: all var(--transition);
  box-shadow: 0 4px 16px rgba(122,158,126,0.25);
}
.btn-checkout:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(122,158,126,0.35);
  background: linear-gradient(135deg, var(--sage-dark, #5d8462), #4a6b4f);
}

/* 安全承诺 */
.yy-security-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--border-soft, #f0ebe3);
}
.trust-item {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ---- 3.5 空购物车状态 ---- */
.yy-cart-empty {
  text-align: center;
  padding: 80px var(--space-lg) 100px;
}
.yy-cart-empty .yy-empty-icon {
  font-size: 68px;
  filter: grayscale(0.2) opacity(0.6);
  margin-bottom: var(--space-lg);
}
.yy-cart-empty .yy-empty-title {
  font-size: 21px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}
.yy-cart-empty .yy-empty-desc {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
  line-height: 1.6;
}
.yy-empty-action {
  display: inline-block;
  padding: 13px 36px;
  font-size: 16px;
}


/* ============================================================
   四、响应式适配
   ============================================================ */

/* 平板：3列网格 */
@media (max-width: 1024px) {
  .yy-products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
  .yy-shop-title { font-size: 26px; }
  /* WC冲突重置响应式 */
  .woocommerce-cart .yy-page-container .yy-cart-layout,
  .woocommerce .yy-page-container .yy-cart-layout {
    grid-template-columns: 1fr 300px !important;
    gap: 20px !important;
  }
  .yy-cart-item {
    grid-template-columns: 74px 1fr auto auto auto 38px;
    gap: 12px;
  }
  .yy-checkout-steps .yy-step-connector { width: 40px; }
}

/* 小平板/大手机 */
@media (max-width: 768px) {
  .yy-page-container {
    width: calc(100% - 32px);
    padding: var(--space-lg, 40px) var(--space-md, 24px);
  }

  /* 全部好物：3列→2列 */
  .yy-products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md, 16px);
  }
  .yy-shop-title { font-size: 24px; }
  .yy-shop-categories { gap: 8px; }
  .yy-cat-chip { padding: 6px 16px; font-size: 12.5px; }

  /* 工具栏垂直堆叠 */
  .yy-shop-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .yy-shop-sort { width: 100%; justify-content: flex-end; }

  /* 购物车：单列布局，汇总在上方 */
  .yy-cart-layout {
    grid-template-columns: 1fr;
  }
  .yy-cart-sidebar {
    position: static;
    order: -1;
  }
  .yy-order-summary {
    padding: 20px 18px;
  }

  /* 购物车商品项：垂直布局 */
  .yy-cart-item {
    grid-template-columns: 78px 1fr auto;
    grid-template-rows: auto auto auto;
    gap: 8px 12px;
    padding: 16px 0;
  }
  .yy-item-image {
    grid-row: 1 / 4;
    width: 78px;
    height: 96px;
  }
  .yy-item-info {
    grid-column: 2 / 4;
  }
  .yy-item-unit-price {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
  }
  .yy-item-qty-wrap {
    grid-column: 3;
    grid-row: 2;
    justify-self: end;
  }
  .yy-item-subtotal {
    grid-column: 2 / 4;
    grid-row: 3;
    justify-self: start;
  }
  .yy-item-remove {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    align-self: start;
  }

  .btn-checkout { margin-top: 16px; }
  .yy-checkout-steps .yy-step-connector { width: 28px; }
  .yy-step-label { font-size: 11px; }
}

/* 手机 */
@media (max-width: 480px) {
  .yy-page-container {
    width: calc(100% - 24px);
    padding: 40px 16px;
  }
  .yy-products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .yy-shop-title { font-size: 22px; }
  .yy-shop-header { padding: var(--space-lg, 40px) 0 var(--space-md); }
  .yy-cart-title { font-size: 24px; }

  .product-body { padding: 12px 14px 16px; }
  .product-title { font-size: 14px; }
  .price-value { font-size: 17px; }

  .yy-add-to-cart {
    padding: 7px 14px;
    font-size: 12px;
  }
  .btn-text { display: none; }
  .btn-icon { font-size: 18px; }

  /* 购物车手机端优化 */
  .yy-cart-item {
    grid-template-columns: 66px 1fr;
    grid-template-rows: auto auto auto auto;
    gap: 6px 10px;
  }
  .yy-item-image {
    grid-row: 1 / 5;
    width: 66px;
    height: 82px;
  }
  .yy-item-info { grid-column: 2; grid-row: 1; }
  .yy-item-unit-price { grid-column: 2; grid-row: 2; justify-self: start; font-size: 13px; }
  .yy-item-qty-wrap { grid-column: 2; grid-row: 3; justify-self: start; }
  .yy-item-subtotal { grid-column: 2; grid-row: 4; }
  .yy-item-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 26px;
    height: 26px;
    font-size: 12px;
  }
  .yy-cart-item { position: relative; }

  .subtotal-value { font-size: 15px; }
  .total-amount { font-size: 20px; }
  .btn-checkout { padding: 13px 24px; font-size: 15px; }

  .yy-back-top-btn { bottom: 20px; right: 20px; width: 38px; height: 38px; font-size: 16px; }
}
