/* Base Wrapper */

.carousel-track {
    cursor: grab; /* default */
}

.carousel-track.dragging {
    cursor: grabbing; /* when dragging */
}

.elementor-4980 .elementor-element.elementor-element-14d47ceb .rating-text .stars {
    text-align: left;
}


.product-carousel-widget-wrapper {
    width: 100%;
    margin: 0 auto;
    padding: 3rem 0;
    position: relative;
    z-index: 1;
}

/* Header */
.product-carousel-header {
    text-align: center;
    margin-bottom: 3rem;
}
.product-carousel-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
    font-family: 'Poppins', sans-serif;
}
.product-carousel-subtitle {
    font-size: 1.125rem;
    color: #4b5563;
    max-width: 48rem;
    margin: 0 auto;
}

/* Carousel Container */
.carousel-container {
    position: relative;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}
.carousel-container.loaded {
    opacity: 1;
}
.carousel-track-wrapper {
    overflow: hidden;
    width: 100%;
}
.carousel-track {
    display: flex;
    align-items: center;
}
.carousel-item {
    flex: 0 0 66.666%;
    padding: 0 12px;
    box-sizing: border-box;
}

/* Card Styling */
.card-inner {
    background-color: #22B573;
    border-radius: 1rem;
    overflow: hidden;
    border: 8px solid #22B573;
    transition: all 0.5s ease;
    transform: scale(0.9);
    display: flex;
    flex-direction: column;
    filter: opacity(0.3);
}
.carousel-item.adjacent .card-inner,
.carousel-item.active .card-inner {
    filter: opacity(1);

}
.carousel-item.active .card-inner {
    border-color: #22B573;
    transform: scale(1);
    box-shadow: 0 0 25px rgba(56, 161, 105, 0.5);
}
.card-image-wrapper {
    aspect-ratio: 0.4/0.3;
    overflow: hidden;
    border-radius: 15px;
}
.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;

}
.card-title-bar {
    background-color: #22B573;
    color: #fff;
    text-align: center;
    font-weight: 700;
    padding: 2rem;
    font-size: 1.125rem;
}

/* Navigation and Footer */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 9999px;
    padding: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
    z-index: 10;
    cursor: pointer;
    border: none;
    display: none; /* Hidden by default, shown on desktop */
}
.carousel-btn.prev-btn { left: 0; }
.carousel-btn.next-btn { right: 0; }
.carousel-btn:hover { background-color: #fff; }
.carousel-btn-icon {
    height: 1.5rem;
    width: 1.5rem;
    color: #374151;
}
.carousel-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 2rem;
}
.pagination-dots {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}
.dot {
    height: 0.625rem;
    width: 0.625rem;
    border-radius: 9999px;
    background-color: #cbd5e0;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}
.dot.active {
    background-color: #38a169;
    width: 2rem;
}
.carousel-view-all-btn {
    background-color: #16a34a;
    color: #fff;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: background-color 0.3s ease;
}
.carousel-view-all-btn:hover {
    background-color: #15803d;
    color:#fff;
}
.carousel-btn-arrow {
    height: 1.25rem;
    width: 1.25rem;
}

/* Responsive */
@media (min-width: 1024px) {
    .carousel-item {
        flex-basis: 22%; /* Shows ~4.5 items */
    }
    .carousel-btn {
        display: block;
    }
}

/* ✅ Fix for mobile product image square layout */
@media (max-width: 768px) {
    
    .product-carousel-subtitle{
                padding: 0px 20px;
    }
  .card-image-wrapper {
    aspect-ratio: 1 / 1;
    overflow: hidden;
   height:auto !important;
}

.elementor-4980 .elementor-element.elementor-element-14d47ceb .rating-text .stars {
    text-align: center;
}

}
