/* Custom Product Carousel Widget Styles */
.xtrain-product-carousel-widget {
    padding: 60px 0;
    width: 100%;
    max-width: 100%;
}

.xtrain-section-header {
    text-align: left;
    margin-bottom: 40px;
}
.xtrain-section-header h2 {
    font-size: 36px;
    font-weight: 800;
    color: #0b1120;
    margin: 0;
}
.xtrain-section-subtitle {
    font-size: 16px;
    color: #666;
    margin-top: 10px;
    margin-bottom: 0;
}

body.rtl .xtrain-section-header {
    text-align: right;
}

/* Slider */
.xtrain-product-carousel {
    padding-bottom: 50px; /* Space for pagination/scrollbar if needed */
    overflow: hidden;
}

.xtrain-product-carousel .swiper-wrapper {
    display: flex;
}

.xtrain-product-carousel .swiper-slide {
    height: auto;
    display: flex;
}

/* Card Design */
.xtrain-product-card {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.xtrain-product-card:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}

.xtrain-product-image {
    position: relative;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    background-color: #f9f9f9;
    overflow: hidden;
}

.xtrain-product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Or cover depending on pref */
    transition: transform 0.5s ease;
}

.xtrain-product-card:hover .xtrain-product-image img {
    transform: scale(1.05); /* Zoom effect */
}

/* Badge */
.xtrain-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #ff4757;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 4px;
    z-index: 2;
}
body.rtl .xtrain-badge {
    left: auto;
    right: 10px;
}

/* Actions Overlay (Add to Cart) */
.xtrain-product-actions {
    position: absolute;
    bottom: -50px; 
    left: 0;
    width: 100%;
    background: rgba(255,255,255,0.9);
    padding: 10px;
    display: flex;
    justify-content: center;
    transition: bottom 0.3s ease;
    z-index: 3;
}
.xtrain-product-card:hover .xtrain-product-actions {
    bottom: 0;
}
.xtrain-product-actions .button {
    width: 100%;
    text-align: center;
    background-color: #0b1120;
    color: #fff !important;
    padding: 8px 0;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
}
.xtrain-product-actions .button:hover {
    background-color: #1a253a;
}

/* Details */
.xtrain-product-details {
    padding: 20px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.xtrain-product-title {
    font-size: 16px;
    margin: 0 0 10px;
    line-height: 1.4;
}

.xtrain-product-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}
.xtrain-product-title a:hover {
    color: #0b1120;
}

.xtrain-product-price {
    font-weight: 700;
    color: #0b1120;
    font-size: 18px;
}
.xtrain-product-price del {
    color: #aaa;
    font-size: 14px;
    margin-right: 5px;
    font-weight: 400;
}
body.rtl .xtrain-product-price del {
    margin-right: 0;
    margin-left: 5px;
}
@media (max-width: 768px) {
    .xtrain-product-carousel-widget {
        padding: 40px 15px;
    }
    .xtrain-section-header h2 {
        font-size: 28px;
    }
}

@media (max-width: 576px) {
    .xtrain-section-header h2 {
        font-size: 24px;
    }
    .xtrain-product-details {
        padding: 15px;
    }
    .xtrain-product-title {
        font-size: 14px;
    }
    .xtrain-product-price {
        font-size: 16px;
    }
}
