/**
 * 系统名称：传息网
 * 主网址：https://www.ipholo.com
 * 开发者：星球软件CEWWW
 * 本页为：主样式表 /assets/css/style.css
 * 色调：浅蓝、清新、青年风格
 */

/* ============================================
   1. CSS变量与重置
   ============================================ */
:root {
    /* 主色调 - 浅蓝清新风格 */
    --primary-dark: #1a2a4a;
    --primary-blue: #4a8bb7;
    --primary-mid: #6baed6;
    --primary-light: #8ecae6;
    --primary-lighter: #b8e0f0;
    --primary-lightest: #e3f2fa;
    --accent-cyan: #48c9b0;
    --accent-cyan-light: #a8e6cf;
    --bg-light: #f5f9fc;
    --bg-white: #ffffff;
    --text-dark: #1a2a3a;
    --text-mid: #4a5a6a;
    --text-light: #8a9aaa;
    --text-white: #ffffff;
    --border-color: #e0ecf5;
    --shadow-sm: 0 2px 12px rgba(74, 139, 183, 0.10);
    --shadow-md: 0 4px 24px rgba(74, 139, 183, 0.15);
    --shadow-lg: 0 8px 48px rgba(74, 139, 183, 0.18);
    --radius: 12px;
    --radius-sm: 6px;
    --transition: all 0.3s ease;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: var(--primary-blue);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-mid);
}

img {
    max-width: 100%;
    display: block;
}

ul, ol {
    list-style: none;
}

/* ============================================
   2. 容器与布局
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.main-content {
    flex: 1;
    padding: 30px 0;
}

/* ============================================
   3. 顶部通知条（高度40px）
   ============================================ */
.top-bar {
    background: var(--primary-dark);
    color: var(--text-white);
    font-size: 13px;
    height: 40px;
    display: flex;
    align-items: center;
    border-bottom: 2px solid var(--accent-cyan);
    overflow: hidden;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
}

.top-bar-links {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 100%;
}

.top-bar-links a {
    color: var(--text-white);
    font-size: 16px;
    opacity: 0.8;
    transition: var(--transition);
    display: flex;
    align-items: center;
    height: 100%;
}

.top-bar-links a:hover {
    opacity: 1;
    color: var(--primary-lighter);
}

.user-greeting {
    color: var(--accent-cyan-light);
    font-size: 16px;
    font-weight: 700;
}

.site-welcome {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
}

/* ============================================
   4. 主头部导航
   ============================================ */
.main-header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    gap: 20px;
    flex-wrap: wrap;
}

.logo {
    flex-shrink: 0;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-dark);
}

.logo img {
    height: 40px;
    width: auto;
    display: block;
}

.logo-text {
    background: white;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.main-nav ul {
    display: flex;
    gap: 8px;
    align-items: center;
}

.main-nav ul li a {
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 500;
    color: var(--text-mid);
    transition: var(--transition);
    position: relative;
}

.main-nav ul li a:hover {
    color: var(--primary-blue);
    background: var(--primary-lightest);
}

.main-nav ul li a.active {
    color: var(--text-white);
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-mid));
    box-shadow: 0 2px 12px rgba(74, 139, 183, 0.35);
}

.main-nav ul li a.active:hover {
    background: linear-gradient(135deg, var(--primary-mid), var(--primary-blue));
}

.header-search {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.header-search form {
    display: flex;
    align-items: center;
    background: var(--bg-light);
    border-radius: 50px;
    border: 2px solid transparent;
    transition: var(--transition);
    overflow: hidden;
}

.header-search form:focus-within {
    border-color: var(--primary-light);
    background: var(--bg-white);
    box-shadow: 0 0 0 4px rgba(74, 139, 183, 0.10);
}

.search-input {
    border: none;
    background: transparent;
    padding: 8px 16px;
    font-size: 14px;
    width: 200px;
    color: var(--text-dark);
    outline: none;
}

.search-input::placeholder {
    color: var(--text-light);
}

.search-btn {
    background: transparent;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-mid);
    transition: var(--transition);
}

.search-btn:hover {
    color: var(--primary-blue);
}

/* 移动端菜单按钮 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
    background: none;
    border: none;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: var(--transition);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* ============================================
   5. 面包屑导航
   ============================================ */
.breadcrumb {
    background: var(--bg-white);
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.breadcrumb nav {
    color: var(--text-mid);
}

.breadcrumb a {
    color: var(--primary-blue);
}

.breadcrumb a:hover {
    color: var(--primary-mid);
}

.breadcrumb .separator {
    margin: 0 8px;
    color: var(--text-light);
}

.breadcrumb .current {
    color: var(--text-dark);
    font-weight: 500;
}

/* ============================================
   6. 首页英雄区
   ============================================ */
.hero-section {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-blue), var(--primary-mid));
    padding: 80px 0 60px;
    border-radius: var(--radius);
    margin: 20px 0 30px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(72, 201, 176, 0.15), transparent 70%);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    text-align: center;
    color: var(--text-white);
    z-index: 1;
}

.hero-content h1 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.hero-content h1::after {
    content: ' 📡';
}

.hero-content p {
    font-size: 18px;
    opacity: 0.85;
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background: var(--accent-cyan);
    color: var(--text-dark);
}

.btn-primary:hover {
    background: #3db8a0;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(72, 201, 176, 0.4);
    color: var(--text-dark);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-white);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    color: var(--text-white);
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
    color: white;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #219a52;
    color: white;
}

.btn-warning {
    background: #f39c12;
    color: white;
}

.btn-warning:hover {
    background: #d68910;
    color: white;
}

.btn-sm {
    padding: 6px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
}

/* ============================================
   7. 统计区域
   ============================================ */
.stats-section {
    margin: 30px 0 40px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stat-item {
    background: var(--bg-white);
    padding: 24px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.stat-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-number {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 4px;
}

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

/* ============================================
   8. 分类导航
   ============================================ */
.category-nav {
    margin-bottom: 40px;
    background: var(--bg-white);
    padding: 20px 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.category-tag {
    padding: 6px 18px;
    background: var(--primary-lightest);
    border-radius: 50px;
    font-size: 14px;
    color: var(--text-mid);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.category-tag:hover {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
    transform: translateY(-2px);
}

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

.section-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    position: relative;
    padding-left: 16px;
}

.section-header h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 28px;
    background: linear-gradient(180deg, var(--primary-blue), var(--accent-cyan));
    border-radius: 2px;
}

.more-link {
    color: var(--primary-mid);
    font-size: 14px;
    font-weight: 500;
}

.more-link:hover {
    color: var(--primary-blue);
    transform: translateX(4px);
}

/* ============================================
   10. 资讯网格
   ============================================ */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.news-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.news-card a {
    color: inherit;
    display: block;
}

.news-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: var(--primary-lightest);
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-image .no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 40px;
    color: var(--text-light);
    background: var(--primary-lightest);
}

.badge-top {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #f39c12, #e74c3c);
    color: white;
    padding: 3px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.news-info {
    padding: 16px 20px 20px;
}

.news-info h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-summary {
    font-size: 14px;
    color: var(--text-mid);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.news-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: var(--text-light);
    align-items: center;
}

.news-meta .cate {
    background: var(--primary-lightest);
    padding: 2px 10px;
    border-radius: 50px;
    color: var(--primary-blue);
    font-weight: 500;
}

/* ============================================
   11. 热门资讯
   ============================================ */
.hot-news-section {
    background: var(--bg-white);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 40px;
    border: 1px solid var(--border-color);
}

.hot-news-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hot-news-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.hot-news-item:hover {
    background: var(--primary-lightest);
}

.hot-rank {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-lightest);
    border-radius: 50%;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-mid);
    flex-shrink: 0;
}

.hot-rank.top {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
}

.hot-news-item a {
    flex: 1;
    color: var(--text-dark);
    font-size: 15px;
}

.hot-news-item a:hover {
    color: var(--primary-blue);
}

.hot-views {
    font-size: 13px;
    color: var(--text-light);
    flex-shrink: 0;
}

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

.product-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

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

.product-card a {
    color: inherit;
    display: block;
}

.product-image {
    height: 200px;
    overflow: hidden;
    background: var(--primary-lightest);
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-image .no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 36px;
    color: var(--text-light);
}

.badge-soldout {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}

.product-info {
    padding: 14px 16px 18px;
}

.product-info h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-subtitle {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.product-price .price {
    font-size: 20px;
    font-weight: 700;
    color: #e74c3c;
}

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

.product-price .discount-tag {
    font-size: 11px;
    background: #e74c3c;
    color: white;
    padding: 1px 8px;
    border-radius: 50px;
    font-weight: 600;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-light);
}

.stock.in-stock {
    color: #27ae60;
}

.stock.out-of-stock {
    color: #e74c3c;
}

/* ============================================
   13. 空状态
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-state p {
    font-size: 18px;
}

.empty-state .empty-hint {
    font-size: 14px;
    margin-top: 8px;
}

/* ============================================
   14. 页脚
   ============================================ */
.main-footer {
    background: var(--primary-dark);
    color: var(--text-white);
    padding: 50px 0 20px;
    margin-top: 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-white);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1.8;
}

.footer-section ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--primary-lighter);
    transform: translateX(4px);
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    font-size: 18px;
    color: var(--text-white);
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--accent-cyan);
    transform: translateY(-3px);
}

.contact-info li {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    padding: 4px 0;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-copyright p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

.footer-links a:hover {
    color: var(--primary-lighter);
}

/* ============================================
   15. 返回顶部按钮
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* ============================================
   16. 工具类
   ============================================ */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-light);
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-40 {
    margin-top: 40px;
}

.mb-40 {
    margin-bottom: 40px;
}

.hidden {
    display: none;
}

.clearfix::after {
    content: '';
    display: table;
    clear: both;
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gap-10 {
    gap: 10px;
}

.gap-20 {
    gap: 20px;
}

.w-100 {
    width: 100%;
}

.rounded {
    border-radius: var(--radius);
}

.shadow {
    box-shadow: var(--shadow-sm);
}

/* ============================================
   17. 响应式（移动端适配）
   ============================================ */
@media screen and (max-width: 991px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-white);
        padding: 20px;
        box-shadow: var(--shadow-lg);
        border-top: 1px solid var(--border-color);
    }
    
    .main-nav.active {
        display: block;
    }
    
    .main-nav ul {
        flex-direction: column;
        align-items: stretch;
    }
    
    .main-nav ul li a {
        display: block;
        padding: 12px 16px;
        border-radius: var(--radius-sm);
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .header-search {
        display: none;
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 767px) {
    .top-bar {
        height: auto;
        min-height: 40px;
        padding: 4px 0;
    }
    
    .top-bar-content {
        flex-direction: column;
        text-align: center;
    }
    
    .top-bar-links {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero-section {
        padding: 40px 20px;
        border-radius: var(--radius-sm);
    }
    
    .hero-content h1 {
        font-size: 24px;
    }
    
    .hero-content p {
        font-size: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .products-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .product-image {
        height: 160px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media screen and (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .product-image {
        height: 140px;
    }
    
    .product-info {
        padding: 10px 12px 14px;
    }
    
    .product-info h3 {
        font-size: 13px;
    }
    
    .product-price .price {
        font-size: 16px;
    }
}