/* ========================================
   箱包服装对接平台 - 主样式
   ======================================== */

/* 基础重置 */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 14px; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
a { color: #333; text-decoration: none; transition: color 0.3s; }
a:hover { color: #ff6b35; }
img { max-width: 100%; height: auto; }
ul, ol { list-style: none; }
input, button, select, textarea { font-family: inherit; font-size: inherit; }
button { cursor: pointer; border: none; background: none; }

/* 布局 */
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }
.clearfix::after { content: ''; display: block; clear: both; }

/* 头部 */
.site-header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}
.logo h1 {
    font-size: 24px;
    color: #ff6b35;
    font-weight: bold;
}
.main-nav { display: flex; gap: 30px; }
.main-nav a {
    font-size: 15px;
    color: #333;
    padding: 8px 0;
    position: relative;
}
.main-nav a:hover,
.main-nav a.active { color: #ff6b35; }
.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 3px;
    background: #ff6b35;
    border-radius: 2px;
}
.btn-publish {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: #fff !important;
    padding: 10px 24px !important;
    border-radius: 20px;
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn-publish:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}
.header-user { display: flex; align-items: center; gap: 15px; }
.btn-login, .btn-register {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
}
.btn-register {
    background: #ff6b35;
    color: #fff !important;
}
.user-menu { position: relative; }
.user-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    border-radius: 4px;
}
.user-link:hover { background: #f5f5f5; }
.user-link .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}
.vip-badge {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
}
.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 4px;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 100;
}
.user-menu:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
}
.user-dropdown a {
    display: block;
    padding: 10px 15px;
    border-bottom: 1px solid #f0f0f0;
}
.user-dropdown a:hover { background: #f9f9f9; }
.user-dropdown a:last-child { border-bottom: none; }
.badge {
    background: #ff4444;
    color: #fff;
    font-size: 11px;
    padding: 1px 5px;
    border-radius: 10px;
    margin-left: 5px;
}

/* 移动端菜单按钮 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
}
.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: #333;
    transition: all 0.3s;
}

/* 移动端菜单 */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100vh;
    background: #fff;
    z-index: 2000;
    transition: right 0.3s;
    overflow-y: auto;
}
.mobile-menu.open { right: 0; }
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}
.mobile-menu-overlay.open {
    opacity: 1;
    visibility: visible;
}
.mobile-menu-header {
    padding: 20px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: #fff;
}
.mobile-menu-header .user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}
.mobile-menu-header .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}
.mobile-nav a {
    display: block;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
}
.mobile-nav a:hover { background: #f9f9f9; color: #ff6b35; }

/* 主内容区 */
.site-main {
    flex: 1;
    padding: 20px 0;
}

/* 轮播广告 */
.banner-slider {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 20px;
}
.banner-slider img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

/* 分类入口 */
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}
.category-card {
    background: #fff;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}
.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.category-card .icon {
    font-size: 48px;
    color: #ff6b35;
    margin-bottom: 10px;
}
.category-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}
.category-card p {
    font-size: 13px;
    color: #999;
}

/* 信息列表 */
.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ff6b35;
}
.section-title h2 {
    font-size: 20px;
    color: #333;
}
.section-title a {
    font-size: 13px;
    color: #999;
}
.info-list { background: #fff; border-radius: 8px; overflow: hidden; margin-bottom: 30px; }
.info-item {
    display: flex;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}
.info-item:hover { background: #fafafa; }
.info-item:last-child { border-bottom: none; }
.info-item.top { background: #fff8f0; }
.info-item.top .info-title::before {
    content: '置顶';
    background: #ff6b35;
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 8px;
}
.info-item.recommend .info-title::after {
    content: '推荐';
    background: #4caf50;
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 8px;
}
.info-thumb {
    width: 120px;
    height: 90px;
    margin-right: 15px;
    flex-shrink: 0;
}
.info-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}
.info-content { flex: 1; min-width: 0; }
.info-title {
    font-size: 16px;
    color: #333;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.info-title:hover { color: #ff6b35; }
.info-desc {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.info-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 12px;
    color: #999;
}
.info-meta .tag {
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 3px;
}

/* 侧边栏 */
.main-layout { display: flex; gap: 20px; }
.main-content { flex: 1; min-width: 0; }
.sidebar { width: 300px; flex-shrink: 0; }
.widget {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}
.widget-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}
.hot-list li {
    padding: 8px 0;
    border-bottom: 1px dashed #f0f0f0;
}
.hot-list li:last-child { border-bottom: none; }
.hot-list li a {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}
.hot-list li .num {
    width: 20px;
    height: 20px;
    background: #999;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}
.hot-list li:nth-child(1) .num,
.hot-list li:nth-child(2) .num,
.hot-list li:nth-child(3) .num { background: #ff6b35; }

/* 广告位 */
.ad-banner {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
}
.ad-banner img {
    width: 100%;
    display: block;
}
.ad-sidebar {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

/* 详情页 */
.info-detail {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 20px;
}
.info-detail-title {
    font-size: 24px;
    margin-bottom: 15px;
}
.info-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 20px;
    font-size: 13px;
    color: #999;
}
.info-detail-content {
    line-height: 1.8;
    font-size: 15px;
}
.info-detail-content img {
    margin: 10px 0;
    border-radius: 4px;
}
.info-detail-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin: 20px 0;
}
.info-detail-images img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
}
.contact-box {
    background: #fff8f0;
    border: 1px solid #ffe0cc;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}
.contact-box .need-login {
    text-align: center;
    color: #999;
}
.contact-box .need-login a {
    color: #ff6b35;
    font-weight: bold;
}
.contact-box .need-vip {
    text-align: center;
    color: #666;
}
.contact-box .need-vip a {
    color: #ff6b35;
    font-weight: bold;
}
.contact-box .need-points {
    text-align: center;
    color: #666;
}
.contact-box .need-points a {
    color: #ff6b35;
    font-weight: bold;
}
.contact-box .contact-info {
    color: #333;
    font-size: 16px;
}
.contact-tip {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-size: 12px;
    color: #999;
}

/* 表单 */
.form-box {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 20px;
}
.form-title {
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #333;
}
.form-group label .required {
    color: #ff4444;
}
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ff6b35;
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-group .help-text {
    margin-top: 5px;
    font-size: 12px;
    color: #999;
}
.form-group .error-text {
    margin-top: 5px;
    font-size: 12px;
    color: #ff4444;
}
.upload-box {
    border: 2px dashed #e0e0e0;
    border-radius: 4px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s;
}
.upload-box:hover { border-color: #ff6b35; }
.upload-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 10px;
}
.upload-preview .preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 4px;
    overflow: hidden;
}
.upload-preview .preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.upload-preview .preview-item .remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    transition: all 0.3s;
}
.btn-primary {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: #fff;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    color: #fff;
}
.btn-default {
    background: #f0f0f0;
    color: #333;
}
.btn-default:hover { background: #e0e0e0; }
.btn-block { display: block; width: 100%; }

/* 会员中心 */
.member-layout { display: flex; gap: 20px; }
.member-sidebar {
    width: 220px;
    flex-shrink: 0;
}
.member-content { flex: 1; min-width: 0; }
.member-menu {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}
.member-menu a {
    display: block;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
}
.member-menu a:hover,
.member-menu a.active {
    background: #fff8f0;
    color: #ff6b35;
}
.member-card {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: #fff;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 20px;
}
.member-card .user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}
.member-card .avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.3);
}
.member-card .nickname { font-size: 20px; font-weight: bold; }
.member-card .vip-info { font-size: 14px; opacity: 0.9; }
.member-stats {
    display: flex;
    gap: 30px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
}
.member-stats .stat-item { text-align: center; }
.member-stats .stat-num { font-size: 24px; font-weight: bold; }
.member-stats .stat-label { font-size: 12px; opacity: 0.8; }

/* VIP套餐 */
.vip-packages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.vip-card {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    border: 2px solid #f0f0f0;
    transition: all 0.3s;
}
.vip-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.vip-card.recommended {
    border-color: #ff6b35;
}
.vip-card .level-name {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}
.vip-card .price {
    font-size: 36px;
    font-weight: bold;
    color: #ff6b35;
    margin-bottom: 5px;
}
.vip-card .price small { font-size: 14px; color: #999; }
.vip-card .duration { font-size: 14px; color: #999; margin-bottom: 20px; }
.vip-card .features {
    text-align: left;
    margin-bottom: 20px;
}
.vip-card .features li {
    padding: 8px 0;
    border-bottom: 1px dashed #f0f0f0;
    font-size: 13px;
}
.vip-card .features li::before {
    content: '✓';
    color: #4caf50;
    margin-right: 8px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 20px 0;
}
.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 13px;
}
.pagination a:hover {
    border-color: #ff6b35;
    color: #ff6b35;
}
.pagination .current {
    background: #ff6b35;
    color: #fff;
    border-color: #ff6b35;
}

/* 页脚 */
.site-footer {
    background: #2c3e50;
    color: #fff;
    padding: 30px 0;
    text-align: center;
}
.footer-links {
    margin-bottom: 15px;
}
.footer-links a {
    color: #fff;
    margin: 0 15px;
    opacity: 0.8;
}
.footer-links a:hover { opacity: 1; }
.friendlinks {
    margin-bottom: 15px;
    font-size: 12px;
    opacity: 0.6;
}
.friendlinks a { margin: 0 5px; color: #fff; }
.footer-copyright {
    font-size: 12px;
    opacity: 0.6;
}

/* 移动端底部导航 */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
    z-index: 100;
}
.mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    color: #666;
    padding: 5px 10px;
}
.mobile-bottom-nav .nav-item .iconfont {
    font-size: 20px;
}
.mobile-bottom-nav .nav-item.active { color: #ff6b35; }

/* 闪存消息 */
.flash-message {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 4px;
    z-index: 9999;
    animation: flashIn 0.3s;
}
.flash-success { background: #4caf50; color: #fff; }
.flash-error { background: #ff4444; color: #fff; }
.flash-warning { background: #ff9800; color: #fff; }
@keyframes flashIn {
    from { opacity: 0; transform: translate(-50%, -20px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* 响应式 */
@media (max-width: 992px) {
    .sidebar { width: 250px; }
    .member-sidebar { width: 180px; }
}
@media (max-width: 768px) {
    .desktop-only { display: none !important; }
    .mobile-only { display: block !important; }
    /* 底部导航必须保持 flex 布局 */
    .mobile-bottom-nav.mobile-only { display: flex !important; }
    .mobile-menu-toggle { display: flex; }
    .category-grid { grid-template-columns: 1fr; }
    .main-layout { flex-direction: column; }
    .sidebar { width: 100%; }
    .member-layout { flex-direction: column; }
    .member-sidebar { width: 100%; }
    .info-item { flex-direction: column; }
    .info-thumb { width: 100%; height: 150px; margin-right: 0; margin-bottom: 10px; }
    .header-inner { height: 60px; }
    .logo h1 { font-size: 18px; }
    .site-main { padding: 10px 0 70px; }
    .info-detail { padding: 15px; }
    .info-detail-title { font-size: 18px; }
}

/* 桌面端隐藏移动端导航 */
@media (min-width: 769px) {
    .mobile-only { display: none !important; }
}
