/* ============================================
   销售平台 - 全局样式
   ============================================ */

:root {
    --primary: #6C5CE7;
    --primary-light: #A29BFE;
    --primary-dark: #5A4BD1;
    --accent: #00CEC9;
    --accent-light: #81ECEC;
    --danger: #E17055;
    --warning: #FDCB6E;
    --success: #00B894;
    --info: #74B9FF;
    --dark: #2D3436;
    --gray-dark: #636E72;
    --gray: #B2BEC3;
    --gray-light: #DFE6E9;
    --white: #FFFFFF;
    --bg: #F8F9FF;
    --bg-card: #FFFFFF;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 24px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ========== 顶部导航栏 ========== */
.app-header {
    background: var(--white);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 32px;
}

.logo {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.logo i {
    font-size: 28px;
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-links a {
    color: var(--gray-dark);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    padding: 4px 0;
    border-bottom: 2px solid transparent;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-right .el-input {
    width: 240px;
}

.cart-icon {
    position: relative;
    cursor: pointer;
    font-size: 22px;
    color: var(--dark);
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -12px;
    background: var(--danger);
    color: white;
    font-size: 11px;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* ========== 主内容区域 ========== */
.main-content {
    flex: 1;
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 20px;
    width: 100%;
}

/* ========== 首页轮播 ========== */
.home-banner {
    margin-bottom: 32px;
    border-radius: var(--radius);
    overflow: hidden;
}

.home-banner .el-carousel__item {
    height: 360px;
}

.home-banner .el-carousel__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========== 分类导航 ========== */
.category-nav {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 32px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.category-nav .cat-item {
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-dark);
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg);
    border: 1px solid transparent;
}

.category-nav .cat-item:hover, .category-nav .cat-item.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* ========== 区块标题 ========== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--dark);
    position: relative;
    padding-left: 14px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    background: var(--primary);
    border-radius: 2px;
}

/* ========== 商品卡片网格 ========== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.product-card .card-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: var(--bg);
}

.product-card .card-body {
    padding: 14px 16px;
}

.product-card .card-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 8px;
}

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

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

.product-card .price-original {
    font-size: 12px;
    color: var(--gray);
    text-decoration: line-through;
}

.product-card .card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 12px;
    color: var(--gray);
}

/* ========== 购物车页面 ========== */
.cart-page {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.cart-list {
    flex: 1;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
}

.cart-summary {
    width: 340px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    position: sticky;
    top: 84px;
}

/* ========== 商品详情页 ========== */
.product-detail {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px;
    display: flex;
    gap: 40px;
}

.product-gallery {
    width: 480px;
    flex-shrink: 0;
}

.product-info {
    flex: 1;
}

.product-info .product-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
}

.product-info .product-price-area {
    background: #FFF5F5;
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    margin-bottom: 20px;
}

.product-info .current-price {
    font-size: 32px;
    font-weight: 700;
    color: var(--danger);
}

/* ========== 登录/注册页 ========== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #6C5CE7, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
}

/* 渐变背景动画 */
@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    25%  { background-position: 100% 0%; }
    50%  { background-position: 100% 100%; }
    75%  { background-position: 0% 100%; }
    100% { background-position: 0% 50%; }
}

/* 浮动泡泡容器 */
.auth-bubbles {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* 浮动泡泡 */
.auth-bubbles .bubble {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    animation: floatUp linear infinite;
}

.auth-bubbles .bubble:nth-child(1)  { width:60px;  height:60px;  left:10%;  animation-duration:12s; animation-delay:0s; }
.auth-bubbles .bubble:nth-child(2)  { width:40px;  height:40px;  left:20%;  animation-duration:8s;  animation-delay:1s; }
.auth-bubbles .bubble:nth-child(3)  { width:80px;  height:80px;  left:35%;  animation-duration:15s; animation-delay:3s; }
.auth-bubbles .bubble:nth-child(4)  { width:30px;  height:30px;  left:50%;  animation-duration:10s; animation-delay:0s; }
.auth-bubbles .bubble:nth-child(5)  { width:50px;  height:50px;  left:65%;  animation-duration:13s; animation-delay:2s; }
.auth-bubbles .bubble:nth-child(6)  { width:70px;  height:70px;  left:75%;  animation-duration:11s; animation-delay:4s; }
.auth-bubbles .bubble:nth-child(7)  { width:45px;  height:45px;  left:85%;  animation-duration:9s;  animation-delay:1s; }
.auth-bubbles .bubble:nth-child(8)  { width:35px;  height:35px;  left:90%;  animation-duration:14s; animation-delay:5s; }
.auth-bubbles .bubble:nth-child(9)  { width:55px;  height:55px;  left:5%;   animation-duration:16s; animation-delay:2s; }
.auth-bubbles .bubble:nth-child(10) { width:65px;  height:65px;  left:42%;  animation-duration:18s; animation-delay:6s; }

@keyframes floatUp {
    0%   { bottom: -100px; opacity: 0; transform: translateX(0) scale(0.5) rotate(0deg); }
    10%  { opacity: 0.8; }
    50%  { opacity: 0.4; transform: translateX(60px) scale(1) rotate(180deg); }
    90%  { opacity: 0.8; }
    100% { bottom: 110%; opacity: 0; transform: translateX(-30px) scale(0.3) rotate(360deg); }
}

/* 底部波浪 */
.auth-wave {
    position: absolute;
    bottom: 0; left: 0;
    width: 200%;
    height: 120px;
    z-index: 0;
    pointer-events: none;
    opacity: 0.3;
}

.auth-wave svg {
    width: 100%;
    height: 100%;
    animation: waveDrift 8s linear infinite;
}

@keyframes waveDrift {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* 毛玻璃卡片 */
.auth-card {
    width: 420px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    position: relative;
    z-index: 10;
    box-shadow: 0 8px 40px rgba(0,0,0,0.12), 0 0 0 1px rgba(255,255,255,0.5) inset;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 56px rgba(0,0,0,0.18), 0 0 0 1px rgba(255,255,255,0.6) inset;
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 8px;
    font-size: 28px;
    font-weight: 800;
    color: var(--dark);
    background: linear-gradient(135deg, #6C5CE7, #e73c7e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-card .auth-subtitle {
    text-align: center;
    color: var(--gray);
    margin-bottom: 28px;
    font-size: 14px;
}

/* 输入框样式增强 */
.auth-card .el-input__wrapper {
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
}

.auth-card .el-input__wrapper:hover {
    box-shadow: 0 4px 16px rgba(108,92,231,0.12);
}

.auth-card .el-button--primary {
    background: linear-gradient(135deg, #6C5CE7, #e73c7e);
    border: none;
    height: 48px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.auth-card .el-button--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(108,92,231,0.35);
}

/* ========== 用户中心 ========== */
.user-layout {
    display: flex;
    gap: 24px;
}

.user-sidebar {
    width: 220px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 0;
}

.user-sidebar .menu-item {
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--gray-dark);
    cursor: pointer;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.user-sidebar .menu-item:hover, .user-sidebar .menu-item.active {
    color: var(--primary);
    background: var(--bg);
    border-left-color: var(--primary);
}

.user-main {
    flex: 1;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    min-height: 500px;
}

/* ========== 后台管理 ========== */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 240px;
    background: linear-gradient(180deg, #2D3436 0%, #1E272E 100%);
    color: white;
    flex-shrink: 0;
    padding: 20px 0;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    overflow-y: auto;
}

.admin-sidebar .admin-logo {
    padding: 0 20px 24px;
    font-size: 20px;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 16px;
}

.admin-sidebar .menu-item {
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    transition: var(--transition);
}

.admin-sidebar .menu-item:hover, .admin-sidebar .menu-item.active {
    color: white;
    background: rgba(255,255,255,0.1);
}

.admin-main {
    flex: 1;
    margin-left: 240px;
    padding: 24px;
    background: var(--bg);
    min-height: 100vh;
}

/* ========== 统计卡片 ========== */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px 24px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-card .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.stat-card .stat-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--dark);
}

.stat-card .stat-label {
    font-size: 13px;
    color: var(--gray);
    margin-top: 2px;
}

/* ========== 页脚 ========== */
.app-footer {
    background: var(--dark);
    color: rgba(255,255,255,0.7);
    padding: 40px 0 0;
    margin-top: auto;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.footer-col h4 {
    color: white;
    font-size: 16px;
    margin-bottom: 16px;
}

.footer-col p, .footer-col a {
    font-size: 13px;
    line-height: 2;
    color: rgba(255,255,255,0.6);
}

.footer-bottom {
    text-align: center;
    padding: 20px;
    margin-top: 32px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 12px;
    color: rgba(255,255,255,0.4);
}

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
    .product-detail { flex-direction: column; }
    .product-gallery { width: 100%; }
    .stat-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .cart-page { flex-direction: column; }
    .cart-summary { width: 100%; }
    .user-layout { flex-direction: column; }
    .user-sidebar { width: 100%; }
}

@media (max-width: 480px) {
    .product-grid { grid-template-columns: 1fr; }
    .stat-cards { grid-template-columns: 1fr; }
}

/* ========== 支付方式选择卡片 ========== */
.pay-method-card {
    cursor: pointer;
    padding: 24px 28px;
    border: 2px solid #E8ECF1;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s;
    width: 150px;
    background: white;
}

.pay-method-card:hover {
    transform: translateY(-2px);
}

.pay-method-alipay:hover {
    border-color: #1677FF;
    box-shadow: 0 4px 16px rgba(22,119,255,0.15);
}

.pay-method-wechat:hover {
    border-color: #07C160;
    box-shadow: 0 4px 16px rgba(7,193,96,0.15);
}

/* ========== 工具类 ========== */
.text-primary { color: var(--primary); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-muted { color: var(--gray); }
.text-bold { font-weight: 700; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-24 { margin-bottom: 24px; }
.gap-16 { gap: 16px; }
.flex-center { display: flex; align-items: center; justify-content: center; }
