/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #1e88e5 0%, #42a5f5 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(30, 136, 229, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #f35252 0%, #f83737 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.btn-sm {
    /* padding: 6px 12px; */
    font-size: 14px;
}

/* 导航按钮 - PC端特殊样式 */
.btn-nav {
    background: transparent;
    color: #666;
}

.btn-nav:hover {
    color: #1e88e5;
}

/* 登录按钮 - PC端特殊样式 */
.btn-login {
    /* background: linear-gradient(135deg, #1e88e5 0%, #42a5f5 100%); */
     color: #666;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(30, 136, 229, 0.4);
}

/* 注册按钮 - PC端特殊样式 */
.btn-register {
    /* background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%); */
     color: #666;
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(238, 90, 90, 0.4);
}

/* 头部导航 */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hamburger-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #1e88e5;
    cursor: pointer;
    padding: 8px;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    color: #1e88e5;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-nav {
    display: flex;
    align-items: center;
}

/* 侧边导航 */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 199;
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

.sidebar {
    position: fixed;
    top: 0;
    left: -200px;
    width: 200px;
    height: 100vh;
    background: #f5f7fa;
    z-index: 200;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.sidebar-logo {
    font-size: 18px;
    font-weight: 700;
    color: #1e88e5;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 8px;
    transition: color 0.3s;
}

.sidebar-close:hover {
    color: #1e88e5;
}

.sidebar-nav {
    padding: 10px 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    color: #333;
    font-size: 15px;
    transition: all 0.3s;
}

.sidebar-nav a:hover {
    background: #e3f2fd;
    color: #1e88e5;
}

.sidebar-nav a i {
    width: 24px;
    text-align: center;
}

/* 购物车角标 */
.cart-link {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 12px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(238, 90, 90, 0.4);
}

/* 侧边导航中的购物车角标 */
.sidebar-nav .cart-link {
    padding-right: 30px;
}

.sidebar-nav .cart-badge {
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
}

/* 主内容区 */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

.page-title {
    font-size: 24px;
    margin-bottom: 25px;
    color: #333;
}

/* 商品卡片网格 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.product-image {
    height: 180px;
    background: linear-gradient(135deg, #1e88e5 0%, #42a5f5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
}

.product-info {
    padding: 15px;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-part-no {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.product-tag {
    font-size: 11px;
    padding: 3px 8px;
    background: #e3f2fd;
    color: #1e88e5;
    border-radius: 4px;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: #1e88e5;
}

/* 弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Toast提示 */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 280px;
    animation: toastSlideIn 0.3s ease;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.toast-success {
    border-left: 4px solid #28a745;
}

.toast.toast-success i {
    color: #28a745;
}

.toast.toast-error {
    border-left: 4px solid #dc3545;
}

.toast.toast-error i {
    color: #dc3545;
}

.toast.toast-warning {
    border-left: 4px solid #ffc107;
}

.toast.toast-warning i {
    color: #ffc107;
}

.toast.toast-info {
    border-left: 4px solid #17a2b8;
}

.toast.toast-info i {
    color: #17a2b8;
}

.toast i {
    font-size: 20px;
}

.toast span {
    flex: 1;
    font-size: 14px;
    color: #333;
}

/* 商品详情页 */
.product-detail {
    background: white;
    border-radius: 16px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.detail-header {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.detail-image {
    height: 300px;
    background: linear-gradient(135deg, #e9e9e9 0%, #eeeeee 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 80px;
}

.detail-info h1 {
    font-size: 28px;
    margin-bottom: 10px;
    color: #333;
}

.detail-part-no {
    font-size: 14px;
    color: #999;
    margin-bottom: 20px;
}

.detail-price {
    font-size: 32px;
    font-weight: 700;
    color: #e74c3c;
    margin-bottom: 25px;
}

.detail-actions {
    /* display: flex; */
    gap: 15px;
    margin-bottom: 30px;
}



.detail-section-title {
    font-size: 17px;
    color: #212529;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #1e88e5;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.detail-section-title i {
    color: #1e88e5;
    font-size: 18px;
}

/* 基本信息网格 */
.detail-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

/* 信息卡片 */
.info-card {
    display: flex;
    gap: 14px;
    padding: 18px 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 10px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border-color: #1e88e5;
}

/* 卡片图标 */
.info-card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #1e88e5 0%, #42a5f5 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-card-icon i {
    color: white;
    font-size: 20px;
}

/* 卡片内容 */
.info-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.info-card-label {
    font-size: 13px;
    color: #6c757d;
    font-weight: 500;
}

.info-card-value {
    font-size: 15px;
    color: #212529;
    font-weight: 600;
    line-height: 1.4;
    word-break: break-all;
}

/* 保持原有样式兼容 */
.detail-section h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #1e88e5;
    display: inline-block;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.detail-item {
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.detail-item-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 4px;
}

.detail-item-value {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

/* 基本信息列表 - 纯文本样式 */
.basic-info-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.info-label {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
    white-space: nowrap;
}

.info-value {
    font-size: 14px;
    color: #212529;
    font-weight: 600;
}

/* 搜索框 */
.search-box {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    margin-bottom: 25px;
}

.search-box form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.search-box input {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #1e88e5;
}

/* 底部 */
.footer {
    background: white;
    padding: 30px 20px;
    margin-top: 50px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    /* 弹窗移动端优化 */
    .modal-overlay {
        padding: 15px;
    }
    
    .modal {
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 16px;
    }
    
    .modal-header h3 {
        font-size: 17px;
    }
    
    .modal-body {
        padding: 20px 16px;
    }
    
    .modal-body p {
        font-size: 15px;
        line-height: 1.6;
    }
    
    .modal-footer {
        padding: 16px;
        gap: 12px;
    }
    
    .modal-footer .btn {
        flex: 1;
        padding: 12px 20px;
        font-size: 15px;
    }
    
    .header-inner {
        padding: 12px 15px;
    }
    
    .logo {
        font-size: 16px;
    }
    
    .header-nav {
        gap: 12px;
    }
    
    .header-nav a {
        font-size: 13px;
    }
    
    .main-content {
        padding: 20px 15px;
    }
    
    .page-title {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }
    
    .product-image {
        height: 140px;
        font-size: 36px;
    }
    
    .product-info {
        padding: 12px;
    }
    
    .product-name {
        font-size: 14px;
    }
    
    .product-price {
        font-size: 16px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .detail-header {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .detail-image {
        height: 200px;
        font-size: 60px;
    }
    
    .detail-info h1 {
        font-size: 22px;
    }
    
    .detail-price {
        font-size: 26px;
    }
    
    .detail-actions {
        flex-direction: column;
    }
    
    .detail-actions .btn {
        width: 100%;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    /* 基本信息移动端适配 */
    .detail-info-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .info-card {
        padding: 14px 14px;
    }
    
    .info-card-icon {
        width: 44px;
        height: 44px;
        border-radius: 8px;
    }
    
    .info-card-icon i {
        font-size: 18px;
    }
    
    .info-card-value {
        font-size: 14px;
    }
    
    .modal {
        border-radius: 12px;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 15px;
    }
    
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .toast {
        min-width: auto;
        width: 100%;
    }
    
    /* 移动端登录注册适配 */
    .auth-container {
        margin: 20px auto !important;
        padding: 25px !important;
    }
    
    /* 移动端个人中心适配 */
    .profile-container {
        grid-template-columns: 1fr !important;
    }
    
    .profile-sidebar {
        order: 2;
    }
    
    .profile-content {
        order: 1;
    }
    
    .info-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* 移动端搜索框优化 - 按钮在右边 */
    .search-box {
        padding: 15px;
    }
    
    .search-box form {
        flex-wrap: nowrap;
        gap: 8px;
    }
    
    .search-box input {
        min-width: 0;
        flex: 1;
    }
    
    .search-box .btn {
        flex-shrink: 0;
        white-space: nowrap;
    }
}

/* 购物车样式 */
.cart-item:hover {
    background: #fafafa;
}

/* 订单卡片 */
.order-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 结算页面 */
.checkout-container {
    gap: 20px;
}

/* 个人中心菜单hover效果 */
.profile-menu a:hover {
    background: #e3f2fd;
    color: #1e88e5;
}

/* 移动端适配 - 头部导航 */
@media (max-width: 768px) {
    .header-inner {
        padding: 12px 15px;
    }
    
    .hamburger-btn {
        display: block;
    }
    
    .logo {
        font-size: 18px;
    }
    
    .header-nav {
        display: none;
    }
    
    /* 主内容区 */
    .main-content {
        padding: 20px 10px;
    }
    
    .page-title {
        font-size: 20px;
        margin-bottom: 20px;
    }
    

    
    /* 商品列表表格 */
    .product-list-container {
        border-radius: 8px;
    }
    
    .product-list-table {
        font-size: 11px;
    }
}

/* ========================================
   我的订单页面
   ======================================== */

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.empty-state i {
    font-size: 80px;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: #666;
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 500;
}

.empty-state p {
    color: #999;
    margin-bottom: 25px;
    font-size: 14px;
}

/* 订单列表 */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 订单卡片 */
.order-item {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 18px 20px;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.order-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 订单左侧 */
.order-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.order-no {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.order-no i {
    color: #1e88e5;
}

.order-time {
    font-size: 12px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 5px;
}

.order-time i {
    color: #ccc;
}

/* 订单右侧 */
.order-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
}

/* 订单状态 */
.order-status {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-0 {
    background: #fff3cd;
    color: #856404;
}

.status-1 {
    background: #d1ecf1;
    color: #0c5460;
}

.status-2 {
    background: #d4edda;
    color: #155724;
}

.status-3 {
    background: #f8d7da;
    color: #721c24;
}

/* 订单金额 */
.order-amount {
    display: flex;
    align-items: center;
    gap: 4px;
}

.amount-label {
    font-size: 13px;
    color: #666;
}

.amount-value {
    font-size: 20px;
    font-weight: 700;
    color: #e74c3c;
}

/* 查看详情按钮 - PC端无样式文本 */
.btn-detail {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #1e88e5;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-detail:hover {
    color: #1565c0;
}

.btn-detail i {
    font-size: 12px;
}

/* 蓝色无样式文本按钮 */
.btn-plain-blue {
    display: inline-block;
    color: #1e88e5;
    font-size: 14px;
    font-weight: 500;
    background: none;
    border: none;
    padding: 0;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

.btn-plain-blue:hover {
    color: #1565c0;
    text-decoration: underline;
}

/* 订单操作按钮容器 */
.order-action {
    margin-top: 4px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: white;
    color: #1e88e5;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.page-btn:hover {
    background: #1e88e5;
    color: white;
}

.page-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    height: 40px;
    background: #1e88e5;
    color: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(30, 136, 229, 0.3);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .order-item {
        flex-wrap: wrap;
        padding: 15px;
    }
    
    .order-left {
        flex: 1;
        min-width: 0;
    }
    
    .order-right {
        flex-direction: column;
        align-items: flex-end;
    }
    
    .order-action {
        width: 100%;
        text-align: center;
        margin-top: 10px;
    }
    
    .btn-detail {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 10px 20px;
        background: #f8f9fa;
        color: #1e88e5;
        border-radius: 6px;
        font-size: 14px;
        font-weight: 500;
        transition: all 0.3s ease;
    }
    
    .btn-detail:hover {
        background: #1e88e5;
        color: white;
    }
    
    .btn-detail i {
        font-size: 14px;
    }
    
    .btn-plain-blue {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 10px 20px;
        background: #f8f9fa;
        color: #1e88e5;
        border-radius: 6px;
        font-size: 14px;
        font-weight: 500;
        text-decoration: none;
        transition: all 0.3s ease;
    }
    
    .btn-plain-blue:hover {
        background: #1e88e5;
        color: white;
        text-decoration: none;
    }
    
    .pagination {
        gap: 6px;
    }
    
    .page-btn {
        width: 36px;
        height: 36px;
    }
    
    .page-current {
        min-width: 70px;
        height: 36px;
    }
}

/* ========================================
   订单详情页面
   ======================================== */

/* 返回链接 */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #1e88e5;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.back-link:hover {
    color: #1565c0;
}

/* 订单详情卡片 */
.order-detail-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

/* 详情区域 */
.detail-section {
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.detail-section:last-child {
    border-bottom: none;
}

/* 订单信息 */
.detail-section:first-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.detail-info {
    display: flex;
    flex-direction: column;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-label {
    font-size: 13px;
    color: #999;
    min-width: 70px;
}

.info-value {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

/* 订单状态 */
.detail-status {
    flex-shrink: 0;
}

/* 商品明细标题 */
.section-title {
    font-size: 15px;
    color: #333;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

/* 商品列表 */
.order-items-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 商品项 */
.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding: 10px 0;
}

.detail-item:not(:last-child) {
    border-bottom: 1px solid #f5f5f5;
    padding: 10px;
}

/* 商品信息 */
.item-info {
    flex: 1;
    min-width: 0;
}

.item-info h4 {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.4;
}

.item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.item-meta span {
    font-size: 12px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 4px;
}

.item-meta i {
    font-size: 11px;
}

/* 价格区域 */
.item-price {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
    flex-shrink: 0;
}

.price-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-label {
    font-size: 12px;
    color: #999;
}

.price-text {
    font-size: 13px;
    color: #666;
}

.price-subtotal {
    font-size: 16px;
    font-weight: 700;
    color: #1e88e5;
}

/* 订单总额 */
.detail-total {
    padding: 20px;
    background: #fafafa;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}

.total-label {
    font-size: 14px;
    color: #666;
}

.total-amount {
    font-size: 26px;
    font-weight: 700;
    color: #e74c3c;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .detail-section:first-child {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
        gap: 20px;
    }
    
    .detail-info {
        flex: 1;
        min-width: 0;
    }
    
    .detail-status {
        flex-shrink: 0;
    }
    
    .detail-item {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .item-price {
        align-items: stretch;
        flex-direction: row;
        justify-content: space-between;
    }
    
    .price-row {
        flex-direction: column;
        align-items: flex-end;
        gap: 4px;
    }
    
    .price-row:last-child {
        align-items: flex-end;
    }
    
    .price-subtotal {
        font-size: 18px;
    }
    
    .detail-total {
        justify-content: center;
        flex-direction: column;
        gap: 8px;
    }
    
    .total-amount {
        font-size: 24px;
    }
}

/* ========================================
   购物车页面 - 电商商城风格
   ======================================== */

/* 购物车卡片 */
.cart-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* 复选框样式 */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: #1e88e5;
    border-color: #1e88e5;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: white;
    font-size: 12px;
}

.select-all-text {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

/* 表头 */
.cart-header {
    display: grid;
    grid-template-columns: 60px 2.5fr 1fr 1.2fr 1fr 100px;
    gap: 10px;
    padding: 16px 20px;
    background: linear-gradient(180deg, #f8f9fa 0%, #f1f3f5 100%);
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
    color: #495057;
    font-weight: 600;
    align-items: center;
}

/* 购物车列表 */
.cart-items-list {
    display: flex;
    flex-direction: column;
}

/* 购物车项 - PC端 */
.cart-item {
    display: grid;
    grid-template-columns: 60px 2.5fr 1fr 1.2fr 1fr 100px;
    gap: 10px;
    padding: 20px;
    border-bottom: 1px solid #f1f3f5;
    align-items: center;
    transition: background 0.2s ease;
}

.cart-item:hover {
    background: #f8f9fa;
}

.cart-item:last-child {
    border-bottom: none;
}

/* 移动端顶部容器 - PC端隐藏 */
.cart-item-top {
    display: contents;
}

/* 选择框列 - PC端 */
.col-check {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 商品信息列 */
.col-info {
    min-width: 0;
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-name {
    font-size: 15px;
    color: #212529;
    font-weight: 600;
    line-height: 1.5;
    margin: 0;
    transition: color 0.2s ease;
}

.product-name:hover {
    color: #1e88e5;
}

.product-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.spec-item {
    font-size: 12px;
    color: #6c757d;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f1f3f5;
    padding: 4px 10px;
    border-radius: 12px;
}

.spec-item i {
    font-size: 11px;
    color: #adb5bd;
}

/* 单价列 */
.col-price {
    text-align: center;
}

.price-text {
    font-size: 16px;
    color: #495057;
    font-weight: 600;
}

/* 数量列 */
.col-quantity {
    display: flex;
    justify-content: center;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
}

.qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #f8f9fa;
    color: #6c757d;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 14px;
}

.qty-btn:hover {
    background: #1e88e5;
    color: white;
}

.qty-btn:active {
    transform: scale(0.95);
}

.qty-input {
    width: 50px;
    height: 36px;
    text-align: center;
    border: none;
    border-left: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
    font-size: 14px;
    color: #212529;
    font-weight: 600;
    background: white;
}

.qty-input:focus {
    outline: none;
    background: #e3f2fd;
}

/* 小计列 */
.col-subtotal {
    text-align: center;
}

.subtotal-text {
    font-size: 18px;
    color: #e74c3c;
    font-weight: 700;
}

/* 操作列 */
.col-action {
    display: flex;
    justify-content: center;
}

.delete-btn {
    padding: 8px 16px;
    border: none;
    background: none;
    color: #6c757d;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    transition: all 0.2s ease;
}

.delete-btn:hover {
    background: #fef0f0;
    color: #e74c3c;
}

.delete-btn i {
    font-size: 14px;
}

/* 底部结算 */
.cart-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    background: linear-gradient(180deg, #f8f9fa 0%, #f1f3f5 100%);
    border-top: 1px solid #e9ecef;
}

.cart-footer-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.batch-delete {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6c757d;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.batch-delete:hover {
    color: #e74c3c;
}

.batch-delete i {
    font-size: 14px;
}

.cart-total-count {
    font-size: 14px;
    color: #495057;
}

.cart-total-count strong {
    color: #1e88e5;
    font-size: 20px;
    font-weight: 700;
}

.cart-footer-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

.cart-total-section {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.total-label {
    font-size: 16px;
    color: #495057;
    font-weight: 500;
}

.total-price {
    font-size: 32px;
    font-weight: 700;
    color: #e74c3c;
}

.btn-checkout {
    padding: 14px 45px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
}

/* 移动端适配 - 现代化购物车布局 */
@media (max-width: 768px) {
    .cart-header {
        display: none;
    }
    
    .cart-item {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 16px;
        background: white;
        border-bottom: 1px solid #f1f3f5;
        position: relative;
    }
    
    .cart-item:hover {
        background: #fafafa;
    }
    
    /* 商品信息顶部区域 - 包含复选框、商品名和删除按钮 */
    .cart-item-top {
        display: flex;
        align-items: flex-start;
    }
    
    /* 选择框 - 左上角 */
    .col-check {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        padding-top: 2px;
    }
    
    /* 商品信息 */
    .col-info {
        flex: 1;
        min-width: 0;
        padding-left: 0;
    }
    
    .product-info {
        gap: 8px;
    }
    
    .product-name {
        font-size: 15px;
        font-weight: 600;
        line-height: 1.4;
        color: #212529;
        display: -webkit-box;
        /*-webkit-line-clamp: 2;*/
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .product-specs {
        gap: 6px;
        flex-wrap: wrap;
    }
    
    .spec-item {
        font-size: 11px;
        padding: 3px 8px;
        background: #f8f9fa;
        color: #6c757d;
        border-radius: 10px;
    }
    
    .spec-item i {
        font-size: 10px;
    }
    
    /* 单价 - 隐藏，因为移动端不需要单独显示单价 */
    .col-price {
        display: none;
    }
    
    /* 数量控制 */
    .col-quantity {
        width: 100%;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        padding-left: 32px;
    }
    
    .col-quantity::before {
        content: none;
    }
    
    .quantity-control {
        border-radius: 8px;
    }
    
    .qty-btn {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
    
    .qty-input {
        width: 45px;
        height: 32px;
        font-size: 14px;
    }
    
    /* 小计 - 左侧对齐复选框 */
    .col-subtotal {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-left: 32px;
    }
    
    .col-subtotal::before {
        content: '小计';
        font-size: 14px;
        color: #6c757d;
        font-weight: 500;
    }
    
    .subtotal-text {
        font-size: 20px;
        font-weight: 700;
        color: #e74c3c;
    }
    
    /* 删除按钮 - 绝对定位在右上角 */
    .col-action {
        position: absolute;
        top: 16px;
        right: 16px;
        padding-left: 0;
    }
    
    .delete-btn {
        padding: 8px;
        font-size: 0;
        color: #adb5bd;
        background: none;
    }
    
    .delete-btn:hover {
        background: #fef0f0;
        color: #e74c3c;
    }
    
    .delete-btn i {
        font-size: 18px;
    }
    
    .delete-btn::before {
        content: none;
    }
    
    /* 底部结算栏 */
    .cart-footer {
        position: sticky;
        bottom: 0;
        z-index: 100;
        flex-direction: column;
        gap: 14px;
        padding: 14px 16px;
        background: white;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
        border-top: 1px solid #e9ecef;
    }
    
    .cart-footer-left {
        width: 100%;
        justify-content: space-between;
        gap: 12px;
        flex-wrap: wrap;
    }
    
    .batch-delete {
        font-size: 13px;
        color: #6c757d;
    }
    
    .batch-delete:hover {
        color: #e74c3c;
    }
    
    .batch-delete i {
        font-size: 14px;
    }
    
    .cart-total-count {
        font-size: 14px;
        color: #495057;
    }
    
    .cart-total-count strong {
        font-size: 18px;
        color: #1e88e5;
    }
    
    .cart-footer-right {
        width: 100%;
        flex-direction: row;
        gap: 16px;
        align-items: center;
    }
    
    .cart-total-section {
        justify-content: flex-start;
        width: auto;
        flex: 1;
    }
    
    .total-label {
        font-size: 15px;
        color: #495057;
    }
    
    .total-price {
        font-size: 26px;
        color: #e74c3c;
    }
    
    .btn-checkout {
        width: auto;
        justify-content: center;
        padding: 12px 32px;
        font-size: 15px;
        border-radius: 25px;
        white-space: nowrap;
    }
}

/* ========================================
   确认订单页面
   ======================================== */

/* 确认订单容器 */
.checkout-container {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
}

/* 商品清单区域 */
.checkout-items {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 24px;
}

/* 区域标题 */
.checkout-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #e3f2fd;
    font-size: 18px;
    font-weight: 600;
    color: #212529;
}

.checkout-section-title i {
    color: #1e88e5;
    font-size: 18px;
}

/* 商品项 */
.checkout-item {
    display: flex;
    padding: 16px 0;
    border-bottom: 1px solid #f1f3f5;
}

.checkout-item:last-child {
    border-bottom: none;
}

/* 商品信息 */
.checkout-item-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.checkout-item-name {
    font-size: 15px;
    color: #212529;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
}

.checkout-item-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.checkout-item-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkout-item-quantity {
    font-size: 14px;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 6px;
}

.checkout-item-quantity i {
    font-size: 13px;
    color: #adb5bd;
}

.checkout-item-subtotal {
    font-size: 18px;
    font-weight: 700;
    color: #e74c3c;
}

/* 订单摘要区域 */
.checkout-summary {
    height: fit-content;
}

.summary-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 24px;
}

/* 摘要行 */
.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 14px;
}

.summary-label {
    color: #6c757d;
}

.summary-value {
    color: #212529;
    font-weight: 600;
}

/* 分隔线 */
.summary-divider {
    height: 1px;
    background: #f1f3f5;
    margin: 16px 0;
}

/* 总计 */
.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.summary-total-label {
    font-size: 16px;
    color: #212529;
    font-weight: 600;
}

.summary-total-price {
    font-size: 30px;
    font-weight: 700;
    color: #e74c3c;
}

/* 提交订单按钮 */
.btn-submit-order {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
}

.btn-submit-order:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* 返回购物车链接 */
.summary-back-link {
    margin-top: 16px;
    text-align: center;
}

.summary-back-link a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #6c757d;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.summary-back-link a:hover {
    color: #1e88e5;
}

.summary-back-link i {
    font-size: 12px;
}

/* 确认订单页面 - 移动端适配 */
@media (max-width: 768px) {
    .checkout-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .checkout-items {
        padding: 16px;
    }
    
    .checkout-section-title {
        font-size: 16px;
        margin-bottom: 16px;
        padding-bottom: 12px;
    }
    
    .checkout-item {
        padding: 12px 0;
    }
    
    .checkout-item-name {
        font-size: 14px;
    }
    
    .checkout-item-specs {
        gap: 6px;
    }
    
    .checkout-item-subtotal {
        font-size: 16px;
    }
    
    .summary-card {
        padding: 16px;
    }
    
    .summary-total-price {
        font-size: 26px;
    }
    
    .btn-submit-order {
        padding: 12px 20px;
        font-size: 15px;
    }
}

/* 移动端商品列表 - 卡片式布局 */
@media (max-width: 768px) {
    .pc-list-view {
        display: none !important;
    }
    
    .mobile-list-view {
        display: block !important;
    }
    
    .detail-actions {
        text-align: center !important;
    }
    
    .action-buttons {
        justify-content: center !important;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
    
    .product-detail-wrapper {
        padding: 15px !important;
        border-radius: 8px !important;
    }
    
    .detail-main h1 {
        font-size: 16px !important;
    }
    
    .info-grid {
        grid-template-columns: 1fr !important;
    }
}

