body {
    background-color: #FFF9F0;
}

/* Banner区域 */
.theme-banner-section {
    position: relative;
    width: 100%;
    height: 450px;
    overflow: hidden;
}

.theme-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.theme-banner-section .header-nav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.5);
}

/* 面包屑导航 */
.breadcrumb-wrapper {
    background-color: #7A2919;
    height: 40px;
    display: flex;
    align-items: center;
}

.breadcrumb-content {
    display: flex;
    align-items: center;
    height: 100%;
    color: #fff;
    font-size: 0.9rem;
}

.breadcrumb-content a {
    color: #fff;
    text-decoration: none;
}

.breadcrumb-content a:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    margin: 0 0.5rem;
    color: #fff;
}

.breadcrumb-current {
    color: #fff;
}

/* Tab导航 */
.breadcrumb-tabs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 2.5rem;
}

.breadcrumb-tabs .tab-item {
    color: #000;
    background-color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
    /* 非 active 状态：背景图 icon3-w.png 水平重复 */
    background-image: url("../img/icon3-w.png");
    background-repeat: repeat-x; /* 水平重复 */
    background-position: center; /* 背景图居中对齐（可按需调整） */
    background-size: auto 100%; /* 背景图高度适配 Tab，宽度自动（可按需调整） */
    /* 关键：给伪元素预留定位空间，相对定位 */
    position: relative;
    /* 避免伪元素覆盖文字，增加内边距（可选，根据 icon 大小调整） */
    padding-left: 1.2rem;
    padding-right: 1.2rem;
}

/* 非 active 状态：before 伪元素（icon1-w.png） */
.breadcrumb-tabs .tab-item:before {
    content: ""; /* 伪元素必备，空内容即可 */
    position: absolute; /* 绝对定位，相对于父元素 tab-item */
    left: 0.2rem; /* 左侧定位，可按需调整 */
    top: 50%; /* 垂直居中 */
    transform: translateY(-50%); /* 垂直居中校准 */
    width: 16px; /* 伪元素宽度（根据 icon 大小调整） */
    height: 16px; /* 伪元素高度（根据 icon 大小调整） */
    background-image: url("../img/icon1-w.png"); /* 非激活状态 before 图片 */
    background-size: cover; /* 图片覆盖伪元素，不拉伸变形 */
    background-repeat: no-repeat; /* 图片不重复 */
    background-position: center; /* 图片居中 */
}

/* 非 active 状态：after 伪元素（icon1-w.png） */
.breadcrumb-tabs .tab-item:after {
    content: ""; /* 伪元素必备，空内容即可 */
    position: absolute; /* 绝对定位，相对于父元素 tab-item */
    right: 0.2rem; /* 右侧定位，可按需调整 */
    top: 50%; /* 垂直居中 */
    transform: translateY(-50%); /* 垂直居中校准 */
    width: 16px; /* 伪元素宽度（根据 icon 大小调整） */
    height: 16px; /* 伪元素高度（根据 icon 大小调整） */
    background-image: url("../img/icon1-w.png"); /* 非激活状态 after 图片 */
    background-size: cover; /* 图片覆盖伪元素，不拉伸变形 */
    background-repeat: no-repeat; /* 图片不重复 */
    background-position: center; /* 图片居中 */
}

/* active 状态样式 */
.breadcrumb-tabs .tab-item.active {
    background-color: #862E23;
    color: #fff;
    font-weight: 500;
    /* active 状态：背景图 icon4-r.png 水平重复 */
    background-image: url("../img/icon4-r.png");
    background-repeat: repeat-x; /* 水平重复 */
    background-position: center; /* 背景图居中对齐（可按需调整） */
    background-size: auto 100%; /* 背景图高度适配 Tab，宽度自动（可按需调整） */
    position: relative; /* 伪元素定位基础（继承自父类，可重复声明确保生效） */
}

/* active 状态：before 伪元素（icon2-r.png） */
.breadcrumb-tabs .tab-item.active:before {
    background-image: url("../img/icon2-r.png"); /* 激活状态 before 图片，覆盖非激活状态 */
}

/* active 状态：after 伪元素（icon2-r.png） */
.breadcrumb-tabs .tab-item.active:after {
    background-image: url("../img/icon2-r.png"); /* 激活状态 after 图片，覆盖非激活状态 */
}

/* 主内容区域 */
.theme-wrapper {
    padding-top: 3rem;
    padding-bottom: 4rem;
    background-image: url('../img/bg-yellow.png');
    background-repeat: repeat-y;
    background-position: top center;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #7f1d1d;
    text-align: center;
    margin-bottom: 3rem;
}

/* 时间轴索引区域 */
.timeline-section {
    margin-bottom: 5rem;
}

/* 水平时间轴 */
.horizontal-timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto 3rem;
    padding: 2rem 0;
}

.timeline-line-horizontal {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, #862E23, #A17B42);
    transform: translateY(-50%);
    z-index: 1;
}

.timeline-items-horizontal {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2;
}

.timeline-item-horizontal {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.timeline-dot-horizontal {
    width: 20px;
    height: 20px;
    background-color: #fff;
    border: 4px solid #862E23;
    border-radius: 50%;
    z-index: 3;
    box-shadow: 0 0 0 3px #862E23;
    transition: all 0.3s ease;
}

.timeline-item-horizontal.active .timeline-dot-horizontal {
    background-color: #862E23;
    transform: scale(1.2);
    box-shadow: 0 0 0 5px rgba(134, 46, 35, 0.3);
}

.timeline-label {
    margin-top: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    transition: color 0.3s ease;
}

.timeline-item-horizontal.active .timeline-label {
    color: #862E23;
    font-weight: 700;
}

.timeline-item-horizontal:hover .timeline-label {
    color: #862E23;
}

/* 老字号列表区域 */
.brand-list-section {
    margin-top: 3rem;
}

.brand-list-container {
    display: flex;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    background-color: #fff;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 左侧：图片+简介 */
.brand-detail {
    flex: 1;
    min-width: 0;
}

.brand-image {
    width: 100%;
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
    overflow: hidden;
}

.brand-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.brand-intro {
    padding: 0;
}

.brand-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #862E23;
    margin-bottom: 1rem;
}

.brand-desc {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.8;
    text-align: justify;
}

/* 右侧：老字号名称列表 */
.brand-names {
    flex: 0 0 300px;
    max-height: 500px;
}

.brand-swiper {
    height: 100%;
    overflow: hidden;
}

.brand-swiper .swiper-wrapper {
    display: flex;
}

.brand-swiper .swiper-slide {
    height: auto;
    width: 100%;
    overflow-y: auto;
    max-height: 500px;
}

.brand-period {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.brand-name-item {
    padding: 1rem 1.5rem;
    background-color: #f5f5f5;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.brand-name-item:hover {
    background-color: #e8e8e8;
    border-color: #862E23;
}

.brand-name-item.active {
    background-color: #862E23;
    color: #fff;
    border-color: #862E23;
}

.brand-name-item span {
    font-size: 1rem;
    font-weight: 500;
}

/* 图片列表区域 */
.image-list-section {
    margin-top: 4rem;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto 3rem;
}

.image-item {
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    cursor: pointer;
}

.image-item:hover {
    transform: translateY(-5px);
}

.image-wrapper-square {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.image-wrapper-square img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-item:hover .image-wrapper-square img {
    transform: scale(1.1);
}

.image-name {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
    background-color: #fff;
}

.image-item:hover .image-name {
    color: #862E23;
}

/* 图片分页 */
.image-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 1.5rem 0;
}

/* 覆盖 Bootstrap 分页默认样式 */
.image-pagination .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
    border: none;
}

.image-pagination .pagination > li {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    border: none;
}

.image-pagination .pagination > li > a,
.image-pagination .pagination > li > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    color: #333;
    text-decoration: none;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
    border: none;
    background: transparent;
    min-width: auto;
    height: auto;
}

.image-pagination .pagination > li > a:hover,
.image-pagination .pagination > li > a:focus {
    background-color: #f0f0f0;
    color: #333;
    border: none;
    text-decoration: none;
}

/* 数字页码样式 */
.image-pagination .pagination > li > a:not([rel="prev"]):not([rel="next"]) {
    min-width: 39px;
    height: 26px;
    padding: 0;
}

/* 当前页（active）样式 */
.image-pagination .pagination > .active > a,
.image-pagination .pagination > .active > span {
    width: 39px;
    height: 26px;
    background: #A17B42;
    color: #fff;
    border: none;
    padding: 0;
}

.image-pagination .pagination > .active > a:hover,
.image-pagination .pagination > .active > a:focus,
.image-pagination .pagination > .active > span:hover,
.image-pagination .pagination > .active > span:focus {
    background: #8a6a38;
    color: #fff;
    border: none;
}

/* 上一页/下一页样式 */
.image-pagination .pagination > li > a[rel="prev"],
.image-pagination .pagination > li > a[rel="next"] {
    padding: 0.5rem 1rem;
}

/* 禁用状态样式 */
.image-pagination .pagination > .disabled > a,
.image-pagination .pagination > .disabled > span {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background: transparent;
    color: #999;
}

.image-pagination .pagination > .disabled > a:hover,
.image-pagination .pagination > .disabled > a:focus,
.image-pagination .pagination > .disabled > span:hover,
.image-pagination .pagination > .disabled > span:focus {
    background: transparent;
    color: #999;
    border: none;
}

/* 兼容旧样式类名（如果模板中有使用） */
.image-pagination .pagination-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    color: #333;
    text-decoration: none;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
}

.image-pagination .pagination-item:hover {
    background-color: #f0f0f0;
}

.image-pagination .pagination-number {
    min-width: 39px;
    height: 26px;
    padding: 0;
}

.image-pagination .pagination-number.active {
    width: 39px;
    height: 26px;
    background: #A17B42;
    color: #fff;
}

.image-pagination .pagination-number.active:hover {
    background: #8a6a38;
}

.image-pagination .pagination-prev,
.image-pagination .pagination-next {
    padding: 0.5rem 1rem;
}

.image-pagination .pagination-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* 响应式设计 - 移动端 */
@media (max-width: 768px) {
    .theme-banner-section {
        height: 320px;
    }

    .theme-wrapper {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }

    /* 水平时间轴移动端 */
    .horizontal-timeline {
        padding: 1.5rem 0;
    }

    .timeline-label {
        font-size: 0.9rem;
        margin-top: 0.5rem;
    }

    .timeline-dot-horizontal {
        width: 16px;
        height: 16px;
        border-width: 3px;
    }

    /* 老字号列表移动端 */
    .brand-list-container {
        flex-direction: column;
        padding: 1.5rem;
        gap: 1.5rem;
    }

    .brand-names {
        flex: 1;
        width: 100%;
        max-height: 300px;
    }

    .brand-title {
        font-size: 1.25rem;
    }

    .brand-desc {
        font-size: 0.9rem;
    }

    /* 图片列表移动端 */
    .image-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .image-name {
        font-size: 0.9rem;
    }

    .image-pagination {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .image-pagination .pagination-item {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }

    .breadcrumb-tabs {
        gap: 0.75rem;
    }

    .breadcrumb-tabs .tab-item {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
}

/* 小屏幕优化 */
@media (max-width: 480px) {
    .image-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .timeline-items-horizontal {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .timeline-item-horizontal {
        flex: 0 0 calc(50% - 0.5rem);
    }
}
