/* 主要内容区域样式 */
.main-content {
    background-color: #f8fafc;
   
    padding: 30px 0 0 0;
}

/* 内容包装器样式 */
.content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(30, 58, 138, 0.08);
}

/* 侧边栏样式 */
.sidebar {
    background-color: transparent;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 20px;
    border-right: 1px solid #e9ecef;
    padding-top: 20px;
}

.sidebar-content {
    padding: 25px 20px;
}

.sidebar-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e3a8a;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

.category-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    margin-bottom: 5px;
}

.category-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    text-decoration: none;
    color: #6b7280;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.category-link:hover {
    background-color: #f1f5f9;
    color: #1e3a8a;
    text-decoration: none;
}

.category-item.active .category-link {
    background-color: #f1f5f9;
    color: #1e3a8a;
    border-color: #f1f5f9;
}

.category-name {
    font-size: 14px;
    font-weight: 500;
}

.category-arrow {
    font-size: 16px;
    opacity: 0.7;
}

/* 产品展示区域样式 */
.product-area {
    padding-left: 20px;
    padding-top: 20px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 20px;
}

.product-item {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(30, 58, 138, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(30, 58, 138, 0.15);
    text-decoration: none;
    color: inherit;
}

.product-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* 图片加载失败时的备用样式 */
.product-img[src=""],
.product-img:not([src]) {
    display: none;
}

.product-image:has(.product-img[src=""]) .product-placeholder,
.product-image:has(.product-img:not([src])) .product-placeholder {
    display: flex;
}

.product-item:hover .product-image img,
.product-item:hover .product-img {
    transform: scale(1.05);
}

.product-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2d5a27, #1e3a1a);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    border-radius: 8px;
    border: 2px solid #2d5a27;
}

.product-info {
    padding: 15px 20px;
    text-align: center;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.product-code {
    font-size: 16px;
    font-weight: 600;
    color: #1e3a8a;
    margin: 0;
}

/* 分页样式 */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    margin-bottom: 20px;
}

.pagination {
    margin: 0;
}

.pagination .page-link {
    color: #1e3a8a;
    border: 1px solid #e5e7eb;
    padding: 8px 12px;
    margin: 0 2px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background-color: #f1f5f9;
    border-color: #1e3a8a;
}

.pagination .page-item.active .page-link {
    background-color: #1e3a8a;
    border-color: #1e3a8a;
    color: #ffffff;
}

/* 响应式设计 */
@media (max-width: 991.98px) {
    .sidebar {
        margin-bottom: 30px;
    }
    
    .product-area {
        padding-left: 0;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 767.98px) {
    .main-content {
        padding: 20px 0;
    }
    
    .sidebar-content {
        padding: 20px 15px;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .product-image {
        height: 150px;
    }
}

/* 搜索页面样式 */
.search-header {
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 1px solid #e5e7eb;
}

.search-title {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 10px;
}

.search-info {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
}

.product-desc {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
    margin-top: 8px;
    margin-bottom: 0;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
    font-size: 16px;
}

.pagination-nav {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

/* 双办公室联系方式模态框样式 */
.contact-offices {
    padding: 20px 0;
}

.office-section {
    margin-bottom: 30px;
}

.office-section:last-child {
    margin-bottom: 0;
}

.office-header {
    margin-bottom: 20px;
}

.office-title {
    font-size: 40px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    text-align: left;
}

/* Bootstrap栅格布局，移除原有的flex样式 */

.office-detail {
    margin-bottom: 15px;
}

.office-detail:last-child {
    margin-bottom: 0;
}

.office-label {
    font-size: 24px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
}

.office-value {
    font-size: 18px;
    color: #1f2937;
    line-height: 1.4;
}

.office-map {
    flex: 1;
    min-width: 0;
}

.map-placeholder {
    width: 100%;
    height: 150px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.map-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.map-placeholder:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.map-placeholder-content {
    text-align: center;
    color: #ffffff;
    z-index: 1;
    position: relative;
}

.map-placeholder-content i {
    font-size: 24px;
    margin-bottom: 8px;
    display: block;
}

.map-placeholder-content span {
    font-size: 16px;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.map-placeholder-content small {
    font-size: 12px;
    opacity: 0.9;
    display: block;
}

/* 地图图片样式 */
.map-image {
    width: 100%;

    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.map-image:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.office-divider {
    height: 1px;
    background-color: #e5e7eb;
    margin: 30px 0;
    position: relative;
}

.office-divider::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 1px;
    background-color: #d1d5db;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .office-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .office-title {
        font-size: 18px;
    }
    
    .map-placeholder {
        height: 120px;
    }
    
    .map-placeholder-content i {
        font-size: 20px;
    }
    
    .map-placeholder-content span {
        font-size: 14px;
    }
    
    .map-placeholder-content small {
        font-size: 11px;
    }
    
    .office-detail {
        margin-bottom: 12px;
    }
    
    .office-label {
        font-size: 13px;
    }
    
    .office-value {
        font-size: 13px;
    }
}

/* 留言表单样式 */
.message-form-section {
    margin-top: 30px;
    padding: 30px 0;
}

.message-header {
    text-align: center;
    margin-bottom: 30px;
}

.message-title {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 10px;
}

.message-subtitle {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
}

.message-form {
    max-width: 600px;
    margin: 0 auto;
}

.message-form .form-group {
    margin-bottom: 20px;
}

.message-form label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.message-form .form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.message-form .form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.message-form textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.message-form .btn {
    width: 100%;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.message-form .btn-primary {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
}

.message-form .btn-primary:hover {
    background-color: #2563eb;
    border-color: #2563eb;
    transform: translateY(-1px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .message-form-section {
        padding: 20px 0;
    }
    
    .message-title {
        font-size: 20px;
    }
    
    .message-subtitle {
        font-size: 14px;
    }
    
    .message-form {
        max-width: 100%;
        padding: 0 15px;
    }
    
    .message-form .form-control {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .message-form .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* 404错误页面样式 */
.error-page-section {
    padding: 80px 20px;
    text-align: center;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-content {
    max-width: 800px;
    margin: 0 auto;
}

.error-icon {
    position: relative;
    margin-bottom: 40px;
}

.error-number {
    font-size: 120px;
    font-weight: 900;
    color: #1e3a8a;
    line-height: 1;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.error-icon-decoration {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 40px;
    color: #3b82f6;
    opacity: 0.3;
}

.error-message {
    margin-bottom: 40px;
}

.error-title {
    font-size: 36px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 20px;
}

.error-description {
    font-size: 18px;
    color: #6b7280;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.error-actions {
    margin-bottom: 50px;
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-home, .btn-back {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-home {
    background-color: #3b82f6;
    color: #ffffff;
}

.btn-home:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-back {
    background-color: #6b7280;
    color: #ffffff;
}

.btn-back:hover {
    background-color: #4b5563;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

.search-suggestion {
    margin-bottom: 50px;
    padding: 30px;
    background-color: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.suggestion-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 20px;
}

.error-search-form {
    max-width: 400px;
    margin: 0 auto;
}

.search-input-group {
    display: flex;
    background-color: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.search-input-group:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-input-group .search-input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    outline: none;
    font-size: 16px;
    background-color: transparent;
}

.search-input-group .search-btn {
    padding: 12px 16px;
    background-color: #3b82f6;
    color: #ffffff;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-input-group .search-btn:hover {
    background-color: #2563eb;
}

.quick-links {
    text-align: left;
}

.links-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 20px;
    text-align: center;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
}

.quick-link-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    color: #374151;
    font-weight: 500;
    transition: all 0.3s ease;
}

.quick-link-item:hover {
    background-color: #f8fafc;
    border-color: #3b82f6;
    color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.quick-link-item i {
    color: #6b7280;
    width: 16px;
}

.quick-link-item:hover i {
    color: #3b82f6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .error-page-section {
        padding: 40px 15px;
    }
    
    .error-number {
        font-size: 80px;
    }
    
    .error-icon-decoration {
        font-size: 30px;
    }
    
    .error-title {
        font-size: 28px;
    }
    
    .error-description {
        font-size: 16px;
    }
    
    .error-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-home, .btn-back {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
    
    .search-suggestion {
        padding: 20px;
    }
    
    .suggestion-title {
        font-size: 18px;
    }
    
    .links-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .quick-link-item {
        padding: 12px 16px;
        font-size: 14px;
    }
}