/* WooCommerce Best Selling Carousel - Frontend Styles */

.wcbsc-container {
    max-width: 1660px;
    margin: 0 auto;
    padding: 40px 20px;
}

.wcbsc-section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 600;
    color: #262626;
    margin-bottom: 40px;
    letter-spacing: -0.5px;
}

/* Carousel Container */
.wcbsc-carousel-container {
    position: relative;
    padding: 0 100px;
    /* Increased from 60px for more gap */
    margin-bottom: 50px;
}

.wcbsc-carousel-wrapper {
    overflow: hidden;
    position: relative;
    width: 100%;
}

.wcbsc-carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: 24px;
}

/* Product Cards */
.wcbsc-product-card {
    background-color: white;
    border-radius: 16px;
    border: 1px solid #e8e8e8;
    /* Width is set dynamically by JavaScript based on items_per_view settings */
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex-shrink: 0;
    position: relative;
}

.wcbsc-product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

/* Gradient Badge at Top */
.wcbsc-product-badge {
    background: linear-gradient(135deg, #5a4a8f 0%, #e76f51 100%);
    color: white;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 8px 20px;
    display: block;
    text-align: center;
    margin: 0;
    border-radius: 0;
}

/* Badge color variations */
.wcbsc-product-card:nth-child(3n+1) .wcbsc-product-badge {
    background: linear-gradient(135deg, #5a4a8f 0%, #e76f51 100%);
}

.wcbsc-product-card:nth-child(3n+2) .wcbsc-product-badge {
    background: linear-gradient(135deg, #5a4a8f 0%, #e76f51 100%);
}

.wcbsc-product-card:nth-child(3n+3) .wcbsc-product-badge {
    background: linear-gradient(135deg, #5a4a8f 0%, #e76f51 100%);
}

.wcbsc-product-image-container {
    position: relative;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    background-color: #fafafa;
}

.wcbsc-product-image {
    max-width: 100%;
    max-height: 140px;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.wcbsc-image-swap-buttons {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
    padding: 0 20px;
}

.wcbsc-image-swap-button {
    width: 12px;
    height: 12px;
    border-radius: 50% !important;
    background-color: #d0d0d0;
    border: 2px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0 !important;
    min-width: 0 !important;
    display: inline-block;
}

.wcbsc-image-swap-button:hover {
    background-color: #a0a0a0;
    transform: scale(1.2);
}

.wcbsc-image-swap-button.active {
    background-color: #000;
    border-color: #000;
    transform: scale(1.4);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.wcbsc-product-info {
    padding: 24px 20px 20px;
    text-align: center;
}

.wcbsc-product-title {
    font-size: 16px;
    font-weight: 600;
    color: #d32323;
    margin-bottom: 12px;
    line-height: 1.4;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wcbsc-product-price {
    font-size: 28px;
    font-weight: 700;
    color: #000;
    margin-bottom: 16px;
}

.wcbsc-product-price del {
    font-size: 18px;
    color: #999;
    font-weight: 500;
    margin-right: 8px;
}

.wcbsc-product-description {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    min-height: 60px;
}

.wcbsc-color-selector {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wcbsc-color-options {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
    justify-content: center;
}

.wcbsc-color-option {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    position: relative;
    padding: 0 !important;
    /* Override Elementor but maintain button size */
    min-width: 32px !important;
    min-height: 32px !important;
}

.wcbsc-color-option:hover {
    transform: scale(1.1);
}

.wcbsc-color-option.active {
    border-color: #333;
    transform: scale(1.15);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

.wcbsc-color-option.active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
}

.wcbsc-color-name {
    font-size: 13px;
    color: #666;
    font-weight: 500;
    margin-bottom: 15px;
}

.wcbsc-product-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.wcbsc-buy-now-btn {
    background-color: #d32323;
    color: white;
    border: none;
    border-radius: 24px;
    padding: 12px 40px !important;
    /* Override Elementor theme */
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: capitalize;
    min-width: 140px;
}

.wcbsc-buy-now-btn:hover {
    background-color: #b91c1c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(211, 35, 35, 0.3);
}

.wcbsc-learn-more-link {
    text-align: center;
    color: #d32323;
    font-size: 14px;
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.3s ease;
}

.wcbsc-learn-more-link:hover {
    color: #b91c1c;
}

/* Carousel Navigation Arrows */
.wcbsc-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: white;
    border: 1px solid #e0e0e0;
    width: 50px !important;
    height: 50px !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    z-index: 10;
    padding: 0 !important;
    /* Override Elementor theme */
    min-width: 50px !important;
    min-height: 50px !important;
}

.wcbsc-carousel-arrow:hover {
    background-color: #f9f9f9;
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.wcbsc-carousel-arrow.wcbsc-left {
    left: 0;
}

.wcbsc-carousel-arrow.wcbsc-right {
    right: 0;
}

.wcbsc-carousel-arrow i {
    font-size: 20px;
    color: #333;
}

/* Carousel Dots */
.wcbsc-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.wcbsc-carousel-dots>button.wcbsc-carousel-dot {
    padding: 10px !important;
    border-radius: 50% !important;
}

.wcbsc-carousel-dot {
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    background-color: #ddd;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0 !important;
    min-width: 12px !important;
    min-height: 12px !important;
}

.wcbsc-carousel-dot:hover {
    background-color: #999;
    transform: scale(1.1);
}

.wcbsc-carousel-dot.active {
    background-color: #333 !important;
    transform: scale(1.4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Responsive Styles */
@media (min-width: 992px) {
    .wcbsc-product-card {
        min-width: calc(33.333% - 16px);
        max-width: calc(33.333% - 16px);
    }

    .wcbsc-carousel-track {
        gap: 24px;
    }
}

@media (max-width: 992px) {
    .wcbsc-product-card {
        min-width: calc(50% - 12px);
        /* Show 2 items on tablet */
        max-width: calc(50% - 12px);
    }
}

@media (max-width: 768px) {
    .wcbsc-carousel-container {
        padding: 0 70px;
        /* Increased gap for arrows */
    }

    .wcbsc-product-card {
        min-width: 100% !important;
        /* Show 1 full item on mobile */
        max-width: 100% !important;
    }

    .wcbsc-carousel-track {
        gap: 20px;
    }

    .wcbsc-carousel-arrow {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
    }

    .wcbsc-section-title {
        font-size: 28px;
        margin-bottom: 30px;
    }
}

@media (max-width: 576px) {
    .wcbsc-carousel-container {
        padding: 0 60px;
        /* More gap for small mobile */
    }

    .wcbsc-product-card {
        min-width: 100% !important;
        /* Ensure 1 full item */
        max-width: 100% !important;
    }

    .wcbsc-carousel-track {
        gap: 16px;
    }

    .wcbsc-product-image-container {
        height: 180px;
    }

    .wcbsc-product-info {
        padding: 20px 15px 15px;
    }

    .wcbsc-carousel-arrow {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        min-height: 36px !important;
    }
}

@media (max-width: 480px) {
    .wcbsc-container {
        padding: 15px;
    }

    .wcbsc-section-title {
        font-size: 24px;
    }

    .wcbsc-carousel-container {
        padding: 0 35px;
    }

    .wcbsc-carousel-arrow {
        width: 35px;
        height: 35px;
    }

    .wcbsc-carousel-arrow i {
        font-size: 16px;
    }
}

/* Loading State */
.wcbsc-product-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Success Message */
.wcbsc-success-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #4caf50;
    color: white;
    padding: 15px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}