/* I Love Health Transparency™ - Single Page Design */

:root {
    --primary: #e74c3c;
    --primary-dark: #c0392b;
    --text: #2c3e50;
    --text-light: #7f8c8d;
    --bg: #f8f9fa;
    --white: #ffffff;
    --border: #e9ecef;
    --success: #27ae60;
    --warning: #f39c12;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%; 
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    background: linear-gradient(135deg, #fff 0%, #fef5f4 50%, #fff 100%);
}

/* Page Wrapper - Full Viewport */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header - 居中 */
.header {
    padding: 16px 24px;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    text-align: center;
}

.logo {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--text);
}

.logo-img {
    height: 80px;
    width: auto;
}

.logo-tagline {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-light);
    letter-spacing: 0.5px;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 30px 20px;
    overflow: auto;
}

/* ========== FOOTER ========== */
.footer {
    background: var(--text);
    color: white;
    flex-shrink: 0;
}

.footer-cards {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-card {
    text-align: center;
    max-width: 200px;
}

.card-icon {
    font-size: 28px;
    display: block;
    margin-bottom: 8px;
}

.footer-card h4 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}

.footer-card p {
    font-size: 11px;
    opacity: 0.8;
    line-height: 1.4;
}

.footer-bottom {
    padding: 16px 24px;
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}

    .footer-links a {
        color: rgba(255,255,255,0.8);
        text-decoration: none;
        font-size: 12px;
    }

        .footer-links a:hover {
            color: white;
        }

.footer-copyright {
    font-size: 11px;
    opacity: 0.6;
}

/* ========== INDEX PAGE ========== */
.search-container {
    text-align: center;
    max-width: 520px;
    width: 100%;
}

.search-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

    .search-title .highlight {
        color: var(--primary);
    }

.search-subtitle {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 20px;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.search-input {
    flex: 1;
    padding: 14px 18px;
    font-size: 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s;
}

    .search-input:focus {
        border-color: var(--primary);
    }

    .search-input::placeholder {
        color: #bdc3c7;
    }

.search-btn {
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    color: white;
    background: var(--primary);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .search-btn:hover {
        background: var(--primary-dark);
        transform: translateY(-1px);
    }

    .search-btn svg {
        width: 18px;
        height: 18px;
    }

.search-hint {
    font-size: 12px;
    color: var(--text-light);
}

/* ========== SEARCH RESULTS ========== */
.result-container {
    text-align: center;
    max-width: 600px;
    width: 100%;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--text-light);
    text-decoration: none;
    margin-bottom: 20px;
}

    .back-link:hover {
        color: var(--primary);
    }

    .back-link svg {
        width: 16px;
        height: 16px;
    }

/* Found State */
.result-found {
    background: var(--white);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.result-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}

    .result-badge.success {
        background: #d4edda;
        color: var(--success);
    }

    .result-badge svg {
        width: 16px;
        height: 16px;
    }

.product-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.product-upc {
    font-size: 13px;
    color: var(--text-light);
    font-family: monospace;
    margin-bottom: 20px;
}

.product-note {
    background: #fff8e6;
    border-left: 3px solid var(--warning);
    padding: 10px 14px;
    font-size: 13px;
    color: #856404;
    text-align: left;
    margin-bottom: 20px;
    border-radius: 0 8px 8px 0;
}

.transparency-box {
    background: #fef5f4;
    border: 1px solid #fde2de;
    border-radius: 12px;
    padding: 20px;
    text-align: left;
    margin-bottom: 20px;
}

    .transparency-box h3 {
        font-size: 14px;
        color: var(--primary);
        margin-bottom: 10px;
    }

    .transparency-box p {
        font-size: 13px;
        color: var(--text);
        line-height: 1.6;
        margin-bottom: 10px;
    }

        .transparency-box p:last-child {
            margin-bottom: 0;
        }

    .transparency-box em {
        color: var(--primary);
    }

.app-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.app-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: white;
    font-size: 14px;
    font-weight: 600;
}

    .app-btn.ios {
        background: #000;
    }

    .app-btn.android {
        background: #3ddc84;
    }

/* Document Preview */
/* Document Table */
.docs-preview {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.docs-title {
    font-size: 14px;
    color: var(--text);
    margin-bottom: 12px;
}

.docs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

    .docs-table thead {
        background: var(--text);
        color: white;
    }

    .docs-table th {
        padding: 10px 12px;
        font-weight: 600;
        font-size: 12px;
    }

        .docs-table th:first-child {
            border-radius: 8px 0 0 0;
        }

        .docs-table th:last-child {
            border-radius: 0 8px 0 0;
            text-align: center;
        }

    .docs-table td {
        padding: 10px 12px;
        border-bottom: 1px solid var(--border);
        vertical-align: middle;
    }

    .docs-table tbody tr:last-child td:first-child {
        border-radius: 0 0 0 8px;
    }

    .docs-table tbody tr:last-child td:last-child {
        border-radius: 0 0 8px 0;
    }

.row-unlocked {
    background: #e8f5e9;
}

.row-locked {
    background: #fafafa;
}

.col-type {
    width: 80px;
    white-space: nowrap;
}

.col-name {
    color: var(--text);
}

.col-status {
    width: 90px;
    text-align: center;
}

.btn-view {
    display: inline-block;
    padding: 5px 10px;
    background: var(--success);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    transition: background 0.2s;
}

    .btn-view:hover {
        background: #1e8449;
    }

.btn-locked {
    display: inline-block;
    padding: 5px 10px;
    background: #eee;
    color: var(--text-light);
    border-radius: 4px;
    font-size: 12px;
}

.docs-more {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 12px;
    text-align: center;
}

/* ========== NOT FOUND ========== */
.not-found-container {
    text-align: center;
    max-width: 450px;
    width: 100%;
    background: var(--white);
    border-radius: 16px;
    padding: 40px 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.not-found-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.not-found-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.not-found-upc {
    font-size: 14px;
    color: var(--text-light);
    font-family: monospace;
    background: var(--bg);
    padding: 6px 12px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 20px;
}
.search-error {
    color: var(--primary);
    font-size: 13px;
    min-height: 20px;
    margin-top: 8px;
}
.not-found-message {
    font-size: 14px;
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 24px;
}

.not-found-contact {
    background: #e8f4fd;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 24px;
}

    .not-found-contact p {
        font-size: 13px;
        color: var(--text);
        margin-bottom: 8px;
    }

    .not-found-contact a {
        color: var(--primary);
        font-weight: 600;
        text-decoration: none;
    }

        .not-found-contact a:hover {
            text-decoration: underline;
        }

.not-found-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-primary {
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
}

    .btn-primary:hover {
        background: var(--primary-dark);
    }

.btn-secondary {
    padding: 12px 24px;
    background: var(--bg);
    color: var(--text);
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
}

    .btn-secondary:hover {
        background: var(--border);
    }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .footer-cards {
        flex-direction: column;
        align-items: center;
        gap: 16px;
        padding: 20px;
    }

    .footer-card {
        max-width: 280px;
    }
}

@media (max-width: 600px) {
    .search-title {
        font-size: 26px;
        font-weight: 700;
        color: var(--text);
        margin-bottom: 6px;
    }

    .search-box {
        flex-direction: column;
    }

    .search-btn {
        justify-content: center;
    }

    .app-buttons {
        flex-direction: column;
    }

    .not-found-actions {
        flex-direction: column;
    }

    .result-found {
        padding: 24px 20px;
    }

    .upc-guide {
        flex-direction: column;
        text-align: center;
    }

    .upc-hint {
        text-align: center;
    }

    .app-promo-content p {
        font-size: 12px;
    }

}

/* UPC Guide */
.upc-guide {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
    padding:12px;
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.upc-sample-img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.upc-hint {
    font-size: 12px;
    color: var(--text-light);
    text-align: left;
    max-width: 300px;
    margin: 0;
    line-height: 1.4;
}
/* APP Promo - 高转化设计 */
.app-promo {
    margin-top: 16px;
    padding: 16px;
    background: linear-gradient(135deg, #e8f5e9 0%, #fff 100%);
    border: 2px solid var(--success);
    border-radius: 12px;
    position: relative;
}

    .app-promo::before {
        content: "⭐ RECOMMENDED";
        position: absolute;
        top: -10px;
        left: 50%;
        transform: translateX(-50%);
        background: var(--success);
        color: white;
        font-size: 10px;
        font-weight: 700;
        padding: 2px 12px;
        border-radius: 10px;
    }

.app-promo-content h3 {
    font-size: 15px;
    color: var(--success);
    margin-bottom: 8px;
}

.app-promo-content p {
    font-size: 12px;
    color: var(--text);
    line-height: 1.5;
    margin-bottom: 8px;
}

    .app-promo-content p:last-of-type {
        margin-bottom: 0;
    }

.app-promo .app-buttons {
    margin-top: 12px;
    gap: 10px;
}

.app-promo .app-btn {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 700;
}

    .app-promo .app-btn.ios {
        background: linear-gradient(135deg, #333 0%, #000 100%);
    }

    .app-promo .app-btn.android {
        background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
    }

