/* 个人中心页面专用样式 */

/* 确保导航栏与首页保持一致 - 重置任何可能的干扰 */
nav.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 16px 0;
    transition: all 0.3s ease;
}


/* 页面容器 - 个人中心专用 */
/* 非移动端设置padding为20px，移动端保持默认 */
@media (min-width: 768px) {
    .page-container {
        padding: 20px !important;
    }
}

/* 个人头像 */
.profile-avatar {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    margin: 0 auto 16px;
}

/* 侧边栏导航 */
.sidebar-nav {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 100px;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-menu li {
    margin-bottom: 8px;
}

.nav-menu a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: var(--accent-color);
    color: var(--primary-color);
}

.nav-menu i {
    margin-right: 12px;
    width: 20px;
}

/* 状态标签 */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    display: inline-block;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-shipped {
    background: #cce5ff;
    color: #004085;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

/* 产品卡片样式覆盖 - 个人中心专用 */
.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.16);
    color: inherit;
    text-decoration: none;
}

.product-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #ccc;
    overflow: hidden;
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.product-price {
    color: var(--primary-color);
    font-size: 20px;
    font-weight: 700;
}

/* 个人中心特定的产品图片高度 */
.profile .product-image {
    height: 120px;
    font-size: 32px;
}

/* 移动端适配 */
@media (max-width: 576px) {
    .sidebar-nav {
        position: static;
        margin-bottom: 24px;
    }
    
    .profile-avatar {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .nav-menu a {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .nav-menu i {
        margin-right: 8px;
        width: 16px;
    }
    
    .status-badge {
        padding: 4px 8px;
        font-size: 12px;
    }
}

/* 个人中心统计卡片 */
.profile-stats-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    border: 1px solid transparent;
}

.profile-stats-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-color);
}

.profile-stats-card i {
    font-size: 48px;
    margin-bottom: 16px;
}

.profile-stats-card h5 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.profile-stats-card .h4 {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
}

/* 最近订单区域 */
.recent-orders .product-card {
    height: 100%;
}

.recent-orders .product-image {
    height: 120px;
    font-size: 32px;
}

.recent-orders .product-info {
    padding: 12px;
}

.recent-orders .product-title {
    font-size: 14px;
    margin-bottom: 4px;
}

.recent-orders .product-price {
    font-size: 16px;
}

.view-more-card {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    background: transparent;
    transition: all 0.3s ease;
    text-decoration: none;
}

.view-more-card:hover {
    border-color: var(--primary-color);
    background: var(--accent-color);
    transform: none;
}

.view-more-card i {
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.view-more-card:hover i {
    color: var(--primary-color);
}

/* 桌面端布局卡片 */
.desktop-layout {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.account-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
}

.account-content {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
}

/* 大头像区域 */
.avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 140px;
}

.large-avatar {
    width: 120px;
    height: 120px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
    position: relative;
    margin-bottom: 12px;
    border: 3px solid #f0f0f0;
    transition: all 0.3s ease;
}

.large-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.edit-avatar-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.edit-avatar-btn:hover {
    background: var(--accent-color);
    color: var(--primary-color);
}

.avatar-label {
    font-size: 16px;
    color: var(--text-secondary);
    text-align: center;
}

/* 账号详情区域 */
.account-details {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 40px;
    row-gap: 0;
}

.details-column {
    min-width: 0;
}

.detail-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
    gap: 5px;
    min-height: 60px;
}

/* 移除最后一行边框的规则 - 现在所有行都保持边框 */

.detail-label {
    font-size: 16px;
    color: var(--text-secondary);
    min-width: 80px;
    font-weight: 500;
    margin-right: 11px;
}

.detail-value {
    font-size: 16px;
    color: var(--text-primary);
    margin-right: 5px;
}

.detail-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.action-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.action-status {
    font-size: 14px;
    color: var(--success-color, #28a745);
    font-weight: 500;
}

.action-value {
    font-size: 14px;
    color: var(--text-primary);
}

.edit-btn, .copy-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
    color: var(--text-secondary);
    margin-left: 5px;
    flex-shrink: 0;
}

.edit-btn:hover, .copy-btn:hover {
    background: var(--accent-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 社交账号绑定区域 */
.social-binding-section {
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
}

.social-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    max-width: 200px;
}

.social-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    text-align: center;
}

.social-card:hover {
    background: white;
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.social-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    margin-bottom: 12px;
    transition: transform 0.3s ease;
}

.social-card:hover .social-icon {
    transform: scale(1.1);
}

.social-icon.wechat {
    background: #07c160;
}

.social-icon.qq {
    background: #12b7f5;
}

.social-icon.weibo {
    background: #e6162d;
}

.social-icon.alipay {
    background: #1677ff;
}

.social-name {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
    margin: 0;
}

/* 隐藏除微信外的其他社交账号 */
.social-card .social-icon.qq,
.social-card .social-icon.weibo,
.social-card .social-icon.alipay {
    display: none;
}

.social-card:nth-child(2),
.social-card:nth-child(3),
.social-card:nth-child(4) {
    display: none;
}

/* PC/移动端布局控制 */
.container-layout {
    display: block;
}

.mobile-layout {
    display: none;
}


/* PC端和iPad适配 - 暂时移除page-container padding测试 */

/* iPad mini 768px适配 */
@media (max-width: 768px) and (min-width: 768px) {
    .sidebar-nav {
        padding: 24px 10px;
    }
    
    .account-details {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* iPad Air 820px适配 */
@media (max-width: 820px) and (min-width: 820px) {
    .account-details {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* 移动端适配 */
@media (max-width: 767px) {
    .page-container {
        padding: 0px;
    }
    
    .container .row {
        margin: 0 !important;
    }
    
    .col-md-9 {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .col-md-3 {
        display: none;
    }
    
    .desktop-layout {
        display: none;
    }
    
    .mobile-layout {
        display: block;
        margin: 0px;
    }
    
    .account-content {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }
    
    .avatar-section {
        align-self: center;
    }
    
    .account-details {
        flex-direction: column;
        gap: 20px;
        text-align: left;
    }
    
    .detail-row {
        flex-direction: row;
        align-items: center;
        gap: 5px;
        padding: 12px 0;
        min-height: auto;
    }
    
    
    .detail-actions {
        margin-left: 0;
        width: 100%;
        justify-content: flex-start;
    }
    
    .large-avatar {
        width: 100px;
        height: 100px;
        font-size: 40px;
    }
    
    .social-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .social-card {
        padding: 16px 12px;
    }
    
    .social-icon {
        width: 48px;
        height: 48px;
        font-size: 24px;
        margin-bottom: 8px;
    }
}

@media (max-width: 576px) {
    .desktop-layout {
        padding: 16px;
        margin: 0 -4px;
        border: none;
        border-radius: 0;
    }
    
    .account-title {
        font-size: 20px;
    }
    
    .large-avatar {
        width: 80px;
        height: 80px;
        font-size: 32px;
    }
    
    .edit-avatar-btn {
        bottom: -2px;
        right: -2px;
    }
    
    .detail-label, .detail-value {
        font-size: 14px;
    }
    
    .social-card {
        padding: 14px 10px;
    }
    
    .social-icon {
        width: 42px;
        height: 42px;
        font-size: 20px;
        margin-bottom: 6px;
    }
    
    .social-name {
        font-size: 12px;
    }
}

/* 移动端专用样式 */
.mobile-layout {
    background: #f5f5f5;
    padding: 0;
}

/* 移动端用户头部区域 */
.mobile-user-header {
    background: linear-gradient(135deg, #ff6b35 0%, #ff4500 100%);
    padding: 40px 16px 80px 16px;
    margin-bottom: 12px;
}

.mobile-user-info {
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
}

.mobile-avatar {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-right: 16px;
}

.mobile-user-text {
    flex: 1;
}

.mobile-username {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.mobile-phone {
    font-size: 14px;
    opacity: 0.9;
}

.mobile-user-arrow {
    font-size: 16px;
    opacity: 0.8;
}

/* 移动端订单区域 */
.mobile-orders-section {
    background: white;
    margin-bottom: 12px;
    padding: 16px;
}

.mobile-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.mobile-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.mobile-section-link {
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
}

.mobile-section-link i {
    font-size: 12px;
    margin-left: 4px;
}

.mobile-orders-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.mobile-order-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: inherit;
}

.mobile-order-icon {
    position: relative;
    width: 44px;
    height: 44px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.mobile-order-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.mobile-order-text {
    font-size: 12px;
    color: var(--text-primary);
}

/* 移动端菜单区域 */
.mobile-menu-section {
    background: white;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: inherit;
}

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

.mobile-menu-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: var(--primary-color);
    font-size: 16px;
}

.mobile-menu-text {
    flex: 1;
    font-size: 16px;
    color: var(--text-primary);
}

.mobile-menu-arrow {
    color: var(--text-secondary);
    font-size: 14px;
}

/* 移动端间距 */
.mobile-gap {
    height: 200px;
    background: #fff;
}

/* 移动端特定的图标颜色 */
.mobile-order-item:nth-child(1) .mobile-order-icon {
    color: #ff9500;
}

.mobile-order-item:nth-child(2) .mobile-order-icon {
    color: #007aff;
}

.mobile-order-item:nth-child(3) .mobile-order-icon {
    color: #34c759;
}

.mobile-order-item:nth-child(4) .mobile-order-icon {
    color: #ff3b30;
}
