/* ==========================================================================
1. 全局变量与基础设置
========================================================================== */
:root {
--primary: #007bff;/* 主品牌蓝 */
--primary-hover: #0056b3;/* 深蓝悬停 */
--q-red: #e53935;/* FAQ问题红色 */
--a-green: #4caf50;/* FAQ回答绿色 */
--bg-gray: #f8f9fa;/* 浅灰背景 */
--border: #e1e4e8; /* 标准边框色 */
--text-main: #333333;/* 主文字颜色 */
--text-muted: #666666; /* 次要文字颜色 */
--result-bg: #fff8e1;/* 结果框背景黄 */
--result-accent: #ffc107;/* 结果框左边框黄 */
--radius: 8px; /* 圆角标准 */
--shadow: 0 4px 15px rgba(0,0,0,0.05);
}

* {
box-sizing: border-box;
-webkit-tap-highlight-color: transparent; /* 移除移动端点击高亮 */
}

body {
margin: 0;
padding: 0;
background-color: #f4f7f6;
font-family: "Helvetica Neue", Helvetica, Arial, "Microsoft YaHei", sans-serif;
}

/* ==========================================================================
2. 物流计算器主容器 (logistics-features)
========================================================================== */
.logistics-features {
width: 95%;
max-width: 800px;
margin: 20px auto;
border: 1px solid var(--border);
border-radius: 12px;
padding: 20px;
background-color: #ffffff;
box-shadow: var(--shadow);
}

.logistics-features h2 {
text-align: center;
font-size: 1.25rem;
color: var(--text-main);
margin-top: 0;
margin-bottom: 20px;
}

/* 路线展示信息 */
.route-info {
display: flex;
flex-wrap: wrap;
justify-content: space-around;
gap: 10px;
margin-bottom: 20px;
background: var(--bg-gray);
padding: 15px;
border-radius: var(--radius);
}

.route-item {
flex: 1;
min-width: 80px;
text-align: center;
}

.route-label {
font-size: 12px;
color: var(--text-muted);
}

.route-value {
font-weight: bold;
color: var(--primary);
font-size: 18px;
margin-top: 5px;
}

/* 切换模式按钮 */
.mode-buttons {
display: flex;
gap: 10px;
margin-bottom: 25px;
}

.mode-btn {
flex: 1;
text-align: center;
padding: 10px 5px;
background: #f0f0f0;
border-radius: var(--radius);
cursor: pointer;
transition: all 0.2s ease;
border: 1px solid transparent;
user-select: none;
line-height: 1.4;
}

.mode-btn:active {
transform: scale(0.95); /* 点击反馈 */
}

.mode-btn.active {
background: var(--primary);
color: #ffffff;
border-color: var(--primary-hover);
}

.mode-btn small {
display: block;
font-size: 11px;
opacity: 0.8;
margin-top: 2px;
}

/* 输入区域逻辑 */
.input-section {
display: none;
}

.input-section.active {
display: block;
animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
from { opacity: 0; transform: translateY(5px); }
to { opacity: 1; transform: translateY(0); }
}

.input-group {
margin-bottom: 15px;
}

.input-group label {
display: block;
margin-bottom: 8px;
font-weight: bold;
color: var(--text-main);
}

.input-group input,
.input-group select {
width: 100%;
padding: 12px;
border: 1px solid #ddd;
border-radius: 6px;
font-size: 16px;
outline: none;
transition: border-color 0.3s;
}

.input-group input:focus {
border-color: var(--primary);
}

/* 计算结果显示 */
.result-box {
background: var(--result-bg);
padding: 18px;
border-left: 5px solid var(--result-accent);
border-radius: 4px;
margin-bottom: 15px;
}

.result-box span {
font-size: 14px;
color: #856404;
}

.result-value {
font-size: 24px;
color: var(--q-red);
font-weight: bold;
margin-top: 8px;
}

.note {
font-size: 13px;
color: var(--text-muted);
line-height: 1.6;
background: #f1f3f5;
padding: 12px;
border-radius: 6px;
border: 1px dashed #ced4da;
}

/* ==========================================================================
3. FAQ 问答模块 (faq-container)
========================================================================== */
.faq-container {
width: 95%;
max-width: 800px;
margin: 30px auto;
}

.faq-item {
background: #ffffff;
border: 1px solid #ebeef5;
border-radius: var(--radius);
margin-bottom: 12px;
overflow: hidden;
transition: all 0.3s ease;
box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.faq-item:hover {
box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.faq-question {
display: flex;
align-items: center;
padding: 15px;
background-color: #fcfcfc;
border-bottom: 1px solid #f0f0f0;
cursor: pointer;
user-select: none;
}

.faq-q {
width: 24px;
height: 24px;
background: var(--q-red);
color: #ffffff;
text-align: center;
line-height: 24px;
border-radius: 4px;
font-weight: bold;
font-size: 14px;
margin-right: 12px;
flex-shrink: 0;
}

.faq-question strong {
font-size: 15px;
color: var(--text-main);
line-height: 1.4;
}

.faq-answer {
display: flex;
padding: 15px;
background-color: #ffffff;
}

.faq-a {
width: 24px;
height: 24px;
background: var(--a-green);
color: #ffffff;
text-align: center;
line-height: 24px;
border-radius: 4px;
font-weight: bold;
font-size: 14px;
margin-right: 12px;
flex-shrink: 0;
}

.faq-answer p {
margin: 0;
font-size: 14px;
color: var(--text-muted);
line-height: 1.6;
flex: 1;
}

/* ==========================================================================
4. 包装指南表格 (guide-table-container)
========================================================================== */
.guide-table-container {
width: 95%;
max-width: 800px;
margin: 30px auto;
overflow-x: auto;
background: #ffffff;
border-radius: var(--radius);
box-shadow: var(--shadow);
border: 1px solid var(--border);
}

table {
width: 100%;
border-collapse: collapse;
border-spacing: 0;
table-layout: fixed;
}

th {
background-color: var(--bg-gray);
color: var(--text-main);
font-weight: bold;
padding: 15px;
text-align: left;
border-bottom: 2px solid #dee2e6;
font-size: 15px;
}

td {
padding: 15px;
border-bottom: 1px solid #eee;
vertical-align: top;
line-height: 1.6;
word-wrap: break-word;
}

/* 表格首列：货物类型优化 */
th:first-child, td:first-child {
width: 120px;
color: var(--primary);
font-weight: bold;
background-color: #fcfcfc;
border-right: 1px solid #f5f5f5;
white-space: nowrap; /* 保持整齐 */
}

.guide-item {
font-size: 14px;
color: #555555;
margin-bottom: 10px;
}

.guide-item:last-child {
margin-bottom: 0;
}

.guide-item strong {
color: var(--text-main);
display: inline-block;
margin-right: 5px;
border-bottom: 1px solid #ddd;
}

/* 隔行变色 */
tbody tr:nth-child(even) {
background-color: #fafafa;
}

/* 悬停变色 */
tbody tr:hover {
background-color: #f1f8ff;
}

/* ==========================================================================
5. 响应式适配 (Mobile Optimization)
========================================================================== */
@media (max-width: 600px) {
.logistics-features {
padding: 15px;
}

.route-value {
font-size: 16px;
}

.mode-btn {
font-size: 13px;
}

th:first-child, td:first-child {
width: 90px;
white-space: normal; /* 极窄屏允许换行 */
font-size: 13px;
padding: 12px 8px;
}

td {
padding: 10px;
font-size: 13px;
}

.guide-item strong {
display: block; /* 移动端标题独占一行 */
margin-bottom: 3px;
border-bottom: none;
color: var(--primary);
}

.result-value {
font-size: 20px;
}
}

/* 针对打印场景的优化 */
@media print {
.logistics-features, .faq-container, .guide-table-container {
box-shadow: none;
border: 1px solid #000;
width: 100%;
margin: 0;
}
.mode-buttons {
display: none;
}
}

/* ==========================================================================
   6. 在线快捷询价 (Inquiry Form)
   ========================================================================== */
.inquiry-container {
    width: 95%;
    max-width: 800px;
    margin: 30px auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
}

.inquiry-header {
    background: linear-gradient(135deg, var(--primary) 0%, #0056b3 100%);
    color: #fff;
    padding: 20px;
    text-align: center;
}

.inquiry-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.inquiry-header p {
    margin: 5px 0 0;
    font-size: 14px;
    opacity: 0.9;
}

.inquiry-body {
    padding: 25px;
}

.inquiry-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.inquiry-full {
    grid-column: 1 / -1;
}

.inquiry-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--text-main);
    font-size: 14px;
}

.inquiry-group input,
.inquiry-group select,
.inquiry-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: inherit;
}

.inquiry-group input:focus,
.inquiry-group select:focus,
.inquiry-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.inquiry-group textarea {
    resize: vertical;
    min-height: 80px;
}

.inquiry-submit {
    width: 100%;
    margin-top: 20px;
    padding: 14px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.inquiry-submit:hover {
    background: var(--primary-hover);
}

.inquiry-submit:active {
    transform: scale(0.98);
}

.inquiry-tips {
    margin-top: 15px;
    padding: 12px;
    background: #e3f2fd;
    border-left: 4px solid var(--primary);
    border-radius: 4px;
    font-size: 13px;
    color: #0d47a1;
}

/* ==========================================================================
   7. 发货须知 (Shipping Tips)
   ========================================================================== */
.tips-container {
    width: 95%;
    max-width: 800px;
    margin: 30px auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.tip-card {
    background: #fff;
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #eee;
    text-align: center;
    transition: transform 0.2s;
}

.tip-card:hover {
    transform: translateY(-3px);
}

.tip-icon {
    font-size: 32px;
    margin-bottom: 10px;
    display: block;
}

.tip-title {
    font-weight: bold;
    color: var(--text-main);
    margin-bottom: 5px;
    font-size: 15px;
}

.tip-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* 响应式补充 */
@media (max-width: 600px) {
    .inquiry-grid {
        grid-template-columns: 1fr;
    }
    .inquiry-body {
        padding: 15px;
    }
    .tips-container {
        grid-template-columns: 1fr 1fr;
    }
}