/* ===== 建筑资料付费网站 - 主样式 ===== */
:root {
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --primary-light: #e8f0fe;
    --success: #0f9d58;
    --success-light: #e6f4ea;
    --warning: #f9ab00;
    --danger: #d93025;
    --gray-50: #f8f9fa;
    --gray-100: #f1f3f4;
    --gray-200: #e8eaed;
    --gray-300: #dadce0;
    --gray-400: #bdc1c6;
    --gray-500: #9aa0a6;
    --gray-600: #80868b;
    --gray-700: #5f6368;
    --gray-800: #3c4043;
    --gray-900: #202124;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    --shadow-lg: 0 4px 6px rgba(0,0,0,.07), 0 10px 15px rgba(0,0,0,.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Navigation ===== */
.navbar {
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
}
.navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.navbar-brand {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 8px;
}
.navbar-brand:hover { text-decoration: none; }
.navbar-brand .brand-icon {
    width: 32px; height: 32px;
    background: var(--primary);
    color: #fff;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
}
.navbar-links { display: flex; gap: 8px; }
.navbar-links a {
    padding: 8px 16px;
    border-radius: 8px;
    color: var(--gray-700);
    font-size: 14px;
    transition: all .2s;
}
.navbar-links a:hover,
.navbar-links a.active {
    background: var(--primary-light);
    color: var(--primary);
    text-decoration: none;
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}

/* ===== Hero Section ===== */
.hero {
    text-align: center;
    padding: 48px 0 32px;
}
.hero h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--gray-900);
}
.hero p {
    font-size: 16px;
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Section Title ===== */
.section-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-title .badge {
    font-size: 12px;
    background: var(--primary-light);
    color: var(--primary);
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: 500;
}

/* ===== Card Grid ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all .3s;
    border: 1px solid var(--gray-200);
}
.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}
.card-cover {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    font-size: 14px;
}
.card-body { padding: 20px; }
.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-subtitle {
    font-size: 13px;
    color: var(--gray-600);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.card-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--danger);
}
.card-pages {
    font-size: 12px;
    color: var(--gray-500);
}
.card-actions { display: flex; gap: 8px; }
.card-actions .btn { flex: 1; text-align: center; }

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--primary-dark);
    color: #fff;
}
.btn-success {
    background: var(--success);
    color: #fff;
}
.btn-success:hover {
    background: #0b8043;
    color: #fff;
}
.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}
.btn-outline:hover {
    background: var(--primary-light);
}
.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
    border-radius: 10px;
}
.btn-block { width: 100%; }
.btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* ===== Product Detail ===== */
.product-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.product-info-side h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}
.product-subtitle {
    font-size: 15px;
    color: var(--gray-600);
    margin-bottom: 16px;
}
.product-desc {
    font-size: 14px;
    color: var(--gray-700);
    line-height: 1.8;
    margin-bottom: 24px;
}
.product-desc p { margin-bottom: 8px; }
.product-meta-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}
.product-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--gray-600);
    background: var(--gray-100);
    padding: 6px 12px;
    border-radius: 6px;
}
.product-price-box {
    background: var(--primary-light);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}
.product-price-box .price {
    font-size: 36px;
    font-weight: 700;
    color: var(--danger);
}
.product-price-box .price-label {
    font-size: 13px;
    color: var(--gray-600);
    margin-top: 4px;
}
.product-actions { display: flex; gap: 12px; }
.product-actions .btn { flex: 1; }

/* ===== Preview Section ===== */
.preview-section {
    margin-top: 40px;
}
.preview-section h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
}
.preview-notice {
    background: var(--warning);
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.preview-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}
.preview-grid img {
    max-width: 100%;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
}
.preview-blur-overlay {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}
.preview-blur-overlay::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(transparent, rgba(255,255,255,.95));
    pointer-events: none;
}
.preview-paywall {
    text-align: center;
    padding: 40px 20px;
    background: var(--gray-100);
    border-radius: var(--radius);
    margin-top: 20px;
    border: 2px dashed var(--gray-300);
}
.preview-paywall h3 {
    font-size: 18px;
    margin-bottom: 8px;
}
.preview-paywall p {
    color: var(--gray-600);
    margin-bottom: 20px;
    font-size: 14px;
}

/* ===== Checkout Page ===== */
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 800px;
    margin: 0 auto;
}
.checkout-order-summary {
    background: #fff;
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--gray-200);
}
.checkout-order-summary h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}
.checkout-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}
.checkout-item:last-child { border-bottom: none; }
.checkout-total {
    font-size: 28px;
    font-weight: 700;
    color: var(--danger);
    text-align: right;
    margin-top: 8px;
}
.checkout-payment {
    background: #fff;
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--gray-200);
}
.checkout-payment h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}
.payment-qr-area {
    text-align: center;
    padding: 20px;
}
.payment-qr-area img {
    width: 200px;
    height: 200px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    margin-bottom: 12px;
}
.payment-qr-area .qr-hint {
    font-size: 13px;
    color: var(--gray-600);
}
.payment-form { margin-top: 16px; }
.payment-form .form-group { margin-bottom: 16px; }
.payment-form label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--gray-700);
}
.payment-form input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 14px;
    transition: border .2s;
}
.payment-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,115,232,.15);
}
.payment-steps {
    margin: 16px 0;
    padding: 16px;
    background: var(--gray-50);
    border-radius: 8px;
}
.payment-steps ol {
    margin-left: 20px;
    font-size: 14px;
    color: var(--gray-700);
}
.payment-steps ol li { margin-bottom: 6px; }

/* ===== Download Page ===== */
.download-hero {
    text-align: center;
    padding: 48px 0;
}
.download-hero .icon-check {
    width: 64px;
    height: 64px;
    background: var(--success-light);
    color: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 16px;
}
.download-hero h1 {
    font-size: 24px;
    margin-bottom: 8px;
}
.download-hero p { color: var(--gray-600); }
.download-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 32px;
    border: 1px solid var(--gray-200);
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}
.download-card h3 { margin-bottom: 8px; }
.download-info {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin: 16px 0;
    font-size: 13px;
    color: var(--gray-600);
}
.download-btn-area { margin: 24px 0; }
.download-extra-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    top: 80px;
    right: 24px;
    padding: 14px 20px;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    z-index: 999;
    animation: slideIn .3s ease;
    box-shadow: var(--shadow-lg);
}
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-info { background: var(--primary); }
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    padding: 24px;
    color: var(--gray-500);
    font-size: 13px;
    border-top: 1px solid var(--gray-200);
    margin-top: 40px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .product-header,
    .checkout-layout {
        grid-template-columns: 1fr;
    }
    .navbar-inner { padding: 0 16px; }
    .container { padding: 20px 16px; }
    .hero h1 { font-size: 24px; }
    .product-info-side h1 { font-size: 22px; }
    .card-grid { grid-template-columns: 1fr; }
}
