/* ========================================
   企业官网 - 全局样式表
   ======================================== */

/* 1. CSS 重置和变量 */
:root {
    /* 主色 */
    --primary: #2563EB;
    --primary-light: #3B82F6;
    --primary-dark: #1D4ED8;

    /* 辅色 */
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;

    /* 文字 */
    --text-primary: #1F2937;
    --text-secondary: #6B7280;

    /* 背景 */
    --bg-white: #FFFFFF;
    --bg-gray: #F9FAFB;
    --bg-dark: #111827;

    /* 布局 */
    --header-height: 64px;
    --max-width: 1200px;

    /* 圆角 */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* 阴影 */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* 过渡 */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

input, button, textarea, select {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    outline: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

/* ========================================
   2. 通用样式
   ======================================== */

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* 按钮系列 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-base);
    text-align: center;
    white-space: nowrap;
    user-select: none;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--primary);
    color: #FFFFFF;
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: #FFFFFF;
}

.btn-danger {
    background-color: var(--danger);
    color: #FFFFFF;
    border-color: var(--danger);
}

.btn-danger:hover {
    background-color: #DC2626;
    border-color: #DC2626;
}

.btn-success {
    background-color: var(--success);
    color: #FFFFFF;
    border-color: var(--success);
}

.btn-success:hover {
    background-color: #059669;
    border-color: #059669;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 14px;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 14px 32px;
    font-size: 18px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 表单控件 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group label .required {
    color: var(--danger);
    margin-left: 2px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="url"],
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-white);
    border: 1px solid #D1D5DB;
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* ========================================
   3. Header 样式
   ======================================== */

#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background-color: var(--bg-white);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: box-shadow var(--transition-base);
}

#header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.header-logo:hover {
    color: var(--primary);
}

.header-logo svg,
.header-logo img {
    width: 36px;
    height: 36px;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.nav-link:hover {
    color: var(--primary);
    background-color: rgba(37, 99, 235, 0.05);
}

.nav-link.active {
    color: var(--primary);
    background-color: rgba(37, 99, 235, 0.1);
}

/* 汉堡菜单按钮 */
.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: background-color var(--transition-fast);
}

.mobile-menu-btn:hover {
    background-color: var(--bg-gray);
}

.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 1px;
    position: relative;
    transition: background-color var(--transition-fast);
}

.mobile-menu-btn span::before,
.mobile-menu-btn span::after {
    content: '';
    position: absolute;
    left: 0;
    width: 22px;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 1px;
    transition: transform var(--transition-base);
}

.mobile-menu-btn span::before {
    top: -7px;
}

.mobile-menu-btn span::after {
    top: 7px;
}

/* 移动端导航 */
.mobile-nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-white);
    z-index: 999;
    padding: 20px;
    overflow-y: auto;
}

.mobile-nav.active {
    display: block;
}

.mobile-nav .nav-link {
    display: flex;
    padding: 14px 16px;
    font-size: 17px;
    border-radius: var(--radius-md);
}

/* ========================================
   4. Footer 样式
   ======================================== */

#footer {
    background-color: var(--bg-dark);
    color: #E5E7EB;
    padding: 60px 0 0;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 16px;
}

.footer-section p {
    font-size: 14px;
    line-height: 1.8;
    color: #9CA3AF;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #9CA3AF;
    font-size: 14px;
    transition: color var(--transition-fast);
}

.footer-section ul li a:hover {
    color: #FFFFFF;
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #9CA3AF;
}

.footer-contact-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding: 20px;
    text-align: center;
    font-size: 14px;
    color: #6B7280;
}

.footer-bottom a {
    color: #6B7280;
    transition: color var(--transition-fast);
}

.footer-bottom a:hover {
    color: #E5E7EB;
}

/* 备案号链接 */
a[href*="beian.miit.gov.cn"] {
    color: #9CA3AF;
}

a[href*="beian.miit.gov.cn"]:hover {
    color: #FFFFFF;
}

/* ========================================
   5. Hero 横幅
   ======================================== */

.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #FFFFFF;
    text-align: center;
    padding: 120px 20px 80px;
    margin-top: var(--header-height);
}

.hero h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero p {
    font-size: 20px;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

.hero .btn {
    font-size: 18px;
    padding: 14px 36px;
}

.hero .btn-outline {
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.5);
}

.hero .btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: #FFFFFF;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========================================
   6. 优势/特色区域
   ======================================== */

.section {
    padding: 80px 0;
}

.section-gray {
    background-color: var(--bg-gray);
}

.section-title {
    text-align: center;
    margin-bottom: 48px;
}

.section-title h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.section-title p {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.feature-card {
    background-color: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-card .feature-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(37, 99, 235, 0.1);
    border-radius: var(--radius-lg);
    color: var(--primary);
}

.feature-card .feature-icon svg {
    width: 28px;
    height: 28px;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ========================================
   7. 商品卡片样式
   ======================================== */

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.product-card {
    background-color: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.product-card-img {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: var(--bg-gray);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.product-card:hover .product-card-img img {
    transform: scale(1.05);
}

.product-card-img .no-image {
    color: var(--text-secondary);
    font-size: 14px;
}

.product-card-info {
    padding: 16px;
}

.product-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-card-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-card-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--danger);
}

.product-card-price .unit {
    font-size: 14px;
    font-weight: 400;
}

.product-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.product-card-category {
    font-size: 12px;
    color: var(--text-secondary);
    background-color: var(--bg-gray);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

/* ========================================
   8. 分类标签栏
   ======================================== */

.category-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.category-tab {
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background-color: var(--bg-gray);
    border: 1px solid transparent;
    border-radius: 20px;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.category-tab:hover {
    color: var(--primary);
    border-color: var(--primary);
    background-color: rgba(37, 99, 235, 0.05);
}

.category-tab.active {
    color: #FFFFFF;
    background-color: var(--primary);
    border-color: var(--primary);
}

/* ========================================
   9. 分页组件
   ======================================== */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 40px;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 14px;
    color: var(--text-secondary);
    background-color: var(--bg-white);
    border: 1px solid #D1D5DB;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pagination-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.pagination-btn.active {
    color: #FFFFFF;
    background-color: var(--primary);
    border-color: var(--primary);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   10. 面包屑导航
   ======================================== */

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb .separator {
    color: #D1D5DB;
}

.breadcrumb .current {
    color: var(--text-primary);
}

/* ========================================
   11. 商品详情页
   ======================================== */

.product-detail {
    margin-top: var(--header-height);
    padding: 40px 0 80px;
}

.product-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.product-gallery {
    position: sticky;
    top: calc(var(--header-height) + 24px);
}

.product-gallery-main {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background-color: var(--bg-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.product-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-gallery-main .no-image {
    color: var(--text-secondary);
}

.screenshot-carousel {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.screenshot-item {
    width: 80px;
    height: 60px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color var(--transition-fast);
    background-color: var(--bg-gray);
}

.screenshot-item:hover,
.screenshot-item.active {
    border-color: var(--primary);
}

.screenshot-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.product-info .product-price {
    font-size: 32px;
    font-weight: 700;
    color: var(--danger);
    margin-bottom: 20px;
}

.product-info .product-price .unit {
    font-size: 18px;
}

.product-info .product-category {
    display: inline-block;
    font-size: 13px;
    color: var(--primary);
    background-color: rgba(37, 99, 235, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 20px;
}

.product-info .product-description {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.product-info .contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ========================================
   12. 留言表单 / 联系我们
   ======================================== */

.contact-page {
    margin-top: var(--header-height);
    padding: 60px 0 80px;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.contact-info {
    padding-right: 20px;
}

.contact-info h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.contact-info > p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.8;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.contact-info-item .icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(37, 99, 235, 0.1);
    border-radius: var(--radius-lg);
    color: var(--primary);
    flex-shrink: 0;
}

.contact-info-item .icon svg {
    width: 22px;
    height: 22px;
}

.contact-info-item .text h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.contact-info-item .text p {
    font-size: 14px;
    color: var(--text-secondary);
}

.contact-form {
    background-color: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
}

.contact-form h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-primary);
}

/* ========================================
   13. 弹窗/模态框
   ======================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background-color: var(--bg-white);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: transform var(--transition-base);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #E5E7EB;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    font-size: 20px;
}

.modal-close:hover {
    background-color: var(--bg-gray);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #E5E7EB;
}

/* ========================================
   14. Toast 提示
   ======================================== */

.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    background-color: var(--bg-white);
    box-shadow: var(--shadow-lg);
    font-size: 14px;
    color: var(--text-primary);
    min-width: 280px;
    max-width: 400px;
    animation: toastSlideIn var(--transition-base) forwards;
}

.toast.removing {
    animation: toastSlideOut var(--transition-base) forwards;
}

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-error {
    border-left: 4px solid var(--danger);
}

.toast-warning {
    border-left: 4px solid var(--warning);
}

.toast .toast-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.toast-success .toast-icon {
    color: var(--success);
}

.toast-error .toast-icon {
    color: var(--danger);
}

.toast-warning .toast-icon {
    color: var(--warning);
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* ========================================
   15. 后台管理布局
   ======================================== */

.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 240px;
    background-color: var(--bg-dark);
    color: #E5E7EB;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
}

.admin-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #374151;
}

.admin-sidebar-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #FFFFFF;
}

.admin-sidebar-header p {
    font-size: 12px;
    color: #9CA3AF;
    margin-top: 4px;
}

.admin-sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    font-size: 14px;
    color: #9CA3AF;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    margin-bottom: 4px;
}

.menu-item:hover {
    color: #FFFFFF;
    background-color: #374151;
}

.menu-item.active {
    color: #FFFFFF;
    background-color: var(--primary);
}

.menu-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.admin-main {
    flex: 1;
    margin-left: 240px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.admin-header {
    height: 64px;
    background-color: var(--bg-white);
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 24px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.admin-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-primary);
}

.admin-user-info .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--primary);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}

.admin-logout-btn {
    padding: 8px 16px;
    font-size: 14px;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.admin-logout-btn:hover {
    color: var(--danger);
    background-color: rgba(239, 68, 68, 0.05);
}

.admin-content {
    flex: 1;
    padding: 24px;
    background-color: var(--bg-gray);
}

.admin-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.admin-page-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

/* ========================================
   16. 后台表格
   ======================================== */

.data-table-wrapper {
    background-color: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: left;
    background-color: var(--bg-gray);
    border-bottom: 1px solid #E5E7EB;
    white-space: nowrap;
}

.data-table td {
    padding: 14px 16px;
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 1px solid #F3F4F6;
}

.data-table tbody tr:hover {
    background-color: var(--bg-gray);
}

.data-table tbody tr:nth-child(even) {
    background-color: #FAFAFA;
}

.data-table tbody tr:nth-child(even):hover {
    background-color: var(--bg-gray);
}

.data-table .cell-id {
    color: var(--text-secondary);
    font-size: 13px;
}

.data-table .cell-image {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background-color: var(--bg-gray);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 20px;
}

.status-badge.active {
    color: var(--success);
    background-color: rgba(16, 185, 129, 0.1);
}

.status-badge.inactive {
    color: var(--text-secondary);
    background-color: var(--bg-gray);
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 13px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.action-btn.edit {
    color: var(--primary);
    background-color: rgba(37, 99, 235, 0.05);
}

.action-btn.edit:hover {
    background-color: rgba(37, 99, 235, 0.15);
}

.action-btn.delete {
    color: var(--danger);
    background-color: rgba(239, 68, 68, 0.05);
}

.action-btn.delete:hover {
    background-color: rgba(239, 68, 68, 0.15);
}

.action-btn.view {
    color: var(--success);
    background-color: rgba(16, 185, 129, 0.05);
}

.action-btn.view:hover {
    background-color: rgba(16, 185, 129, 0.15);
}

.action-btn-group {
    display: flex;
    gap: 6px;
}

/* ========================================
   17. 后台统计卡片
   ======================================== */

.stat-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background-color: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.stat-card-header .stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
}

.stat-card-header .stat-icon svg {
    width: 24px;
    height: 24px;
}

.stat-card-header .stat-icon.blue {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

.stat-card-header .stat-icon.green {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.stat-card-header .stat-icon.yellow {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.stat-card-header .stat-icon.red {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.stat-card .stat-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-card .stat-title {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ========================================
   18. 登录页
   ======================================== */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background-color: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-xl);
}

.login-card h1 {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.login-card .login-subtitle {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.login-card .form-group {
    margin-bottom: 20px;
}

.login-card .btn {
    width: 100%;
    margin-top: 8px;
}

.login-error {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 14px;
    margin-bottom: 16px;
    display: none;
}

.login-error.show {
    display: block;
}

/* ========================================
   19. Loading 状态
   ======================================== */

.loading-spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid #E5E7EB;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-spinner-sm {
    width: 18px;
    height: 18px;
    border-width: 2px;
}

.loading-spinner-lg {
    width: 48px;
    height: 48px;
    border-width: 4px;
}

.loading-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 页面加载占位 */
.page-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    gap: 16px;
}

.page-loading p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state svg {
    width: 80px;
    height: 80px;
    color: #D1D5DB;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ========================================
   关于我们页面
   ======================================== */

.about-page {
    margin-top: var(--header-height);
    padding: 60px 0 80px;
}

.about-page h1 {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
}

.about-page > .container > p {
    text-align: center;
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 48px;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-content h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
    margin-top: 32px;
    color: var(--text-primary);
}

.about-content p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* ========================================
   后台搜索和筛选栏
   ======================================== */

.admin-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.admin-search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    max-width: 400px;
}

.admin-search input {
    flex: 1;
}

.admin-filter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-filter select {
    min-width: 140px;
}

/* 后台表单弹窗 */
.admin-form-group {
    margin-bottom: 16px;
}

.admin-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.admin-form-group input,
.admin-form-group select,
.admin-form-group textarea {
    width: 100%;
}

/* 图片上传 */
.upload-area {
    border: 2px dashed #D1D5DB;
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.upload-area:hover {
    border-color: var(--primary);
    background-color: rgba(37, 99, 235, 0.02);
}

.upload-area .upload-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    color: var(--text-secondary);
}

.upload-area p {
    font-size: 14px;
    color: var(--text-secondary);
}

.upload-area .upload-hint {
    font-size: 12px;
    color: #9CA3AF;
    margin-top: 4px;
}

.upload-preview {
    margin-top: 12px;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.upload-preview img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
    margin: 0 auto;
}

/* ========================================
   响应式设计
   ======================================== */

/* 平板 - 1024px */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 手机 - 768px */
@media (max-width: 768px) {
    .header-nav {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero {
        padding: 100px 20px 60px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero p {
        font-size: 16px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .product-detail-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .product-gallery {
        position: static;
    }

    .contact-layout {
        grid-template-columns: 1fr;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 60px 0;
    }

    .section-title h2 {
        font-size: 24px;
    }

    /* 后台响应式 */
    .admin-sidebar {
        display: none;
    }

    .admin-main {
        margin-left: 0;
    }

    .stat-cards {
        grid-template-columns: 1fr;
    }

    .admin-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-search {
        max-width: none;
    }

    .data-table-wrapper {
        overflow-x: auto;
    }

    .data-table {
        min-width: 600px;
    }
}

/* 小屏手机 - 480px */
@media (max-width: 480px) {
    .features-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 24px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .category-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
    }

    .category-tab {
        flex-shrink: 0;
    }

    .login-card {
        padding: 24px;
    }
}
