/*
Theme Name: Kinetic Carry - Titanium Pro
Description: Production-ready e-commerce theme with risk mitigation (Phone required, Address validation, Terms enforcement).
Version: 10.4 (Risk Mitigation Update)
*/

:root {
    --bg-body: #000000;
    --bg-card: #1c1c1e;
    --bg-input: #2c2c2e;
    --text-primary: #f5f5f7;
    --text-secondary: #86868b;
    --accent-blue: #0071e3;
    --accent-red: #ff453a;
    --border-color: rgba(255, 255, 255, 0.1);
    --radius-card: 20px;
    --radius-input: 12px;
}

/* 1. 全局重置 */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-font-smoothing: antialiased; }
body { background-color: var(--bg-body); color: var(--text-primary); font-family: "Inter", sans-serif; line-height: 1.5; overflow-x: hidden; }
a { color: var(--accent-blue); text-decoration: none; transition: 0.2s; }
img { max-width: 100%; display: block; }

/* 强制隐藏 WP 黑条 */
#wpadminbar { display: none !important; }
html { margin-top: 0 !important; }

/* 2. 导航栏 */
.site-header { position: fixed; top: 0; width: 100%; height: 52px; background: rgba(0,0,0,0.7); backdrop-filter: blur(20px); z-index: 1000; border-bottom: 1px solid rgba(255,255,255,0.08); display: flex; align-items: center; }
.header-container { width: 100%; max-width: 1000px; margin: 0 auto; padding: 0 24px; display: flex; justify-content: space-between; align-items: center; }
.site-logo a { color: #fff; font-weight: 700; font-size: 18px; text-transform: uppercase; }

/* 3. --- 首页核心样式 (修复排版乱的关键) --- */
.hero-section { height: 100vh; position: relative; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; }
.hero-video-container { position: absolute; inset: 0; z-index: 0; }
.hero-video { width: 100%; height: 100%; object-fit: cover; opacity: 0.6; } /* 视频背景 */
.hero-content { position: relative; z-index: 10; max-width: 800px; padding: 0 20px; }
.hero-title { font-size: clamp(40px, 6vw, 80px); font-weight: 700; color: #fff; background: linear-gradient(180deg, #fff 0%, #b0b0b0 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 20px; }
.hero-links { display: flex; gap: 20px; justify-content: center; margin-top: 30px; }
.btn, .buy-link { background: var(--accent-blue); color: #fff; padding: 12px 30px; border-radius: 98px; display: inline-block; font-weight: 500; text-decoration: none; border: none; cursor: pointer; }
.btn:hover, .buy-link:hover { background: #0077ed; transform: scale(1.02); }

/* Video Audio Control Button */
.video-control-btn { position: fixed; bottom: 40px; right: 40px; width: 50px; height: 50px; border-radius: 50%; background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.2); display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 100; transition: all 0.3s ease; }
.video-control-btn:hover { background: rgba(255, 255, 255, 0.2); transform: scale(1.1); }
.video-control-btn svg { width: 24px; height: 24px; fill: #fff; }
@media (max-width: 768px) {
    .video-control-btn { width: 44px; height: 44px; bottom: 20px; right: 20px; }
    .video-control-btn svg { width: 20px; height: 20px; }
}

/* Bento 网格 & 产品列表 */
.bento-section, .product-section { padding: 100px 0; background: #000; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section-header { text-align: center; margin-bottom: 60px; }
.section-header h2 { font-size: 40px; font-weight: 700; color: #fff; }

.bento-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.bento-item { background: var(--bg-card); border-radius: 20px; padding: 30px; min-height: 300px; border: 1px solid rgba(255,255,255,0.05); display: flex; flex-direction: column; justify-content: space-between; }
.bento-item.large { grid-column: span 2; }
.bento-content h3 { font-size: 24px; margin-bottom: 10px; color: #fff; }
.bento-content p { color: var(--text-secondary); }

/* Service Guarantees Section */
.service-guarantees { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 50px; }
.guarantee-item { display: flex; align-items: center; gap: 15px; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 16px; padding: 20px; transition: all 0.3s ease; }
.guarantee-item:hover { background: rgba(255, 255, 255, 0.05); transform: translateY(-2px); }
.guarantee-icon { font-size: 32px; flex-shrink: 0; }
.guarantee-text { flex: 1; }
.guarantee-text strong { display: block; color: #fff; font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.guarantee-text span { display: block; color: var(--text-secondary); font-size: 13px; line-height: 1.4; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 30px; justify-content: center; }
.product-card { background: var(--bg-card); border-radius: 20px; overflow: hidden; border: 1px solid rgba(255,255,255,0.05); display: flex; flex-direction: column; }
.product-image-wrapper { width: 100%; padding-top: 100%; position: relative; background: #151516; }
.product-image-wrapper img { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 50% !important; height: auto !important; }
.product-info { padding: 24px; text-align: center; flex-grow: 1; }
.product-name a { color: #fff; font-weight: 600; font-size: 18px; }
.product-price { color: var(--text-secondary); margin: 10px 0; }

/* 4. --- 结算页交互优化 --- */
.kinetic-checkout-wrapper { max-width: 1200px; margin: 0 auto; padding: 80px 20px 120px; }
.checkout-header { text-align: center; margin-bottom: 30px; }
.checkout-header h1 { font-size: 36px; font-weight: 700; color: #fff; }

/* Checkout Guarantees */
.checkout-guarantees { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; margin-bottom: 50px; padding: 25px; background: rgba(76, 217, 100, 0.08); border: 1px solid rgba(76, 217, 100, 0.2); border-radius: 16px; }
.checkout-guarantee-item { display: flex; align-items: center; gap: 8px; color: #4cd964; font-size: 14px; font-weight: 500; }
.guarantee-check { font-size: 18px; font-weight: bold; }

/* 🚨 强制隐藏 PayPal Express Checkout 和分隔线 */
.ppcp-express-checkout-wrapper,
.ppcp-express-checkout,
.wc-block-checkout__express-checkout,
.woocommerce-checkout-payment .ppcp-express-checkout-section,
.checkout-divider,
[data-block-name="woocommerce/checkout-express-payment-block"],
.wc-block-components-express-payment,
.wc-block-components-express-payment__content,
/* 额外的选择器 - 针对可能的容器 */
.kinetic-checkout-wrapper > div:first-child,
.woocommerce-checkout::before,
form.checkout::before {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* 布局 Grid */
.checkout-layout-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.form-section-card, .order-review-card { background: var(--bg-card); border-radius: var(--radius-card); padding: 30px; border: 1px solid rgba(255,255,255,0.05); }
.section-title { font-size: 20px; color: #fff; margin: 0 0 25px; padding-bottom: 15px; border-bottom: 1px solid var(--border-color); }

/* 输入框 */
.woocommerce form .form-row { margin-bottom: 24px; padding: 0; }
.woocommerce form .form-row label { display: block; margin-bottom: 8px; font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .select2-container--default .select2-selection--single { background-color: var(--bg-input) !important; border: 1px solid transparent !important; border-radius: var(--radius-input) !important; height: 50px !important; color: #fff !important; padding: 0 16px !important; font-size: 16px !important; width: 100%; outline: none; transition: 0.2s; }
.woocommerce form .form-row input.input-text:focus { background-color: #3a3a3c !important; border-color: var(--accent-blue) !important; }

/* 响应式 */
@media (max-width: 900px) {
    .bento-grid, .checkout-layout-grid { grid-template-columns: 1fr; gap: 30px; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .service-guarantees { grid-template-columns: 1fr; gap: 15px; }
    .guarantee-item { padding: 16px; }
    .guarantee-icon { font-size: 28px; }
    .checkout-guarantees { flex-direction: column; gap: 15px; padding: 20px; }
    .checkout-guarantee-item { justify-content: center; }
}

/* --- 🚨 核心修复：就地报错样式 (Inline Validation) --- */

/* 1. 坚决隐藏顶部的列表式报错 (防止页面跳上去只看到一堆红字) */
.woocommerce-NoticeGroup-checkout, 
.woocommerce-error, 
.woocommerce-message { 
    display: none !important; 
}

/* 2. 让漏填的输入框变成醒目的红色 */
.woocommerce-invalid input.input-text, 
.woocommerce-invalid select, 
.woocommerce-invalid textarea,
.woocommerce-invalid .select2-selection { 
    border-color: var(--accent-red) !important; 
    background-color: rgba(255, 69, 58, 0.08) !important; /* 淡淡的红色背景 */
    box-shadow: 0 0 0 1px var(--accent-red) !important; /* 加上红色的发光边框 */
    transition: all 0.2s ease;
}

/* 3. ✨ 关键魔法：在输入框正下方直接显示文字提示 */
.woocommerce-invalid .woocommerce-input-wrapper::after {
    content: "⚠️ Please fill in this field / 请填写此项"; 
    color: var(--accent-red);
    font-size: 13px;
    display: block;
    margin-top: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    animation: fadeInUp 0.3s ease;
}

/* 4. 让原本的“必填星号”也变成警示红 */
.required { 
    color: var(--accent-red) !important; 
    text-decoration: none !important; 
    border: none !important; 
}

/* 5. 震动动画：让没填的格子"抖"一下，吸引眼球 */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

/* 只要是无效的字段，就抖动 */
.woocommerce-invalid {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

/* 🚨 移动端优化：减小震动幅度（防止 iOS Safari 视觉错位） */
@media (max-width: 768px) {
    @keyframes shake {
        0%, 100% { transform: translateX(0); }
        10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); }
        20%, 40%, 60%, 80% { transform: translateX(2px); }
    }
}

/* 6. 修复 Select2 下拉框的样式 (国家/地区选择) */
.woocommerce-invalid .select2-container--default .select2-selection--single {
    background-color: rgba(255, 69, 58, 0.08) !important;
    border-color: var(--accent-red) !important;
}

/* 辅助动画：提示文字向上浮入 */
@keyframes fadeInUp { 
    from { opacity: 0; transform: translateY(-5px); } 
    to { opacity: 1; transform: translateY(0); } 
}

/* --- 支付方式样式 & Chrome 滚动修复 --- */
.woocommerce-checkout-payment {
    scroll-margin-top: 100px; /* 防止滚动时被导航栏遮挡 */
}

.payment_box {
    transition: all 0.3s ease; /* 平滑展开动画 */
}

/* 修复 Chrome 浏览器支付方式切换时的跳转问题 */
.wc_payment_method label {
    cursor: pointer;
    scroll-behavior: smooth;
}

/* 确保 PayPal 信用卡表单不会被隐藏 */
.payment_method_ppcp-gateway .payment_box,
#ppc-button-ppcp-gateway-card-button-render-container {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
    position: relative !important;
}

/* --- 支付按钮样式 --- */
#place_order {
    background: var(--accent-blue) !important;
    color: white !important;
    font-size: 18px !important;
    padding: 18px !important;
    border-radius: 98px;
    font-weight: 600;
    width: 100%;
    border: none;
    cursor: pointer;
    display: block;
    margin-top: 20px;
    transition: 0.3s;
}
#place_order:hover {
    background: #0077ed !important;
    transform: scale(1.01);
}

/* --- Footer Styles --- */
.site-footer { background: #0a0a0a; border-top: 1px solid rgba(255, 255, 255, 0.08); padding: 60px 0 30px; margin-top: 100px; }
.footer-guarantees { display: flex; justify-content: center; gap: 40px; margin-bottom: 40px; flex-wrap: wrap; }
.footer-guarantee { display: flex; align-items: center; gap: 10px; }
.guarantee-emoji { font-size: 24px; }
.footer-guarantee strong { color: var(--text-secondary); font-size: 14px; font-weight: 500; }
.footer-content { text-align: center; margin-bottom: 30px; }
.footer-bottom { text-align: center; padding-top: 30px; border-top: 1px solid rgba(255, 255, 255, 0.05); }
.footer-bottom p { color: var(--text-secondary); font-size: 13px; }

@media (max-width: 768px) {
    .footer-guarantees { flex-direction: column; gap: 20px; align-items: center; }
}

/* --- Policy Pages --- */
.policy-page { min-height: 100vh; padding: 100px 20px 80px; background: var(--bg-body); }
.policy-container { max-width: 900px; margin: 0 auto; }
.policy-header { text-align: center; margin-bottom: 60px; }
.policy-header h1 { font-size: 48px; font-weight: 700; color: #fff; margin-bottom: 20px; background: linear-gradient(180deg, #fff 0%, #b0b0b0 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.policy-intro { font-size: 18px; color: var(--text-secondary); line-height: 1.6; max-width: 700px; margin: 0 auto; }

.policy-content { background: var(--bg-card); border-radius: var(--radius-card); padding: 40px; border: 1px solid rgba(255, 255, 255, 0.05); }
.policy-section { margin-bottom: 50px; padding-bottom: 40px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.policy-section:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.policy-icon { font-size: 48px; margin-bottom: 20px; }
.policy-section h2 { font-size: 28px; font-weight: 600; color: #fff; margin-bottom: 15px; }
.policy-section p { color: var(--text-secondary); line-height: 1.8; margin-bottom: 15px; font-size: 16px; }
.policy-section ul, .policy-section ol { margin: 20px 0; padding-left: 0; list-style: none; }
.policy-section ul li, .policy-section ol li { color: var(--text-secondary); line-height: 1.8; margin-bottom: 12px; padding-left: 30px; position: relative; font-size: 16px; }
.policy-section ul li::before { content: "•"; position: absolute; left: 10px; color: var(--accent-blue); font-weight: bold; }
.numbered-list { counter-reset: item; }
.numbered-list li { counter-increment: item; }
.numbered-list li::before { content: counter(item) "."; position: absolute; left: 0; color: var(--accent-blue); font-weight: 600; }

.shipping-regions { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin: 30px 0; }
.region-item { background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px; padding: 20px; text-align: center; }
.region-item strong { display: block; color: #fff; font-size: 16px; margin-bottom: 8px; }
.region-item span { color: var(--accent-blue); font-size: 14px; font-weight: 500; }

.shipping-note { font-size: 14px; font-style: italic; color: #888; margin-top: 20px; }
.response-time { font-size: 14px; color: #888; margin-top: 10px; font-style: italic; }
.highlight-box { background: rgba(0, 113, 227, 0.1); border-left: 3px solid var(--accent-blue); padding: 20px; border-radius: 8px; margin-top: 20px; }

.policy-section a { color: var(--accent-blue); text-decoration: none; transition: 0.2s; }
.policy-section a:hover { color: #0077ed; text-decoration: underline; }

.policy-cta { text-align: center; margin-top: 60px; }

/* Return Policy Shipping Conditions */
.shipping-conditions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin: 30px 0; }
.condition-box { background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px; padding: 25px; }
.condition-box h4 { color: #fff; font-size: 18px; margin-bottom: 10px; font-weight: 600; }
.quality-issue h4 { color: #4cd964; }
.personal-reason h4 { color: #ff9f0a; }
.condition-box p { color: var(--text-secondary); margin-bottom: 15px; }
.condition-box ul { margin-top: 15px; }
.condition-box .note { font-size: 13px; font-style: italic; color: #888; margin-top: 15px; background: rgba(0, 0, 0, 0.3); padding: 12px; border-radius: 8px; }
.refund-note { font-size: 14px; font-style: italic; color: #ff9f0a; margin-top: 15px; padding: 15px; background: rgba(255, 159, 10, 0.1); border-radius: 8px; border-left: 3px solid #ff9f0a; }

@media (max-width: 768px) {
    .policy-header h1 { font-size: 36px; }
    .policy-intro { font-size: 16px; }
    .policy-content { padding: 30px 20px; }
    .policy-section h2 { font-size: 24px; }
    .shipping-regions { grid-template-columns: 1fr; }
    .shipping-conditions { grid-template-columns: 1fr; }
    .condition-box { padding: 20px; }
}