/* ============================================
   WD Carousel Products Style - Similar to bonbonegy.com
   ============================================ */

/* Carousel Container */
.wd-carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-bottom: 2rem;
}

/* Spacing between multiple carousels */
.wd-carousel-container.mt-5 {
    margin-top: 3rem !important;
}

/* Navigation Arrows - Left and Right */
.wd-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    color: #333;
    font-size: 18px;
    opacity: 0.85;
    backdrop-filter: blur(10px);
    padding: 0;
    margin: 0;
    outline: none;
}

.wd-carousel-nav:hover {
    background: #fff;
    border-color: #007bff;
    color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
    opacity: 1;
}

.wd-carousel-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.wd-carousel-nav:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

/* Previous button (Right side for RTL) */
.wd-carousel-prev {
    right: 15px;
}

/* Next button (Left side for RTL) */
.wd-carousel-next {
    left: 15px;
}

.wd-carousel-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.wd-carousel-inner {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* Carousel Main */
.wd-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.wd-carousel-wrap {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* Carousel Items - Similar to bonbonegy.com */
.wd-carousel-item {
    flex-shrink: 0;
    padding: 0 5px; /* Gap 10px = 5px on each side */
    box-sizing: border-box;
}

/* Product Wrapper */
.product-wrapper {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Product Element Top */
.product-element-top {
    position: relative;
    margin-bottom: 10px;
}

.product-image-link {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #f8f9fa;
}

.product-thumb-info-image {
    position: relative;
    width: 100%;
    padding-top: 100%; /* Square aspect ratio */
    overflow: hidden;
    background: #f8f9fa;
}

.product-thumb-info-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-image-link:hover .product-thumb-info-image img {
    transform: scale(1.05);
}

/* Product Labels */
.product-labels {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.product-labels .attribute-label {
    display: inline-block;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}

/* Buttons - Top Right */
.wd-buttons {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 15;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.wd-wishlist-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.wd-wishlist-btn:hover {
    background: #fff;
    color: #e74c3c;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.wd-wishlist-btn span {
    position: absolute;
    left: -9999px;
    visibility: hidden;
}

.wd-wishlist-btn i {
    font-size: 16px;
}

/* Add to Cart Button - Shows on Hover */
.wd-add-btn {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0 10px 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 15;
}

.product-wrapper:hover .wd-add-btn {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.wd-add-btn .button,
.wd-add-btn .addtocart-btn-hover {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 16px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.wd-add-btn .button:hover,
.wd-add-btn .addtocart-btn-hover:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
    color: #fff;
}

/* Product Title */
.wd-entities-title,
.product-title {
    margin: 10px 0 5px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    min-height: 42px;
}

.wd-entities-title a,
.product-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wd-entities-title a:hover,
.product-title a:hover {
    color: #007bff;
}

/* Price */
.price {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
    flex-wrap: wrap;
}

.price .woocommerce-Price-amount,
.price .sale {
    font-size: 16px;
    font-weight: 600;
    color: #007bff;
}

.price .woocommerce-Price-amount.amount.text-muted {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

.price .woocommerce-Price-currencySymbol {
    font-size: 12px;
    margin-right: 2px;
}

/* Pagination Bullets - Similar to bonbonegy.com */
.wd-nav-pagin-wrap {
    margin-top: 24px;
    padding: 10px 0;
}

.wd-nav-pagin {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.wd-nav-pagin-item {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}

.wd-nav-pagin-item span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.wd-nav-pagin-item:hover {
    background: #bbb;
    transform: scale(1.2);
}

.wd-nav-pagin-item.wd-active {
    background: #007bff;
    width: 24px;
    border-radius: 4px;
}

/* Responsive - Desktop: 5 products (using CSS variables) */
@media (min-width: 1200px) {
    .wd-carousel {
        --wd-col-lg: 5;
        --wd-gap-lg: 10px;
    }
    
    .wd-carousel-item {
        width: calc((100% - (var(--wd-gap-lg) * 4)) / var(--wd-col-lg));
        min-width: calc((100% - (var(--wd-gap-lg) * 4)) / var(--wd-col-lg));
        max-width: calc((100% - (var(--wd-gap-lg) * 4)) / var(--wd-col-lg));
    }

    .wd-carousel-nav {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
}

/* Responsive - Tablet: 4 products */
@media (min-width: 768px) and (max-width: 1199px) {
    .wd-carousel {
        --wd-col-md: 4;
        --wd-gap-md: 10px;
    }
    
    .wd-carousel-item {
        width: calc((100% - (var(--wd-gap-md) * 3)) / var(--wd-col-md));
        min-width: calc((100% - (var(--wd-gap-md) * 3)) / var(--wd-col-md));
        max-width: calc((100% - (var(--wd-gap-md) * 3)) / var(--wd-col-md));
    }
}

/* Responsive - Mobile: 2 products */
@media (max-width: 767px) {
    .wd-carousel {
        --wd-col-sm: 2;
        --wd-gap-sm: 10px;
    }
    
    .wd-carousel-item {
        width: calc((100% - (var(--wd-gap-sm) * 1)) / var(--wd-col-sm));
        min-width: calc((100% - (var(--wd-gap-sm) * 1)) / var(--wd-col-sm));
        max-width: calc((100% - (var(--wd-gap-sm) * 1)) / var(--wd-col-sm));
    }

    .wd-nav-pagin-wrap.wd-hide-md-sm,
    .wd-nav-pagin-wrap.wd-hide-sm {
        display: none !important;
    }

    .wd-carousel-nav {
        width: 42px;
        height: 42px;
        font-size: 16px;
    }

    .wd-carousel-prev {
        right: 10px;
    }

    .wd-carousel-next {
        left: 10px;
    }
}

@media (max-width: 576px) {
    .wd-carousel-nav {
        width: 38px;
        height: 38px;
        font-size: 14px;
        opacity: 0.9;
    }

    .wd-carousel-prev {
        right: 8px;
    }

    .wd-carousel-next {
        left: 8px;
    }
}

/* Scroll per page behavior */
.wd-carousel[data-scroll_per_page="yes"] .wd-carousel-wrap {
    scroll-snap-type: x mandatory;
}

.wd-carousel-item {
    scroll-snap-align: start;
}

/* RTL Support */
.wd-rtl .wd-carousel-wrap {
    direction: rtl;
}

/* Animation */
.wd-carousel.wd-initialized {
    opacity: 1;
    visibility: visible;
}

/* Hide on mobile */
.wd-hide-md-sm {
    display: block;
}

.wd-hide-sm {
    display: block;
}

@media (max-width: 991px) {
    .wd-hide-md-sm {
        display: none !important;
    }
}

@media (max-width: 575px) {
    .wd-hide-sm {
        display: none !important;
    }
}

