.container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-size: .18rem;
}

/* 左侧菜单样式 */
.sidebar {
    width: 220px;
    flex-shrink: 0;
    margin-right: 20px;
}

.menu-title {
    background-color: #e95c33;
    color: white;
    padding: 10px;
    position: relative;
    font-weight: bold;
}
.menu-title a {
    text-decoration: none;
    color: #fff;
}
.menu-title::after {
    content: "";
    position: absolute;
    right: 10px;
    top: 15px;
    border-top: 6px solid white;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
}
.menu-list {
    border: 1px solid #ddd;
}
.menu-list li {
    list-style: none;
    padding: 10px;
    border-bottom: 1px solid #ddd;
}
.menu-list li:last-child {
    border-bottom: none;
}
.menu-list li a {
    text-decoration: none;
    color: #333;
    display: block;
}
.menu-list li a:hover {
    color: #e95c33;
}
.menu-list .active {
    color: #e95c33;
}
.submenu-title {
    background-color: #f5f5f5;
    padding: 10px;
    position: relative;
    font-weight: bold;
}

.submenu-title a{
    text-decoration: none;
    color: #666;
}

.submenu-title::after {
    content: "";
    position: absolute;
    right: 10px;
    top: 15px;
    border-top: 6px solid #666;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
}

/* 右侧产品列表样式 */
.product-list {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    height: 100%;
}

.product-item {
    background-color: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-image {
    /*height: 200px;*/
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.product-item:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 15px;
    /*text-align: center;*/
}

.product-info h3 {
    font-size: 16px;
    margin-bottom: 5px;
    color: #333;
}

.product-info h3 a {
    text-decoration: none;
    color: #333;
}

.product-info h4 {
    font-size: 18px;
    color: #e85c33;
    margin-bottom: 5px;
}

.product-info p {
    font-size: 14px;
    color: #666;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        margin-right: 0;
        margin-bottom: 20px;
    }

    .product-list {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }

    .product-image {
        height: 180px;
    }

    .product-info h3 {
        font-size: 15px;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 10px;
    }

    .product-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .product-image {
        height: 160px;
    }

    .product-info {
        padding: 12px;
    }

    .product-info h3 {
        font-size: 14px;
    }

    .product-info h4 {
        font-size: 16px;
    }
}


/* 产品详情右侧内容区域 */
.content {
    /*margin-left: 220px;*/
}

.product-display {
    display: flex;
    margin-bottom: 20px;
}

.product-gallery {
    width: 400px;
    margin-right: 20px;
}

.main-image {
    margin-bottom: 10px;
    border: 1px solid #ddd;
    padding: 5px;
}

.main-image img {
    width: 100%;
    display: block;
}

.thumbnail-container {
    position: relative;
    overflow: hidden;
}

.thumbnail-list {
    display: flex;
    transition: transform 0.3s ease;
}

.thumbnail {
    flex: 0 0 80px; /* 固定宽度，不伸缩 */
    margin-right: 10px;
    cursor: pointer;
    border: 2px solid transparent;
}

.thumbnail.active {
    border-color: #e95c33;
}

.thumbnail img {
    width: 100%;
    display: block;
}

.thumbnail-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    z-index: 10;
    pointer-events: none;
}

.thumbnail-nav .prev,
.thumbnail-nav .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: rgba(0,0,0,.4);
    color: #fff;
    text-align: center;
    line-height: 30px;
    cursor: pointer;
    pointer-events: auto;    /* 只让箭头本身拦截事件 */
}

.thumbnail-nav .prev { left: 0;  }
.thumbnail-nav .next { right: 0; }

.thumbnail-nav span {
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 5px 10px;
    user-select: none;
}

.product-info {
    flex: 1;
}

.product-title {
    font-size: 24px;
    margin-bottom: 10px;
}

.product-desc {
    margin-bottom: 20px;
}

.buy-btn {
    display: inline-block;
    background-color: #e95c33;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
}

/* 弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    width: 400px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
    margin-bottom: 30px;
}
.product-gallery {
    width: 450px;
    position: relative;
}
.main-image {
    width: 100%;
    height: 350px;
    border: 1px solid #ddd;
    position: relative;
    overflow: hidden;
}
.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.magnifier {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 1px solid #ddd;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: move;
    display: none;
}
.zoomed-image {
    position: absolute;
    top: 0;
    left: 105%;
    width: 300px;
    height: 300px;
    border: 1px solid #ddd;
    overflow: hidden;
    background-color: #fff;
    display: none;
    z-index: 100;
}
.zoomed-image img {
    position: absolute;
}
.thumbnail-container {
    margin-top: 10px;
    position: relative;
}
.thumbnail-list {
    display: flex;
    justify-content: space-between;
    margin: 0 30px;
}
.thumbnail {
    width: 80px;
    height: 60px;
    border: 1px solid #ddd;
    cursor: pointer;
}
.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.thumbnail.active {
    border: 2px solid #e95c33;
}
.thumbnail-nav {
    position: absolute;
    width: 100%;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
}
.prev, .next {
    cursor: pointer;
    /*font-size: 20px;*/
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    /*width: 25px;*/
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
/* 产品信息区域 */
.product-info {
    margin-left: 30px;
    flex: 1;
}
.product-title {
    font-size: 24px;
    margin-bottom: 20px;
}
.product-desc {
    margin-bottom: 20px;
    line-height: 1.6;
}
.buy-btn {
    display: inline-block;
    background-color: #e95c33;
    color: white;
    padding: 8px 20px;
    text-decoration: none;
    border-radius: 4px;
}
/* 标签页样式 */
.tabs {
    margin-top: 30px;
    border-bottom: 1px solid #ddd;
}
.tab-nav {
    display: flex;
}
.tab-item {
    padding: 10px 20px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-bottom: none;
    margin-right: 5px;
    cursor: pointer;
}
.tab-item.active {
    background-color: #fff;
    border-bottom: 1px solid #fff;
    margin-bottom: -1px;
}
.tab-content {
    padding: 20px;
    border: 1px solid #ddd;
    /*border-top: none;*/
}
.tab-pane {
    display: none;
}
.tab-pane.active {
    display: block;
}
/* 技术参数表格 */
.tech-specs {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}
.tech-specs th, .tech-specs td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
}
.tech-specs th {
    background-color: #f5f5f5;
}
/* 在线留言 */
.contact-form {
    background-color: #f5f5f5;
    padding: 20px;
    margin-top: 30px;
}
.contact-form h3 {
    background-color: #666;
    color: white;
    padding: 10px;
    margin-bottom: 20px;
}
.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
}
.form-group textarea {
    height: 100px;
    resize: vertical;
}
.submit-btn {
    background-color: #e95c33;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
}
/* 相关推荐 */
.related-products {
    margin-top: 30px;
}
.related-products h3 {
    background-color: #666;
    color: white;
    padding: 10px;
    margin-bottom: 20px;
}
.product-list {
    /*display: flex;*/
    /*height: 260px;*/
    /*flex-wrap: wrap;*/
    /*justify-content: space-between;*/
}
.product-item {
    /*width: 23%;*/
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
    height: 260px;
}
.product-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    margin-bottom: 10px;
}
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #e95c33;
    color: white;
    width: 40px;
    height: 40px;
    text-align: center;
    line-height: 40px;
    border-radius: 4px;
    cursor: pointer;
}

/* 咨询弹窗样式 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}
.modal-container {
    background-color: #fff;
    width: 500px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    position: relative;
}
.modal-header {
    background-color: #e95c33;
    color: white;
    padding: 15px;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    position: relative;
}
.modal-title {
    margin: 0;
    font-size: 18px;
}
.modal-close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 20px;
    color: white;
    cursor: pointer;
}
.modal-body {
    padding: 20px;
}
.modal-form .form-group {
    margin-bottom: 15px;
}
.modal-form label {
    display: block;
    margin-bottom: 5px;
}
.modal-form input, .modal-form textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.modal-form textarea {
    height: 100px;
    resize: vertical;
}
.modal-form .required::after {
    content: " *";
    color: red;
}
.modal-footer {
    padding: 15px;
    text-align: center;
    border-top: 1px solid #ddd;
}
.modal-submit {
    background-color: #e95c33;
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}