// Breakpoints
$breakpoint-xs: 480px;
$breakpoint-sm: 576px;
$breakpoint-md: 768px;
$breakpoint-lg: 992px;
$breakpoint-xl: 1200px;

// Astra support for WCPS
html :where([style*=border-width]) {
    border-style: none;
}

/* -------------- AJAX Loading States -------------- */
.wcps-loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

/* Only apply the CSS loader to elements that don't have their own loading mechanism */
.wcps-loading:not(.wcps-ajax-add-to-cart):not(.wcps-compare-wishlist)::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4a6cf7;
    border-radius: 50%;
    animation: wcps-spin 1s linear infinite;
    z-index: 1000;
}

@keyframes wcps-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Filter active states */
.wcps-filter.active {
    background-color: #4a6cf7 !important;
    color: white !important;
}

.wcps-filter:hover {
    background-color: #3b5bdb !important;
    color: white !important;
}

/* No products message */
.wcps-no-products {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}





/* -------------- END -------------- */



/* -------------- Compare css  -------------- */

/* Compare Button */
.wcps-compare-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    background-color: #f7f7f7;
    border: 1px solid #ddd;
    color: #333;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.wcps-compare-button:hover {
    background-color: #ebebeb;
    border-color: #c8c8c8;
}

.wcps-compare-button.added,
.wcps-compare-button.in-compare {
    background-color: #f0f9ff;
    border-color: #90cdf4;
    color: #3182ce;
}

.wcps-compare-button .wcps-icon {
    margin-right: 5px;
}

.wcps-icon-compare::before {
    content: "\21C5";
    /* Unicode for up/down arrow */
}

.wcps-icon-close::before {
    content: "\00D7";
    /* Unicode for × character */
}

.wcps-compare-button.wcps-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Compare Bar */
.wcps-compare-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #fff;
    border-top: 1px solid #ddd;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.wcps-compare-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 15px;
}

.wcps-compare-bar-items {
    display: flex;
    overflow-x: auto;
    max-width: 75%;
    padding-right: 15px;
}

.wcps-compare-bar-item {
    flex: 0 0 auto;
    width: 100px;
    margin-right: 10px;
    text-align: center;
    position: relative;
}

.wcps-compare-bar-item-img {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 5px;
}

.wcps-compare-bar-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 1px solid #eee;
    border-radius: 4px;
}

.wcps-compare-bar-item-name {
    font-size: 12px;
    line-height: 1.2;
    max-height: 2.4em;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.wcps-compare-bar-item-remove {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background-color: #ff6b6b;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    z-index: 1;
}

.wcps-compare-bar-actions {
    display: flex;
    align-items: center;
}

.wcps-compare-bar-clear {
    background-color: transparent;
    border: 1px solid #ddd;
    color: #666;
    padding: 8px 12px;
    border-radius: 4px;
    margin-right: 10px;
    cursor: pointer;
}

.wcps-compare-view-button {
    background-color: #3182ce;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
}

/* Compare Modal */
.wcps-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.wcps-modal.wcps-modal-open {
    display: block;
    z-index: 100;
}

.wcps-modal-content {
    background-color: #fff;
    max-width: 90%;
    width: 1200px;
    margin: 30px auto;
    border-radius: 6px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    position: relative;
}

.wcps-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wcps-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.wcps-modal-close {
    font-size: 24px;
    cursor: pointer;
    color: #666;
    z-index: 10;
}

.wcps-modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.wcps-quickview-content.woocommerce {
    padding: 50px;
}

.wcps-loading-spinner {
    display: block;
    width: 40px;
    height: 40px;
    margin: 20px auto;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3182ce;
    border-radius: 50%;
    animation: wcps-spin 1s linear infinite;
}

@keyframes wcps-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Compare Table */
.wcps-compare-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #eee;
}

.wcps-compare-table th,
.wcps-compare-table td {
    padding: 12px 15px;
    text-align: left;
    border: 1px solid #eee;
    vertical-align: top;
}

.wcps-compare-table thead th {
    background-color: #f7f7f7;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1;
}

.wcps-compare-table tbody td:first-child {
    background-color: #f7f7f7;
    font-weight: 600;
    width: 150px;
}

.wcps-compare-product-title {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
}

.wcps-compare-remove {
    color: #ff6b6b;
    text-decoration: none;
    margin-left: 10px;
}

.wcps-compare-add-to-cart {
    display: inline-block;
    padding: 8px 12px;
    background-color: #3182ce;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    text-align: center;
}


/* Responsive */
@media (max-width: 768px) {
    .wcps-modal-content {
        width: 95%;
        margin: 15px auto;
    }

    .wcps-compare-bar-inner {
        flex-direction: column;
    }

    .wcps-compare-bar-items {
        max-width: 100%;
        padding-right: 0;
        margin-bottom: 10px;
    }

    .wcps-compare-table {
        display: block;
        overflow-x: auto;
    }
}

/* -------------- END  -------------- */
/* -------------- Quick view  -------------- */
/* Quickview Modal Styles */
.wcps-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    overflow-y: auto;
    padding: 20px;
}

.wcps-modal.open {
    display: flex;
    align-items: center;
    justify-content: center;
}

.wcps-modal-content {
    position: relative;
    background-color: #fff;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    animation: wcps-modal-in 0.3s ease-out;
}

@keyframes wcps-modal-in {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wcps-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s;
}

.wcps-modal-close:hover {
    color: #000;
}

.wcps-modal-body {
    padding: 35px;
    max-height: 80vh;
    overflow-y: auto;
}


.wcps-modal-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
    text-align: right;
}

/* Responsive Styles */
@media only screen and (max-width: 767px) {
    .wcps-quickview-wrapper {
        flex-direction: column;
    }

    .wcps-quickview-images,
    .wcps-quickview-summary {
        width: 100%;
    }

    .wcps-quickview-images {
        margin-bottom: 20px;
    }

    .wcps-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .wcps-quickview-summary h1 {
        font-size: 20px;
    }
}

/* -------------- End   -------------- */

/* -------------- Wish list   -------------- */
.wcps-wishlist-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 15px;
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    margin: 5px;
}

.wcps-wishlist-button:hover {
    background-color: #e5e5e5;
    color: #000;
}

.wcps-wishlist-button.in-wishlist,
.wcps-wishlist-button.added {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.wcps-wishlist-button.in-wishlist:hover,
.wcps-wishlist-button.added:hover {
    background-color: #f1c1c7;
}

.wcps-icon-heart {
    display: inline-block;
    margin-right: 5px;
    position: relative;
    width: 16px;
    height: 16px;
}

.wcps-icon-heart:before {
    // content: "♥";
    content: "♡";
    font-size: 16px;
    line-height: 1;
}



/* Wishlist products display */
.wcps-wishlist-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.wcps-wishlist-product {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    transition: all 0.3s ease;
}

.wcps-wishlist-product:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.wcps-wishlist-product-image {
    text-align: center;
    margin-bottom: 10px;
}

.wcps-wishlist-product-image img {
    max-width: 100%;
    height: auto;
}

.wcps-wishlist-product-title {
    font-size: 16px;
    margin: 0 0 10px;
}

.wcps-wishlist-product-price {
    font-weight: bold;
    margin-bottom: 10px;
}

.wcps-wishlist-product-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.wcps-wishlist-add-to-cart {
    background-color: #4CAF50;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
}

.wcps-wishlist-remove-item {
    color: #dc3545;
    text-decoration: none;
    font-size: 14px;
}

/* Loading animation */
.wcps-loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.wcps-loading:after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-top: -8px;
    margin-left: -8px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top-color: #333;
    animation: wcps-spin 0.8s infinite linear;
}

@keyframes wcps-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Wishlist counter */
.wcps-wishlist-count {
    display: inline-block;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 12px;
    line-height: 18px;
    text-align: center;
    margin-left: 5px;
}

/* Notification */
.wcps-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #4caf50;
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s, transform 0.3s;
}

.wcps-notification.wcps-notification-visible {
    opacity: 1;
    transform: translateY(0);
}

.wcps-notification.show {
    transform: translateY(0);
    opacity: 1;
}

.wcps-notification.error {
    background-color: #dc3545;
}

/* -------------- End   -------------- */

// Badge 
span.wcps-product-badge {
    font-size: 14px;
    font-weight: 600;
    text-transform: normal;
    text-align: center;
    word-break: break-all;
    letter-spacing: 0.4px;
    line-height: 1.2;
    list-style: none;
    -ms-flex-align: center;
    -ms-flex-pack: center;
    justify-content: center;
    border-radius: 20px 20px 20px 20px;
    padding: 5px 5px 5px 5px;
    margin-bottom: 10px;
    z-index: 2;
    background: var(--wcps-background, rgb(54, 182, 217));
    color: var(--wcps-price-delete-font-color, #fff);
    position: absolute;
    right: 5px;
    top: 5px;
}

/* Filters */
.wcps-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f7f7f7;
    border-radius: 4px;
}

.wcps-filter-sorting,
.wcps-filter-categories {
    margin-bottom: 10px;
}

.wcps-filter-sorting label,
.wcps-filter-categories label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.wcps-orderby {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
}

.wcps-category-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

.wcps-category-list li {
    margin: 0 5px 5px 0;
}

.wcps-category-list a {
    display: inline-block;
    padding: 5px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
}

.wcps-category-list a:hover,
.wcps-category-list a.active {
    background-color: var(--wcps-product-title, #0170B9);
    color: #fff;
    border-color: var(--wcps-product-title, #0170B9);
}

// Tag, Brands, Attributes filter 
// Filter Component Styles
.wcps-filter-brands,
.wcps-filter-tags {
    margin-bottom: 1.5rem;

    label {
        display: block;
        font-weight: 600;
        font-size: 1rem;
        color: #333;
        margin-bottom: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
}

// Brand and Tag Lists
.wcps-brand-list,
.wcps-tag-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;

    li {
        margin: 0;

        a {
            display: inline-block;
            padding: 0.5rem 1rem;
            text-decoration: none;
            color: #666;
            background-color: #f8f9fa;
            border: 1px solid #e9ecef;
            border-radius: 0.375rem;
            font-size: 0.875rem;
            font-weight: 500;
            transition: all 0.2s ease-in-out;
            white-space: nowrap;

            &:hover {
                color: #333;
                background-color: #e9ecef;
                border-color: #dee2e6;
                transform: translateY(-1px);
            }

            &.active {
                color: #fff;
                background-color: #007bff;
                border-color: #007bff;

                &:hover {
                    background-color: #0056b3;
                    border-color: #0056b3;
                }
            }

            &:focus {
                outline: none;
                box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
            }
        }
    }
}

// Responsive Design
@media (max-width: 768px) {

    .wcps-filter-brands,
    .wcps-filter-tags {
        margin-bottom: 1rem;

        label {
            font-size: 0.875rem;
            margin-bottom: 0.5rem;
        }
    }

    .wcps-brand-list,
    .wcps-tag-list {
        gap: 0.375rem;

        li a {
            padding: 0.375rem 0.75rem;
            font-size: 0.8125rem;
        }
    }
}

// Alternative Compact Layout
.wcps-filters-compact {

    .wcps-filter-brands,
    .wcps-filter-tags {
        display: inline-block;
        margin-right: 2rem;
        margin-bottom: 1rem;

        label {
            display: inline-block;
            margin-right: 0.75rem;
            margin-bottom: 0;
            vertical-align: middle;
        }
    }

    .wcps-brand-list,
    .wcps-tag-list {
        display: inline-flex;
        vertical-align: middle;
    }
}

// Dark Theme Variant
.wcps-filters-dark {

    .wcps-filter-brands,
    .wcps-filter-tags {
        label {
            color: #e9ecef;
        }
    }

    .wcps-brand-list,
    .wcps-tag-list {
        li a {
            color: #adb5bd;
            background-color: #343a40;
            border-color: #495057;

            &:hover {
                color: #f8f9fa;
                background-color: #495057;
                border-color: #6c757d;
            }

            &.active {
                color: #fff;
                background-color: #007bff;
                border-color: #007bff;

                &:hover {
                    background-color: #0056b3;
                    border-color: #0056b3;
                }
            }
        }
    }
}


// Global Pagination 
.wcps-pagination {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
    padding: 1rem 0;

    ul.page-numbers {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        list-style: none;
        margin: 0;
        padding: 0;

        li {
            display: inline-flex;

            .page-numbers {
                display: inline-flex;
                align-items: center;
                justify-content: center;
                min-width: 2.5rem;
                height: 2.5rem;
                padding: 0.5rem 0.75rem;
                font-size: 0.875rem;
                font-weight: 500;
                text-decoration: none;
                color: #374151;
                background-color: #ffffff;
                border: 1px solid #d1d5db;
                border-radius: 0.375rem;
                transition: all 0.2s ease-in-out;
                cursor: pointer;

                &:hover {
                    background-color: #f9fafb;
                    border-color: #9ca3af;
                    color: #111827;
                    transform: translateY(-1px);
                    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
                }

                &:active {
                    transform: translateY(0);
                    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
                }

                &:focus {
                    outline: none;
                    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
                    border-color: #3b82f6;
                }

                &.current {
                    background-color: #3b82f6;
                    border-color: #3b82f6;
                    color: #ffffff;
                    font-weight: 600;
                    cursor: default;
                    pointer-events: none;

                    &:hover {
                        background-color: #3b82f6;
                        transform: none;
                        box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
                    }
                }

                &.dots {
                    border: none;
                    background: none;
                    color: #6b7280;
                    cursor: default;
                    pointer-events: none;
                    font-weight: 500;

                    &:hover {
                        background: none;
                        transform: none;
                        box-shadow: none;
                    }
                }

                &.next,
                &.prev {
                    font-size: 1rem;
                    font-weight: 600;
                    padding: 0.5rem 1rem;

                    &:hover {
                        background-color: #eff6ff;
                        border-color: #3b82f6;
                        color: #3b82f6;
                    }
                }
            }

            // Handle span elements (current page and dots)
            span.page-numbers {
                display: inline-flex;
                align-items: center;
                justify-content: center;
                min-width: 2.5rem;
                height: 2.5rem;
                padding: 0.5rem 0.75rem;
                font-size: 0.875rem;
                font-weight: 500;
                border-radius: 0.375rem;

                &.current {
                    background-color: #3b82f6;
                    color: #ffffff;
                    font-weight: 600;
                    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
                }

                &.dots {
                    color: #6b7280;
                    font-weight: 500;
                    background: none;
                }
            }
        }
    }
}

// Responsive design
@media (max-width: 768px) {
    .wcps-pagination {
        margin: 1.5rem 0;
        padding: 0.75rem 0;

        ul.page-numbers {
            gap: 0.25rem;
            flex-wrap: wrap;
            justify-content: center;

            li {
                .page-numbers {
                    min-width: 2.25rem;
                    height: 2.25rem;
                    padding: 0.375rem 0.5rem;
                    font-size: 0.8rem;

                    &.next,
                    &.prev {
                        padding: 0.375rem 0.75rem;
                    }
                }

                span.page-numbers {
                    min-width: 2.25rem;
                    height: 2.25rem;
                    padding: 0.375rem 0.5rem;
                    font-size: 0.8rem;
                }
            }
        }
    }
}

@media (max-width: 480px) {
    .wcps-pagination {
        ul.page-numbers {
            gap: 0.125rem;

            li {
                .page-numbers {
                    min-width: 2rem;
                    height: 2rem;
                    padding: 0.25rem 0.375rem;
                    font-size: 0.75rem;
                }

                span.page-numbers {
                    min-width: 2rem;
                    height: 2rem;
                    padding: 0.25rem 0.375rem;
                    font-size: 0.75rem;
                }
            }
        }
    }
}

// Dark mode support (optional)
@media (prefers-color-scheme: dark) {
    .wcps-pagination {
        ul.page-numbers {
            li {
                .page-numbers {
                    color: #e5e7eb;
                    background-color: #374151;
                    border-color: #4b5563;

                    &:hover {
                        background-color: #4b5563;
                        border-color: #6b7280;
                        color: #f9fafb;
                    }

                    &.current {
                        background-color: #3b82f6;
                        border-color: #3b82f6;
                        color: #ffffff;
                    }

                    &.dots {
                        color: #9ca3af;
                    }

                    &.next,
                    &.prev {
                        &:hover {
                            background-color: #1e3a8a;
                            border-color: #3b82f6;
                            color: #93c5fd;
                        }
                    }
                }

                span.page-numbers {
                    &.current {
                        background-color: #3b82f6;
                        color: #ffffff;
                    }

                    &.dots {
                        color: #9ca3af;
                    }
                }
            }
        }
    }
}

// END 
/* ------------ Pagination & Filters -------------- */
// Pagination styles
.wcps-pagination {
    margin: 30px 0;
    text-align: center;

    .page-numbers {
        display: inline-flex;
        list-style: none;
        margin: 0;
        padding: 0;
        gap: 5px;

        li {
            margin: 0;

            a,
            span {
                display: inline-block;
                padding: 8px 12px;
                background: #f5f5f5;
                color: #333;
                text-decoration: none;
                border-radius: 4px;
                transition: all 0.3s ease;
                border: 1px solid #ddd;

                &:hover {
                    background: #4a6cf7;
                    color: white;
                    border-color: #4a6cf7;
                }
            }

            &.current span {
                background: #4a6cf7;
                color: white;
                border-color: #4a6cf7;
            }
        }
    }
}

// Filter styles
.wcps-filters {
    margin-bottom: 20px;
    text-align: center;

    .wcps-filter {
        display: inline-block;
        padding: 8px 16px;
        background: #f5f5f5;
        color: #333;
        text-decoration: none;
        border-radius: 4px;
        transition: all 0.3s ease;
        border: 1px solid #ddd;
        margin: 0 5px 5px 0;

        &:hover {
            background: #4a6cf7;
            color: white;
            border-color: #4a6cf7;
        }

        &.active {
            background: #4a6cf7;
            color: white;
            border-color: #4a6cf7;
        }
    }
}

// Loading state
.wcps-loading {
    position: relative;
    opacity: 0.6;

    &::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 40px;
        height: 40px;
        margin: -20px 0 0 -20px;
        border: 3px solid #f3f3f3;
        border-top: 3px solid #4a6cf7;
        border-radius: 50%;
        animation: spin 1s linear infinite;
        z-index: 10;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}
/* ------------ Compare Modal Styles -------------- */
.wcps-compare-modal-content {
    max-width: 95vw;
    max-height: 90vh;
    overflow: auto;
}

.wcps-compare-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 14px;

    th, td {
        padding: 15px 10px;
        text-align: center;
        border: 1px solid #e0e0e0;
        vertical-align: top;
        position: relative;
    }

    th {
        background-color: #f8f9fa;
        font-weight: 600;
        color: #333;

        .wcps-compare-product-title {
            display: block;
            color: #333;
            text-decoration: none;
            font-weight: 600;
            margin-bottom: 5px;

            &:hover {
                color: #4a6cf7;
            }
        }

        .wcps-compare-remove {
            position: absolute;
            top: 5px;
            right: 5px;
            width: 20px;
            height: 20px;
            background: #ff4757;
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            text-decoration: none;
            font-size: 12px;
            line-height: 1;

            &:hover {
                background: #ff3742;
            }
        }
    }

    td:first-child {
        background-color: #f8f9fa;
        font-weight: 600;
        text-align: left;
        min-width: 120px;
    }

    img {
        max-width: 80px;
        height: auto;
        border-radius: 4px;
    }

    .wcps-compare-actions {
        display: flex;
        flex-direction: column;
        gap: 8px;
        align-items: center;

        .button {
            min-width: 120px;
            padding: 8px 12px;
            border-radius: 4px;
            font-size: 12px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
            border: 1px solid #ddd;
            background: #fff;
            color: #333;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 5px;

            &:hover {
                background: #f8f9fa;
                border-color: #4a6cf7;
            }

            &.wcps-ajax-add-to-cart {
                background: #4a6cf7;
                color: white;
                border-color: #4a6cf7;

                &:hover {
                    background: #3d5af1;
                }

                &.wcps-loading {
                    opacity: 0.7;
                    pointer-events: none;
                }

                &.wcps-added {
                    background: #2ed573;
                    border-color: #2ed573;
                }

                &:disabled {
                    background: #ccc;
                    border-color: #ccc;
                    cursor: not-allowed;
                }
            }

            &.wcps-view-cart-btn {
                background: #28a745;
                color: white;
                border-color: #28a745;

                &:hover {
                    background: #218838;
                    border-color: #1e7e34;
                }

                .wcps-icon {
                    font-size: 14px;
                }
            }

            &.wcps-compare-wishlist {
                background: #ff6b6b;
                color: white;
                border-color: #ff6b6b;

                &:hover {
                    background: #ff5252;
                }

                &.in-wishlist {
                    background: #2ed573;
                    border-color: #2ed573;

                    &:hover {
                        background: #26d0ce;
                    }
                }

                .wcps-icon {
                    font-size: 14px;
                }
            }

            .wcps-icon {
                font-size: 14px;
            }
        }
    }
}

/* Responsive Compare Table */
@media (max-width: $breakpoint-md) {
    .wcps-compare-modal-content {
        max-width: 98vw;
        padding: 10px;
    }

    .wcps-compare-table {
        font-size: 12px;

        th, td {
            padding: 8px 5px;
        }

        img {
            max-width: 60px;
        }

        .wcps-compare-actions .button {
            min-width: 100px;
            padding: 6px 8px;
            font-size: 11px;
        }
    }
}

@media (max-width: $breakpoint-sm) {
    .wcps-compare-table {
        th, td {
            padding: 5px 3px;
        }

        .wcps-compare-actions {
            gap: 5px;

            .button {
                min-width: 80px;
                padding: 5px 6px;
                font-size: 10px;
            }
        }
    }
}

/* -------------- Notification Styles -------------- */
.wcps-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 4px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);

    &.wcps-notification-success {
        background: #2ed573;
    }

    &.wcps-notification-error {
        background: #ff4757;
    }

    &.wcps-notification-show {
        transform: translateX(0);
    }
}

@media (max-width: $breakpoint-sm) {
    .wcps-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100%);

        &.wcps-notification-show {
            transform: translateY(0);
        }
    }
}