/* Featured Products Widget Styles */

.wpb-featured-products-wrapper {
    position: relative;
    width: 100%;
    margin: 40px 0;
}

/* Grid Layout (<= 4 items) */
.wpb-featured-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center; /* Center if fewer than 4 */
}

.wpb-featured-grid .wpb-featured-card {
    flex: 0 0 calc(25% - 15px); /* 4 columns with gap */
    max-width: calc(25% - 15px);
}

@media (max-width: 991px) {
    .wpb-featured-grid .wpb-featured-card {
        flex: 0 0 calc(50% - 10px);
        max-width: calc(50% - 10px);
    }
}

@media (max-width: 767px) {
    .wpb-featured-grid .wpb-featured-card {
        flex: 0 0 100%;
        max-width: 100%;
    }
}


/* Card Styles */
.wpb-featured-card {
    background: #fff;
    box-shadow: 0 0 40px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    border-radius: 4px; /* Optional rounded corners */
    transition: transform 0.3s ease;
    padding-bottom: 0 !important; /* Force no padding at bottom */
}

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

.wpb-featured-image {
    width: 100%;
    height: 330px; /* Fixed height for consistency */
    overflow: hidden;
    background: #fff; /* Ensure white bg for contain */
}

.wpb-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.wpb-featured-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    text-align: center; /* Center text */
}

.wpb-featured-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #024576; /* Custom color */
}

.wpb-featured-abstract {
    font-size: 14px;
    line-height: 1.5;
    color: #024576; /* Custom color */
    margin-bottom: 20px;
    flex-grow: 1;
}

.wpb-featured-cta {
    display: block;
    width: 100%;
    padding: 15px 20px;
    text-align: center;
    background: linear-gradient(135deg, #014576 0%, #26949D 100%);
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    border: none;
    margin-top: auto; /* Push to bottom */
    margin-bottom: 0 !important; /* Ensure no bottom margin */
}

.wpb-featured-cta:hover {
    opacity: 0.9;
    color: #fff !important;
}

/* Swiper Override */
.swiper {
    overflow: visible !important;
}

.swiper-horizontal>.swiper-pagination-bullets, 
.swiper-pagination-bullets.swiper-pagination-horizontal, 
.swiper-pagination-custom, 
.swiper-pagination-fraction {
    bottom: -35px !important;
}

.swiper-slide {
    height: auto; /* Ensure equal height slides */
}
.swiper-slide .wpb-featured-card {
    height: 100%;
}

/* Pagination bullets color override */
.swiper-pagination-bullet-active {
    background: #014576 !important;
}
