/**
 * 新云商城 - 专业主题样式
 * 统一配色：紫色渐变主题
 */

/* ==================== 基础变量 ==================== */
:root {
    --primary-color: #667eea;
    --primary-dark: #764ba2;
    --secondary-color: #f093fb;
    --accent-color: #4facfe;
    --success-color: #1cc88a;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --dark-color: #2c3e50;
    --light-color: #f8f9fc;
    --text-color: #555;
    --text-muted: #858796;
    --border-color: #e3e6f0;
    --shadow-sm: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
    --shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
    --shadow-lg: 0 1rem 3rem rgba(0,0,0,0.175);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #1cc88a 0%, #13855c 100%);
    --gradient-warning: linear-gradient(135deg, #f6c23e 0%, #dda20a 100%);
    --gradient-danger: linear-gradient(135deg, #e74a3b 0%, #be2617 100%);
}

/* ==================== 全局样式 ==================== */
html {
    font-size: 16px !important;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f7fa;
    color: var(--text-color);
    line-height: 1.6;
    font-size: 14px !important;
}

/* 强制字体加载 */
@font-face {
    font-family: 'icon';
    src: url('../font/iconfont.eot');
    src: url('../font/iconfont.eot#iefix') format('embedded-opentype'),
         url('../font/iconfont.woff') format('woff'),
         url('../font/iconfont.ttf') format('truetype'),
         url('../font/iconfont.svg#icon') format('svg');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ==================== 头部样式 ==================== */
.fui-header {
    background: var(--gradient-primary) !important;
    border-bottom: none !important;
    box-shadow: 0 2px 10px rgba(102,126,234,0.3);
}

.fui-header .title {
    color: #fff !important;
    font-weight: 600;
    font-size: 18px !important;
}

.fui-header .icon {
    color: #fff !important;
    font-size: 20px !important;
}

/* ==================== 导航栏样式 ==================== */
.fui-navbar {
    background: #fff !important;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    border-top: 1px solid var(--border-color);
}

.fui-navbar .nav-item {
    color: var(--text-muted) !important;
    transition: all 0.3s ease;
}

.fui-navbar .nav-item.active {
    color: var(--primary-color) !important;
}

.fui-navbar .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.fui-navbar .nav-item .icon {
    font-size: 22px !important;
    margin-bottom: 4px;
    display: block;
    height: 24px;
    line-height: 24px;
    font-family: "icon" !important;
}

.fui-navbar .nav-item .label {
    font-size: 12px !important;
    display: block;
    margin-top: 2px;
    color: inherit;
}

/* ==================== 按钮样式 ==================== */
.btn-primary, .fui-btn-primary {
    background: var(--gradient-primary) !important;
    border: none !important;
    border-radius: 25px !important;
    padding: 12px 30px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(102,126,234,0.3) !important;
    transition: all 0.3s ease !important;
}

.btn-primary:hover, .fui-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102,126,234,0.4) !important;
}

.btn-success {
    background: var(--gradient-success) !important;
    border: none !important;
    border-radius: 25px !important;
}

.btn-warning {
    background: var(--gradient-warning) !important;
    border: none !important;
    border-radius: 25px !important;
}

.btn-danger {
    background: var(--gradient-danger) !important;
    border: none !important;
    border-radius: 25px !important;
}

/* ==================== 商品卡片样式 ==================== */
.fui-goods-item {
    background: #fff;
    border-radius: 12px;
    margin: 10px;
    padding: 15px;
    box-shadow: var(--shadow-sm);
    border: none !important;
    transition: all 0.3s ease;
}

.fui-goods-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.fui-goods-item .image {
    border-radius: 8px;
    overflow: hidden;
}

.fui-goods-item .image img {
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.fui-goods-item:hover .image img {
    transform: scale(1.05);
}

.fui-goods-item .detail .name {
    color: var(--dark-color);
    font-weight: 600;
    font-size: 14px !important;
    line-height: 1.4;
}

.fui-goods-item .detail .price {
    color: var(--danger-color);
    font-weight: 700;
    font-size: 16px !important;
}

.fui-goods-item .detail .price .buy {
    background: var(--gradient-primary) !important;
    border-radius: 15px !important;
    padding: 5px 15px !important;
    font-size: 12px !important;
    color: #fff !important;
}

/* ==================== 分类样式 ==================== */
.goods-category {
    background: #fff;
    border-radius: 12px;
    margin: 10px;
    padding: 15px;
    box-shadow: var(--shadow-sm);
}

.goods-category li {
    transition: all 0.3s ease;
}

.goods-category li p {
    border-radius: 20px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    font-size: 13px !important;
    color: #555 !important;
}

.goods-category li .icon-title {
    font-size: 13px !important;
    color: #555 !important;
    margin-top: 5px;
}

.goods-category li.active p,
.goods-category li:hover p {
    background: var(--gradient-primary) !important;
    color: #fff !important;
    border-color: transparent;
    box-shadow: 0 4px 10px rgba(102,126,234,0.3);
}

/* ==================== 搜索栏样式 ==================== */
.fui-searchbar {
    background: #fff;
    border-radius: 25px;
    margin: 10px 15px;
    box-shadow: var(--shadow-sm);
}

.fui-searchbar .search-input {
    background: transparent;
}

.fui-searchbar .search-input input {
    background: #f5f7fa;
    border-radius: 20px;
    border: none;
    padding: 10px 15px;
    font-size: 14px !important;
}

.fui-searchbar .searchbtn {
    background: var(--gradient-primary);
    color: #fff;
    border-radius: 20px;
    padding: 8px 20px;
    font-size: 14px !important;
    border: none;
    cursor: pointer;
}

.fui-searchbar .searchbar-cancel {
    background: var(--gradient-primary) !important;
    color: #fff !important;
    border-radius: 20px !important;
    padding: 8px 20px !important;
    font-size: 14px !important;
    border: none !important;
}

/* ==================== 轮播图样式 ==================== */
.fui-swipe {
    border-radius: 12px;
    overflow: hidden;
    margin: 10px;
    box-shadow: var(--shadow-sm);
}

.fui-swipe-wrapper {
    border-radius: 12px;
}

.fui-swipe-page .fui-swipe-bullet {
    background: rgba(255,255,255,0.5);
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.fui-swipe-page .fui-swipe-bullet.active {
    background: #fff;
    width: 20px;
    border-radius: 4px;
}

/* ==================== 公告样式 ==================== */
.fui-notice {
    background: #fff;
    border-radius: 12px;
    margin: 10px;
    padding: 12px 15px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
}

.fui-notice .image {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fui-notice .image img {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
    display: block;
}

.fui-notice .icon {
    color: #fff !important;
    font-size: 20px !important;
}

.fui-notice .text {
    flex: 1;
    margin-left: 12px;
    color: var(--text-color);
    font-size: 13px !important;
}

/* ==================== 排序栏样式 ==================== */
.goods_sort {
    background: #fff;
    border-radius: 12px;
    margin: 10px;
    padding: 12px 0;
    box-shadow: var(--shadow-sm);
}

.goods_sort .item {
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 14px !important;
}

.goods_sort .item .text {
    font-size: 14px !important;
}

.goods_sort .item .icon {
    font-family: "icon" !important;
    font-size: 12px !important;
}

.goods_sort .item .sorting .icon-sanjiao1,
.goods_sort .item .sorting .icon-sanjiao2 {
    font-family: "icon" !important;
    font-size: 10px !important;
}

.goods_sort .item.on .text {
    color: var(--primary-color);
}

.goods_sort .item.on .icon {
    color: var(--primary-color);
}

/* ==================== 会员中心样式 ==================== */
.member-page .headinfo {
    background: var(--gradient-primary) !important;
    border-radius: 0 0 30px 30px;
    padding: 30px 20px;
    position: relative;
    overflow: hidden;
}

.member-page .headinfo::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.member-page .headinfo .face img {
    border: 3px solid rgba(255,255,255,0.3);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* ==================== 表单样式 ==================== */
.fui-cell-group {
    background: #fff;
    border-radius: 12px;
    margin: 10px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.fui-cell {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.fui-cell:last-child {
    border-bottom: none;
}

.fui-cell-label {
    color: var(--dark-color);
    font-weight: 600;
    font-size: 14px !important;
}

.fui-cell-info input,
.fui-cell-info textarea {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 15px;
    transition: all 0.3s ease;
    font-size: 14px !important;
}

.fui-cell-info input:focus,
.fui-cell-info textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

/* ==================== 标签样式 ==================== */
.layui-this {
    background: var(--gradient-primary) !important;
    color: #fff !important;
    border-radius: 20px !important;
}

/* ==================== 购物车样式 ==================== */
.member-cart-page .fui-footer {
    background: #fff;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
}

/* ==================== 订单样式 ==================== */
.order-list-page .fui-tab {
    background: #fff;
    border-radius: 12px;
    margin: 10px;
    box-shadow: var(--shadow-sm);
}

.order-list-page .fui-tab .item {
    color: var(--text-muted);
}

.order-list-page .fui-tab .item.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

/* ==================== 弹窗样式 ==================== */
.account-layer {
    background: #fff;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.account-title {
    color: var(--dark-color);
    font-weight: 700;
    font-size: 1.2rem;
}

.account-btn {
    background: var(--gradient-primary);
    color: #fff;
    border-radius: 25px;
    font-weight: 600;
}

/* ==================== 加载动画 ==================== */
.fui-preloader {
    border-color: var(--primary-color);
    border-top-color: transparent;
}

/* ==================== 价格标签 ==================== */
.seckill-container .seckill-list {
    background: var(--gradient-danger) !important;
    border-radius: 12px;
}

.live-price {
    background: var(--gradient-danger) !important;
    border-radius: 4px;
}

/* ==================== 底部样式 ==================== */
.footer {
    background: #fff;
    border-radius: 12px 12px 0 0;
    margin-top: 20px;
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px !important;
}

.footer ul {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}

.footer ul li {
    list-style: none;
}

.footer ul li a {
    color: var(--text-muted);
    text-decoration: none;
}

/* ==================== 滚动条美化 ==================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ==================== 图标字体修复 ==================== */
.icon,
.iconfont {
    font-family: "icon" !important;
    font-size: 20px !important;
    font-style: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: inline-block;
    vertical-align: middle;
    speak: none;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
}

/* Font Awesome 图标修复 */
.fa {
    display: inline-block;
    font: normal normal normal 14px/1 FontAwesome;
    font-size: 14px !important;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 底部导航图标特殊处理 */
.fui-navbar .icon-home:before,
.fui-navbar .icon-dingdan1:before,
.fui-navbar .icon-cart2:before,
.fui-navbar .icon-service1:before,
.fui-navbar .icon-person2:before {
    font-family: "icon" !important;
    font-size: 22px !important;
    line-height: 1;
}

/* 搜索图标 */
.icon-search {
    font-family: "icon" !important;
    font-size: 18px !important;
}

/* 公告图标 */
.fui-notice .icon {
    font-size: 24px !important;
}

/* ==================== 动画效果 ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fui-goods-item {
    animation: fadeInUp 0.5s ease forwards;
}

/* ==================== 响应式优化 ==================== */
@media (max-width: 768px) {
    .fui-goods-item {
        margin: 8px;
        padding: 12px;
    }
    
    .goods-category {
        margin: 8px;
        padding: 12px;
    }
    
    .fui-navbar .nav-item .label {
        font-size: 0.6rem;
    }
}
