/* 公共样式 */
.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

.main {
    min-height: calc(100vh - 400px);
    padding: 0;
}

/* 首页主内容区 - 不需要上边距 */
body:has(.header-absolute) .main {
    padding-top: 0;
}

html {
    scroll-behavior: smooth;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #0066cc;
    color: #fff;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #0052a3;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.btn-submit {
    padding: 10px 24px;
    background-color: #0066cc;
    color: #fff;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    background-color: #0052a3;
}

/* 页面头部 */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 60px 0;
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

.page-header p {
    font-size: 16px;
    opacity: 0.9;
}

/* 内容布局 */
.content-wrapper {
    display: flex;
    gap: 30px;
}

.sidebar {
    width: 260px;
    flex-shrink: 0;
}

.main-content {
    flex: 1;
}

/* 侧边栏 */
.sidebar-widget {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.sidebar-widget h3 {
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0066cc;
}

.category-list li {
    margin-bottom: 8px;
}

.category-list a {
    display: block;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.category-list a:hover,
.category-list a.active {
    background-color: #f0f7ff;
    color: #0066cc;
}

.sub-category {
    margin-left: 20px;
    margin-top: 8px;
}

.sub-category li {
    margin-bottom: 5px;
}

.sub-category a {
    font-size: 13px;
    padding: 5px 10px;
}

/* 分页 */
.pagination {
    margin-top: 40px;
    text-align: center;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 3px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background-color: #0066cc;
    border-color: #0066cc;
    color: #fff;
}

.pagination .current {
    background-color: #0066cc;
    border-color: #0066cc;
    color: #fff;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: #fff;
    border-radius: 8px;
}

.empty-state p {
    font-size: 16px;
    color: #999;
}

/* 徽章 */
.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 3px;
    background-color: #ff6b6b;
    color: #fff;
    position: absolute;
    top: 10px;
    right: 10px;
}

.badge.hot {
    background-color: #ff6b6b;
}

.badge.new {
    background-color: #51cf66;
}

.badge.top {
    background-color: #ffd43b;
    color: #333;
}

/* 产品网格（用于分类页） */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

/* 文章列表（用于分类页） */
.articles-list {
    display: grid;
    gap: 25px;
}

/* 新闻列表（用于分类页） */
.news-list {
    display: grid;
    gap: 25px;
}

/* 响应式 */
@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .page-header h1 {
        font-size: 28px;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* Toast消息提示 */
.toast-message { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); padding: 14px 28px; border-radius: 8px; font-size: 15px; z-index: 10000; opacity: 0; animation: toastIn 0.3s ease forwards; box-shadow: 0 4px 20px rgba(0,0,0,0.15); display: flex; align-items: center; gap: 10px; }
.toast-message.toast-success { background: linear-gradient(135deg, #52c41a 0%, #73d13d 100%); color: #fff; }
.toast-message.toast-error { background: linear-gradient(135deg, #ff4d4f 0%, #ff7875 100%); color: #fff; }
.toast-message.toast-hide { animation: toastOut 0.3s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(-20px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(-50%) translateY(0); } to { opacity: 0; transform: translateX(-50%) translateY(-20px); } }
