/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}
a { color: #ff6034; text-decoration: none; }
a:hover { color: #e54d2e; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* === Buttons === */
.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, #ff6034, #ff8c42);
    color: #fff;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    transition: transform .15s, box-shadow .15s;
    border: none;
    cursor: pointer;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255,96,52,.35); color: #fff; }
.btn-lg { padding: 14px 36px; font-size: 17px; border-radius: 12px; }
.btn-outline {
    display: inline-block;
    border: 2px solid #ff6034;
    color: #ff6034;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: background .15s;
}
.btn-outline:hover { background: #fff5f0; }
.btn-buy {
    display: block;
    text-align: center;
    background: linear-gradient(135deg, #ff6034, #ff8c42);
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 8px;
}
.btn-buy:hover { color: #fff; opacity: .9; }
.btn-coupon {
    display: block;
    text-align: center;
    background: #ff6034;
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    margin-top: 12px;
}
.btn-coupon:hover { color: #fff; background: #e54d2e; }

/* === Header === */
.header {
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}
.logo a {
    font-size: 22px;
    font-weight: 700;
    color: #ff6034;
}
.nav { display: flex; gap: 28px; }
.nav a {
    color: #333;
    font-size: 15px;
    font-weight: 500;
    transition: color .15s;
}
.nav a:hover { color: #ff6034; }
.btn-register {
    background: #ff6034;
    color: #fff !important;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

/* === Hero === */
.hero {
    background: linear-gradient(135deg, #ff6034 0%, #ff8c42 50%, #ffb347 100%);
    color: #fff;
    padding: 60px 0 50px;
    text-align: center;
}
.hero h1 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 12px;
    text-shadow: 0 2px 4px rgba(0,0,0,.15);
}
.hero-desc {
    font-size: 18px;
    opacity: .95;
    margin-bottom: 28px;
    line-height: 1.8;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; margin-bottom: 36px; }
.hero .btn-outline { border-color: #fff; color: #fff; }
.hero .btn-outline:hover { background: rgba(255,255,255,.15); }
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
}
.stat { text-align: center; }
.stat-num { display: block; font-size: 28px; font-weight: 800; }
.stat-label { font-size: 14px; opacity: .85; }

/* === Category Nav === */
.cat-nav { background: #fff; padding: 20px 0; border-bottom: 1px solid #eee; }
.cat-nav .container { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 24px;
    border-radius: 12px;
    background: #fafafa;
    transition: background .15s, transform .15s;
    min-width: 100px;
}
.cat-item:hover { background: #fff5f0; transform: translateY(-2px); }
.cat-icon { font-size: 28px; }
.cat-name { font-size: 14px; font-weight: 600; color: #333; }

/* === Sections === */
.section { padding: 40px 0; }
.section-alt { background: #fff; }
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.section-header h2 { font-size: 22px; font-weight: 700; }
.more-link { font-size: 14px; color: #ff6034; }

/* === Product Grid === */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}
.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    transition: transform .2s, box-shadow .2s;
}
.product-card:hover { transform: translateY(-3px); box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.product-img {
    display: block;
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f8f8f8;
}
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.discount-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ff6034;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}
.product-info { padding: 14px; }
.product-title { font-size: 14px; font-weight: 600; line-height: 1.4; margin-bottom: 6px; }
.product-title a { color: #333; }
.product-title a:hover { color: #ff6034; }
.product-desc { font-size: 12px; color: #999; margin-bottom: 8px; }
.product-price { display: flex; align-items: baseline; gap: 8px; }
.price { font-size: 20px; font-weight: 800; color: #ff6034; }
.original-price { font-size: 13px; color: #999; text-decoration: line-through; }

/* === Coupon Grid === */
.coupon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.coupon-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    border: 1px dashed #ff6034;
    position: relative;
}
.coupon-platform {
    display: inline-block;
    background: #ff6034;
    color: #fff;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}
.coupon-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.coupon-discount { font-size: 28px; font-weight: 800; color: #ff6034; }
.coupon-min, .coupon-expire { font-size: 13px; color: #999; margin-top: 4px; }
.coupon-code code {
    background: #fff5f0;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    color: #ff6034;
}

/* === Article Grid === */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}
.article-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    display: flex;
    flex-direction: column;
}
.article-cover {
    height: 140px;
    background: linear-gradient(135deg, #fff5f0, #fff0e8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}
.article-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.article-body h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.article-body h3 a { color: #333; }
.article-body h3 a:hover { color: #ff6034; }
.article-summary { font-size: 13px; color: #666; flex: 1; }
.article-meta {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: #999;
    margin-top: 12px;
    flex-wrap: wrap;
}
.article-cat {
    background: #fff5f0;
    color: #ff6034;
    padding: 1px 8px;
    border-radius: 4px;
}

/* === Article List === */
.article-list { display: flex; flex-direction: column; gap: 16px; }
.article-list-item {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.article-list-item h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.article-list-item h3 a { color: #333; }
.article-list-item h3 a:hover { color: #ff6034; }

/* === Article Detail === */
.article-detail {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    align-items: start;
}
.article-content {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.article-content h1 { font-size: 26px; font-weight: 800; margin-bottom: 12px; }
.article-body { margin-top: 24px; font-size: 16px; line-height: 1.9; }
.article-body h2 { font-size: 20px; margin: 28px 0 12px; padding-left: 12px; border-left: 3px solid #ff6034; }
.article-body h3 { font-size: 17px; margin: 20px 0 8px; }
.article-body p { margin-bottom: 12px; color: #444; }
.article-body li { margin-bottom: 6px; margin-left: 20px; list-style: disc; }
.article-body a { color: #ff6034; text-decoration: underline; }
.article-sidebar { position: sticky; top: 80px; }
.invite-box {
    background: linear-gradient(135deg, #fff5f0, #fff0e8);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    border: 2px solid #ff6034;
}
.invite-box h3 { font-size: 18px; margin-bottom: 8px; }
.invite-box p { font-size: 14px; color: #666; margin-bottom: 8px; }
.invite-code code {
    background: #fff;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 800;
    color: #ff6034;
    border: 2px dashed #ff6034;
}

/* === Product Detail === */
.breadcrumb {
    font-size: 13px;
    color: #999;
    margin-bottom: 20px;
}
.breadcrumb a { color: #999; }
.breadcrumb a:hover { color: #ff6034; }
.product-detail {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 32px;
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.product-main-img {
    width: 100%;
    border-radius: 12px;
    aspect-ratio: 1;
    object-fit: cover;
}
.product-detail-info h1 { font-size: 22px; font-weight: 700; margin-bottom: 12px; }
.product-detail-desc { font-size: 15px; color: #666; margin-bottom: 16px; line-height: 1.8; }
.product-detail-price { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.price-large { font-size: 32px; font-weight: 800; color: #ff6034; }
.original-price-large { font-size: 16px; color: #999; text-decoration: line-through; }
.save-tag {
    background: #fff5f0;
    color: #ff6034;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
}
.product-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.tag {
    background: #f0f0f0;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
}
.tag-sm {
    background: #f5f5f5;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 11px;
    color: #999;
}
.product-actions { margin-bottom: 20px; }
.invite-tip {
    background: #fff5f0;
    border-radius: 8px;
    padding: 16px;
}
.invite-tip p { font-size: 14px; color: #666; margin-bottom: 8px; }
.related-products { margin-top: 32px; }
.related-products h2 { font-size: 18px; margin-bottom: 16px; }

/* === Sidebar === */
.content-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    align-items: start;
}
.sidebar {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    position: sticky;
    top: 80px;
}
.sidebar h3 { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.sidebar-cats li { margin-bottom: 4px; }
.sidebar-cats a {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    transition: background .15s;
}
.sidebar-cats a:hover { background: #fff5f0; color: #ff6034; }
.sidebar-cats li.active a { background: #fff5f0; color: #ff6034; font-weight: 600; }
.sidebar-cta {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #eee;
    text-align: center;
}
.sidebar-cta p { font-size: 13px; color: #666; margin-bottom: 10px; }

/* === Page Header === */
.page-header {
    background: linear-gradient(135deg, #ff6034, #ff8c42);
    color: #fff;
    padding: 40px 0;
    text-align: center;
}
.page-header h1 { font-size: 28px; margin-bottom: 8px; }
.page-header p { opacity: .9; }

/* === CTA Section === */
.cta-section {
    text-align: center;
    padding: 40px 20px;
    margin-top: 32px;
    background: linear-gradient(135deg, #fff5f0, #fff0e8);
    border-radius: 16px;
}
.cta-section h2 { font-size: 24px; margin-bottom: 8px; }
.cta-section p { color: #666; margin-bottom: 16px; }

/* === Footer === */
.footer {
    background: #222;
    color: #ccc;
    padding: 40px 0 20px;
    margin-top: 40px;
}
.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 24px;
}
.footer h3 { color: #fff; font-size: 18px; margin-bottom: 8px; }
.footer h4 { color: #fff; font-size: 15px; margin-bottom: 12px; }
.footer-brand p { font-size: 14px; color: #999; }
.footer-links a {
    display: block;
    font-size: 14px;
    color: #999;
    margin-bottom: 6px;
}
.footer-links a:hover { color: #ff6034; }
.footer-invite p { font-size: 13px; color: #999; margin-bottom: 8px; }
.footer-invite code {
    background: #333;
    padding: 2px 8px;
    border-radius: 4px;
    color: #ff6034;
}
.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 16px;
    text-align: center;
    font-size: 13px;
    color: #666;
}

/* === Float Button === */
.float-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #ff6034, #ff8c42);
    color: #fff;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 4px 16px rgba(255,96,52,.4);
    z-index: 999;
    transition: transform .2s;
    display: none;
}
.float-btn:hover { transform: scale(1.05); color: #fff; }

/* === Empty State === */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 16px;
}

/* === Responsive === */
@media (max-width: 768px) {
    .header .container { flex-wrap: wrap; height: auto; padding: 10px 16px; }
    .nav { display: none; }
    .hero h1 { font-size: 26px; }
    .hero-desc { font-size: 15px; }
    .hero-stats { gap: 24px; }
    .stat-num { font-size: 22px; }
    .product-detail { grid-template-columns: 1fr; }
    .product-gallery { max-width: 300px; margin: 0 auto; }
    .article-detail { grid-template-columns: 1fr; }
    .content-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .footer-inner { grid-template-columns: 1fr; gap: 20px; }
    .float-btn { display: block; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .coupon-grid { grid-template-columns: 1fr; }
    .article-grid { grid-template-columns: 1fr; }
}
