* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary: #1a5276;
    --primary-light: #2980b9;
    --accent: #00a8ff;
    --bg: #f0f2f5;
    --card-bg: #ffffff;
    --text: #2c3e50;
    --text-light: #7f8c8d;
    --border: #e8eaed;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.12);
    --radius: 12px;
    --header-h: 56px;
}

html {
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Microsoft YaHei", "PingFang SC", "Helvetica Neue", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg);
    position: relative;
}

/* ========== Header ========== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    box-shadow: 0 2px 8px rgba(26, 82, 118, 0.3);
}

.header-title {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.header-back {
    position: absolute;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background 0.2s;
}

.header-back:active {
    background: rgba(255, 255, 255, 0.2);
}

.header-back svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

/* ========== List Page ========== */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    padding: 40px 20px 30px;
    text-align: center;
}

.hero-section h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.hero-section p {
    font-size: 0.85rem;
    opacity: 0.85;
    line-height: 1.5;
}

.product-list {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.product-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    display: block;
}

.product-card:active {
    transform: scale(0.98);
    box-shadow: var(--shadow-hover);
}

.product-card-top {
    height: 6px;
    background: linear-gradient(90deg, var(--accent), var(--primary-light));
}

.product-card-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px 10px;
}

.product-card-head-text {
    flex: 1;
    min-width: 0;
}

.product-card-img {
    width: 200px;
    height: 100px;
    flex-shrink: 0;
    object-fit: cover;
    object-position: center;
    border-radius: 8px;
    display: block;
    background: #eef1f5;
    overflow: hidden;
}

.product-card-img.full {
    object-fit: contain;
}

.product-card-body {
    padding: 0 16px 16px;
}

.product-card-tag {
    display: inline-block;
    font-size: 0.7rem;
    color: var(--accent);
    background: rgba(0, 168, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
    font-weight: 500;
}

.product-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    line-height: 1.4;
}

.product-card-summary {
    font-size: 0.82rem;
    color: var(--text-light);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.product-card-arrow {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.product-card-arrow svg {
    width: 16px;
    height: 16px;
    fill: var(--accent);
}

/* ========== Detail Page ========== */
.detail-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    padding: 30px 20px 24px;
    text-align: center;
}

.detail-banner h1 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.4;
}

.detail-banner p {
    font-size: 0.8rem;
    opacity: 0.8;
}

.detail-content {
    padding: 16px;
}

.detail-section {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 16px;
    margin-bottom: 14px;
}

.detail-section h2 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 12px;
    padding-left: 10px;
    border-left: 3px solid var(--accent);
    line-height: 1.4;
}

.detail-section h3 {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
    margin: 14px 0 8px;
}

.detail-section p {
    font-size: 0.85rem;
    color: var(--text);
    line-height: 1.8;
    margin-bottom: 10px;
    text-align: justify;
}

.detail-section ul {
    list-style: none;
    padding: 0;
    margin: 8px 0;
}

.detail-section li {
    font-size: 0.85rem;
    color: var(--text);
    line-height: 1.8;
    padding-left: 16px;
    position: relative;
    margin-bottom: 4px;
}

.detail-section li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
}

.detail-section .highlight-box {
    background: rgba(0, 168, 255, 0.06);
    border-radius: 8px;
    padding: 12px 14px;
    margin: 10px 0;
}

.detail-section .highlight-box p {
    margin-bottom: 0;
}

.detail-section .case-tag {
    display: inline-block;
    font-size: 0.75rem;
    color: #fff;
    background: var(--primary-light);
    padding: 3px 10px;
    border-radius: 20px;
    margin: 2px 4px 2px 0;
}

/* ========== Download Section ========== */
.download-section {
    padding: 10px 16px 30px;
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary-light) 100%);
    color: #fff;
    text-decoration: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 168, 255, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.download-btn:active {
    transform: scale(0.97);
    box-shadow: 0 2px 8px rgba(0, 168, 255, 0.3);
}

.download-btn svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

/* ========== Footer ========== */
.footer {
    text-align: center;
    padding: 20px 16px 24px;
    color: var(--text-light);
    font-size: 0.75rem;
}

.footer p {
    margin-bottom: 4px;
}

.footer .company-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 6px;
}

/* ========== Responsive ========== */
@media (min-width: 481px) {
    .container {
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.06);
    }
}

/* Safe area for notch phones */
@supports (padding: env(safe-area-inset-top)) {
    .header {
        padding-top: env(safe-area-inset-top);
        height: calc(var(--header-h) + env(safe-area-inset-top));
    }
}
