/**
 * XingCMS 示例模板 - 样式文件
 * 
 * 这是一个现代化的响应式模板样式
 */

/* ========== CSS 变量 ========== */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    
    --text-color: #333;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --bg-color: #f8f9fa;
    
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --font-size-base: 16px;
    --line-height-base: 1.6;
    
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    
    --border-radius: 4px;
    --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    
    --container-width: 1200px;
    --header-height: 50px;
}

/* ========== 重置样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: #97663e;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: var(--line-height-base);
    color: var(--text-color);
    background-color: #fff;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

a:hover {
    color: #0056b3;
}

img {
    max-width: 100%;    
    height: auto;

}

ul, ol {
    list-style: none;
}

/* 防止长单词/URL溢出 */
p, span, div, li, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* ========== 容器 ========== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ========== 顶部信息栏 ========== */
.top-bar {
    background: #f5f5f5;
    color: #666;
    padding: var(--spacing-xs) 0;
    font-size: 0.875rem;
}

.top-info {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
    justify-content: flex-end;
}

.top-info-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.top-info-item .icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ========== 头部导航 ========== */
.header {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--box-shadow);
    padding: var(--spacing-md) 0;
}

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
    gap: var(--spacing-md);
}

.logo a {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
    width: auto;
}

.logo-text {
    font-size: 1.75rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* 导航栏包装器 */
.header-nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-lg);
    background: url('/uploads/images/01.png') repeat-x top;
    padding-top: calc(7px + var(--spacing-md));
}

.nav {
    flex: 1;
}

.nav-list {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
}

.nav-item a {
    display: block;
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.3s ease;
    font-weight: bold;
}

.nav-item a:hover,
.nav-item a.active {
    color: #97663e;
}

/* 手机版导航链接下划线 */
@media (max-width: 768px) {
    .nav-item a.active {
        position: relative;
    }

    .nav-item a.active::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 2px;
        background: #97663e;
        width: 100%;
    }
}

/* 下拉菜单 */
.nav-item.has-dropdown {
    position: relative;
}

.nav-item.has-dropdown > a::after {
    content: '';
    display: inline-block;
    margin-left: 4px;
    border: 4px solid transparent;
    border-top-color: currentColor;
    vertical-align: middle;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 160px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
    padding: var(--spacing-xs) 0;
}

.nav-item:hover > .dropdown-menu {
    display: block;
}

.dropdown-item a {
    display: block;
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-color);
    white-space: nowrap;
    transition: all 0.2s ease;
}

.dropdown-item a:hover {
    background: var(--bg-color);
    color: var(--primary-color);
}

/* 搜索框 */
.header-search {
    flex-shrink: 0;
    margin-left: auto;
}

.header-search-form {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    background: transparent;
    border-radius: 25px;
    padding: var(--spacing-xs) var(--spacing-sm);
    border: 1px solid var(--border-color);
    transition: border-color 0.3s ease;
}

.header-search-form:focus-within {
    border-color: var(--primary-color);
}

.header-search-input {
    border: none;
    background: transparent;
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 0.875rem;
    width: 150px;
    outline: none;
}

/* 去除浏览器自动填充背景色 */
.header-search-input:-webkit-autofill,
.header-search-input:-webkit-autofill:hover,
.header-search-input:-webkit-autofill:focus,
.header-search-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
    -webkit-text-fill-color: var(--text-color) !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Firefox */
.header-search-input:-moz-autofill,
.header-search-input:-moz-autofill-preview {
    filter: none;
}

.header-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #bd9e85;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease;
}

.header-search-btn:hover {
    background: #0056b3;
}

.header-search-btn svg {
    width: 16px;
    height: 16px;
    color: #fff;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: var(--spacing-sm);
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-color);
    transition: all 0.3s ease;
}

/* 移动菜单按钮激活状态 */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ========== 轮播图 ========== */
.banner {
    position: relative;
    height: 400px;
    overflow: hidden;
    background: #000;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s;
    z-index: 1;
}

.banner-slide.active {
    opacity: 1;
    z-index: 2;
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

/* 轮播图链接样式 */
.banner-slide a.banner-link {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    text-decoration: none;
    z-index: 5;
}

.banner-slide a.banner-link img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

/* 轮播图内容覆盖层 */
.banner-content {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: left;
    color: #fff;
    z-index: 10;
}

.banner-content h2 {
    font-size: 26px;
    font-style: italic;
    line-height: 40px;
    margin: 0;
    padding: 0 15px;
    position: relative;
    display: inline-block;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.banner-content h2::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: -15px;
    right: -15px;
    height: calc(50% + 5px);
    background: rgba(0, 0, 0, 0.3);
    clip-path: polygon(15px 0, 100% 0, calc(100% - 15px) 100%, 0 100%);
    z-index: -1;
}

.banner-content p,
.banner-subtitle {
    font-size: 18px;
    margin: 0;
    margin-left: 15px;
    opacity: 0.9;
    font-weight: 300;
}

/* 焦点图箭头 */
.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 80px;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner:hover .banner-arrow {
    opacity: 1;
}

.banner-arrow:hover {
    background: rgba(0, 0, 0, 0.5);
}

.banner-prev {
    left: 0;
    border-radius: 0 4px 4px 0;
}

.banner-next {
    right: 0;
    border-radius: 4px 0 0 4px;
}

/* 焦点图标题滑入动画 */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-120px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(120px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.banner-slide .banner-content h2 {
    opacity: 0;
    transform: translateX(-120px);
}

.banner-slide .banner-content .banner-subtitle {
    opacity: 0;
    transform: translateX(120px);
}

.banner-slide.active .banner-content h2 {
    animation: slideInLeft 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s forwards;
}

.banner-slide.active .banner-content .banner-subtitle {
    animation: slideInRight 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.5s forwards;
}

.banner-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
}

.banner-dots span {
    width: 12px;
    height: 12px;
    margin: 0 5px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.banner-dots span.active {
    background: #fff;
}

/* ========== 内容区块 ========== */

/* 通用section样式 */
section.section {
    padding: 40px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    border-bottom: 2px solid #bd9e85;
    padding-bottom: var(--spacing-md);
}

.section-title {
    font-size: 1.2rem;
    color: var(--text-color);
}

.section-more {
    font-size: 0.875rem;
}

.section-more .more-link {
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.section-more .more-link:hover {
    color: var(--primary-color);
}

.section-tabs {
    display: flex;
    gap: var(--spacing-sm);
}

.section-tabs .tab {
    padding: var(--spacing-xs) var(--spacing-md);
    color: var(--text-muted);
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.section-tabs .tab:hover,
.section-tabs .tab.active {
    color: var(--primary-color);
    background: rgba(0, 123, 255, 0.1);
}

.section-footer {
    text-align: center;
    margin-top: var(--spacing-lg);
}

/* ========== 武馆介绍 ========== */
.about-section {
    background: var(--bg-color);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.about-media .video-wrapper,
.about-media .image-wrapper {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.about-media video,
.about-media img {
    width: 100%;
    height: auto;
    display: block;
}

.about-text h3 {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-md);
    color: var(--text-color);
}

.about-description {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: var(--spacing-lg);
}

/* ========== 教学内容 ========== */
.teaching-section {
    background: #fff;
}

.teaching-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
}

.teaching-item {
    background: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-width: 0;
}

.teaching-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.teaching-thumb {
    height: 160px;
    overflow: hidden;
}

.teaching-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.teaching-item:hover .teaching-thumb img {
    transform: scale(1.05);
}

.teaching-title {
    padding: var(--spacing-sm);
    font-size: 1rem;
    font-weight: bold;
    color: var(--text-color);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========== 相册滚动展示 ========== */
.gallery-section {
    background: #fff;
}

.gallery-scroll-wrapper {
    position: relative;
    padding: 0 50px;
}

.gallery-scroll {
    display: flex;
    gap: var(--spacing-md);
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: var(--spacing-sm) 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.gallery-scroll::-webkit-scrollbar {
    display: none;
}

.gallery-scroll-item {
    flex-shrink: 0;
    width: 300px;
}

.gallery-scroll-item a {
    display: block;
    background: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-scroll-item a:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.gallery-scroll-thumb {
    height: 200px;
    overflow: hidden;
}

.gallery-scroll-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-scroll-item a:hover .gallery-scroll-thumb img {
    transform: scale(1.05);
}

.gallery-scroll-title {
    padding: var(--spacing-sm);
    font-size: 1rem;
    font-weight: bold;
    color: var(--text-color);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: #bd9e85;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    z-index: 10;
}

.gallery-scroll-btn:hover {
    background: #97663e;
}

.gallery-scroll-btn svg {
    width: 20px;
    height: 20px;
}

.gallery-scroll-btn.prev {
    left: 0;
}

.gallery-scroll-btn.next {
    right: 0;
}

/* ========== 三列信息 ========== */
.info-section {
    background: var(--bg-color);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

.info-column {
    background: #fff;
    border-radius: var(--border-radius);
    min-width: 0;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    padding: var(--spacing-lg);
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid #bd9e85;
}

.info-title {
    font-size: 1.125rem;
    color: var(--text-color);
}

.info-header .more-link {
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.info-header .more-link:hover {
    color: var(--primary-color);
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.info-list li {
    border-bottom: 1px dashed var(--border-color);
}

.info-list li:last-child {
    border-bottom: none;
}

.info-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) 0;
    color: var(--text-color);
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.info-list li a:hover {
    color: var(--primary-color);
}

.info-item-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: var(--spacing-sm);
}

.info-item-date {
    flex-shrink: 0;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.info-list .empty-item {
    padding: var(--spacing-md) 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* 联系信息盒子 */
.contact-info-box {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    font-size: 0.875rem;
    color: var(--text-color);
    line-height: 1.6;
}

.contact-info-item .icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--primary-color);
    margin-top: 2px;
}

.route-tip {
    margin-top: var(--spacing-sm);
    padding: var(--spacing-sm);
    background: rgba(0, 123, 255, 0.1);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    color: var(--primary-color);
    text-align: center;
}

/* ========== 新闻网格 ========== */
.news-text-page,
.products-text-page {
    padding: var(--spacing-lg) 0;
}

.news-text-layout,
.products-text-layout {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: var(--spacing-xl);
}

.news-main,
.products-main {
    min-width: 0;
    overflow: hidden;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-top: 5px;
}

/* 纯文字列表模式 */
.news-text-item {
    background: #fff;
    border-radius: var(--border-radius);
    padding: var(--spacing-md) var(--spacing-lg);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.news-text-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--box-shadow);
}

.news-text-content {
    width: 100%;
}

.news-text-content .news-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
}

.news-text-content .tag {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.75rem;
    border-radius: 3px;
    font-weight: 500;
}

.news-text-content .tag-top {
    background: #ff4d4f;
    color: #fff;
}

.news-text-content .tag-recommend {
    background: var(--primary-color);
    color: #fff;
}

.news-text-content .news-excerpt {
    color: var(--text-muted);
    margin-bottom: var(--spacing-sm);
    line-height: 1.6;
}

.news-text-content .news-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.recommend-news {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.recommend-news-item {
    padding: var(--spacing-sm);
    border-bottom: 1px solid var(--border-color);
}

.recommend-news-item:last-child {
    border-bottom: none;
}

.recommend-news-item a {
    display: block;
}

.recommend-news-item h4 {
    font-size: 0.875rem;
    color: var(--text-color);
    margin-bottom: var(--spacing-xs);
    line-height: 1.4;
}

.recommend-news-item:hover h4 {
    color: var(--primary-color);
}

.recommend-news-item .date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.news-item {
    background: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-width: 0;
    max-width: 100%;
}

.news-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.news-link {
    display: block;
}

.news-thumb {
    position: relative;
    overflow: hidden;
}

.news-thumb img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position:top;
    transition: transform 0.3s ease;
}

.news-item:hover .news-thumb img {
    transform: scale(1.05);
}

.news-content {
    padding: var(--spacing-md);
}

.news-title {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-color);
    line-height: 1.4;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.news-title a {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.news-excerpt {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: var(--spacing-sm);
    line-height: 1.6;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.news-meta {
    display: flex;
    gap: var(--spacing-md);
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ========== 产品分类导航 ========== */
.products-page {
    padding: var(--spacing-lg) 0;
}

.products-page .page-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.products-page .page-title {
    font-size: 1.75rem;
    margin-bottom: var(--spacing-sm);
}

.products-page .page-description {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.category-nav {
    margin-bottom: var(--spacing-lg);
}

.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    justify-content: center;
}

.category-tag {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    background: #f5f5f5;
    color: var(--text-color);
    border-radius: 25px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.category-tag:hover {
    background: var(--primary-color);
    color: #fff;
}

.category-tag.active {
    background: var(--primary-color);
    color: #fff;
}

/* ========== 产品网格 ========== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--spacing-lg);
}

.product-item {
    background: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease;
}

.product-item:hover {
    transform: translateY(-4px);
}

.product-link {
    display: block;
}

.product-thumb img,
.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    aspect-ratio: 1 / 1;
}

.product-item h3 {
    font-size: 1rem;
    margin: var(--spacing-sm);
    color: var(--text-color);
}

.product-item p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0 var(--spacing-sm);
    line-height: 1.4;
}

.product-item .price {
    font-size: 1.125rem;
    color: var(--danger-color);
    font-weight: bold;
    margin: var(--spacing-sm);
}

/* 产品详情页图片组 */
.product-gallery {
    margin: var(--spacing-lg) 0;
    padding: var(--spacing-lg);
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.product-gallery h3 {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--primary-color);
}

.product-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--spacing-md);
}

.product-gallery-item {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.product-gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-gallery-item:hover img {
    transform: scale(1.02);
}

/* 产品参数 */
.product-params {
    margin: var(--spacing-lg) 0;
    padding: var(--spacing-lg);
    background: #f8f9fa;
    border-radius: var(--border-radius);
}

.product-price-box {
    margin-bottom: var(--spacing-md);
}

.price-label {
    font-size: 1rem;
    color: var(--text-muted);
}

.price-value {
    font-size: 1.5rem;
    color: var(--danger-color);
    font-weight: bold;
}

.product-parameters {
    font-size: 0.875rem;
    line-height: 1.8;
}

.product-parameters table {
    width: 100%;
    border-collapse: collapse;
}

.product-parameters td {
    padding: var(--spacing-sm);
    border-bottom: 1px solid var(--border-color);
}

.product-parameters td:first-child {
    font-weight: 500;
    color: var(--text-muted);
    width: 120px;
}

.product-info {
    padding: var(--spacing-md);
}

.product-title {
    font-size: 1rem;
    margin-bottom: var(--spacing-xs);
    color: var(--text-color);
}

.product-price {
    font-size: 1.25rem;
    color: var(--danger-color);
    font-weight: bold;
}

/* ========== 列表页 ========== */
.list-page {
    padding: 0 0 var(--spacing-lg) 0;
}

.breadcrumb-wrapper {
    background: var(--bg-color);
    padding: var(--spacing-md) 0;
    
}

.breadcrumb {
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 0.875rem;
}

.breadcrumb a {
    color: var(--text-muted);
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb .current {
    color: var(--text-color);
}

.breadcrumb .separator {
    color: var(--text-muted);
}

.list-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--spacing-xl);
}

.list-main {
    min-width: 0;
}

.list-sidebar {
    min-width: 0;
}

.list-header {
    margin-bottom: var(--spacing-lg);
}

.list-title {
    font-size: 1.75rem;
    margin-bottom: var(--spacing-sm);
}

.list-description {
    color: var(--text-muted);
}

.list-items {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.list-item {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.list-item:hover {
    transform: translateX(4px);
}

.list-item-link {
    display: flex;
    gap: var(--spacing-md);
}

.list-item-thumb {
    flex-shrink: 0;
    width: 200px;
}

.list-item-thumb img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    padding:5px;;
    object-position: top;
}

.list-item-content {
    flex: 1;
    padding: var(--spacing-md);
}

.list-item-title {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-color);
}

.list-item-excerpt {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: var(--spacing-sm);
    line-height: 1.6;
}

.list-item-meta {
    display: flex;
    gap: var(--spacing-md);
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ========== 详情页 ========== */
.detail-page {
    padding: 0 0 var(--spacing-lg) 0;
}

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--spacing-xl);
}

.detail-main {
    min-width: 0;
}

.detail-sidebar {
    min-width: 0;
}

/* ========== 单页布局 ========== */
.page-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--spacing-xl);
}

.page-main {
    min-width: 0;
}

.page-sidebar {
    min-width: 0;
}

.article {
    min-width: 0;
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: var(--spacing-xl);
}

.article-header {
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
}

.article-title {
    font-size: 2rem;
    line-height: 1.3;
    margin-bottom: var(--spacing-md);
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.article-content {
    line-height: 1.8;
    font-size: 1rem;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
    overflow: hidden;
}

.article-content p {
    max-width: 100%;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

.article-content table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-md) 0;
}

/* 表格包裹层 - 用于响应式滚动 */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: var(--spacing-md) 0;
}

.table-wrapper table {
    min-width: 600px;
    margin: 0;
}

/* 手机端表格滚动优化 */
@media (max-width: 768px) {
    /* 手机端使用 fixed 布局防止横向滚动 */
    .article-content table {
        table-layout: fixed;
    }
    
    .table-wrapper {
        border-radius: var(--border-radius);
        position: relative;
    }
    
    /* 移除白色渐变层，避免影响页面背景 */
    
    .table-wrapper table {
        min-width: auto;
        width: 100%;
    }
    
    /* 确保文章内容区域不出现横向滚动 */
    .article-content {
        overflow-x: hidden;
    }
    
    /* 确保容器不出现横向滚动 */
    .container {
        overflow-x: hidden;
    }
}

.article-content table th,
.article-content table td {
    border: 1px solid #e0e0e0;
    padding: var(--spacing-sm) var(--spacing-md);
    text-align: left;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.article-content table th {
    background: #f8f9fa;
    font-weight: 600;
}

.article-content table tr:hover {
    background: #fafafa;
}

.article-tags {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

.tags-label {
    font-weight: bold;
    margin-right: var(--spacing-sm);
}

.tag {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    margin: var(--spacing-xs);
    background: var(--bg-color);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--primary-color);
    color: #fff;
}

.article-nav {
    display: flex;
    justify-content: space-between;
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

.article-nav a {
    flex: 1;
    padding: var(--spacing-md);
    background: var(--bg-color);
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.article-nav a:hover {
    background: rgba(0, 123, 255, 0.1);
}

.article-nav .nav-prev {
    margin-right: var(--spacing-sm);
}

.article-nav .nav-next {
    margin-left: var(--spacing-sm);
    text-align: right;
}

.article-nav .nav-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-xs);
}

.article-nav .nav-title {
    display: block;
    font-weight: 500;
    color: var(--text-color);
}

/* ========== 侧边栏 ========== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.sidebar-widget {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: var(--spacing-md);
    margin-bottom: 5px;
}

/* 栏目文章列表 */
.category-article-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.category-article-item {
    padding: var(--spacing-xs) 0;
    border-bottom: 1px dashed var(--border-color);
}

.category-article-item:last-child {
    border-bottom: none;
}

.category-article-item a {
    display: block;
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.5;
    transition: color 0.3s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-article-item a:hover {
    color: var(--primary-color);
}

.widget-title {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid #bd9e85;
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.category-list li a {
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-sm);
    color: var(--text-color);
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.category-list li a:hover {
    background: var(--bg-color);
    color: var(--primary-color);
}

.category-list li.active a {
    background: var(--primary-color);
    color: white;
}

.category-list li.active a:hover {
    background: var(--primary-color);
    color: white;
    opacity: 0.9;
}

.category-item a {
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-sm);
    color: var(--text-color);
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.category-item a:hover {
    background: var(--bg-color);
    color: var(--primary-color);
}

.category-item .count {
    color: var(--text-muted);
    font-size: 1rem;
}

.hot-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.hot-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
}

.hot-rank {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--text-muted);
    color: #fff;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: bold;
}

.hot-rank.top {
    background: var(--danger-color);
}

.hot-item a {
    flex: 1;
    font-size: 0.875rem;
    color: var(--text-color);
    line-height: 1.4;
}

.hot-item a:hover {
    color: var(--primary-color);
}

.recommend-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.recommend-item a {
    display: flex;
    gap: var(--spacing-sm);
}

.recommend-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.recommend-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recommend-info {
    flex: 1;
}

.recommend-title {
    font-size: 0.875rem;
    color: var(--text-color);
    line-height: 1.4;
    margin-bottom: var(--spacing-xs);
}

.recommend-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.contact-info {
    font-size: 0.875rem;
    line-height: 1.8;
}

.contact-info p {
    margin-bottom: var(--spacing-xs);
}

/* ========== 分页 ========== */
.pagination-wrapper {
    margin-top: var(--spacing-xl);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-xs);
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 var(--spacing-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-color);
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.pagination .current {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    font-weight: bold;
}

.pagination .ellipsis {
    border: none;
}

/* ========== 按钮 ========== */
.btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: #97663e;
    color: #fff;   
}

.btn-primary:hover {
    background: #0056b3;
    color: #fff;
}

/* ========== 页脚 ========== */
.footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding: var(--spacing-xl) 0;
    margin-top: var(--spacing-xl);
}

.footer-content {
    text-align: center;
}

/* 友情链接 */
.friend-links {
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: var(--spacing-md);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--spacing-sm);
}

.friend-links span {
    font-weight: 600;
    color: #ecf0f1;
}

.friend-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.friend-links a:hover {
    color: var(--primary-color);
}

.friend-link-logo {
    height: 20px;
    width: auto;
    vertical-align: middle;
}

.copyright {
    margin-bottom: var(--spacing-md);
}

.copyright p {
    margin-bottom: var(--spacing-xs);
}

.copyright .beian-info {
    font-size: 0.875rem;
    color: #bdc3c7;
}

.copyright .beian-info a {
    color: #bdc3c7;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-right: 5px;
}

.copyright .beian-info a:hover {
    color: #ecf0f1;
}

.copyright a {
    color: #ecf0f1;
}

/* 手机版底部向上移动 */
@media (max-width: 768px) {
    .footer {
        padding-bottom: 80px;
    }
}

.copyright a:hover {
    color: var(--primary-color);
}

.footer-links {
    font-size: 0.875rem;
    color: #bdc3c7;
}

/* ========== 返回顶部 ========== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    font-size: 1.5rem;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #0056b3;
    transform: translateY(-4px);
}

/* ========== 空状态 ========== */
.empty-state {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-muted);
}

/* ========== 响应式设计 ========== */
@media (max-width: 992px) {
    .list-layout,
    .detail-layout {
        grid-template-columns: 1fr !important;
    }
    
    .list-main,
    .detail-main {
        max-width: 100%;
    }
    
    .detail-sidebar,
    .list-sidebar,
    .page-sidebar {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        margin-top: var(--spacing-xl);
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .gallery-scroll-wrapper {
        padding: 0 40px;
    }
    
    .gallery-scroll-item {
        width: 250px;
    }
}

@media (max-width: 768px) {
    :root {
        --font-size-base: 14px;
    }

    /* 防止整体溢出 */
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    .container {
        padding: 0 10px;
    }

    .top-bar {
        display: none;
    }

    .header {
        padding: var(--spacing-sm) 0;
    }

    .header-main {
        flex-wrap: nowrap;
        gap: var(--spacing-sm);
        align-items: center;
    }

    .logo {
        flex: 1 1 auto;
        max-width: calc(100% - 80px);
        min-width: 0;
    }

    .logo img {
        height: 40px;
        max-width: 100%;
        object-fit: contain;
    }

    .logo-text {
        font-size: 1.25rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-menu-toggle {
        display: flex;
        order: 2;
        flex-shrink: 0;
    }

    .header-search {
        display: none;
    }

    .header-nav-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: var(--spacing-md);
    }

    .nav {
        display: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-out, opacity 0.3s ease;
        opacity: 0;
    }

    .nav.active {
        display: block;
        max-height: 1000px;
        opacity: 1;
        animation: slideDown 0.4s ease-out;
    }

    @keyframes slideDown {
        from {
            max-height: 0;
            opacity: 0;
        }
        to {
            max-height: 1000px;
            opacity: 1;
        }
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .nav-item {
        width: 100%;
         text-align: center; /* 这将使其内部的行内元素或文本居中 */
    }

    .nav-item a {
        display: block;
        padding: var(--spacing-md);
        border-bottom: 1px solid var(--border-color);
        width: 100%;
    }
    
    .banner {
        height: 250px;
    }

    .banner-slide img {
        height: 250px;
    }

    .banner-content {
        width: 80%;
        padding: 0 var(--spacing-md);
        box-sizing: border-box;
    }

    .banner-content h2 {
        font-size: 1.2rem;
        line-height: 20px;
    }

    .banner-content p,
    .banner-subtitle {
        font-size: 1rem;
    }

    .banner-arrow {
        width: 40px;
        height: 60px;
        font-size: 28px;
    }

    .banner-dots {
        bottom: 15px;
    }

    .banner-dots span {
        width: 10px;
        height: 10px;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }

    .product-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-grid,
    .gallery-categories,
    .cases-grid {
        grid-template-columns: 1fr;
    }

    .gallery-images {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .list-item-link {
        flex-direction: column;
    }
    
    .list-item-thumb {
        width: 100%;
    }

    .list-item-thumb img {
        height: 200px;
    }
    
    .article {
        padding: var(--spacing-md);
    }
    
    .article-title {
        font-size: 1.5rem;
    }
    
    .article-nav {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .article-nav .nav-prev,
    .article-nav .nav-next {
        margin: 0;
    }
    
    .article-nav .nav-next {
        text-align: left;
    }
    
    /* 首页响应式 */
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .about-text h3 {
        font-size: 1.25rem;
    }
    
    .gallery-scroll-wrapper {
        padding: 0;
    }
    
    .gallery-scroll-btn {
        display: none;
    }
    
    .gallery-scroll-item {
        width: 200px;
    }
    
    .gallery-scroll-thumb {
        height: 150px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .info-column {
        padding: var(--spacing-md);
    }
    
    /* 单页布局响应式 */
    .page-layout {
        grid-template-columns: 1fr !important;
    }
    
    .page-main,
    .page-sidebar {
        max-width: 100%;
    }
    
    .page-sidebar {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        margin-top: var(--spacing-xl);
    }
    
    /* 页面Banner */
    .page-banner {
        height: 150px;
    }
    
    .page-banner h1 {
        font-size: 1.5rem;
    }
    
    .page-banner .page-subtitle {
        font-size: 0.875rem;
    }
    
    /* 面包屑 */
    .breadcrumb-wrapper {
        padding: var(--spacing-sm) 0;
    }
    
    .breadcrumb {
        font-size: 0.75rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    /* 详情页布局 */
    .detail-layout {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .detail-sidebar {
        order: 2;
    }
    
    /* 产品详情 */
    .products-text-layout {
        grid-template-columns: 1fr;
    }
    
    .products-text-layout .sidebar {
        display: none;
    }
    
    .product-detail {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .product-images {
        order: 1;
    }
    
    .product-info {
        order: 2;
    }
    
    .product-main-image img {
        height: 250px;
    }
    
    /* 防止图片溢出 */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* 防止pre/code溢出 */
    pre, code {
        overflow-x: auto;
        white-space: pre-wrap;
        word-wrap: break-word;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 8px;
    }

    .section-header {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
    }

    .section-title {
        font-size: 1rem;
    }

    .section-more {
        font-size: 0.75rem;
    }

    .teaching-grid {
        grid-template-columns: 1fr;
    }

    .section-tabs {
        margin-top: var(--spacing-sm);
        flex-wrap: wrap;
    }

    .article-meta {
        flex-direction: column;
        gap: var(--spacing-xs);
    }

    /* Logo进一步缩小 */
    .logo img {
        height: 32px;
    }

    .logo-text {
        font-size: 1rem;
    }

    /* 按钮优化 */
    .btn {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.875rem;
    }

    /* 标题优化 */
    .article-title {
        font-size: 1.25rem;
    }

    .product-title {
        font-size: 1.25rem;
    }

    /* 强制单列布局 */
    .products-grid,
    .product-gallery-grid,
    .gallery-images {
        grid-template-columns: 1fr;
    }

    .news-title {
        font-size: 1rem;
    }

    .news-thumb img {
        height: 160px;
    }
}

/* 超小屏幕保护（320px及以下） */
@media (max-width: 360px) {
    .container {
        padding: 0 5px;
    }

    /* 强制所有grid为单列 */
    .news-grid,
    .products-grid,
    .product-gallery-grid,
    .teaching-grid,
    .gallery-grid,
    .gallery-categories,
    .cases-grid,
    .gallery-images,
    .info-grid {
        grid-template-columns: 1fr !important;
    }

    /* Logo更小 */
    .logo img {
        height: 28px;
    }

    .logo-text {
        font-size: 0.875rem;
    }

    /* 标题更小 */
    .section-title {
        font-size: 0.875rem;
    }

    .article-title {
        font-size: 1rem;
    }

    /* 按钮更小 */
    .btn {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
}

/* ========== 相册网格 ========== */
.gallery-list-page,
.gallery-category-page,
.gallery-detail-page {
    padding: var(--spacing-lg) 0;
}

.gallery-list-page .page-header,
.gallery-category-page .page-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.gallery-list-page .page-header h1,
.gallery-category-page .page-header h1 {
    font-size: 1.75rem;
    margin-bottom: var(--spacing-sm);
}

.gallery-list-page .page-header .subtitle,
.gallery-category-page .page-header .subtitle {
    color: var(--text-muted);
}

.gallery-grid,
.gallery-categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.gallery-item,
.gallery-category-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover,
.gallery-category-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img,
.gallery-category-item:hover .category-cover img {
    transform: scale(1.05);
}

.gallery-item .overlay,
.gallery-category-item .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--spacing-md);
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gallery-item h3,
.gallery-category-item h3 {
    font-size: 1rem;
    margin: 0;
    color: #fff;
    flex: 1;
}

.gallery-item .image-count,
.gallery-category-item .count {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.8);
    flex-shrink: 0;
    margin-left: var(--spacing-sm);
}

.gallery-category-item .category-subtitle {
    padding: var(--spacing-sm);
    font-size: 0.875rem;
    color: var(--text-muted);
    background: #fff;
    display: block;
    line-height: 1.4;
}

/* 相册分类封面容器 */
.gallery-category-item .category-cover {
    position: relative;
    overflow: hidden;
}

.gallery-category-item .category-cover img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* 相册详情页 */
.gallery-detail-page {
    padding: var(--spacing-xl) 0;
}

.gallery-detail-page h1 {
    font-size: 1.75rem;
    margin-bottom: var(--spacing-md);
}

.gallery-detail-page .summary {
    color: var(--text-muted);
    margin-bottom: var(--spacing-lg);
}

.gallery-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--spacing-md);
}

.gallery-image-item {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.gallery-image-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-image-item:hover img {
    transform: scale(1.02);
}

.gallery-image-item .image-title {
    padding: var(--spacing-sm);
    font-size: 1rem;
    font-weight: bold;
    color: var(--text-muted);
    background: #fff;
    text-align: center;
}

/* ========== 案例网格 ========== */
.cases-text-page {
    padding: var(--spacing-lg) 0;
}

.cases-text-page .page-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.cases-text-page .page-header h1 {
    font-size: 1.75rem;
    margin-bottom: var(--spacing-sm);
}

.cases-text-page .page-header .subtitle {
    color: var(--text-muted);
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.case-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.case-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.case-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: top;
    transition: transform 0.3s ease;
}

.case-item:hover img {
    transform: scale(1.05);
}

.case-item .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--spacing-md);
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: #fff;
}

.case-item h3 {
    font-size: 1rem;
    margin: 0;
    color: #fff;
}

/* ========== 联系我们页面 ========== */
.page-banner {
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
}

.page-banner h1 {
    font-size: 2rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.page-banner .page-subtitle {
    font-size: 1rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    opacity: 0.9;
    margin: 0;
}

.contact-page-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    align-items: start;
}

.contact-left {
    min-width: 0;
    height: 100%;
}

.contact-left .contact-form-box {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.contact-left .contact-form-box h2 {
    flex-shrink: 0;
}

.contact-left .contact-form {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.contact-left .captcha-group {
    flex-shrink: 0;
}

.contact-left .form-group:last-child {
    margin-top: auto;
    flex-shrink: 0;
    align-items: center;
}

.contact-left .form-group:last-child label {
    width: 100%;
}

.contact-left .form-group:last-child .btn {
    min-width: 200px;
}

.contact-right {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.contact-form-box,
.contact-info-box {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: var(--spacing-lg);
}

.contact-form-box h2,
.contact-info-box h2 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid #bd9e85;
}

/* 表单样式 */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: var(--spacing-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group label .required {
    color: var(--danger-color);
}

.form-group input,
.form-group textarea {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.captcha-group .captcha-input {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

.captcha-input input {
    flex: 1;
    max-width: 150px;
}

.captcha-input img {
    height: 38px;
    border-radius: var(--border-radius);
    cursor: pointer;
}

/* 联系信息 */
.contact-items {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.contact-item {
    display: flex;
    gap: var(--spacing-md);
    align-items: flex-start;
}

.contact-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.contact-item h4 {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-xs);
}

.contact-item p {
    font-size: 0.875rem;
    color: var(--text-color);
    line-height: 1.6;
}

/* 媒体账号 */
.social-media-box .social-media-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.social-media-item {
    text-align: center;
}

.social-media-item .qrcode-wrapper {
    width: 120px;
    height: 120px;
    margin: 0 auto var(--spacing-sm);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.social-media-item .qrcode-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.social-media-name {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* 地图 */
.contact-map-wrapper {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: var(--spacing-lg);
}

.contact-map-wrapper h2 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid #bd9e85;
}

.contact-map {
    border-radius: var(--border-radius);
    overflow: hidden;
}

/* ========== 打印样式 ========== */
@media print {
    .header,
    .footer,
    .sidebar,
    .back-to-top,
    .pagination {
        display: none;
    }
    
    .article {
        box-shadow: none;
        padding: 0;
    }
    
    .article-content {
        font-size: 12pt;
    }
}

/* ========== 浮动表单样式 ========== */
.float-form-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.5);
}

.float-form-modal.show {
    display: flex;
}

.float-form-modal.float-center {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    align-items: center;
    justify-content: center;
}

.float-form-modal.float-left-bottom {
    bottom: 20px;
    left: 20px;
    background: transparent;
}

.float-form-modal.float-right-bottom {
    bottom: 20px;
    right: 20px;
    background: transparent;
}

.float-form-content {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 450px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: fadeInUp 0.3s ease;
}

.float-left-bottom .float-form-content,
.float-right-bottom .float-form-content {
    max-width: 350px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.float-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
    background: var(--primary-color);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.float-form-header h3 {
    margin: 0;
    font-size: 1.125rem;
    color: #fff;
}

.close-float-form {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #fff;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.close-float-form:hover {
    opacity: 1;
}

.float-form-body {
    padding: var(--spacing-lg);
}

.float-form-field {
    margin-bottom: var(--spacing-md);
}

.float-form-field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: var(--spacing-xs);
    color: var(--text-color);
}

.float-form-field label .required {
    color: var(--danger-color);
}

.float-form-field input,
.float-form-field select,
.float-form-field textarea {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.float-form-field input:focus,
.float-form-field select:focus,
.float-form-field textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.float-form-field textarea {
    resize: vertical;
    min-height: 80px;
}

.captcha-field .captcha-input-wrapper {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

.captcha-input-wrapper .captcha-input {
    flex: 1;
}

.captcha-input-wrapper .captcha-img {
    height: 38px;
    border-radius: var(--border-radius);
    cursor: pointer;
}

.float-form-footer {
    margin-top: var(--spacing-lg);
    text-align: center;
}

.float-form-footer .btn {
    width: 100%;
    padding: var(--spacing-md);
}

/* ========== 产品详情页 ========== */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.product-images {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    position: relative;
    max-width: 100%;
    min-width: 0;
}

.product-main-image {
    width: 100%;
    aspect-ratio: 1;
    background: var(--bg-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.product-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.product-thumbnails {
    display: flex;
    gap: var(--spacing-sm);
    overflow-x: hidden;
    padding: var(--spacing-xs) 0;
    scroll-behavior: smooth;
    width: 100%;
}

.product-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.product-thumbnails::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-radius: 3px;
}

.product-thumbnails::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.thumbnail-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.3s ease;
}

.thumbnail-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

.thumbnail-btn.prev {
    left: 5px;
}

.thumbnail-btn.next {
    right: 5px;
}

.thumbnail-wrapper {
    position: relative;
    width: 100%;
}

.thumbnail-wrapper .thumbnail-btn {
    display: none;
}

.thumbnail-wrapper.has-more .thumbnail-btn {
    display: flex;
}

.thumbnail-item {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.thumbnail-item:hover,
.thumbnail-item.active {
    border-color: var(--primary-color);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.product-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
    line-height: 1.4;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: #fff5f5;
    border-radius: var(--border-radius);
}

.price-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.price-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e53e3e;
}

.product-summary {
    padding: var(--spacing-md);
    background: var(--bg-color);
    border-radius: var(--border-radius);
    line-height: 1.8;
    color: var(--text-color);
}

.product-parameters {
    padding: var(--spacing-md);
    background: var(--bg-color);
    border-radius: var(--border-radius);
}

.product-meta {
    display: flex;
    gap: var(--spacing-lg);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.product-actions {
    margin-top: var(--spacing-md);
}

.btn-inquiry {
    display: inline-block;
    padding: var(--spacing-md) var(--spacing-xl);
    background: var(--primary-color);
    color: #fff;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    transition: background 0.3s ease, transform 0.2s ease;
}

.btn-inquiry:hover {
    background: var(--primary-color-hover, #2563eb);
    transform: translateY(-2px);
}

/* ========== 响应式补充 ========== */
@media (max-width: 992px) {
    .contact-page-wrapper {
        grid-template-columns: 1fr;
    }
    
    .contact-right {
        order: -1;
    }
    
    .news-text-layout,
    .products-text-layout {
        grid-template-columns: 1fr;
    }
    
    .news-text-layout .sidebar,
    .products-text-layout .sidebar {
        order: 1;
    }
    
    .product-detail {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
}

@media (max-width: 768px) {
    .gallery-grid,
    .gallery-categories,
    .cases-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .teaching-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-images {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .social-media-grid {
        grid-template-columns: 1fr;
    }
    
    .social-media-item .qrcode-wrapper {
        width: 150px;
        height: 150px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    /* 移动端产品详情 */
    .products-text-layout {
        grid-template-columns: 1fr;
    }
    
    .products-text-layout .sidebar {
        order: 1;
    }
    
    .product-detail {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        overflow: hidden;
    }
    
    .product-images {
        width: 100%;
        max-width: 100%;
    }
    
    .thumbnail-wrapper {
        position: relative;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
    
    .thumbnail-wrapper .thumbnail-btn {
        display: flex;
    }
}

/* ========== 产品选项卡 ========== */
.product-tabs {
    margin-top: var(--spacing-xl);
}

.tab-nav {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    gap: var(--spacing-sm);
}

.tab-btn {
    padding: var(--spacing-md) var(--spacing-lg);
    background: transparent;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    padding: var(--spacing-lg) 0;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.tab-pane .content-body {
    line-height: 1.8;
    color: var(--text-color);
}

.tab-pane .content-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

/* ========== 规格参数内容（富文本模式）========== */
.specs-content {
    line-height: 1.8;
    color: var(--text-color);
}

.specs-content table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-sm) 0;
}

.specs-content table th,
.specs-content table td {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--border-color);
    text-align: left;
}

.specs-content table th {
    background: var(--bg-color);
    font-weight: 600;
    width: 200px;
}

/* ========== 规格参数（简单输入模式）========== */
.specs-table {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.specs-row {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.specs-row:last-child {
    border-bottom: none;
}

.specs-key {
    width: 200px;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-color);
    font-weight: 600;
    color: var(--text-color);
    border-right: 1px solid var(--border-color);
}

.specs-val {
    flex: 1;
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-color);
}

/* ========== 询价弹窗 ========== */
.inquiry-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.inquiry-modal.active {
    display: flex;
}

.inquiry-modal-content {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.2);
}

.inquiry-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
}

.inquiry-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
}

.inquiry-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-color);
    border-radius: 8px;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}

.inquiry-modal-close:hover {
    background: var(--border-color);
    color: var(--text-color);
}

.inquiry-modal-body {
    padding: var(--spacing-lg);
}

.inquiry-form .form-group {
    margin-bottom: var(--spacing-md);
}

.inquiry-form label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--text-color);
}

.inquiry-form .form-control {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.inquiry-form .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.inquiry-form .required {
    color: #e53e3e;
}

.inquiry-form .btn-submit {
    width: 100%;
    padding: var(--spacing-md);
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.inquiry-form .btn-submit:hover {
    background: var(--primary-color-hover, #2563eb);
}

/* ========== 相册灯箱 ========== */
.gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox.active {
    display: flex;
}

.gallery-lightbox .lightbox-close {
    position: absolute;
    top: 20px;
    right: 25px;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    z-index: 10001;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    transition: all 0.3s;
}

.gallery-lightbox .lightbox-close:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}

/* 左右箭头 */
.gallery-lightbox .lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 80px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    opacity: 0;
}

.gallery-lightbox.show-controls .lightbox-arrow {
    opacity: 1;
}

.gallery-lightbox .lightbox-arrow:hover {
    background: rgba(231,76,60,0.8);
}

.gallery-lightbox .lightbox-prev {
    left: 20px;
    border-radius: 0 4px 4px 0;
}

.gallery-lightbox .lightbox-next {
    right: 20px;
    border-radius: 4px 0 0 4px;
}

/* 幻灯片容器 */
.gallery-lightbox .lightbox-slide-container {
    width: 100%;
    max-width: 100vw;
    height: calc(88vh - 120px);
    overflow: hidden;
    position: relative;
}

.gallery-lightbox .lightbox-slide-wrapper {
    display: flex;
    height: 100%;
    transition: transform 0.3s ease-out;
}

.gallery-lightbox .lightbox-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 80px;
}

.gallery-lightbox .lightbox-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: pointer;
    user-select: none;
    -webkit-user-drag: none;
}

/* 图片信息栏 */
.gallery-lightbox .lightbox-info-bar {
    max-width: 100vw;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    flex-shrink: 0;
}

.gallery-lightbox .lightbox-title {
    color: #ffffff;
    font-size: 16px;
    padding: 8px;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-lightbox .lightbox-counter {
    color: #777777;
    font-size: 16px;
    flex-shrink: 0;
    white-space: nowrap;
}

/* 缩略图导航 */
.gallery-lightbox .lightbox-thumbs {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    max-width: 90%;
    overflow-x: auto;
    padding: 10px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.3) transparent;
}

.gallery-lightbox .lightbox-thumbs::-webkit-scrollbar {
    height: 4px;
}

.gallery-lightbox .lightbox-thumbs::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
}

.gallery-lightbox .lightbox-thumb {
    flex-shrink: 0;
    width: 60px;
    height: 45px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.gallery-lightbox .lightbox-thumb:hover {
    opacity: 0.8;
}

.gallery-lightbox .lightbox-thumb.active {
    opacity: 1;
    border-color: var(--primary-color);
}

.gallery-lightbox .lightbox-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 响应式 */
@media (max-width: 768px) {
    .gallery-lightbox .lightbox-arrow {
        display: none;
    }
    
    .gallery-lightbox .lightbox-slide {
        padding: 0 10px;
    }
    
    .gallery-lightbox .lightbox-close {
        top: 10px;
        right: 15px;
        font-size: 28px;
        width: 40px;
        height: 40px;
    }
    
    .gallery-lightbox .lightbox-slide-container {
        height: calc(80vh - 120px);
    }
    
    .gallery-lightbox .lightbox-info-bar {
        height: 50px;
        padding: 0 15px;
    }
    
    .gallery-lightbox .lightbox-title {
        font-size: 14px;
    }
    
    .gallery-lightbox .lightbox-counter {
        font-size: 12px;
    }
    
    .gallery-lightbox .lightbox-thumbs {
        bottom: 5px;
    }
    
    .gallery-lightbox .lightbox-thumb {
        width: 50px;
        height: 38px;
    }
}


/* Video.js H5播放器样式 */
.video-js,
.edui-upload-video {
    max-width: 100%;
    display: block;
    margin: 15px auto;
    background: #000;
}

/* 居中显示 */
.video-js.video-align-center,
.edui-upload-video.video-align-center {
    margin: 15px auto;
}

.video-js video,
.edui-upload-video video {
    width: 100%;
    height: auto;
}

/* 手机端响应式 */
@media (max-width: 768px) {
    .video-js,
    .edui-upload-video {
        max-width: 100% !important;
        width: 100% !important;
    }
}
