/* ============================================
   订单查询页面样式 - 主流电商风格
   ============================================ */

   .track-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px 60px;
}

/* ========== 面包屑导航 ========== */
.breadcrumb {
    padding: 10px 0 20px;
    font-size: 13px;
    color: #888;
}

.breadcrumb a {
    color: #888;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: #DD302D;
}

.breadcrumb .separator {
    margin: 0 8px;
    color: #ccc;
}

.breadcrumb .current {
    color: #333;
    font-weight: 500;
}

/* 页面头部 */
.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 32px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.page-header p {
    font-size: 16px;
    color: #666;
    max-width: 500px;
    margin: 0 auto;
}

/* 查询表单卡片 */
.track-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s;
    box-sizing: border-box;
}

.form-group input:focus {
    border-color: #DD302D;
    outline: none;
    box-shadow: 0 0 0 3px rgba(221, 48, 45, 0.1);
}

.track-btn {
    width: 100%;
    padding: 14px;
    background: #DD302D;
    color: white;
    border: none;
    border-radius: 40px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.track-btn:hover {
    background: #b02623;
    transform: translateY(-2px);
}

/* 错误提示 */
.error-box {
    background: #fff5f5;
    border: 1px solid #fcd7d7;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin: 20px 0;
}

.error-box p {
    color: #DD302D;
    margin-bottom: 15px;
}

.search-again-link {
    background: none;
    border: none;
    color: #DD302D;
    cursor: pointer;
    font-size: 14px;
    text-decoration: underline;
    padding: 5px 10px;
}

.search-again-link:hover {
    color: #b02623;
}

/* 订单结果卡片 */
.result-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    overflow: hidden;
    margin-top: 0;
}

.result-header {
    background: #f8f9fa;
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.result-header-left h2 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-again-btn {
    background: none;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 30px;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.search-again-btn:hover {
    background: #f8f9fa;
    border-color: #DD302D;
    color: #DD302D;
}

/* 订单状态条 */
.order-status-bar {
    padding: 16px 24px;
    border-bottom: 1px solid #e9ecef;
    background: #fff;
}

.order-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
}

.status-0 { background: #f8d7da; color: #721c24; }
.status-1, .status-2 { background: #fff3cd; color: #856404; }
.status-3 { background: #d4edda; color: #155724; }
.status-5, .status-6 { background: #cce7ff; color: #004085; }
.status-7 { background: #d1f7c4; color: #0d5c00; }

/* 订单摘要网格 */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 24px;
    border-bottom: 1px solid #e9ecef;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.summary-label {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-value {
    font-size: 15px;
    font-weight: 500;
    color: #333;
}

.summary-value.total {
    font-size: 20px;
    font-weight: 700;
    color: #DD302D;
}

/* 商品表格 */
.items-section {
    padding: 0;
}

.items-table {
    width: 100%;
    border-collapse: collapse;
}

.items-table th {
    text-align: left;
    padding: 14px 20px;
    background: #fafafa;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    border-bottom: 1px solid #e9ecef;
}

.items-table td {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.product-cell {
    display: flex;
    align-items: center;
    gap: 14px;
}

.product-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid #eee;
}

.product-image.no-img {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: #f0f0f0;
}

.product-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.price-cell {
    font-weight: 500;
    color: #333;
}

.subtotal-cell {
    font-weight: 600;
    color: #DD302D;
}

/* 总计区域 - PC端显示 */
.totals-section {
    background: #f8f9fa;
    padding: 16px 24px;
    border-top: 1px solid #e9ecef;
    text-align: right;
}

.totals-row {
    display: flex;
    justify-content: flex-end;
    padding: 6px 0;
    gap: 20px;
}

.totals-label {
    font-size: 14px;
    color: #666;
}

.totals-value {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    min-width: 100px;
    text-align: right;
}

.grand-total .totals-label {
    font-weight: 600;
    color: #333;
}

.grand-total .totals-value {
    font-size: 18px;
    font-weight: 700;
    color: #DD302D;
}

/* 移动端商品列表 - 默认隐藏 */
.mobile-items {
    display: none;
}

.mobile-item {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    background: white;
}

.mobile-item-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.mobile-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.mobile-item-image.no-img {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: #f0f0f0;
}

.mobile-item-info {
    flex: 1;
}

.mobile-item-name {
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.mobile-item-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
}

.mobile-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-detail-label {
    color: #666;
}

.mobile-detail-value {
    color: #333;
    font-weight: 500;
}

.mobile-detail-value.price {
    color: #DD302D;
    font-weight: 600;
}

/* 移动端总计 - 默认隐藏 */
.mobile-totals {
    background: #f8f9fa;
    padding: 15px;
    border-top: 1px solid #e9ecef;
}

.mobile-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.mobile-total-row:last-child {
    border-bottom: none;
}

.mobile-total-row.grand-total .mobile-total-label,
.mobile-total-row.grand-total .mobile-total-value {
    font-weight: 700;
    font-size: 16px;
    color: #DD302D;
}

/* 支付区域 */
.payment-box {
    background: #f0f9ff;
    border: 1px solid #cde5f5;
    border-radius: 12px;
    margin: 20px 24px;
    padding: 20px;
    text-align: center;
}

.payment-box h3 {
    font-size: 16px;
    font-weight: 600;
    color: #DD302D;
    margin-bottom: 8px;
}

.payment-box p {
    font-size: 13px;
    color: #666;
    margin-bottom: 16px;
}

.payment-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: #DD302D;
    color: white;
    border: none;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.payment-btn:hover {
    background: #b02623;
    transform: translateY(-2px);
}

/* 已支付状态 */
.paid-box {
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    border-radius: 12px;
    margin: 20px 24px;
    padding: 20px;
    text-align: center;
}

.paid-box h3 {
    font-size: 16px;
    font-weight: 600;
    color: #2e7d32;
    margin-bottom: 8px;
}

.paid-box p {
    font-size: 13px;
    color: #555;
}

/* 信息区域 */
.info-section {
    padding: 20px 24px;
    border-top: 1px solid #e9ecef;
}

.info-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
}

.info-value {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    word-break: break-word;
}

/* 贺卡样式 */
.greeting-box {
    background: linear-gradient(135deg, #fff9e8, #fff5e0);
    border: 1px solid #ffe6b3;
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
    display: flex;
    gap: 12px;
}

.greeting-icon {
    font-size: 24px;
}

.greeting-content {
    font-size: 14px;
    line-height: 1.6;
    color: #8d6e00;
    font-style: italic;
    flex: 1;
}

/* 帮助区域 */
.help-section {
    background: #f8f9fa;
    padding: 16px 24px;
    text-align: center;
    border-top: 1px solid #e9ecef;
}

.help-section p {
    font-size: 13px;
    color: #666;
    margin: 0;
}

.help-section a {
    color: #DD302D;
    text-decoration: none;
}

.help-section a:hover {
    text-decoration: underline;
}

.no-items {
    padding: 40px;
    text-align: center;
    color: #888;
}

/* ========== 响应式 ========== */
@media (max-width: 992px) {
    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .track-container {
        padding: 20px 16px 40px;
    }
    
    .page-header h1 {
        font-size: 24px;
    }
    
    .page-header p {
        font-size: 14px;
    }
    
    .track-card {
        padding: 24px;
    }
    
    /* PC端表格隐藏 */
    .items-table {
        display: none;
    }
    
    /* 移动端列表显示 */
    .mobile-items {
        display: block;
    }
    
    /* 隐藏PC端的总计区域，避免与移动端重复 */
    .items-section .totals-section {
        display: none;
    }
    
    /* 移动端总计显示 */
    .mobile-totals {
        display: block;
    }
    
    .summary-grid {
        gap: 15px;
        padding: 20px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .result-header {
        flex-direction: column;
        text-align: center;
    }
    
    .payment-box, .paid-box {
        margin: 16px;
        padding: 16px;
    }
    
    .payment-btn {
        width: 100%;
        justify-content: center;
    }
    
    .greeting-box {
        flex-direction: column;
        text-align: center;
    }
    
    .mobile-item-details {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .breadcrumb {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .mobile-item-details {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .mobile-detail-item {
        justify-content: space-between;
    }
}