/*
Theme Name: Astra Child
Template: astra
Version: 1.0
*/

/* ===== 基础重置 ===== */
.af-landing * { box-sizing: border-box; }
.af-landing { max-width: 1100px; margin: 0 auto; padding: 0 16px 60px; font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif; color: #222; }

/* ===== 顶部条 ===== */
.af-topbar {
    background: #1a1a1a;
    color: #fff;
    display: flex;
    justify-content: space-around;
    padding: 10px 16px;
    font-size: 13px;
    flex-wrap: wrap;
    gap: 10px;
}
.af-topbar span { white-space: nowrap; }

/* ===== 紧迫感条 ===== */
.af-urgency {
    background: linear-gradient(90deg, #d32f2f, #e53935);
    color: #fff;
    text-align: center;
    padding: 14px;
    font-weight: bold;
    font-size: 15px;
    border-radius: 0 0 10px 10px;
    margin-bottom: 30px;
    animation: afPulse 2s infinite;
}
@keyframes afPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

/* ===== 英雄区 ===== */
.af-hero { display: flex; gap: 50px; align-items: flex-start; margin-bottom: 60px; }
.af-hero-img { flex: 1; position: relative; min-width: 0; }
.af-hero-info { flex: 1; min-width: 0; }

/* ===== 轮播 ===== */
.af-carousel { position: relative; border-radius: 14px; overflow: hidden; background: #f8f8f8; }
.af-carousel-track { position: relative; width: 100%; aspect-ratio: 1 / 1; }
.af-slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.af-slide.active { opacity: 1; z-index: 2; }
.af-slide img { width: 100%; height: 100%; object-fit: contain; padding: 20px; }

.af-prev, .af-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: none;
    width: 42px; height: 42px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.2s;
}
.af-prev:hover, .af-next:hover { background: #fff; transform: translateY(-50%) scale(1.1); }
.af-prev { left: 12px; }
.af-next { right: 12px; }

.af-thumbs {
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 12px;
    background: #fff;
}
.af-thumb {
    width: 60px; height: 60px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    opacity: 0.6;
}
.af-thumb:hover { opacity: 1; }
.af-thumb.active { border-color: #28a745; opacity: 1; }

/* 折扣徽章 */
.af-badge {
    position: absolute;
    top: 15px; left: 15px;
    background: #d32f2f;
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 20px;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(211,47,47,0.4);
}

/* ===== 产品标题 ===== */
.af-title { font-size: 30px; line-height: 1.25; margin: 0 0 14px; color: #1a1a1a; font-weight: 700; }
.af-title span { font-size: 16px; color: #666; font-weight: 400; display: block; margin-top: 6px; }

.af-rating { color: #f5a623; font-size: 17px; margin-bottom: 22px; }
.af-rating span { color: #666; font-size: 14px; }

/* ===== 卖点 ===== */
.af-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
    background: #f8fdf8;
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid #28a745;
}
.af-benefits li { padding: 8px 0; font-size: 15.5px; color: #333; line-height: 1.5; }

/* ===== 价格 ===== */
.af-price-box { margin-bottom: 28px; }
.af-old-price { text-decoration: line-through; color: #999; font-size: 18px; margin-right: 12px; }
.af-new-price, .af-new-price .woocommerce-Price-amount {
    font-size: 36px;
    font-weight: 800;
    color: #28a745;
    line-height: 1;
}
.af-installment { display: block; color: #666; font-size: 15px; margin-top: 8px; }

/* ===== 购买按钮 ===== */
.af-buy-btn {
    display: block;
    width: 100%;
    padding: 22px;
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(40,167,69,0.4);
    transition: all 0.25s;
    letter-spacing: 0.3px;
}
.af-buy-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(40,167,69,0.5);
}
.af-secure { text-align: center; color: #666; font-size: 14px; margin-top: 14px; }
.af-out { color: #d32f2f; font-weight: bold; font-size: 18px; }

/* ===== 社会证明 ===== */
.af-proof { margin: 60px 0; }
.af-proof h2 { text-align: center; font-size: 26px; margin-bottom: 35px; color: #1a1a1a; font-weight: 700; }
.af-reviews { display: flex; gap: 20px; }
.af-review {
    flex: 1;
    background: #fff;
    padding: 26px;
    border-radius: 12px;
    border-left: 4px solid #28a745;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    transition: transform 0.2s;
}
.af-review:hover { transform: translateY(-4px); }
.af-review p { font-style: italic; color: #333; margin: 0 0 14px; line-height: 1.6; }
.af-review span { color: #666; font-size: 14px; font-weight: 500; }

/* ===== 保障 ===== */
.af-guarantee {
    display: flex;
    justify-content: space-around;
    background: linear-gradient(135deg, #f0f8f0, #e8f5e9);
    padding: 26px;
    border-radius: 12px;
    margin: 40px 0;
    flex-wrap: wrap;
    gap: 16px;
}
.af-guarantee-item { font-size: 15px; color: #2e7d32; font-weight: 600; }

/* ===== 结账区 ===== */
.af-checkout {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 3px solid #28a745;
}
.af-checkout h2 { text-align: center; font-size: 26px; margin-bottom: 30px; color: #1a1a1a; }

/* ===== 移动端 ===== */
@media (max-width: 768px) {
    .af-landing { padding: 0 12px 40px; }
    .af-hero { flex-direction: column; gap: 24px; }
    .af-title { font-size: 21px; }
    .af-title span { font-size: 14px; }
    .af-new-price, .af-new-price .woocommerce-Price-amount { font-size: 28px; }
    .af-buy-btn { padding: 20px; font-size: 20px; }
    .af-reviews { flex-direction: column; }
    .af-guarantee { flex-direction: column; text-align: center; }
    .af-urgency { font-size: 13px; padding: 12px; }
    .af-benefits { padding: 16px; }
    .af-benefits li { font-size: 15px; }
    .af-prev, .af-next { width: 36px; height: 36px; font-size: 16px; }
    .af-thumb { width: 50px; height: 50px; }
    .af-topbar { font-size: 12px; padding: 8px; }
    .af-badge { font-size: 16px; padding: 8px 12px; }
}
