/* 首页布局 */
.home-container {
    display: flex;
    max-width: 1450px;
    margin: 0 auto;
    padding: 20px 15px;
    gap: 20px;
}

/* Logo */
.custom-logo-link img {
    max-height: 50px;
    width: auto;
}

.custom-logo-link,
.top-header a {
    color: #fff;
    text-decoration: none;
}

/* 语言选择 */
.language-select {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    color: #fff;
}

.language-select select {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 5px 10px;
    border-radius: 4px;
    margin-left: 10px;
}

.language-select select option {
    background: #000;
    color: #fff;
}

/* 顶部搜索栏 */
.top-header {
    padding: 15px 0;
    background: #000;
    color: #fff;
}

/* 搜索框 */
.search-form {
    display: flex;
    align-items: center;
    max-width: 500px;
    margin: 0 auto;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
}

.search-form input[type="text"] {
    flex: 1;
    padding: 10px 15px;
    border: none;
    outline: none;
    font-size: 14px;
}

.search-form button {
    background: none;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-form button svg {
    width: 16px;
    height: 16px;
    fill: #666;
}

.search-form button:hover svg {
    fill: #fff;
}

/* 侧边栏菜单 */
.sidebar-menu {
    width: 250px;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: visible;
}

.categories-list {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}

.category-item {
    position: relative;
}

.category-item > a {
    display: block;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.category-item.has-children > a::after {
    content: '\F285';
    font-family: 'bootstrap-icons';
    font-size: 0.8em;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

.category-item:hover > a {
    background: #f8f9fa;
    color: #0056b3;
}

.category-item .submenu {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    width: 200px;
    background: #fff;
    border: 1px solid #eee;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.1);
    z-index: 100;
}

.category-item:hover .submenu {
    display: block;
}

.submenu-list {
    list-style: none;
    margin: 0;
    padding: 10px 0;
}

.submenu-list li a {
    display: block;
    padding: 8px 20px;
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}

.submenu-list li a:hover {
    color: #0056b3;
}

.category-item .submenu-wrapper {
    position: absolute;
    left: calc(100% - 1px);
    top: -1px;
    width: 220px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 0 4px 4px 0;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
    display: none;
    z-index: 100;
}

.category-item:hover > .submenu-wrapper {
    display: block;
    width: 100%;
    min-height: 100vh;
}

.submenu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.submenu-item {
    position: relative;
}

.submenu-item a {
    padding: 8px 15px;
    font-size: 0.95em;
    display: block;
    position: relative;
}

.submenu-item.has-children > a::after {
    content: '\F285';
    font-family: 'bootstrap-icons';
    font-size: 0.8em;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

.submenu-list-child {
    position: absolute;
    left: calc(100% - 1px);
    top: -1px;
    width: 220px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 0 4px 4px 0;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
    z-index: 101;
}

.submenu-item:hover > .submenu-list-child {
    display: block;
}

/* 主要内容区 */
.main-content {
    flex: 1;
    min-width: 0;
}

/* 轮播图 */
.banner-slider {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
}

.banner-slider {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
}

.banner-slider {
    margin-bottom: 30px;
    background: #f8f9fa;
}

.swiper {
    width: 100%;
    height: 600px;
}
/* 
.swiper-wrapper {
    width: 100%;
    height: 100%;
}

.swiper-slide {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.swiper-slide img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.swiper-slide {
    position: relative;
}
*/
.swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    text-align: center;
}

.swiper-slide img {
    object-fit: contain;
    display: block;
}

.swiper-slide .slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0));
    color: #fff;
    z-index: 1;
}

.slide-content h2 {
    font-size: 28px;
    margin: 0 0 10px;
    font-weight: 600;
}

.slide-content p {
    font-size: 16px;
    margin: 0;
    opacity: 0.9;
}

.swiper-button-prev,
.swiper-button-next {
    color: #fff;
    background: rgba(0,0,0,0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.swiper-button-prev:after,
.swiper-button-next:after {
    font-size: 18px;
}

.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: rgba(255,255,255,0.5);
}

.swiper-pagination-bullet-active {
    background: #fff;
}

/* 产品屗段样式 */
.products-sections {
    margin-top: 30px;
}

.products-showcase {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 24px;
    margin: 0;
}

.view-all {
    color: #0056b3;
    text-decoration: none;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

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

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    position: relative;
    width: 100%;
    height: 200px;
    background: #f8f9fa;
    overflow: hidden;
}

/* Homepage Featured Product Card Specific Styles */
.products-showcase .products-grid {
    align-items: stretch; /* Ensures cards in a row have the same height */
}

.product-card.front-page-item {
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensure card takes full height of grid cell */
    background: #fff; /* Ensure background is white if not already */
    border-radius: 8px; /* Consistent with other cards */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); /* Consistent shadow */
    overflow: hidden; /* Prevent content spill */
}

.product-card.front-page-item .product-link {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Link takes up available space */
    text-decoration: none;
    color: inherit;
}

.product-card.front-page-item .product-image {
    display: block;
    position: relative;
    padding-top: 75%; /* 4:3 Aspect Ratio. Adjust if images are different. */
    overflow: hidden;
    background-color: #f8f9fa; /* Placeholder background */
}

.product-card.front-page-item .product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Use 'contain' to see whole image, 'cover' to fill */
    padding: 10px; /* Optional padding inside the image container */
}

.product-card.front-page-item .product-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Info section takes remaining vertical space */
    padding: 15px;
    text-align: left;
}

.product-card.front-page-item .product-title {
    margin: 0 0 10px 0;
    font-size: 1rem; /* Or your preferred size */
    line-height: 1.4; /* Improved line height */
    font-weight: 600;
    color: #333;
    /* Optional: To limit title to a certain number of lines */
    /* display: -webkit-box;
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis; 
    min-height: 2.8em; /* Adjust based on font-size and line-height for 2 lines */
}

.product-card.front-page-item .product-title a {
    color: inherit;
    text-decoration: none;
}

.product-card.front-page-item .product-title a:hover {
    color: #0056b3; /* Standard link hover color */
}

.product-price {
    margin-top: auto; /* CRITICAL: Pushes price to the bottom */
    padding-top: 10px; /* Space between title/content and price */
    font-size: 1.1rem; /* Or your preferred size */
    font-weight: bold;
    color: #e53935; /* Price color from products.css */
}
.product-image a {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.product-image .product-img {
    max-width: 100%;
    max-height: 100%;
    height: auto;
    width: 100%;
    object-fit: contain;
    display: block;
}

.product-tags {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.tag {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #fff;
    background: rgba(0,0,0,0.5);
}

.tag.top-selling { background: #28a745; }
.tag.new-arrival { background: #007bff; }
.tag.featured { background: #ffc107; color: #000; }
.tag.hot-deal { background: #dc3545; }

.product-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-title {
    font-size: 18px;
    margin: 0 0 10px;
}

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

.product-excerpt {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.4;
}

.product-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-details,
.btn-quote {
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
    flex: 1;
    text-align: center;
    display: inline-block;
}

.btn-details {
    background: #0056b3;
    color: #fff;
}

.btn-quote {
    background: transparent;
    color: #0056b3;
    border: 1px solid #0056b3;
}

.btn-details:hover,
.btn-quote:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.products-showcase {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.section-title {
    font-size: 24px;
    color: #333;
    margin: 0;
}

.view-all {
    color: #0056b3;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.view-all:hover {
    color: #003d82;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* 产品卡片样式 */
.product-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

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

.product-image {
    position: relative;
    background: #f8f9fa;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-tags {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.product-tags .tag {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
}

.tag.top-selling { background-color: #e74c3c; }
.tag.new-arrival { background-color: #2ecc71; }
.tag.featured { background-color: #f1c40f; }
.tag.hot-deal { background-color: #9b59b6; }

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-title {
    font-size: 18px;
    margin: 0 0 10px;
    line-height: 1.4;
}

.product-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.product-title a:hover {
    color: #0056b3;
}

.product-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.product-actions {
    display: flex;
    gap: 10px;
}

.product-actions a {
    flex: 1;
    padding: 8px 15px;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-details {
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

.btn-details:hover {
    background-color: #e9ecef;
}

.btn-quote {
    background-color: #0056b3;
    color: #fff;
    border: 1px solid #0056b3;
}

.btn-quote:hover {
    background-color: #003d82;
    border-color: #003d82;
}

/* 联系我们区域 */
.contact-section {
    background: linear-gradient(135deg, #0056b3, #003d82);
    border-radius: 8px;
    padding: 40px;
    margin: 40px 0;
    color: #fff;
    text-align: center;
}

.contact-content h2 {
    font-size: 28px;
    margin: 0 0 15px;
}

.contact-content p {
    font-size: 16px;
    margin: 0 0 25px;
    opacity: 0.9;
}

.contact-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.contact-buttons .btn {
    padding: 12px 25px;
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-primary {
    background: #fff;
    color: #0056b3;
}

.btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.btn-outline {
    border: 2px solid #fff;
    color: #fff;
}

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 15px;
    }

    .contact-section {
        padding: 30px 20px;
    }

    .contact-buttons {
        flex-direction: column;
    }

    .contact-buttons .btn {
        width: 100%;
    }
}
