/* 订单页面样式 */

/* 页面主体 */
.order-page {
    min-height: 100vh;
    background: #f8f9fa;
}

/* 页面头部 */
.order-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0 40px;
}

.order-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
}

.order-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    text-align: center;
    margin: 0;
}

/* 筛选标签 */
.order-filters {
    background: white;
    padding: 20px 0;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 80px;
    z-index: 100;
}

.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 24px;
    border: 2px solid #dee2e6;
    background: white;
    color: #6c757d;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.tab-btn:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
}

.tab-btn.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* 订单列表 */
.order-list-section {
    padding: 40px 0;
}

.order-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.order-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.order-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.order-number {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
}

.order-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: #e3f2fd;
    color: #1976d2;
}

.order-content {
    display: flex;
    padding: 20px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.order-content:hover {
    background: #f8f9fa;
}

.order-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    margin-right: 16px;
}

.order-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.order-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.order-title {
    font-size: 16px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 8px;
    line-height: 1.4;
}

.order-price {
    font-size: 18px;
    font-weight: 700;
    color: #dc3545;
    margin-bottom: 4px;
}

.price-main {
    font-size: 20px;
}

.price-cents {
    font-size: 16px;
}

.integral-text {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
}

.order-quantity {
    font-size: 14px;
    color: #6c757d;
}

.order-actions {
    padding: 16px 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state img {
    width: 200px;
    height: auto;
    margin-bottom: 20px;
    opacity: 0.6;
}

.empty-state p {
    font-size: 16px;
    color: #6c757d;
    margin: 0;
}

/* 订单详情弹窗 - 标准网站风格 */
.order-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
}

.order-detail-modal.show {
    display: flex;
}

.order-detail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

.order-detail-content {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* 弹窗头部 - 标准风格 */
.order-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e5e5;
    background: #ffffff;
}

.order-detail-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333333;
    margin: 0;
}

.order-detail-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999999;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s ease;
}

.order-detail-close:hover {
color: #333333;
}

/* 弹窗主体 - 按APP版逻辑重新设计 */
.order-detail-body {
max-height: calc(90vh - 140px);
overflow-y: auto;
padding: 0;
gap: 0;
}

/* 1. 订单状态头部 - APP端样式 */
.order-status-header {
    background: #F58C45;
    color: white;
    padding: 20px 24px;
    text-align: center;
    margin-bottom: 0;
    font-size: 16px;
    font-weight: 600;
}

.status-timer {
background: #F58C45;
}

.timer-display {
font-size: 24px;
font-weight: 700;
margin-bottom: 8px;
}

.timer-tip {
font-size: 14px;
opacity: 0.9;
}

.status-display {
background: #F58C45;
}

.status-text {
font-size: 18px;
font-weight: 600;
}

/* 2. 配送方式选择 */
.delivery-method-section {
padding: 0 24px 20px;
background: white;
}

.delivery-tabs {
display: flex;
gap: 0;
border-radius: 8px;
overflow: hidden;
border: 1px solid #F58C45;
}

.delivery-tab {
flex: 1;
padding: 12px 16px;
border: none;
background: white;
color: #F58C45;
font-weight: 500;
cursor: pointer;
transition: all 0.2s ease;
}

.delivery-tab.active {
background: #F58C45;
color: white;
}

.delivery-tab:hover:not(.active) {
background: #fff5f0;
}

/* 3. 表单区域 */
.delivery-form-section,
.virtual-form-section {
padding: 20px 24px;
background: white;
border-bottom: 8px solid #f8f9fa;
}

.form-group {
margin-bottom: 16px;
display: flex;
align-items: center;
gap: 12px;
}

.form-group label {
min-width: 80px;
font-weight: 500;
color: #333;
white-space: nowrap;
}

.form-group input {
flex: 1;
padding: 8px 12px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 14px;
}

.form-group input:focus {
outline: none;
border-color: #F58C45;
box-shadow: 0 0 0 2px rgba(245, 140, 69, 0.1);
}

/* 2. 商家信息 - APP端样式 */
.merchant-section {
    padding: 20px 24px;
    background: white;
    border-bottom: 1px solid #f0f0f0;
}

.merchant-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.merchant-details {
    flex: 1;
}

.merchant-name {
font-weight: 600;
color: #333;
margin-bottom: 4px;
}

.merchant-address {
color: #666;
font-size: 14px;
}

.map-btn {
display: flex;
align-items: center;
gap: 6px;
padding: 8px 16px;
background: #F58C45;
color: white;
border: none;
border-radius: 20px;
font-size: 14px;
cursor: pointer;
transition: all 0.2s ease;
}

.map-btn:hover {
background: #e07a35;
transform: translateY(-1px);
}

/* 3. 商品信息 - APP端样式 */
.product-section {
    padding: 20px 24px;
    background: white;
    border-bottom: 1px solid #f0f0f0;
}

.product-info {
    display: flex;
    gap: 16px;
    align-items: center;
}

.product-image {
width: 80px;
height: 80px;
border-radius: 8px;
overflow: hidden;
flex-shrink: 0;
}

.product-image img {
width: 100%;
height: 100%;
object-fit: cover;
}

.product-details {
flex: 1;
}

.product-title {
font-size: 16px;
font-weight: 600;
color: #333;
margin-bottom: 8px;
}

.product-quantity {
color: #666;
font-size: 14px;
margin-bottom: 8px;
}

.product-price {
display: flex;
align-items: baseline;
gap: 2px;
margin-bottom: 8px;
}

.price-currency {
color: #F58C45;
font-size: 16px;
font-weight: 600;
}

.price-amount {
color: #F58C45;
font-size: 18px;
font-weight: 700;
}

.product-points {
background: #28a745;
color: white;
padding: 4px 8px;
border-radius: 12px;
font-size: 12px;
font-weight: 500;
display: inline-block;
}

/* 4. 订单信息 - APP端样式 */
.order-info-section {
    padding: 20px 24px;
    background: white;
}

.order-info-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    margin-top: 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.order-info-list {
display: flex;
flex-direction: column;
gap: 12px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f8f9fa;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
color: #666;
font-size: 14px;
min-width: 80px;
}

.info-value {
color: #333;
font-size: 14px;
font-weight: 500;
text-align: right;
}

/* 自定义滚动条 */
.order-detail-body::-webkit-scrollbar {
width: 6px;
}

.order-detail-body::-webkit-scrollbar-track {
    background: var(--bg-gray);
    border-radius: 3px;
}

.order-detail-body::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
    opacity: 0.7;
}

.order-detail-body::-webkit-scrollbar-thumb:hover {
    opacity: 1;
}

/* 订单状态区域 - 标准风格 */
.order-status-section {
    background: #F58C45;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
    color: white;
}

.status-timer {
    background: transparent;
    color: white;
    padding: 0;
    border-radius: 0;
    margin-bottom: 0;
    box-shadow: none;
}

.timer-display {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.timer-tip {
    font-size: 14px;
    opacity: 0.9;
}

.status-display {
    background: #F58C45;
    color: white;
    padding: 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    border: none;
}

.status-text {
    color: white;
}

/* 配送方式区域 - 标准风格 */
.delivery-section, .virtual-section {
    margin-bottom: 20px;
}

.delivery-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e5e5;
}

.delivery-tab {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: #ffffff;
    color: #666666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    border-right: 1px solid #e5e5e5;
}

.delivery-tab:last-child {
    border-right: none;
}

.delivery-tab:hover {
    background: #f8f9fa;
}

.delivery-tab.active {
    background: #F58C45;
    color: white;
}

.delivery-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    color: #333333;
    font-size: 14px;
}

.form-group input {
    padding: 12px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    background: #ffffff;
    color: #333333;
}

.form-group input:focus {
    outline: none;
    border-color: #F58C45;
}

.form-group input::placeholder {
    color: #999999;
}

/* 商家信息区域 - 标准风格 */
.merchant-section {
    margin-bottom: 20px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
}

.merchant-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.merchant-details {
    flex: 1;
}

.merchant-name {
    font-size: 16px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 4px;
}

.merchant-address {
    font-size: 14px;
    color: #666666;
    line-height: 1.4;
}

.map-btn {
    padding: 8px 16px;
    background: #F58C45;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.map-btn:hover {
    background: #e07a35;
}

/* 商品信息区域 - 标准风格 */
.product-section {
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
}

.product-info {
    display: flex;
    gap: 16px;
    align-items: center;
}

.product-image {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f8f9fa;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-details {
    flex: 1;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 8px;
    line-height: 1.4;
}

.product-quantity {
    font-size: 14px;
    color: #666666;
    margin-bottom: 8px;
}

.product-price {
    font-size: 20px;
    font-weight: 700;
    color: #dc3545;
    margin-bottom: 8px;
}

.price-dollar {
    font-size: 16px;
}

.price-main {
    font-size: 20px;
}

.price-decimal {
    font-size: 16px;
}

.price-cents {
    font-size: 16px;
}

.product-integral {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #28a745;
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* 订单信息区域 - 标准风格 */
.order-info-section {
    margin-bottom: 20px;
}

.order-info-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e5e5;
}

.order-info-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f8f9fa;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 500;
    color: #666666;
    font-size: 14px;
}

.info-value {
    color: #333333;
    font-size: 14px;
    text-align: right;
    word-break: break-all;
}

/* 弹窗底部 - 标准风格 */
.order-detail-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #e5e5e5;
    background: #ffffff;
}

.order-detail-footer .btn {
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    transition: background-color 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
    flex: 1;
}

.order-detail-footer .btn-secondary {
    background: #ffffff;
    color: #F58C45;
    border: 1px solid #F58C45;
}

.order-detail-footer .btn-secondary:hover {
    background: #f8f9fa;
}

.order-detail-footer .btn-primary {
    background: #F58C45;
    color: white;
    border: 1px solid #F58C45;
}

.order-detail-footer .btn-primary:hover {
    background: #e07a35;
}

.order-detail-footer .btn-primary:disabled {
    background: #cccccc;
    border-color: #cccccc;
    cursor: not-allowed;
}

.order-detail-footer .btn-disabled {
    background: #6c757d;
    color: white;
    border: 1px solid #6c757d;
    cursor: not-allowed;
}

.order-detail-footer .btn-disabled:hover {
    background: #6c757d;
}

/* 加载和错误状态 - 标准风格 */
.loading-state, .error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #F58C45;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 12px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-state span {
    font-size: 14px;
    color: #666666;
}

.error-state {
    color: #dc3545;
    font-size: 14px;
}

/* 响应式设计 - 移动端优化 */
@media (max-width: 768px) {
    .order-detail-modal {
        padding: var(--spacing-sm);
        align-items: flex-end;
    }
    
    .order-detail-content {
        max-width: 100%;
        max-height: 95vh;
        border-radius: var(--radius-large) var(--radius-large) 0 0;
        animation: modalSlideUpMobile 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    @keyframes modalSlideUpMobile {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }
    
    .order-detail-header {
        padding: var(--spacing-lg) var(--spacing-md);
    }
    
    .order-detail-header h3 {
        font-size: var(--font-size-lg);
    }
    
    .order-detail-close {
        width: 36px;
        height: 36px;
    }
    
    .order-detail-body {
        padding: var(--spacing-md);
        gap: var(--spacing-md);
    }
    
    .order-detail-footer {
        padding: var(--spacing-md);
        flex-direction: column-reverse;
        gap: var(--spacing-sm);
    }
    
    .order-detail-footer .btn {
        width: 100%;
        min-width: auto;
    }
    
    /* 商品信息移动端布局 */
    .product-info {
        grid-template-columns: 100px 1fr;
        gap: var(--spacing-md);
    }
    
    .product-image {
        width: 100px;
        height: 100px;
    }
    
    .product-price {
        font-size: 1.5rem;
    }
    
    .price-main {
        font-size: 1.8rem;
    }
    
    /* 商家信息移动端布局 */
    .merchant-info {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
        text-align: center;
    }
    
    .merchant-details {
        order: 1;
    }
    
    .map-btn {
        order: 2;
        align-self: center;
    }
    
    /* 订单信息移动端布局 */
    .info-item {
        grid-template-columns: 1fr;
        gap: var(--spacing-xs);
        text-align: left;
    }
    
    .info-label {
        font-weight: 700;
        color: var(--text-primary);
    }
    
    .info-value {
        padding-left: var(--spacing-md);
        font-weight: 400;
    }
    
    /* 配送标签移动端 */
    .delivery-tabs {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
    
    .delivery-tab {
        padding: var(--spacing-md);
    }
    
    /* 状态区域移动端 */
    .timer-display {
        font-size: 2rem;
    }
    
    .status-display {
        padding: var(--spacing-md);
        font-size: var(--font-size-md);
    }
}

@media (max-width: 480px) {
    .order-detail-modal {
        padding: 0;
    }
    
    .order-detail-content {
        border-radius: 0;
        max-height: 100vh;
    }
    
    .order-detail-header {
        padding: var(--spacing-md) var(--spacing-sm);
    }
    
    .order-detail-body {
        padding: var(--spacing-sm);
    }
    
    .order-detail-footer {
        padding: var(--spacing-sm);
    }
    
    .product-info {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--spacing-sm);
    }
    
    .product-image {
        width: 120px;
        height: 120px;
        justify-self: center;
    }
    
    .timer-display {
        font-size: 1.8rem;
        letter-spacing: 1px;
    }
    
    .merchant-section,
    .product-section,
    .order-info-section,
    .delivery-section,
    .virtual-section,
    .order-status-section {
        padding: var(--spacing-md);
    }
}

