/* Buying Guide Page Styles */

/* Breadcrumb Navigation */
.breadcrumb-nav {
    background-color: #f8fafc;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.breadcrumb-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    box-sizing: border-box;
}

.breadcrumb {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    white-space: nowrap;
    overflow-x: auto;
    min-width: 0;
}

.breadcrumb li {
    position: relative;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
    color: #64748b;
    flex-shrink: 0;
    white-space: nowrap;
}

.breadcrumb li+li:before {
    content: "/";
    color: #b3b3b3;
    padding: 0 8px;
}

.breadcrumb li.active {
    color: #0c4a6e;
    font-weight: 600;
}

.breadcrumb a {
    color: #1e40af;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #6ec1e4;
    text-decoration: underline;
}

/* 强制显示面包屑导航 */
.breadcrumb-nav,
.breadcrumb-container,
.breadcrumb {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    height: auto !important;
    z-index: 10 !important;
    position: relative !important;
}

/* 强制面包屑不换行 */
.breadcrumb {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    white-space: nowrap !important;
    overflow-x: auto !important;
}

.breadcrumb li {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    display: inline-block !important;
}

/* 额外的面包屑单行显示规则 */
.breadcrumb-nav .breadcrumb {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
}

.breadcrumb-nav .breadcrumb li {
    display: inline-flex !important;
    align-items: center !important;
}

/* Guide Hero Section */
.guide-hero {
    background: linear-gradient(135deg, #e0f2fe 0%, #b3e5fc 100%);
    padding: 120px 0 80px;
    margin-top: 70px;
}

.guide-hero .hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.guide-hero h1 {
    font-size: 3rem;
    color: #1e40af;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #64748b;
    margin-bottom: 3rem;
}

.guide-value {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
}

.guide-value h3 {
    color: #1e40af;
    margin-bottom: 1rem;
    text-align: center;
}

.value-list {
    list-style: none;
    margin: 0;
}

.value-list li {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
    color: #64748b;
}

.value-list li::before {
    content: "✓";
    color: #10b981;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Table of Contents */
.table-of-contents {
    padding: 60px 0;
    background-color: white;
}

.table-of-contents h2 {
    text-align: center;
    color: #1e40af;
    margin-bottom: 3rem;
}

.toc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.toc-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background-color: #f8fafc;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.toc-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #6EC1E4;
}

.toc-number {
    width: 50px;
    height: 50px;
    background-color: #6EC1E4;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.toc-content h4 {
    color: #1e40af;
    margin-bottom: 0.25rem;
}

.toc-content p {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0;
}

/* Content Sections */
.content-section {
    padding: 80px 0;
}

.content-section.alt-bg {
    background-color: #f8fafc;
}

.content-section h2 {
    color: #1e40af;
    text-align: center;
    margin-bottom: 3rem;
}

.section-intro {
    text-align: center;
    color: #64748b;
    font-size: 1.1rem;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Content Grid Layout */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.content-text h3 {
    color: #1e40af;
    margin-bottom: 1.5rem;
}

.content-image {
    text-align: center;
}

.content-image img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Benefits Grid */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.benefit-item {
    background-color: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.benefit-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.benefit-item h4 {
    color: #1e40af;
    margin-bottom: 0.5rem;
}

.benefit-item p {
    color: #64748b;
    font-size: 0.9rem;
}

/* Foam Types */
.foam-types {
    display: grid;
    gap: 2rem;
    margin-bottom: 4rem;
}

.foam-type-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.type-header {
    background-color: #1e40af;
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.type-header h3 {
    margin: 0;
    color: white;
}

.type-badge {
    background-color: #6EC1E4;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.type-content {
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    align-items: start;
}

.type-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.type-details h4 {
    color: #1e40af;
    margin-bottom: 1rem;
}

.type-details ul {
    list-style: none;
    margin-bottom: 1.5rem;
}

.type-details li {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
    color: #64748b;
}

.type-details li::before {
    content: "•";
    color: #6EC1E4;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Comparison Table */
.comparison-section {
    margin-top: 4rem;
}

.comparison-section h3 {
    color: #1e40af;
    text-align: center;
    margin-bottom: 2rem;
}

.comparison-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* for smooth scrolling on iOS */
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* 滑动指示器样式 */
.swipe-indicator {
    display: none;
    text-align: center;
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 2rem;
    animation: fadeInOut 2s infinite;
}

@keyframes fadeInOut {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

@media (max-width: 768px) {
    .swipe-indicator {
        display: block;
    }
    
    /* 添加滚动条样式 */
    .comparison-table::-webkit-scrollbar {
        height: 4px;
    }
    
    .comparison-table::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
    }
    
    .comparison-table::-webkit-scrollbar-thumb {
        background: #0ea5e9;
        border-radius: 10px;
    }
}

.comparison-table table {
    width: 100%;
    min-width: 600px; /* 确保表格有最小宽度，防止内容被压缩 */
    border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}

.comparison-table th {
    background-color: #1e40af;
    color: white;
    font-weight: 600;
}

.comparison-table td:first-child {
    font-weight: 600;
    color: #1e40af;
    text-align: left;
}

.excellent { color: #10b981; font-weight: 600; }
.good { color: #6EC1E4; font-weight: 600; }
.fair { color: #f59e0b; font-weight: 600; }

/* Sleep Positions */
.sleep-positions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.position-card {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.position-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f9ff;
    padding: 10px;
}

.position-icon img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.position-card h4 {
    color: #1e40af;
    margin-bottom: 1rem;
}

.position-details p {
    margin-bottom: 0.75rem;
    color: #64748b;
    text-align: left;
}

.position-details strong {
    color: #1e40af;
}

/* Firmness Scale */
.firmness-scale {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.scale-item {
    background-color: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.scale-number {
    background-color: #6EC1E4;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    margin: 0 auto 1rem;
}

.scale-item h4 {
    color: #1e40af;
    margin-bottom: 0.5rem;
}

.scale-item p {
    color: #64748b;
    font-size: 0.9rem;
}

/* Cooling Features */
.cooling-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.cooling-feature {
    background-color: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.cooling-feature h4 {
    color: #1e40af;
    margin-bottom: 0.5rem;
}

.cooling-feature p {
    color: #64748b;
    font-size: 0.9rem;
}

/* Adjustability Info */
.adjustability-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.adjust-benefit {
    background-color: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.adjust-benefit h4 {
    color: #1e40af;
    margin-bottom: 0.5rem;
}

.adjust-benefit p {
    color: #64748b;
    font-size: 0.9rem;
}

/* Allergy Info */
.allergy-info {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-top: 2rem;
}

.allergy-features {
    list-style: none;
    margin-top: 1rem;
}

.allergy-features li {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
    color: #64748b;
}

.allergy-features li::before {
    content: "✓";
    color: #10b981;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.allergy-features strong {
    color: #1e40af;
}

/* Recommendation Categories */
.recommendation-categories {
    display: grid;
    gap: 30px;
    margin-top: 20px;
}

.rec-category {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.rec-category h3 {
    background-color: #1e40af;
    color: white;
    padding: 1.5rem;
    margin: 0;
    text-align: center;
}

.rec-content {
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    align-items: start;
}

.rec-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.rec-details h4 {
    color: #1e40af;
    margin-bottom: 1rem;
}

.rec-details ul {
    list-style: none;
    margin-bottom: 2rem;
}

.rec-details li {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
    color: #64748b;
}

.rec-details li::before {
    content: "•";
    color: #6EC1E4;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.rec-product {
    margin-top: 15px;
    border-top: 1px solid #e0e0e0;
    padding-top: 15px;
}

.rec-product h5 {
    margin-bottom: 5px;
    color: #333;
}

.rec-product p {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.6;
}

.rec-buttons {
    display: flex;
    gap: 10px;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.rec-buttons .cta-button {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    text-align: center;
    flex-grow: 1;
    min-width: 120px;
    border: 1px solid transparent;
}

.rec-buttons .cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.rec-buttons .cta-button:not(.buy-button) {
    background-color: #f0f0f0;
    color: #333;
    border-color: #ddd;
}

.rec-buttons .cta-button:not(.buy-button):hover {
    background-color: #e0e0e0;
}

.rec-buttons .cta-button.buy-button {
    background-color: #4267B2;
    color: white;
    border-color: transparent;
}

.rec-buttons .cta-button.buy-button:hover {
    background-color: #365899;
}

/* Care Grid */
.care-grid {
    display: grid;
    gap: 3rem;
}

.care-section h3 {
    color: #1e40af;
    margin-bottom: 2rem;
    text-align: center;
}

.care-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.care-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.care-steps h4 {
    color: #1e40af;
    margin-bottom: 1rem;
}

.care-steps ol {
    margin-bottom: 2rem;
}

.care-steps li {
    margin-bottom: 0.5rem;
    color: #64748b;
}

.care-steps strong {
    color: #1e40af;
}

/* Lifespan Tips */
.lifespan-tips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.tip-item {
    background-color: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.tip-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.tip-item h4 {
    color: #1e40af;
    margin-bottom: 0.5rem;
}

.tip-item p {
    color: #64748b;
    font-size: 0.9rem;
}

/* Troubleshooting */
.troubleshooting {
    display: grid;
    gap: 1.5rem;
}

.issue-item {
    background-color: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #6EC1E4;
}

.issue-item h4 {
    color: #1e40af;
    margin-bottom: 0.5rem;
}

.issue-item p {
    color: #64748b;
    margin: 0;
}

.issue-item strong {
    color: #1e40af;
}

/* Decision Tool */
.decision-intro {
    text-align: center;
    margin-bottom: 3rem;
}

.decision-steps {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

.decision-step {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.step-number {
    background-color: #1e40af;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
    margin: 1.5rem;
    float: left;
}

.step-content {
    padding: 1.5rem;
    padding-left: 120px;
}

.step-content h3 {
    color: #1e40af;
    margin-bottom: 1.5rem;
}

.step-options {
    display: grid;
    gap: 1rem;
}

.option-item {
    display: flex;
    align-items: center;
}

.option-item input[type="radio"],
.option-item input[type="checkbox"] {
    margin-right: 1rem;
    transform: scale(1.2);
}

.option-item label {
    cursor: pointer;
    color: #64748b;
    display: flex;
    flex-direction: column;
}

.option-item label strong {
    color: #1e40af;
    margin-bottom: 0.25rem;
}

.option-item label span {
    font-size: 0.9rem;
}

/* Decision Result */
.decision-result {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    text-align: center;
    margin-bottom: 3rem;
}

.decision-result h3 {
    color: #1e40af;
    margin-bottom: 1.5rem;
}

.result-content {
    margin-bottom: 2rem;
    color: #64748b;
}

/* Checklist */
.checklist-section {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.checklist-section h3 {
    color: #1e40af;
    text-align: center;
    margin-bottom: 2rem;
}

.checklist {
    display: grid;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.checklist-item input[type="checkbox"] {
    transform: scale(1.2);
}

.checklist-item label {
    cursor: pointer;
    padding-left: 0.5rem;
    color: #64748b;
}

/* 优化内容加载 */
.content-section img {
    display: block;
    height: auto;
}

/* 添加滚动平滑效果 */
html {
    scroll-behavior: smooth;
}

/* 优化表单元素在移动设备上的交互 */
input[type="radio"],
input[type="checkbox"] {
    cursor: pointer;
}

label {
    cursor: pointer;
}

/* 优化图片加载 */
.content-image img,
.type-image img,
.position-icon img,
.rec-image img,
.care-image img {
    max-width: 100%;
    height: auto;
}

/* 为What You'll Learn部分添加的样式 */
.learn-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
}

.learn-item {
    display: flex;
    align-items: flex-start;
    background-color: rgba(240, 248, 240, 0.9); /* 更改为浅绿色调的背景 */
    padding: 1.2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(200, 230, 200, 0.5); /* 添加浅绿色边框 */
}

.learn-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: rgba(245, 250, 245, 0.95); /* 悬停时稍微变亮 */
}

.learn-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    color: #3a805c; /* 更改为深绿色，与网站主题更协调 */
    display: inline-block;
    min-width: 24px;
    text-align: center;
}

.learn-item p {
    margin: 0;
    font-weight: 500;
    color: #2c5a40; /* 更深的绿色文字，增加对比度 */
    line-height: 1.4;
}

@media (max-width: 768px) {
    .learn-items {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .learn-item {
        padding: 0.8rem;
    }
}

/* Option Item 样式修改 */
.option-item {
    display: flex;
    align-items: flex-start;
}

.option-item input[type="radio"],
.option-item input[type="checkbox"] {
    margin-right: 1rem;
    transform: scale(1.2);
}

.option-item label {
    cursor: pointer;
    color: #64748b;
    display: flex;
    flex-direction: column;
    text-align: left;
    width: 100%;
}

.option-item label strong {
    color: #1e40af;
    margin-bottom: 0.25rem;
}

.option-item label span {
    font-size: 0.9rem;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .breadcrumb-container {
        padding: 0 15px;
    }
    
    .breadcrumb li {
        font-size: 0.8rem;
    }
    
    .breadcrumb li+li:before {
        padding: 0 6px;
    }
    
    .guide-hero {
        padding: 80px 0 40px;
    }

    .guide-hero h1 {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }
    .toc-grid {
        grid-template-columns: 1fr;
    }
    .content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .content-image {
        order: -1;
        margin-bottom: 2rem;
    }
    .type-content {
        grid-template-columns: 1fr;
    }

    .type-image {
        text-align: center;
    }
    .type-image img {
        max-width: 80%;
    }
    .comparison-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
        padding: 0;
        margin-bottom: 0; /* 减少底部边距，因为我们有单独的滑动指示器 */
        border: 1px solid #e2e8f0;
    }

    .comparison-table table {
        font-size: 0.9rem;
        min-width: 500px; /* 移动端的最小宽度 */
    }

    .comparison-table th,
    .comparison-table td {
        font-size: 0.9rem;
        padding: 0.75rem 0.5rem;
    }
    .rec-content {
        grid-template-columns: 1fr;
    }

    .rec-image {
        text-align: center;
    }
    .rec-image img {
        max-width: 250px;
    }
    .care-content {
        grid-template-columns: 1fr;
    }

    .care-image {
        order: -1;
        margin-bottom: 2rem;
    }
    .step-content {
        flex-direction: column;
        padding: 1.5rem;
        padding-left: 1.5rem;
    }
    .step-number {
        margin-bottom: 1rem;
    }
    .cta-buttons {
        flex-direction: column;
    }
    .cta-button {
        width: 100%;
        text-align: center;
    }

    .position-card {
        flex-direction: column;
        text-align: center;
    }

    .position-icon {
        margin: 0 auto 1rem;
    }
    .adjustability-info {
        grid-template-columns: 1fr;
    }

    .allergy-info {
        padding: 1.5rem;
    }
    
    /* 选择框优化 */
    .decision-steps .option-item {
        margin-bottom: 10px;
    }
    
    .option-item {
        padding: 0.5rem 0;
    }
    
    .option-item label {
        padding-left: 35px !important;
    }

    .decision-steps .option-item label::before {
        top: 0.2rem;
    }

    .decision-steps .option-item input[type="radio"]:checked + label::after {
        top: 0.5rem;
    }

    .decision-steps .option-item input[type="checkbox"]:checked + label::after {
        top: 0.3rem;
    }
}

@media (max-width: 480px) {
    .breadcrumb-container {
        padding: 0 10px;
    }
    
    .breadcrumb li {
        font-size: 0.75rem;
    }
    
    .breadcrumb li+li:before {
        padding: 0 4px;
        font-size: 0.8rem;
    }
    
    .guide-hero {
        padding: 80px 0 50px;
    }
    
    .guide-hero h1 {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .guide-content {
        padding: 1.5rem;
    }
    
    .toc-item {
        padding: 1rem;
    }
    
    .toc-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .content-section {
        padding: 50px 0;
    }
    
    .content-section h2 {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }
    
    .section-intro {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .benefit-item {
        padding: 1.25rem;
    }
    
    .foam-type-card {
        margin-bottom: 1.5rem;
    }
    
    .type-header {
        padding: 1rem;
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .type-content {
        padding: 1.5rem;
    }
    
    .type-image img {
        max-width: 100%;
    }
    
    .sleep-positions {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .firmness-scale {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .cooling-features {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .lifespan-tips {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .rec-category {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .rec-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .rec-buttons .cta-button {
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .decision-steps {
        padding: 1.5rem;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .checklist-section {
        padding: 1.5rem;
    }
    
    /* 优化表格在小屏幕上的显示 */
    .comparison-table th,
    .comparison-table td {
        padding: 0.5rem 0.3rem;
        font-size: 0.8rem;
    }
    
    .comparison-table table {
        min-width: 450px; /* 更小屏幕的最小宽度 */
    }

    .swipe-indicator {
        font-size: 0.75rem;
        margin-bottom: 1.5rem;
    }

    /* 优化决策工具在小屏幕上的显示 */
    .decision-steps .option-item {
        margin-bottom: 8px;
    }
    
    .option-item {
        padding: 0.4rem 0;
    }
    
    .option-item label {
        font-size: 0.9rem;
    }

    .option-item label strong {
        font-size: 0.95rem;
    }
    
    .option-item label span {
        font-size: 0.85rem;
    }
}

/* 添加触摸设备优化 */
@media (hover: none) {
    .toc-item:hover {
        transform: none;
    }
    
    .toc-item:active {
        background-color: #e0f2fe;
    }
    
    /* 增加触摸目标尺寸 */
    .option-item input[type="radio"],
    .option-item input[type="checkbox"],
    .checklist-item input[type="checkbox"] {
        min-width: 24px;
        min-height: 24px;
    }
}

/* 添加平板设备优化 */
@media (min-width: 481px) and (max-width: 768px) {
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sleep-positions {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .firmness-scale {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cooling-features {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .lifespan-tips {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 决策工具的自定义表单控件 */
.decision-steps .option-item {
    position: relative;
    display: block;
    margin-bottom: 12px;
}

.decision-steps .option-item input[type="radio"],
.decision-steps .option-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.decision-steps .option-item label {
    display: inline-flex;
    align-items: flex-start;
    position: relative;
    padding-left: 35px;
    min-height: 24px;
    line-height: 1.4;
    cursor: pointer;
    transition: color 0.3s ease;
}

.decision-steps .option-item label::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.3rem;
    transform: translateY(0);
    width: 20px;
    height: 20px;
    border: 2px solid #b0bec5;
    background-color: #f8fafc;
    transition: all 0.2s ease;
}

.decision-steps .option-item:hover label::before {
    border-color: #6EC1E4;
}

.decision-steps .option-item input[type="radio"] + label::before {
    border-radius: 50%;
}

.decision-steps .option-item input[type="checkbox"] + label::before {
    border-radius: 4px;
}

.decision-steps .option-item input:checked + label::before {
    background-color: #1e40af;
    border-color: #1e40af;
}

.decision-steps .option-item label::after {
    content: "";
    position: absolute;
    display: none;
}

.decision-steps .option-item input:checked + label::after {
    display: block;
}

.decision-steps .option-item input[type="radio"]:checked + label::after {
    left: 6px;
    top: 0.6rem;
    transform: translateY(0);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: white;
}

.decision-steps .option-item input[type="checkbox"]:checked + label::after {
    left: 7px;
    top: 0.4rem;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Final CTA */
.final-cta {
    padding: 80px 0;
    background: linear-gradient(135deg, #1e40af 0%, #6EC1E4 100%);
    text-align: center;
    color: white;
    margin-bottom: 0;
}

.cta-content h2 {
    color: white;
    margin-bottom: 1rem;
}

.cta-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.cta-button.secondary {
    background-color: transparent;
    border: 2px solid white;
    color: white;
}

.cta-button.secondary:hover {
    background-color: white;
    color: #1e40af;
}

/* 确保 final-cta 和 footer 之间没有空白 */
.final-cta + .footer {
    margin-top: 0;
}

/* 消除页面底部多余空白 */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

main {
    flex: 1;
}

/* 修复不同部分之间的间距 */
section:last-of-type:not(.footer) {
    margin-bottom: 0;
    padding-bottom: 0;
}



/* 额外的面包屑强制单行显示规则 - 确保不被其他样式覆盖 */
.breadcrumb-nav .breadcrumb-container .breadcrumb {
    display: flex !important;
    flex-wrap: nowrap !important;
    flex-direction: row !important;
    align-items: center !important;
    white-space: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

.breadcrumb-nav .breadcrumb-container .breadcrumb li {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

.breadcrumb-nav .breadcrumb-container .breadcrumb li + li:before {
    content: "/" !important;
    color: #cbd5e1 !important;
    padding: 0 8px !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}

/* 确保面包屑容器有足够的空间 */
.breadcrumb-nav {
    width: 100% !important;
    overflow: visible !important;
}

.breadcrumb-container {
    width: 100% !important;
    max-width: 1200px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

/* 移动端额外优化 */
@media (max-width: 768px) {
    .breadcrumb-nav .breadcrumb-container .breadcrumb li {
        font-size: 0.8rem !important;
    }
    
    .breadcrumb-nav .breadcrumb-container .breadcrumb li + li:before {
        padding: 0 6px !important;
    }
}

@media (max-width: 480px) {
    .breadcrumb-nav .breadcrumb-container .breadcrumb li {
        font-size: 0.75rem !important;
    }
    
    .breadcrumb-nav .breadcrumb-container .breadcrumb li + li:before {
        padding: 0 4px !important;
        font-size: 0.8rem !important;
    }
}