/**
 * 产品轮播组件样式 - Swiper 版本
 */

.ecw-product-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.ecw-product-carousel .swiper-wrapper {
    display: flex;
}

.ecw-product-carousel .swiper-slide {
    width: 100%;
    flex-shrink: 0;
}

.ecw-product-layout {
    display: flex;
    align-items: center;
    gap: 40px;
    background: #FAFAFA;
}

/* 左侧区域（图片+按钮） - 方向感知悬停效果 */
.ecw-product-left {
    flex: 0 0 50%;
    max-width: 50%;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.ecw-product-image {
    width: 100%;
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
}

.ecw-product-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    transform: scale(1.15);
    transition: transform 0.4s ease;
}

/* 方向感知 - 从上 */
.ecw-product-left.direction-top .ecw-product-image img {
    transform: scale(1.15) translateY(15px);
}

/* 方向感知 - 从下 */
.ecw-product-left.direction-bottom .ecw-product-image img {
    transform: scale(1.15) translateY(-15px);
}

/* 方向感知 - 从左 */
.ecw-product-left.direction-left .ecw-product-image img {
    transform: scale(1.15) translateX(15px);
}

/* 方向感知 - 从右 */
.ecw-product-left.direction-right .ecw-product-image img {
    transform: scale(1.15) translateX(-15px);
}

.ecw-product-button {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-block;
    padding: 0;
    background: transparent;
    color: #FFF;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.5s ease;
    text-transform: uppercase;
    z-index: 10;
}

.ecw-product-button::after {
    content: '';
    display: block;
    width: 100%;
    transform: scale(0);
    height: 2px;
    transition: all 0.5s ease;
    background-color: currentColor;
}

.ecw-product-button:hover {
    color: #fff;
}

.ecw-product-left:hover .ecw-product-button::after{
    transform: scale(1);
}

/* 右侧信息 */
.ecw-product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.ecw-product-top-text {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 60px;
    letter-spacing: 1px;
    display: inline-block;
}

.ecw-product-image-small {
    width: 130px;
    margin-bottom: 12px;
}

.ecw-product-image-small img {
    width: 100%;
    height: auto;
    display: block;
}

.ecw-product-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin: 20px 0;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

/* 当没有设置渐变时，使用纯色 */
.ecw-product-title:not([style*="background"]) {
    -webkit-text-fill-color: currentColor !important;
}

/* Swiper 分页器样式 - 显示在标题下面 */
.ecw-product-pagination {
    display: flex;
    justify-content: center;
    gap: 0px;
    margin-top: 20px;
}

.ecw-product-pagination .swiper-pagination-bullet {
    width: 70px;
    height: 2px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0;
    opacity: 1;
    transition: background 0.3s ease;
    margin: 0 !important;
}

.ecw-product-pagination .swiper-pagination-bullet-active {
    background: #000;
}

.ecw-product-pagination .swiper-pagination-bullet:hover {
    background: #222;
}

/* 移除旧的分页器样式 */
.ecw-product-carousel .swiper-pagination {
    display: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .ecw-product-layout {
        flex-direction: column;
        padding: 20px;
        gap: 20px;
    }
    
    .ecw-product-left {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .ecw-product-top-text {
        font-size: 22px;
        margin-bottom: 36px;
    }
    
    .ecw-product-image-small {
        width: 150px;
    }
    
    .ecw-product-title {
        font-size: 24px;
        margin: 24px 0 48px;
    }
}


/* 产品 */
.ecw-product-button {
	text-transform: capitalize;
}
@media(max-width: 768px) {
	div.elementor-element.mobile-full-width > div.e-con-inner{
		width: 100%; 
	}
	.swiper-slide .ecw-product-layout {
		padding: 0;
        gap: 0;
	}
	.ecw-product-layout .ecw-product-left {
		border-radius: 0;
	}
	.ecw-product-layout .ecw-product-left .ecw-product-image{
		max-height: 310px;
	}
	.ecw-product-layout .ecw-product-left .ecw-product-image img {
		transform: scale(1) translatey(-16%);
		border-radius: 0;
	}
	.ecw-product-button {
		bottom: 32px;
		font-size: 13px;
		font-weight: 500;
	}
	.ecw-product-button::after {
		transform: scale(1);
		height: 1.5px;
	}
	.ecw-product-image-small {
		width: 38%;
        margin-bottom: 0;
	}
    .ecw-product-pagination {
        margin-top: 0;
    }
    .ecw-product-pagination .swiper-pagination-bullet {
        width: 36px;
        height: 1px;
    }
    .ecw-product-info {
        padding: 48px 0;
    }
}