/*
Theme Name: Sandboxie 中文站
Theme URI: https://sandboxiex.com/
Description: Sandboxie 沙盘软件中文官网 - 下载、教程、资讯
Version: 1.0.0
Author: Dev Team
Text Domain: sandboxie
*/

/* ================================================================
   CSS重置 & 全局变量
   ================================================================ */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --accent: #f59e0b;
  --bg-dark: #0a1628;
  --bg-hero: #0b1a30;
  --bg-section: #f5f7fa;
  --bg-card: #ffffff;
  --text-primary: #1a1a2e;
  --text-secondary: #64748b;
  --text-light: #94a3b8;
  --border: #e2e8f0;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --transition: 0.2s ease;
  --max-width: 1200px;
  --header-height: 64px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ================================================================
   全局 HEADER
   ================================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 22, 40, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  height: var(--header-height);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
}

.site-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), #6366f1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
}

/* Primary Navigation */
.primary-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.primary-nav .menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 4px;
  align-items: center;
}

.primary-nav .menu > li { position: relative; }

.primary-nav .menu > li > a {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
}

.primary-nav .menu > li > a:hover,
.primary-nav .menu > li.current-menu-item > a {
  color: #ffffff;
  background: rgba(255,255,255,0.1);
}

/* Dropdown */
.primary-nav .sub-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px 0;
  min-width: 160px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.primary-nav li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
}

.primary-nav .sub-menu a {
  display: block;
  padding: 10px 20px;
  color: var(--text-primary);
  font-size: 14px;
  transition: var(--transition);
}

.primary-nav .sub-menu a:hover {
  background: var(--bg-section);
  color: var(--primary);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Search */
.header-search {
  position: relative;
}

.header-search input {
  width: 200px;
  height: 36px;
  padding: 0 36px 0 16px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 18px;
  background: rgba(255,255,255,0.08);
  color: #ffffff;
  font-size: 13px;
  outline: none;
  transition: var(--transition);
}

.header-search input::placeholder { color: rgba(255,255,255,0.4); }
.header-search input:focus {
  border-color: var(--primary);
  background: rgba(255,255,255,0.12);
  width: 260px;
}

.header-search button {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  color: rgba(255,255,255,0.6);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

/* Download Button in Header */
.header-download-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: linear-gradient(135deg, var(--primary), #6366f1);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  border-radius: 20px;
  transition: var(--transition);
  white-space: nowrap;
}

.header-download-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
}

/* Login link */
.header-login {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}
.header-login:hover { color: #ffffff; }

/* Mobile toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  color: #fff;
  font-size: 24px;
}

/* ================================================================
   全局 FOOTER
   ================================================================ */
.site-footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.7);
  padding: 60px 0 0;
}

.footer-logo {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-brand p {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.8;
  max-width: 320px;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  padding: 6px 0;
  transition: var(--transition);
}

.footer-col a:hover { color: #ffffff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 24px 0 20px;
  font-size: 12px;
  line-height: 2;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  margin-bottom: 12px;
}

.footer-legal a {
  color: rgba(255,255,255,0.6);
  transition: var(--transition);
}

.footer-legal a:hover { color: #ffffff; }

.footer-divider {
  margin: 0 8px;
  color: rgba(255,255,255,0.2);
}

.footer-info {
  color: rgba(255,255,255,0.5);
  margin-bottom: 12px;
}

.footer-info a {
  color: rgba(255,255,255,0.5);
  transition: var(--transition);
}

.footer-info a:hover { color: rgba(255,255,255,0.8); }

.footer-copyright {
  color: rgba(255,255,255,0.4);
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.footer-social a {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.6);
  transition: var(--transition);
}

.footer-social a:hover {
  background: rgba(255,255,255,0.15);
  color: #ffffff;
}

/* ================================================================
   通用组件样式
   ================================================================ */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 24px;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #6366f1);
  color: #ffffff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.4);
}

.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
}

.btn-outline:hover {
  background: var(--primary);
  color: #ffffff;
}

.btn-lg {
  padding: 16px 40px;
  font-size: 17px;
  border-radius: 28px;
}

.btn-sm {
  padding: 6px 16px;
  font-size: 13px;
  border-radius: 16px;
}

/* Section titles */
.section-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

/* Cards */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-light);
  padding: 16px 0;
}

.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: #cbd5e1; }

/* Page header */
.page-header-section {
  background: var(--bg-dark);
  padding: 48px 0;
  text-align: center;
  color: #ffffff;
}

.page-header-section h1 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 8px;
}

.page-header-section p {
  font-size: 16px;
  color: rgba(255,255,255,0.7);
}

/* ================================================================
   响应式
   ================================================================ */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .primary-nav { gap: 0; }
  .primary-nav .menu > li > a { padding: 8px 10px; font-size: 13px; }
}

@media (max-width: 768px) {
  :root { --header-height: 56px; }
  .container { padding: 0 16px; }

  .primary-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-dark);
    flex-direction: column;
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
  }

  .primary-nav.active { display: flex; }
  .mobile-menu-toggle { display: block; }

  .header-search { display: none; }
  .header-download-btn { padding: 6px 14px; font-size: 12px; }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; }

  .page-header-section { padding: 32px 0; }
  .page-header-section h1 { font-size: 26px; }
  .section-title { font-size: 22px; }
}

/* ================================================================
   WooCommerce Style Overrides
   ================================================================ */

/* ——— Price display ——— */
.game-price-tag {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  margin-right: 16px;
}

.game-price-display {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  text-align: center;
  margin-bottom: 16px;
}

/* ——— Paid info button (catalog mode) ——— */
.download-btn-paid-info,
.download-btn-paid-info:hover,
.download-btn-paid-info:visited {
  background: linear-gradient(135deg, var(--accent), #f97316);
  color: #fff;
  cursor: default;
}

.download-btn-paid-info:hover {
  transform: none;
  box-shadow: none;
}

/* ——— Ranking price badge ——— */
.ranking-price {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
  text-align: right;
}

/* ——— WooCommerce pages ——— */
.woocommerce-cart .cart-collaterals .cart_totals,
.woocommerce-checkout .col2-set {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.woocommerce button.button.alt,
.woocommerce #respond input#submit.alt,
.woocommerce a.button.alt {
  background: var(--primary);
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.woocommerce button.button.alt:hover,
.woocommerce #respond input#submit.alt:hover,
.woocommerce a.button.alt:hover {
  background: var(--primary-dark);
}

.woocommerce .button.checkout-button {
  background: var(--accent);
  border-radius: var(--radius-sm);
}

.woocommerce .button.checkout-button:hover {
  background: #e08f0b;
}

.woocommerce-info {
  border-top-color: var(--primary);
}

.woocommerce-info::before {
  color: var(--primary);
}

.woocommerce-MyAccount-navigation ul {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.woocommerce-MyAccount-navigation ul li a {
  padding: 12px 20px;
  display: block;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.woocommerce-MyAccount-navigation ul li a:hover,
.woocommerce-MyAccount-navigation ul li.is-active a {
  background: var(--primary);
  color: #fff;
}

/* ================================================================
   Blog Listing — news grid / cards
   ================================================================ */
.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.news-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
}

.news-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.news-card-thumb {
  display: block;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--bg-section);
}

.news-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-card-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-card-body {
  padding: 20px;
}

.news-card-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.4;
}

.news-card-title a {
  color: var(--text-primary);
  transition: var(--transition);
}

.news-card-title a:hover { color: var(--primary); }

.news-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-light);
  flex-wrap: wrap;
}

.news-card-meta svg {
  vertical-align: middle;
  margin-right: 2px;
}

.news-card-excerpt {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 8px 0 12px;
}

.news-card-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  transition: var(--transition);
}

.news-card-more:hover { gap: 8px; }

/* ─── Blog category/tag badges ─── */
.blog-cat {
  display: inline-block;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--primary);
  background: #dbeafe;
  border-radius: 12px;
  transition: var(--transition);
}

.blog-cat:hover {
  background: var(--primary);
  color: #fff;
}

.blog-tag {
  display: inline-block;
  padding: 2px 10px;
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-section);
  border-radius: 12px;
  transition: var(--transition);
  margin-right: 4px;
  margin-bottom: 4px;
}

.blog-tag:hover {
  background: var(--primary);
  color: #fff;
}

/* ─── Empty state ─── */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-secondary);
}

.empty-state svg {
  margin-bottom: 16px;
}

.empty-state h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 14px;
  margin-bottom: 20px;
}

/* ─── Pagination ─── */
.pagination-wrap {
  margin-top: 40px;
  text-align: center;
}

.pagination-wrap .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  margin: 0 2px;
  font-size: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text-primary);
  transition: var(--transition);
}

.pagination-wrap .page-numbers.current {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.pagination-wrap .page-numbers:hover:not(.current) {
  border-color: var(--primary);
  color: var(--primary);
}

/* ================================================================
   Single Post — news detail
   ================================================================ */
.news-detail {
  padding: 32px 0 64px;
}

.news-detail-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.news-detail-main {
  flex: 1;
  min-width: 0;
}

.news-detail-header {
  margin-bottom: 24px;
}

.news-detail-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.news-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  font-size: 13px;
  color: var(--text-light);
}

.news-detail-meta svg {
  vertical-align: middle;
  margin-right: 4px;
}

.news-detail-featured {
  margin-bottom: 24px;
  border-radius: var(--radius);
  overflow: hidden;
}

.news-detail-featured-img {
  width: 100%;
  height: auto;
  display: block;
}

.news-detail-content {
  font-size: 15px;
  line-height: 1.9;
  color: var(--text-primary);
}

.news-detail-content p {
  margin-bottom: 1.2em;
}

.news-detail-content h2,
.news-detail-content h3 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  font-weight: 700;
}

.news-detail-content img {
  border-radius: var(--radius-sm);
  margin: 1em 0;
}

.news-detail-content a {
  color: var(--primary);
  text-decoration: underline;
}

.news-detail-content a:hover {
  color: var(--primary-dark);
}

.news-detail-back {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ─── Single post sidebar ─── */
.news-detail-sidebar {
  flex: 0 0 280px;
  width: 280px;
  position: sticky;
  top: calc(var(--header-height) + 24px);
}

.news-sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}

.news-sidebar-widget h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.news-related-list { list-style: none; }

.news-related-item { margin-bottom: 12px; }

.news-related-item:last-child { margin-bottom: 0; }

.news-related-link {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.news-related-thumb {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-section);
}

.news-related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-related-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.news-related-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  transition: var(--transition);
}

.news-related-link:hover .news-related-title { color: var(--primary); }

.news-related-date {
  font-size: 11px;
  color: var(--text-light);
}

.news-recent-list { list-style: none; }

.news-recent-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.news-recent-list li:last-child { border-bottom: none; }

.news-recent-list a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  display: block;
  margin-bottom: 2px;
  transition: var(--transition);
}

.news-recent-list a:hover { color: var(--primary); }

.news-recent-list time {
  font-size: 11px;
  color: var(--text-light);
}

/* ─── Responsive: blog ─── */
@media (max-width: 1024px) {
  .news-detail-sidebar { display: none; }
}

@media (max-width: 768px) {
  .news-grid { grid-template-columns: 1fr; }
  .news-detail-title { font-size: 22px; }
  .news-detail-layout { flex-direction: column; }
  .news-detail-sidebar {
    display: block;
    flex: none;
    width: 100%;
    position: static;
  }
}

/* Hero Images Grid */
.hero-images-section { padding: 40px 0; background: var(--bg-primary, #fff); }
.hero-images-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; align-items: center; }
.hero-img-item { border-radius: 12px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.08); transition: transform 0.2s; }
.hero-img-item:hover { transform: translateY(-4px); }
.hero-img-item img { width: 100%; height: auto; display: block; }
.hero-images-section { padding: 60px 0 50px; background: #f8fafc; }
.hero-images-section .section-label { text-align: center; font-size: 13px; letter-spacing: 2px; color: #64748b; text-transform: uppercase; margin-bottom: 8px; }
.hero-images-section .section-title { text-align: center; font-size: 28px; font-weight: 700; color: #0f172a; margin-bottom: 40px; }
.hero-images-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; align-items: start; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
@media (max-width: 1024px) { .hero-images-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .hero-images-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
.hero-img-item { border-radius: 16px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.06); transition: all 0.3s ease; background: #fff; }
.hero-img-item:hover { transform: translateY(-6px); box-shadow: 0 12px 32px rgba(0,0,0,0.12); }
.hero-img-item img { width: 100%; height: 220px; object-fit: cover; display: block; }
@media (max-width: 768px) { .hero-img-item img { height: 180px; } }
