/*
 Theme Name:   Kadence Child
 Theme URI:    https://tishiking.online
 Template:     kadence
 Version:      1.0.0
*/

/* ── 品牌变量 ── */
:root {
  --primary:       #7C3AED;
  --primary-dark:  #6D28D9;
  --primary-light: #EDE9FE;
  --accent:        #F59E0B;
  --accent-dark:   #D97706;
  --text:          #1F2937;
  --text-muted:    #6B7280;
  --bg:            #F5F3FF;
  --card:          #FFFFFF;
  --radius:        14px;
  --shadow:        0 4px 20px rgba(124,58,237,0.08);
  --shadow-hover:  0 14px 40px rgba(124,58,237,0.2);
  --transition:    0.25s ease;
}

/* ── 全局 ── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
}

/* ── Hero 区块 ── */
.tk-hero {
  background: #07020F;
  background-image:
    linear-gradient(rgba(124,58,237,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,58,237,0.07) 1px, transparent 1px);
  background-size: 40px 40px;
  padding: 72px 24px 88px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.tk-hero::before,
.tk-hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.tk-hero::before {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(124,58,237,0.35) 0%, transparent 70%);
  top: -280px; left: -180px;
}
.tk-hero::after {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(0,212,255,0.25) 0%, transparent 70%);
  bottom: -160px; right: -100px;
  animation: tk-pulse-glow 4s ease-in-out infinite alternate;
}

.tk-hero-badge {
  display: inline-block;
  background: rgba(124,58,237,0.15);
  color: #A78BFA;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 16px;
  border-radius: 50px;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
  position: relative; z-index: 1;
  border: 1px solid rgba(124,58,237,0.5);
  box-shadow: 0 0 12px rgba(124,58,237,0.3);
}

.tk-hero h1 {
  font-size: clamp(1.9rem, 5vw, 3rem);
  color: #fff;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 18px;
  position: relative; z-index: 1;
  text-shadow: 0 0 40px rgba(124,58,237,0.8), 0 0 80px rgba(124,58,237,0.4);
}

.tk-hero p {
  font-size: 1.05rem;
  color: rgba(200,185,255,0.85);
  max-width: 500px;
  margin: 0 auto 36px;
  line-height: 1.75;
  position: relative; z-index: 1;
}

.tk-btn {
  display: inline-block;
  background: linear-gradient(135deg, #7C3AED, #00D4FF);
  color: #fff !important;
  padding: 15px 40px;
  border-radius: 50px;
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none !important;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 0 20px rgba(124,58,237,0.6), 0 0 40px rgba(124,58,237,0.3);
  position: relative; z-index: 1;
  letter-spacing: 0.5px;
}
.tk-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 30px rgba(124,58,237,0.9), 0 0 60px rgba(0,212,255,0.4);
  background: linear-gradient(135deg, #6D28D9, #00B8E6);
}

.tk-hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 44px;
  position: relative; z-index: 1;
  flex-wrap: wrap;
}
.tk-hero-stat {
  color: rgba(167,139,250,0.8);
  text-align: center;
}
.tk-hero-stat strong {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: #A78BFA;
  line-height: 1;
  margin-bottom: 4px;
  text-shadow: 0 0 15px rgba(167,139,250,0.7);
}
.tk-hero-stat span {
  font-size: 0.82rem;
  opacity: 0.7;
}

/* ── Hero 浮动装饰点 ── */
.tk-hero-dot {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: tk-float 6s ease-in-out infinite;
}
.tk-hero-dot:nth-child(1) {
  width: 8px; height: 8px;
  background: #7C3AED;
  box-shadow: 0 0 10px #7C3AED, 0 0 20px #7C3AED;
  top: 20%; left: 15%;
  animation-delay: 0s;
}
.tk-hero-dot:nth-child(2) {
  width: 5px; height: 5px;
  background: #00D4FF;
  box-shadow: 0 0 8px #00D4FF, 0 0 16px #00D4FF;
  top: 60%; right: 18%;
  animation-delay: 2s;
}
.tk-hero-dot:nth-child(3) {
  width: 6px; height: 6px;
  background: #A78BFA;
  box-shadow: 0 0 8px #A78BFA, 0 0 16px #A78BFA;
  bottom: 25%; left: 30%;
  animation-delay: 4s;
}

@keyframes tk-pulse-glow {
  from { opacity: 0.6; transform: scale(1); }
  to   { opacity: 1;   transform: scale(1.15); }
}

@keyframes tk-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}

/* ── 信任栏 ── */
.tk-trust {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  background: #fff;
  border-bottom: 1px solid #E5E7EB;
  flex-wrap: wrap;
}
.tk-trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 28px;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
  border-right: 1px solid #F3F4F6;
}
.tk-trust-item:last-child { border-right: none; }
.tk-trust-item .tk-icon { font-size: 1.15rem; }

/* ── 商品网格容器 ── */
.woocommerce .woocommerce-products-header {
  margin-bottom: 8px;
}

/* ── 商品卡片 ── */
.woocommerce ul.products li.product {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  border: none;
}
.woocommerce ul.products li.product:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow-hover);
}

/* 商品缩略图 */
.woocommerce ul.products li.product a > img,
.woocommerce ul.products li.product .attachment-woocommerce_thumbnail {
  display: block !important;
  width: 100% !important;
  height: 200px !important;
  object-fit: cover !important;
  border-radius: 0 !important;
  transition: transform 0.4s ease !important;
}
.woocommerce ul.products li.product:hover a > img {
  transform: scale(1.04);
}
/* 无图时的渐变兜底 */
.woocommerce ul.products li.product .tk-card-cover {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}
.woocommerce ul.products li.product:nth-child(8n+1) .tk-card-cover { background: linear-gradient(135deg,#7C3AED,#4F46E5); }
.woocommerce ul.products li.product:nth-child(8n+2) .tk-card-cover { background: linear-gradient(135deg,#EC4899,#F43F5E); }
.woocommerce ul.products li.product:nth-child(8n+3) .tk-card-cover { background: linear-gradient(135deg,#3B82F6,#06B6D4); }
.woocommerce ul.products li.product:nth-child(8n+4) .tk-card-cover { background: linear-gradient(135deg,#10B981,#14B8A6); }
.woocommerce ul.products li.product:nth-child(8n+5) .tk-card-cover { background: linear-gradient(135deg,#F59E0B,#EF4444); }
.woocommerce ul.products li.product:nth-child(8n+6) .tk-card-cover { background: linear-gradient(135deg,#8B5CF6,#D946EF); }
.woocommerce ul.products li.product:nth-child(8n+7) .tk-card-cover { background: linear-gradient(135deg,#6366F1,#8B5CF6); }
.woocommerce ul.products li.product:nth-child(8n+8) .tk-card-cover { background: linear-gradient(135deg,#F97316,#FBBF24); }

/* 商品名 */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  padding: 14px 16px 6px;
  line-height: 1.4;
}

/* 价格 */
.woocommerce ul.products li.product .price {
  display: block;
  padding: 2px 16px 12px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.woocommerce ul.products li.product .price del {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 400;
  margin-right: 4px;
}

/* 加入购物车按钮 */
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product a.button {
  background: var(--primary) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 0 0 var(--radius) var(--radius) !important;
  width: 100% !important;
  text-align: center !important;
  padding: 13px !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.5px !important;
  transition: background var(--transition) !important;
  display: block !important;
  box-shadow: none !important;
}
.woocommerce ul.products li.product .button:hover,
.woocommerce ul.products li.product a.button:hover {
  background: var(--primary-dark) !important;
}

/* ── 排序栏 ── */
.woocommerce .woocommerce-ordering select {
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.9rem;
  color: var(--text);
  background: #fff;
}

/* ── 页脚 ── */
.site-footer,
footer.site-footer {
  background: #1F2937;
  color: #9CA3AF;
  font-size: 0.85rem;
  padding: 28px 20px;
  text-align: center;
}
.site-footer a,
footer.site-footer a {
  color: #D1D5DB;
  text-decoration: none;
}
.site-footer a:hover,
footer.site-footer a:hover {
  color: #fff;
}

/* ══════════════════════════════════════════════════════
   暗黑霓虹 — 首页 / 提示词库 / 分类页
   ══════════════════════════════════════════════════════ */

body.home,
body.page-id-28,
body.page-id-85,
body.category {
  background: #07020F !important;
}

/* 内容区深色背景覆盖 */
body.home .content-bg,
body.page-id-28 .content-bg,
body.page-id-85 .content-bg,
body.category .content-bg {
  background: #07020F !important;
}

/* WooCommerce Block 商品列表（首页 wp:woocommerce/product-query） */
body.home .wp-block-post-template,
body.page-id-28 .wp-block-post-template {
  background: transparent !important;
}
body.home .wp-block-post.type-post,
body.home .wp-block-post.type-product,
body.page-id-28 .wp-block-post.type-post,
body.page-id-28 .wp-block-post.type-product {
  background: rgba(12,4,26,0.9) !important;
  border: 1px solid rgba(124,58,237,0.22) !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  padding: 16px !important;
  transition: all 0.3s ease !important;
}
body.home .wp-block-post.type-post:hover,
body.home .wp-block-post.type-product:hover,
body.page-id-28 .wp-block-post.type-post:hover,
body.page-id-28 .wp-block-post.type-product:hover {
  border-color: rgba(124,58,237,0.65) !important;
  box-shadow: 0 0 20px rgba(124,58,237,0.3), 0 8px 28px rgba(0,0,0,0.5) !important;
  transform: translateY(-4px) !important;
}
body.home .wp-block-post-title a,
body.page-id-28 .wp-block-post-title a {
  color: #fff !important;
  text-decoration: none !important;
}
body.home .wp-block-post-title a:hover,
body.page-id-28 .wp-block-post-title a:hover {
  color: #a78bfa !important;
}

/* 隐藏首页 Kadence 页面标题栏和默认 cover block */
body.home .entry-hero,
body.page-id-28 .entry-hero,
body.home .entry-header,
body.page-id-28 .entry-header,
body.home .wp-block-cover,
body.page-id-28 .wp-block-cover {
  display: none !important;
}

/* 首页标题文字 */
body.home h2, body.page-id-28 h2,
body.home h3, body.page-id-28 h3 {
  color: #fff !important;
}

/* ── 首页分类卡片 ── */
body.home .pk-cats-heading,
body.page-id-28 .pk-cats-heading {
  color: #fff !important;
  text-shadow: 0 0 30px rgba(124,58,237,0.6) !important;
}
body.home .pk-cats-sub,
body.page-id-28 .pk-cats-sub {
  color: #a78bfa !important;
}
body.home .pk-cats-grid,
body.page-id-28 .pk-cats-grid {
  perspective: 1200px;
}
body.home .pk-cat-item,
body.page-id-28 .pk-cat-item {
  background: rgba(12,4,26,0.9) !important;
  border: 1px solid rgba(124,58,237,0.22) !important;
  color: #e2d9f3 !important;
}
body.home .pk-cat-item:hover,
body.page-id-28 .pk-cat-item:hover {
  background: rgba(124,58,237,0.14) !important;
  border-color: rgba(124,58,237,0.65) !important;
  box-shadow: 0 0 24px rgba(124,58,237,0.35), 0 8px 32px rgba(0,0,0,0.6) !important;
  color: #e2d9f3 !important;
  text-decoration: none !important;
}
body.home .pk-cat-item-name,
body.page-id-28 .pk-cat-item-name {
  color: #fff !important;
}
body.home .pk-cat-item-desc,
body.page-id-28 .pk-cat-item-desc {
  color: #a78bfa !important;
}
body.home .pk-view-all a,
body.page-id-28 .pk-view-all a {
  background: linear-gradient(135deg, #7C3AED, #00D4FF) !important;
  box-shadow: 0 0 20px rgba(124,58,237,0.5) !important;
  transition: box-shadow 0.3s ease, transform 0.2s ease !important;
}
body.home .pk-view-all a:hover,
body.page-id-28 .pk-view-all a:hover {
  box-shadow: 0 0 35px rgba(124,58,237,0.8), 0 0 60px rgba(0,212,255,0.3) !important;
  transform: translateY(-2px) !important;
}

/* 首页商品卡片暗黑 */
body.home .woocommerce ul.products,
body.page-id-28 .woocommerce ul.products {
  perspective: 1200px;
}
body.home .woocommerce ul.products li.product,
body.page-id-28 .woocommerce ul.products li.product {
  background: rgba(12,4,26,0.9) !important;
  border: 1px solid rgba(124,58,237,0.2) !important;
}
body.home .woocommerce ul.products li.product:hover,
body.page-id-28 .woocommerce ul.products li.product:hover {
  border-color: rgba(124,58,237,0.6) !important;
  box-shadow: 0 0 20px rgba(124,58,237,0.3), 0 14px 40px rgba(0,0,0,0.6) !important;
}
body.home .woocommerce-loop-product__title,
body.page-id-28 .woocommerce-loop-product__title {
  color: #fff !important;
}

/* ── 提示词库页 (page 85) 霓虹升级 ── */

/* 卡片头图区 */
.pk-cat-visual {
  height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.pk-cat-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.35) 100%);
  pointer-events: none;
}
.pk-cat-visual-emoji {
  font-size: 2.6rem;
  line-height: 1;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}
.pk-cat-visual-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
  line-height: 1.3;
}
.pk-cat-visual-count {
  position: absolute;
  bottom: 10px;
  right: 12px;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  z-index: 2;
  backdrop-filter: blur(4px);
}
.pk-cat-body {
  padding: 14px 18px 18px;
  position: relative;
}

body.page-id-85 .pk-hero {
  background:
    radial-gradient(ellipse at 25% 50%, rgba(124,58,237,0.3) 0%, transparent 55%),
    radial-gradient(ellipse at 75% 50%, rgba(0,212,255,0.15) 0%, transparent 55%),
    linear-gradient(135deg, #07020F 0%, #0f0520 50%, #050e28 100%) !important;
  border: 1px solid rgba(124,58,237,0.3) !important;
  box-shadow: 0 0 60px rgba(124,58,237,0.15), inset 0 0 80px rgba(124,58,237,0.04) !important;
}
body.page-id-85 .pk-hero h1 {
  background: linear-gradient(135deg, #fff 0%, #a78bfa 50%, #00D4FF 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}
body.page-id-85 .pk-stat-num {
  color: #A78BFA !important;
  text-shadow: 0 0 15px rgba(167,139,250,0.7) !important;
}
body.page-id-85 .pk-section-title {
  color: #fff !important;
  border-color: rgba(124,58,237,0.5) !important;
}
body.page-id-85 .pk-grid {
  perspective: 1200px;
}
body.page-id-85 .pk-cat-card {
  background: rgba(12,4,26,0.9) !important;
  border: 1px solid rgba(124,58,237,0.2) !important;
  color: #e2d9f3 !important;
}
body.page-id-85 .pk-cat-card::before {
  background: linear-gradient(90deg, #7C3AED, #00D4FF) !important;
}
body.page-id-85 .pk-cat-card:hover {
  background: rgba(124,58,237,0.12) !important;
  border-color: rgba(124,58,237,0.6) !important;
  box-shadow: 0 0 24px rgba(124,58,237,0.3), 0 12px 32px rgba(0,0,0,0.6) !important;
  color: #e2d9f3 !important;
  text-decoration: none !important;
}
body.page-id-85 .pk-cat-name {
  color: #fff !important;
}
body.page-id-85 .pk-cat-desc {
  color: #a78bfa !important;
}
body.page-id-85 .pk-cat-tag {
  background: rgba(124,58,237,0.2) !important;
  color: #a78bfa !important;
  border: 1px solid rgba(124,58,237,0.3) !important;
}
body.page-id-85 .pk-cat-count {
  background: linear-gradient(135deg, #7C3AED, #00D4FF) !important;
}
body.page-id-85 .pk-bottom-cta {
  background: linear-gradient(135deg, #1a0533 0%, #0d1b4b 100%) !important;
  border: 1px solid rgba(124,58,237,0.35) !important;
  box-shadow: 0 0 40px rgba(124,58,237,0.2) !important;
}
body.page-id-85 .pk-btn {
  background: linear-gradient(135deg, #7C3AED, #00D4FF) !important;
  color: #fff !important;
  box-shadow: 0 0 20px rgba(124,58,237,0.5) !important;
}

/* ── 分类归档页 ── */
body.category article.post,
body.category article.hentry {
  background: rgba(12,4,26,0.9) !important;
  border: 1px solid rgba(124,58,237,0.2) !important;
}
body.category article.post:hover,
body.category article.hentry:hover {
  border-color: rgba(124,58,237,0.6) !important;
  box-shadow: 0 0 20px rgba(124,58,237,0.25), 0 8px 28px rgba(0,0,0,0.5) !important;
}
body.category .entry-title a {
  color: #e2d9f3 !important;
}
body.category .entry-title a:hover {
  color: #a78bfa !important;
}
body.category .entry-summary,
body.category .entry-content p {
  color: #a78bfa !important;
}
body.category .archive .page-header {
  background: linear-gradient(135deg, rgba(124,58,237,0.25), rgba(0,212,255,0.1)) !important;
  border: 1px solid rgba(124,58,237,0.35) !important;
  box-shadow: 0 0 40px rgba(124,58,237,0.15) !important;
}
body.category .page-header .page-title {
  color: #fff !important;
}
body.category .page-header .archive-description {
  color: #a78bfa !important;
}

/* ── 滚动显现 ── */
.tk-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
  will-change: opacity, transform;
}
.tk-reveal.tk-visible {
  opacity: 1;
  transform: translateY(0);
}
.tk-reveal:nth-child(2) { transition-delay: 0.08s; }
.tk-reveal:nth-child(3) { transition-delay: 0.16s; }
.tk-reveal:nth-child(4) { transition-delay: 0.24s; }
.tk-reveal:nth-child(5) { transition-delay: 0.08s; }
.tk-reveal:nth-child(6) { transition-delay: 0.16s; }
.tk-reveal:nth-child(7) { transition-delay: 0.24s; }
.tk-reveal:nth-child(8) { transition-delay: 0.32s; }

/* ── 响应式 ── */
@media (max-width: 768px) {
  .tk-hero { padding: 52px 16px 64px; }
  .tk-trust-item { padding: 14px 16px; font-size: 0.82rem; }
  .tk-hero-stats { gap: 24px; }
  .tk-card-cover { height: 120px; font-size: 2.4rem; }
}

@media (max-width: 480px) {
  .tk-trust { flex-direction: column; gap: 0; }
  .tk-trust-item { border-right: none; border-bottom: 1px solid #F3F4F6; width: 100%; justify-content: center; }
  .tk-trust-item:last-child { border-bottom: none; }
}
