.loading-state,
.error-state {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: #666;
}

.error-state {
    color: #d32f2f;
}

/* 桌面端隐藏汉堡菜单按钮，显示导航菜单 */
@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none !important;
    }

    .nav-menu {
        display: flex !important;
        position: static !important;
        flex-direction: row !important;
        box-shadow: none !important;
        max-height: none !important;
        overflow: visible !important;
        width: auto !important;
        background: transparent !important;
    }

    .nav-menu li {
        border-bottom: none !important;
        width: auto !important;
    }

    .nav-link {
        width: auto !important;
        padding: 10px 15px !important;
    }
}

@media (max-width: 768px) {
    /* 导航栏 - 移动端固定在顶部 */
    .header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: #fff;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

    /* 为页面内容添加上边距，避免被固定导航栏遮挡 */
    body {
        padding-top: 70px;
    }

    /* 隐藏移动端 footer */
    .footer {
        display: none;
    }

    .main-nav {
        padding: 10px 0;
    }

    .main-nav .container {
        flex-direction: row;
        gap: 15px;
        justify-content: space-between;
        align-items: center;
        position: relative;
    }

    .logo {
        flex: 0 0 auto;
    }

    .logo img {
        max-height: 45px;
        max-width: 160px;
    }

    /* 汉堡菜单按钮 */
    .mobile-menu-toggle {
        display: flex !important;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 25px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1001;
        flex-shrink: 0;
        position: relative;
    }

    .mobile-menu-toggle span {
        width: 100%;
        height: 3px;
        background: #333;
        border-radius: 3px;
        transition: all 0.3s ease;
        position: relative;
        display: block;
    }

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

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

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

    /* 导航菜单 */
    .nav-menu {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        width: 100%;
        background: #fff;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        gap: 0;
        z-index: 1000;
    }

    .nav-menu.active {
        max-height: 350px;
        overflow-y: auto;
    }

    .nav-menu li {
        border-bottom: 1px solid #f0f0f0;
        width: 100%;
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-link {
        width: 100%;
        text-align: center;
        padding: 15px 20px;
        border-radius: 0;
        display: block;
    }

    .nav-link:hover,
    .nav-link.active {
        background: rgba(0, 86, 179, 0.08);
    }

    /* 顶部栏 */
    .top-bar .container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 32px;
    }

    .hero-content h2 {
        font-size: 20px;
    }

    .hero-section {
        height: 350px;
        margin-top: -70px;
        padding-top: 70px;
    }

    /* 移动端轮播指示点：上移避开控制按钮 */
    .slide-indicators {
        bottom: 90px;
    }

    .slide-indicator {
        width: 10px;
        height: 10px;
    }

    /* page-header 也要调整，紧贴导航栏 */
    .page-header {
        /* margin-top: -70px;
        padding-top: 70px;
        padding-bottom: 30px; */
        display: flex;
        align-items: center;
        justify-content: center; 
		padding: 10px 0;
    }
	
	.news-section {
		padding: 20px 0;
		background: #f9f9f9;
	}
	
	.about-section {
	    padding: 20px 0;
	    background: #f9f9f9;
	}

    .page-title {
        font-size: 24px;
        margin: 0;
        text-align: center;
    }

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

    .product-title {
        font-size: 16px;
    }

    .product-description {
        font-size: 13px;
    }

    .profile-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .cert-list,
    .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 20px;
    }

    .products-list-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .filter-tabs {
        flex-direction: column;
        gap: 10px;
    }

    .filter-btn {
        width: 100%;
    }

    .catalogue-grid,
    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .catalogue-actions {
        flex-direction: column;
    }

    .subscribe-form {
        flex-direction: column;
    }

    .subscribe-form input,
    .subscribe-form button {
        width: 100%;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .form-row {
        flex-direction: column;
        gap: 15px;
    }

    .faq-item {
        margin-bottom: 15px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-nav {
        flex-direction: column;
        gap: 15px;
    }

    .contact-item {
        font-size: 13px;
    }

    .section-title {
        font-size: 28px;
    }

    .cta-section h2 {
        font-size: 28px;
    }

    .cta-section p {
        font-size: 16px;
    }

    .cta-btn {
        padding: 12px 30px;
        font-size: 14px;
    }

    .product-layout-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* 侧边栏折叠功能 */
    .product-sidebar {
        border-radius: 8px;
        position: relative;
    }

    .sidebar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }

    .sidebar-toggle-btn {
        background: transparent;
        border: none;
        color: rgba(255,255,255,0.8);
        font-size: 14px;
        cursor: pointer;
        padding: 5px 10px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .sidebar-toggle-btn span {
        display: inline-block;
        transition: transform 0.3s ease;
    }

    .sidebar-toggle-btn span.rotated {
        transform: rotate(-90deg);
    }

    .product-sidebar.collapsed .sidebar-content {
        display: none;
    }

    /* 侧边栏内容过渡动画 */
    .sidebar-content {
        transition: all 0.3s ease;
    }

    .category-link {
        padding: 10px 15px;
    }

    .category-name {
        font-size: 13px;
    }

    .category-count {
        font-size: 11px;
    }

    .content-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .category-title {
        font-size: 22px;
        word-break: break-word;
    }

    .products-display-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* 产品卡片移动端优化 */
    .product-card-modern {
        width: 100%;
    }

    .product-card-image {
        height: 180px;
    }

    .product-card-body {
        padding: 15px;
    }

    .product-card-title {
        font-size: 15px;
        line-height: 1.3;
    }

    .product-card-model {
        font-size: 12px;
    }

    .product-card-desc {
        font-size: 12px;
        -webkit-line-clamp: 2;
    }

    /* 分页组件移动端优化 */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
        padding: 25px 0;
    }

    .page-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .page-btn.prev,
    .page-btn.next {
        order: 10;
        flex-basis: 100%;
        margin: 5px 0;
    }

    .page-numbers {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }

    .page-number {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
        padding: 0;
    }

    /* 页面内边距调整 */
    .product-page-layout {
        padding: 30px 0;
    }

    .container {
        padding: 0 15px;
    }

    /* 空状态优化 */
    .empty-state {
        padding: 40px 20px;
    }

    .empty-icon {
        font-size: 48px;
        margin-bottom: 15px;
    }

    .empty-state h3 {
        font-size: 20px;
    }

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

    /* 搜索框优化 */
    .category-search {
        padding: 15px;
    }

    .search-input {
        padding: 10px 12px;
        font-size: 14px;
    }

    .category-list {
        padding: 5px 0;
    }

    .sidebar-info {
        padding: 15px;
        font-size: 13px;
    }

    /* 页脚和按钮 */
    .sort-select {
        width: 100%;
    }

    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .main-image {
        height: 400px;
    }

    .thumbnail-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
        padding: 15px;
    }

    .related-products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .product-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .products-list-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .catalogue-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-content h1 {
        font-size: 40px;
    }

    .hero-content h2 {
        font-size: 24px;
    }

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

    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .thumbnail-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    }

    .related-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 24px;
    }

    .hero-content h2 {
        font-size: 16px;
    }

    .hero-section {
        height: 300px;
    }

    .section-title {
        font-size: 24px;
    }

    .page-title {
        font-size: 28px;
    }

    .filter-btn {
        padding: 10px 20px;
        font-size: 13px;
    }

    .product-item-title {
        font-size: 16px;
    }

    .submit-btn,
    .cta-btn {
        padding: 12px 25px;
        font-size: 14px;
    }

    /* 产品搜索页面超小屏幕优化 */
    .product-page-layout {
        padding: 20px 0;
    }

    .logo img {
        max-height: 45px;
        max-width: 160px;
    }

    .category-title {
        font-size: 20px;
    }

    .product-card-image {
        height: 160px;
    }

    .product-card-body {
        padding: 12px;
    }

    .product-card-title {
        font-size: 14px;
    }

    .product-card-model {
        font-size: 11px;
    }

    .product-card-desc {
        font-size: 11px;
        -webkit-line-clamp: 2;
    }

    .product-category-badge {
        font-size: 10px;
        padding: 3px 10px;
    }

    .page-number {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .page-btn {
        padding: 7px 12px;
        font-size: 11px;
    }

    .sidebar-header h3 {
        font-size: 16px;
    }

    .category-link {
        padding: 8px 12px;
    }

    .category-name {
        font-size: 12px;
    }

    .category-count {
        font-size: 10px;
    }
}

/* 默认隐藏汉堡菜单按钮（在媒体查询之外） */
.mobile-menu-toggle {
    display: none;
}
