/*
Theme Name: Faust Store
Theme URI: https://example.com/faust-store
Author: Trae AI
Description: A sleek, Apple-inspired WooCommerce theme with minimalist design and smooth interactions.
Version: 1.0.0
Text Domain: faust-store
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Tags: ecommerce, woocommerce, minimal, responsive
*/

/* 基础：尽量保持简洁，使用系统字体 */
html { box-sizing: border-box; }
*, *:before, *:after { box-sizing: inherit; }

:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #6e6e73; /* Apple 风格灰 */
  --border: #e5e5ea;
  --primary: #0071e3; /* Apple 链接蓝 */
  --primary-dark: #0061c9;
}

html, body { height: 100%; }
body {
  margin: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  color: var(--text);
  background: var(--bg);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, "Noto Sans", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.site-content { flex: 1 0 auto; }
.site-footer { flex-shrink: 0; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--text); text-decoration: none; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.btn { display: inline-block; padding: 12px 18px; border-radius: 22px; font-weight: 600; }
.btn-primary { background: var(--text); color: #fff; }
.btn-primary:hover { background: #000; }
.btn-ghost { border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: #c7c7cc; }

/* Header 简洁悬浮阴影 */
.site-header { position: sticky; top: 0; z-index: 1000; background: rgba(255,255,255,0.86); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid rgba(0,0,0,0.06); }
.site-header.scrolled { box-shadow: 0 2px 16px rgba(0,0,0,0.06); }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.site-brand { font-weight: 700; letter-spacing: 0.2px; }

.nav { display: flex; gap: 18px; align-items: center; }
.nav a { color: var(--muted); font-weight: 500; }
.nav a:hover { color: var(--text); }

.header-actions { display: flex; gap: 16px; align-items: center; }
.header-cart { position: relative; }
.header-cart .count { position: absolute; top: -6px; right: -8px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--text); color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; }

/* Hero */
.hero { text-align: center; padding: 80px 0 40px; will-change: transform; transition: transform .3s ease; }
.hero h1 { font-size: 48px; line-height: 1.1; margin: 0 0 12px; letter-spacing: -0.5px; }
.hero p { color: var(--muted); font-size: 18px; margin: 0 0 24px; }
.hero .actions { display: inline-flex; gap: 12px; }

/* 渐入动效通用类 */
.reveal { opacity: 0; transform: translateY(20px); transition: all .6s cubic-bezier(.22,.61,.36,1); }
.reveal-in { opacity: 1; transform: translateY(0); }

/* 产品网格（兼容 WooCommerce 默认类名） */
.woocommerce ul.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 1024px) { .woocommerce ul.products { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .woocommerce ul.products { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .woocommerce ul.products { grid-template-columns: 1fr; } }

.woocommerce ul.products li.product { border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: #fff; transition: box-shadow .2s ease, transform .2s ease; }
.woocommerce ul.products li.product:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.08); transform: translateY(-2px); }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 16px; margin: 12px 16px 4px; letter-spacing: 0; }
.woocommerce ul.products li.product .price { margin: 0 16px 12px; color: var(--text); font-weight: 600; }
.woocommerce ul.products li.product a.button { margin: 0 16px 16px; width: calc(100% - 32px); text-align: center; border-radius: 12px; padding: 10px 12px; background: var(--text); color: #fff; }

/* 单品页面 */
.woocommerce div.product { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 1024px) { .woocommerce div.product { grid-template-columns: 1fr; } }
.woocommerce div.product .product_title { font-size: 32px; margin-bottom: 12px; }
.woocommerce div.product .summary .price { font-size: 22px; font-weight: 700; margin: 8px 0 16px; }
.woocommerce div.product .summary .cart .button { border-radius: 14px; padding: 12px 18px; background: var(--text); color: #fff; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); margin-top: 64px; }
.site-footer .bar { display: flex; align-items: center; justify-content: space-between; padding: 24px 0; color: var(--muted); font-size: 14px; }

/* 搜索框 */
.search-input { border: 1px solid var(--border); border-radius: 14px; padding: 8px 12px; width: 220px; }
.search-input:focus { outline: none; border-color: #c7c7cc; }