/* ========================
   产品中心页面样式
   ======================== */

/* --- Banner 区域 --- */
.ts-products-hero {
    position: relative;
    width: 100%;
}

.ts-products-hero__bg {
    position: relative;
    width: 100%;
    min-height: 420px;
    background-image: url('../assets/images/products/hero.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 40px;
}

.ts-products-hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.ts-products-hero__content {
    position: relative;
    z-index: 2;
    padding: 130px 1rem 50px;
}

.ts-products-hero__title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: bold;
    margin-bottom: 1rem;
    letter-spacing: 4px;
    position: relative;
    padding-bottom: 1rem;
}

.ts-products-hero__title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background-color: #ffffff;
}

.ts-products-hero__subtitle {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 0;
    margin-top: 0.75rem;
    letter-spacing: 1px;
}

/* --- 搜索区域 --- */
.ts-products-search {
    position: relative;
    z-index: 10;
    margin-top: -25px;
    padding: 0;
    line-height: 0;
}

.ts-products-search__wrapper {
    display: flex;
    justify-content: center;
    padding: 0 1rem;
    line-height: 0;
}

.ts-products-search__form {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 600px;
    background-color: #ffffff;
    border: none;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    line-height: normal;
}

.ts-products-search__input {
    flex: 1;
    height: 48px;
    padding: 0 1.25rem;
    border: none;
    font-size: 0.875rem;
    color: #333333;
    outline: none;
    background-color: transparent;
}

.ts-products-search__input::placeholder {
    color: #aaaaaa;
}

.ts-products-search__btn {
    width: 48px;
    height: 48px;
    background-color: #c82126;
    border: none;
    border-radius: 0;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s;
    flex-shrink: 0;
}

.ts-products-search__btn:hover {
    background-color: #a51b1f;
}

/* --- 产品列表主体布局 --- */
.ts-products-main {
    padding: 2rem 0 4rem;
}

.ts-products-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
}

@media (max-width: 991px) {
    .ts-products-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* --- 左侧边栏 --- */
.ts-products-sidebar {
    width: 100%;
}

.ts-sidebar-block {
    margin-bottom: 2rem;
}

.ts-sidebar-block__title {
    font-size: 1rem;
    font-weight: bold;
    color: #333333;
    margin-bottom: 1rem;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 0.625rem;
}

.ts-sidebar-block__title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: #c82126;
}

/* 分类列表 */
.ts-sidebar-cate {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ts-sidebar-cate__item {
    background-color: #f8f8f8;
    border-radius: 4px;
    overflow: hidden;
}

.ts-sidebar-cate__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    color: #666666;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.3s;
}

.ts-sidebar-cate__link::after {
    content: ">";
    font-size: 0.75rem;
    color: #999999;
    transition: all 0.3s;
}

.ts-sidebar-cate__link:hover {
    color: #c82126;
    background-color: #f0f0f0;
}

.ts-sidebar-cate__link:hover::after {
    color: #c82126;
    transform: translateX(2px);
}

.ts-sidebar-cate__item.active {
    background-color: #fff5f5;
}

.ts-sidebar-cate__item.active .ts-sidebar-cate__link {
    color: #c82126;
    font-weight: 500;
}

.ts-sidebar-cate__item.active .ts-sidebar-cate__link::after {
    color: #c82126;
}

/* 最新产品 */
.ts-sidebar-latest__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f5f5f5;
    text-decoration: none;
    transition: all 0.3s;
}

.ts-sidebar-latest__item:hover {
    padding-left: 0.25rem;
}

.ts-sidebar-latest__item:hover .ts-sidebar-latest__name,
.ts-sidebar-latest__item:hover .ts-sidebar-latest__no {
    color: #c82126;
}

.ts-sidebar-latest__img {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ts-sidebar-latest__img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.ts-sidebar-latest__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ts-sidebar-latest__no {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #333333;
    line-height: 1.3;
    transition: color 0.3s;
}

.ts-sidebar-latest__name {
    font-size: 0.75rem;
    color: #888888;
    line-height: 1.3;
    transition: color 0.3s;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- 右侧产品网格 --- */
.ts-products-grid-wrapper {
    min-width: 0;
}

.ts-products-search-result {
    margin-bottom: 1.5rem;
    padding: 0.875rem 1rem;
    background-color: #f8f8f8;
    border-left: 3px solid #c82126;
    font-size: 0.875rem;
    color: #666666;
}

.ts-products-search-result strong {
    color: #c82126;
}

.ts-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

@media (max-width: 1199px) {
    .ts-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .ts-products-grid {
        grid-template-columns: 1fr;
    }
}

/* --- 产品卡片 --- */
.ts-product-card {
    display: block;
    text-decoration: none;
    background-color: #ffffff;
    border: 1px solid #eeeeee;
    transition: all 0.3s ease-in-out;
}

.ts-product-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.ts-product-card__img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: transparent;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ts-product-card__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1.5rem;
    transition: transform 0.5s ease;
}

.ts-product-card:hover .ts-product-card__img {
    transform: scale(1.05);
}

.ts-product-card__body {
    padding: 1rem 1rem 1.25rem;
    text-align: center;
    background-color: #ffffff;
}

.ts-product-card__name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #333333;
    margin-bottom: 0.75rem;
    min-height: 1.5em;
    transition: color 0.3s;
    letter-spacing: 0.5px;
}

.ts-product-card:hover .ts-product-card__name {
    color: #c82126;
}

.ts-product-card__btn-wrapper {
    display: flex;
    justify-content: center;
}

.ts-product-card__btn {
    display: inline-block;
    padding: 0.4rem 1.5rem;
    background-color: #c82126;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease-in-out;
    border: 1px solid #c82126;
    letter-spacing: 1px;
}

.ts-product-card:hover .ts-product-card__btn {
    background-color: #ffffff;
    color: #c82126;
}

/* --- 空状态 --- */
.ts-products-empty {
    padding: 4rem 2rem;
    text-align: center;
    color: #999999;
    font-size: 1rem;
}

/* --- 分页 --- */
.ts-products-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eeeeee;
}

.ts-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.625rem;
    background-color: #f2f2f2;
    color: #333333;
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.ts-page-btn:hover:not(.disabled):not(.ts-page-btn--active) {
    background-color: #dddddd;
    color: #333333;
}

.ts-page-btn--active {
    background-color: #c82126;
    color: #ffffff;
    cursor: default;
}

.ts-page-btn.disabled {
    color: #aaaaaa;
    cursor: not-allowed;
    opacity: 0.6;
}

.ts-page-info {
    font-size: 0.8125rem;
    color: #666666;
    margin-left: 0.5rem;
}

@media (max-width: 575px) {
    .ts-products-pagination {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* ========================
   产品详情页样式
   ======================== */

.ts-product-detail-main {
    padding: 2.5rem 0;
}

.ts-product-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 991px) {
    .ts-product-detail-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* 左侧大图 */
.ts-product-detail-image {
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.ts-product-detail-image img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
}

/* 右侧信息 */
.ts-product-detail-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* 型号标题 */
.ts-product-detail-model {
    background-color: #c82126;
    color: #ffffff;
    font-size: 1.125rem;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    letter-spacing: 1px;
}

/* 信息框 */
.ts-product-detail-box {
    border: 1px dashed #cccccc;
    padding: 1.25rem;
}

.ts-product-detail-box__title {
    font-size: 0.8125rem;
    color: #888888;
    margin-bottom: 0.75rem;
    font-weight: normal;
}

.ts-product-detail-box__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ts-product-detail-box__list li {
    font-size: 0.875rem;
    color: #333333;
    padding: 0.25rem 0;
    line-height: 1.6;
}

/* 红色分割线 */
.ts-product-detail-divider {
    width: 100%;
    height: 3px;
    background-color: #c82126;
    margin-top: 1rem;
}
