/* 订单详情页专用样式 */

/* 订单详情页独立的page-container样式 */
/* 非移动端设置padding为20px，移动端保持默认 */
@media (min-width: 768px) {
    .page-container {
        padding: 20px !important;
    }
}

/* 订单状态横幅 */
.order-status-banner .order-status-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 30px;
}

.order-status-banner .status-info h3 {
    margin-bottom: 8px;
    font-weight: 600;
}

.order-status-banner .order-actions {
    display: flex;
    gap: 12px;
}

/* 卡片头部样式 */
.card-header-custom {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 16px 20px;
    margin: 0;
    border-radius: 8px 8px 0 0;
}

.card-header-custom h5,
.card-header-custom h6 {
    margin: 0;
    font-weight: 600;
}

/* 商品信息样式 */
.product-item {
    padding: 20px;
}

.product-image {
    width: 100%;
    max-width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.product-title {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.product-specs {
    margin-bottom: 8px;
}

.spec-item {
    display: inline-block;
    background-color: #e9ecef;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 8px;
    margin-bottom: 4px;
}

.quantity-info,
.price-info {
    text-align: center;
}

.quantity-info .label,
.price-info .label {
    display: block;
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 4px;
}

.quantity-info .value,
.price-info .value {
    font-weight: 600;
    font-size: 16px;
}

/* 订单详情样式 */
.order-details {
    padding: 20px;
}

.detail-group {
    margin-bottom: 24px;
}

.detail-title {
    color: #495057;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f8f9fa;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item .label {
    color: #6c757d;
    font-weight: 500;
}

.detail-item .value {
    font-weight: 600;
    color: #333;
}

/* 收货信息样式 */
.delivery-info {
    padding: 20px;
}

.recipient-info h6 {
    font-weight: 600;
    color: #333;
}

.recipient-info .address {
    background-color: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
}

/* 费用明细样式 */
.cost-breakdown {
    padding: 20px;
}

.cost-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f8f9fa;
}

.cost-item:last-of-type {
    border-bottom: none;
    margin-bottom: 16px;
}

.cost-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-top: 2px solid #e9ecef;
    font-size: 18px;
}

/* 快捷操作样式 */
.quick-actions {
    padding: 0 20px 20px 20px;
    margin-top: 0 !important;
}


/* 粘性定位 */
.sticky-top {
    top: 20px;
}

/* 移动端布局样式 */
.mobile-layout {
    padding: 0 16px;
}

/* 移动端订单状态 */
.mobile-order-status {
    background: white;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-label {
    font-weight: 600;
    color: #333;
}

.status-value {
    font-weight: 600;
}

/* 移动端地址卡片 */
.mobile-address-card {
    background: white;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.recipient {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-weight: 600;
}

.recipient .name {
    margin-right: 12px;
}

.recipient .phone {
    color: #666;
}

.address {
    color: #666;
    line-height: 1.4;
    padding-left: 20px;
}

/* 移动端信息卡片通用样式 */
.mobile-order-info,
.mobile-product-info,
.mobile-price-info {
    background: white;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.section-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

/* 订单信息项 */
.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f8f9fa;
}

.info-item:last-child {
    border-bottom: none;
}

.info-item .label {
    color: #666;
    font-size: 14px;
}

.info-item .value {
    font-weight: 500;
    color: #333;
}

/* 商品信息 */
.product-item-mobile {
    display: flex;
    gap: 12px;
}

.product-image-mobile {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.product-details {
    flex: 1;
}

.product-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    line-height: 1.3;
}

.product-spec {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.product-price {
    font-size: 16px;
    font-weight: 600;
    color: #ff4444;
}

/* 价格信息 */
.price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.price-item.total {
    border-top: 1px solid #f0f0f0;
    margin-top: 8px;
    padding-top: 16px;
    font-weight: 600;
    font-size: 16px;
}

.price-item .label {
    color: #666;
}

.price-item .value {
    font-weight: 500;
    color: #333;
}

.price-item.total .value {
    color: #ff4444;
    font-size: 18px;
}

/* 悬浮按钮 */
.mobile-floating-buttons {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e9ecef;
    padding: 12px 16px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.floating-btn-group {
    display: flex;
    gap: 12px;
}

.floating-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    color: #666;
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.floating-btn:hover {
    background: #f8f9fa;
    color: #333;
}

.floating-btn.primary {
    background: #ff4444;
    color: white;
    border-color: #ff4444;
}

.floating-btn.primary:hover {
    background: #e63939;
    color: white;
}

.floating-btn span {
    font-weight: 500;
}

/* 为移动端悬浮按钮预留底部空间 */
@media (max-width: 767px) {
    .mobile-layout {
        padding: 0;
        /* padding-bottom: 80px; */
        background-color: #f5f5f5;
    }
    
    .mobile-order-status {
        border-radius: 0;
    }
    
    .mobile-address-card {
        border-radius: 0;
    }
    
    .mobile-order-info {
        border-radius: 0;
    }
    
    .mobile-product-info {
        border-radius: 0;
    }
    
    .mobile-price-info {
        border-radius: 0;
    }
}

/* iPad尺寸专用适配 - 使用双列布局 */
@media (min-width: 768px) and (max-width: 1024px) and (pointer: coarse) {
    /* iPad上的PC端按钮布局优化 */
    .order-status-banner .order-actions {
        flex-direction: row;
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .order-status-banner .order-actions button {
        flex: 1;
        min-width: 140px;
    }
    
    /* iPad上保持双列布局，但调整比例 */
    .row .col-lg-8 {
        flex: 0 0 65%;
        max-width: 65%;
    }
    
    .row .col-lg-4 {
        flex: 0 0 35%;
        max-width: 35%;
    }
    
    /* iPad上的sticky定位调整 */
    .sticky-top {
        position: sticky;
        top: 10px;
    }
}

/* 确保所有768px以上设备都能看到PC端布局 */
@media (min-width: 768px) {
    /* 强制显示PC端布局元素 */
    .d-none.d-md-block {
        display: block !important;
    }
    
    .d-none.d-md-flex {
        display: flex !important;
    }
    
    /* 隐藏移动端布局 */
    .d-md-none {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .order-status-banner .order-status-header {
        padding: 20px;
    }
    
    .order-status-banner .d-flex {
        flex-direction: row;
        gap: 16px;
    }
    
    .product-image {
        max-width: 80px;
        height: 80px;
    }
    
    .quantity-info,
    .price-info {
        margin-top: 12px;
    }
    
    .detail-group {
        margin-bottom: 16px;
    }
    
    .cost-breakdown,
    .delivery-info,
    .order-details {
        padding: 16px;
    }
}

@media (max-width: 576px) {
    .product-actions {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .product-actions .btn {
        width: 100%;
        margin-right: 0 !important;
    }
}
