* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-size: 18px;
    line-height: 1.8;
    color: #333;
}

/* 百度白皮书5.0 字体规范 - 适合老人阅读 */
body {
    font-size: 18px;
    line-height: 1.8;
}
p, li, span {
    font-size: 16px;
    line-height: 1.8;
    color: #666;
}
.text-sm {
    font-size: 16px !important;
}
.text-xs {
    font-size: 14px !important;
}
h1 {
    font-size: 32px;
    line-height: 1.4;
}
h2 {
    font-size: 26px;
    line-height: 1.4;
}
h3 {
    font-size: 22px;
    line-height: 1.4;
}
h4 {
    font-size: 20px;
    line-height: 1.4;
}

/* 颜色规范 */
.primary-blue {
    color: #1E88E5;
}
.bg-primary-blue {
    background-color: #1E88E5;
}
.border-primary-blue {
    border-color: #1E88E5;
}
.bg-light-blue {
    background-color: #E3F2FD;
}
.text-primary-green {
    color: #43A047;
}
.bg-primary-green {
    background-color: #43A047;
}
.text-primary {
    color: #2e7d32;
}
.bg-primary {
    background-color: #2e7d32;
}
.bg-light {
    background-color: #e8f5e9;
}

/* 行高限制 */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
}
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
}

/* 按钮样式优化 */
.btn-primary {
    background: linear-gradient(135deg, #1E88E5 0%, #1565C0 100%);
    color: white;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 18px;
    line-height: 1.4;
    transition: all 0.3s;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #1565C0 0%, #0D47A1 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.3);
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
}
.card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

/* 输入框样式 - 适合老人 */
input, select, textarea {
    font-size: 18px !important;
    padding: 14px 18px !important;
    border-radius: 10px !important;
    border: 2px solid #e0e0e0 !important;
    transition: all 0.3s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #1E88E5 !important;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}
label {
    font-size: 16px !important;
}

/* 百度白皮书5.0 加载优化 */
img {
    max-width: 100%;
    height: auto;
}

/* 移动端字体优化 - 更大更清晰 */
@media (max-width: 768px) {
    body {
        font-size: 17px;
        line-height: 1.8;
    }
    p, li, span {
        font-size: 16px;
        line-height: 1.8;
    }
    h1 {
        font-size: 28px;
    }
    h2 {
        font-size: 24px;
    }
    h3 {
        font-size: 20px;
    }
    h4 {
        font-size: 18px;
    }
    input, select, textarea {
        font-size: 17px !important;
        padding: 14px 16px !important;
    }
    .text-sm {
        font-size: 15px !important;
    }
    .text-xs {
        font-size: 14px !important;
    }
}

/* 保证可点击区域足够大 */
a:not(.flex.flex-col), 
button:not(.flex.flex-col) {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* 移动端底部导航特殊处理 */
nav.fixed.bottom-0 a {
    min-height: auto !important;
    display: flex !important;
}

/* 间距优化 */
section {
    padding: 24px 0;
}
@media (max-width: 768px) {
    section {
        padding: 20px 0;
    }
}

/* 百度白皮书5.0：服务承诺区域 - 白色文字 */
.bg-primary-blue.text-white {
    color: white !important;
}
.bg-primary-blue.text-white svg {
    color: white !important;
    fill: none;
    stroke: white;
}
.bg-primary-blue.text-white span {
    color: white !important;
}

/* 立即购买按钮 - 白色文字 */
.bg-gradient-to-r.from-green-500.to-green-600.text-white,
.bg-gradient-to-r.from-green-600.to-green-700.text-white {
    color: white !important;
}
.bg-gradient-to-r.from-green-500.to-green-600.text-white svg,
.bg-gradient-to-r.from-green-600.to-green-700.text-white svg {
    color: white !important;
    fill: none;
    stroke: white;
}
.bg-gradient-to-r.from-green-500.to-green-600.text-white span,
.bg-gradient-to-r.from-green-600.to-green-700.text-white span {
    color: white !important;
}

/* 标签和按钮文字加粗 - 适合老人 */
.font-medium {
    font-weight: 600;
}
.font-semibold {
    font-weight: 600;
}
.font-bold {
    font-weight: 700;
}

/* 百度白皮书5.0：Header背景渐变 - 简洁导航 */
#main-header,
header#main-header {
    background: linear-gradient(to right, #f9fafb, #eff6ff) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* 产品分类区域背景 */
section.py-8 {
    background-color: #f9fafb;
}

/* ========== 移动端Header优化 ========== */
#mobile-header {
    background: linear-gradient(to bottom, #f9fafb 0%, #ffffff 100%);
}

#mobile-header .bg-gradient-to-r {
    background-image: linear-gradient(to right, #1E88E5, #2563eb);
}

#mobile-header .bg-white {
    background-color: #ffffff;
}

/* 移动端菜单动画 */
#mobile-menu {
    transition: all 0.3s ease-in-out;
}

#mobile-menu.hidden {
    display: none;
}

/* 移动端菜单项 */
#mobile-menu a {
    display: block;
    padding: 12px 16px;
    border-radius: 8px;
    transition: all 0.2s;
}

#mobile-menu a:hover {
    background-color: #f3f4f6;
}

#mobile-menu a.bg-blue-50 {
    background-color: #eff6ff;
}

/* 移动端服务承诺网格 */
#mobile-menu .grid-cols-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

/* 汉堡菜单按钮 */
#menu-toggle {
    padding: 8px;
    border-radius: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

#menu-toggle:hover {
    background-color: #f3f4f6;
}

#menu-toggle:active {
    background-color: #e5e7eb;
}

/* 移动端文字截断 */
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 移动端flex优化 */
.flex-shrink-0 {
    flex-shrink: 0;
}

.overflow-hidden {
    overflow: hidden;
}

/* 移动端阴影 */
.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 移动端响应式服务承诺 */
@media (max-width: 768px) {
    #mobile-header .bg-gradient-to-r {
        padding: 8px 16px;
    }
    
    #mobile-header .space-x-4 > * + * {
        margin-left: 16px;
    }
    
    #mobile-header .text-xs {
        font-size: 12px;
    }
}

/* ========== 产品页专用样式 ========== */
.text-primary { color: #2e7d32; }
.bg-primary { background-color: #2e7d32; }
.border-primary { border-color: #2e7d32; }
.bg-light { background-color: #e8f5e9; }
.btn-primary {
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #1b5e20 0%, #003300 100%);
}
.package-selected {
    border-color: #2e7d32 !important;
    background-color: #e8f5e9;
}

/* 分类标签选中状态 - 蓝色背景 */
a.bg-blue-500,
a.bg-blue-500.text-white {
    background-color: #1E88E5 !important;
    color: white !important;
    border-color: #1E88E5 !important;
}

a.bg-blue-500:hover,
a.bg-blue-500.text-white:hover {
    background-color: #1565C0 !important;
    border-color: #1565C0 !important;
}

/* ========== 页面修复关键样式 ========== */
.grid { display: grid !important; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
.grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
@media (min-width: 768px) {
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
    .md\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
}

.flex { display: flex !important; }
.flex-col { flex-direction: column !important; }
.flex-row { flex-direction: row !important; }
.items-center { align-items: center !important; }
.justify-center { justify-content: center !important; }
.justify-between { justify-content: space-between !important; }

.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 0.75rem !important; }
.gap-4 { gap: 1rem !important; }
.gap-6 { gap: 1.5rem !important; }
.gap-8 { gap: 2rem !important; }
@media (min-width: 768px) {
    .md\:gap-4 { gap: 1rem !important; }
    .md\:gap-8 { gap: 2rem !important; }
}

.max-w-4xl { max-width: 56rem !important; }
.max-w-7xl { max-width: 80rem !important; }
.max-w-md { max-width: 28rem !important; }

.mx-auto { margin-inline: auto !important; }
.px-3 { padding-inline: 0.75rem !important; }
.px-4 { padding-inline: 1rem !important; }
.py-3 { padding-block: 0.75rem !important; }
.py-6 { padding-block: 1.5rem !important; }
.py-8 { padding-block: 2rem !important; }
.py-12 { padding-block: 3rem !important; }
.py-16 { padding-block: 4rem !important; }
@media (min-width: 768px) {
    .md\:py-12 { padding-block: 3rem !important; }
    .md\:py-16 { padding-block: 4rem !important; }
}

.text-xl { font-size: 1.25rem !important; }
.text-3xl { font-size: 1.875rem !important; }
.text-4xl { font-size: 2.25rem !important; }
.text-sm { font-size: 0.875rem !important; }
.text-xs { font-size: 0.75rem !important; }
.text-lg { font-size: 1.125rem !important; }

.text-primary-blue { color: #1E88E5 !important; }
.bg-primary-blue { background-color: #1E88E5 !important; }

.text-gray-50 { color: #f9fafb !important; }
.text-gray-100 { color: #f3f4f6 !important; }
.text-gray-500 { color: #6b7280 !important; }
.text-gray-600 { color: #4b5563 !important; }
.text-gray-800 { color: #1f2937 !important; }
.text-gray-900 { color: #111827 !important; }
.text-green-500 { color: #22c55e !important; }
.text-red-500 { color: #ef4444 !important; }
.text-blue-700 { color: #1d4ed8 !important; }

.font-bold { font-weight: 700 !important; }
.font-semibold { font-weight: 600 !important; }

.p-3 { padding: 0.75rem !important; }
.p-4 { padding: 1rem !important; }
.p-6 { padding: 1.5rem !important; }

.mb-1 { margin-bottom: 0.25rem !important; }
.mb-3 { margin-bottom: 0.75rem !important; }
.mb-4 { margin-bottom: 1rem !important; }
.mb-5 { margin-bottom: 1.25rem !important; }
.mb-6 { margin-bottom: 1.5rem !important; }

.ml-3 { margin-left: 0.75rem !important; }
.ml-6 { margin-left: 1.5rem !important; }
.ml-8 { margin-left: 2rem !important; }

.rounded-xl { border-radius: 0.75rem !important; }
.rounded-lg { border-radius: 0.5rem !important; }
.rounded-full { border-radius: 9999px !important; }

.bg-white { background-color: #ffffff !important; }
.bg-gray-50 { background-color: #f9fafb !important; }
.bg-gray-100 { background-color: #f3f4f6 !important; }
.bg-blue-50 { background-color: #eff6ff !important; }

.border { border-width: 1px !important; }
.border-2 { border-width: 2px !important; }
.border-gray-100 { border-color: #f3f4f6 !important; }
.border-primary-blue { border-color: #1E88E5 !important; }

.w-full { width: 100% !important; }
.w-5 { width: 1.25rem !important; }
.w-6 { width: 1.5rem !important; }
.w-8 { width: 2rem !important; }
.w-10 { width: 2.5rem !important; }
.w-48 { width: 12rem !important; }
.w-36 { width: 9rem !important; }

.h-5 { height: 1.25rem !important; }
.h-6 { height: 1.5rem !important; }
.h-8 { height: 2rem !important; }
.h-10 { height: 2.5rem !important; }
.h-48 { height: 12rem !important; }
.h-56 { height: 14rem !important; }

.object-contain { object-fit: contain !important; }
.overflow-hidden { overflow: hidden !important; }
.shadow-sm { box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05) !important; }
.shadow-md { box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1) !important; }

.transition-all { transition: all 0.3s ease !important; }
.transition-colors { transition: color 0.3s ease !important; }
.duration-300 { transition-duration: 300ms !important; }

.relative { position: relative !important; }
.absolute { position: absolute !important; }
.static { position: static !important; }
.top-0 { top: 0 !important; }
.right-0 { right: 0 !important; }
.bottom-0 { bottom: 0 !important; }
.left-0 { left: 0 !important; }

.z-10 { z-index: 10 !important; }
.z-30 { z-index: 30 !important; }
.z-40 { z-index: 40 !important; }
.z-50 { z-index: 50 !important; }

.bg-gradient-to-br { background-image: linear-gradient(to bottom right, var(--tw-gradient-stops)) !important; }
.bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-gradient-stops)) !important; }
.bg-gradient-to-b { background-image: linear-gradient(to bottom, var(--tw-gradient-stops)) !important; }

.from-blue-50 { --tw-gradient-from: #eff6ff !important; }
.from-gray-50 { --tw-gradient-from: #f9fafb !important; }
.to-white { --tw-gradient-to: #ffffff !important; }
.to-gray-100 { --tw-gradient-to: #f3f4f6 !important; }

.whitespace-nowrap { white-space: nowrap !important; }
.block { display: block !important; }
.inline-flex { display: inline-flex !important; }

.line-clamp-2 {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}
.line-clamp-3 {
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* 隐藏类 - 确保弹窗默认隐藏 */
.hidden {
    display: none !important;
}

/* 移动端提示弹窗默认隐藏 */
#tip-overlay {
    display: none !important;
}

/* 弹窗显示时的样式 */
#tip-overlay.show {
    display: flex !important;
}
@media (min-width: 1024px) {
    .lg\:flex {
        display: flex !important;
    }
}

/* ========== 图片自适应样式 ========== */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 产品卡片图片容器 */
.product-image-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    background: #f5f5f5 !important;
}

/* 响应式图片高度 */
.product-image-container img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
}

/* 移动端产品图片 */
@media (max-width: 768px) {
    .product-image-container img {
        width: 100%;
        max-width: 100%;
        height: auto;
        display: block;
    }
}

/* 固定比例容器 */
.aspect-square {
    aspect-ratio: 1 / 1;
}

.aspect-video {
    aspect-ratio: 16 / 9;
}

.aspect-[4/3] {
    aspect-ratio: 4 / 3;
}

