/**
 * Product Category Filter for Elementor
 * Complete CSS
 * Version: 1.0.0
 */

/* =========================================================
   MAIN WIDGET
   ========================================================= */

.product-filter-widget {
    width: 100%;
    position: relative;
}
.product-filter-widget *,
.product-filter-widget *::before,
.product-filter-widget *::after {
    box-sizing: initial !important;
}



/* =========================================================
   CATEGORY SECTION
   ========================================================= */

.product-filter-categories {
    width: 100%;
    margin: 0 0 30px;
}

.categories-wrapper {
    width: 100%;
}

.category-list {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}


/* =========================================================
   CATEGORY ITEM
   ========================================================= */

.category-item {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0;
}

.category-item > a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0px;
    border: 1px solid #e5e5e5;
    color: #333333;
    text-decoration: none;
    cursor: pointer;
    transition:
        background-color 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s ease;
}

.category-item > a:hover {
    color: #222222;
    border-color: #d5d5d5;
    transform: translateY(-1px);
}



/* =========================================================
   CATEGORY IMAGE
   ========================================================= */

.category-image {
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
}

.category-image img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}


/* =========================================================
   CATEGORY NAME
   ========================================================= */

.category-name {
    display: inline-block;
    line-height: 1.4;
    font-size: 15px;
    font-weight: 600;
	text-decoration: none;
}

.category-count {
    display: inline-block;
    font-size: 13px;
    line-height: 1.4;
    opacity: 0.75;
}


/* =========================================================
   CATEGORY DROPDOWN
   ========================================================= */

.category-dropdown-wrapper {
    width: 100%;
    margin-bottom: 25px;
}

.category-dropdown {
    width: 100%;
    min-height: 46px;
    padding: 10px 40px 10px 14px;

    border: 1px solid #dddddd;
    border-radius: 6px;

    background-color: #ffffff;
    color: #333333;

    font-size: 15px;
    cursor: pointer;
}


/* =========================================================
   SUBCATEGORY SECTION
   ========================================================= */

.subcategories-wrapper {
    display: none;
    width: 100%;
    margin: 0 0 30px;
}

.subcategory-list-horizontal {
    width: 100%;
}

.product-subcategories {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.subcategory-item {
    display: block;
    margin: 0;
    padding: 0;
    list-style: none;
}

.subcategory-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 14px;
    border: 1px solid #e2e2e2;
    border-radius: 6px;
    color: #444444;
    font-size: 14px;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
    transition:
        background-color 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease;
}

.subcategory-link:hover {
    border-color: #cccccc;
    color: #222222;
}

.subcategory-name {
    display: inline-block;
}

.subcategory-link .category-count {
    font-size: 12px;
}


/* =========================================================
   PRODUCTS AREA
   ========================================================= */

.products-container {
    width: 100%;
    position: relative;
}

.products-grid {
    width: 100%;
    min-height: 100px;
    position: relative;
}


/*
 * IMPORTANT:
 * AJAX returns .products-grid-inner.
 */

.products-grid-inner {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 25px;
    margin: 0;
    padding: 36px;
    opacity: 1;
    transition: opacity 0.3s ease;
}


/* =========================================================
   RESPONSIVE GRID CLASSES
   ========================================================= */

.products-grid-inner.cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.products-grid-inner.cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.products-grid-inner.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.products-grid-inner.cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.products-grid-inner.cols-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.products-grid-inner.cols-6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}


/* =========================================================
   PRODUCT ITEM
   ========================================================= */

.product-item {
    position: relative;

    width: 100%;
    min-width: 0;

    overflow: hidden;

    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 10px;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;

    opacity: 1;
}

.product-item:hover {
    transform: translateY(-4px);

    border-color: #e2e2e2;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.08);
}


/* =========================================================
   PRODUCT LINK
   ========================================================= */

.product-link {
    display: block;

    width: 100%;

    color: inherit;
    text-decoration: none;
}

.product-link:hover {
    color: inherit;
    text-decoration: none;
}


/* =========================================================
   PRODUCT THUMBNAIL
   ========================================================= */

.product-thumbnail {
    position: relative;

    width: 100%;

    overflow: hidden;

    background: #f7f7f7;

    aspect-ratio: 1 / 1;
}

.product-thumbnail img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    margin: 0;

    transition:
        transform 0.4s ease;
}

.product-item:hover .product-thumbnail img {
    transform: scale(1.04);
}


/* =========================================================
   SALE BADGE
   ========================================================= */

.sale-badge {
    position: absolute;

    top: 12px;
    left: 12px;

    z-index: 2;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 9px;
    border-radius: 4px;
    background: #d62828;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}


/* =========================================================
   PRODUCT TITLE
   ========================================================= */

.product-title {
    margin: 15px 15px 8px;
    color: #222222;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* =========================================================
   PRODUCT RATING
   ========================================================= */

.product-rating {
    margin: 0 15px 7px;
    min-height: 18px;
}

.product-rating .star-rating {
    margin: 0;
}

.product-rating .star-rating::before {
    color: #cccccc;
}

.product-rating .star-rating span::before {
    color: #f5a623;
}


/* =========================================================
   PRODUCT PRICE
   ========================================================= */

.product-price {
    margin: 0 15px 15px;
    color: #222222;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
}

.product-price del {
    margin-right: 5px;
    color: #999999;
    font-size: 14px;
    font-weight: 400;
}

.product-price ins {
    color: #d62828;
    text-decoration: none;
}


/* =========================================================
   PRODUCT ACTIONS
   ========================================================= */

.product-actions {
    display: flex;
    width: 80%;
    padding: 15px;
}

.add-to-cart-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 7px;

    width: 100%;

    min-height: 42px;

    padding: 9px 14px;

    border: 1px solid #222222;
    border-radius: 6px;

    background: #222222;
    color: #ffffff;

    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;

    text-align: center;
    text-decoration: none;

    cursor: pointer;

    transition:
        background-color 0.25s ease,
        border-color 0.25s ease,
        opacity 0.25s ease;
}

.add-to-cart-button:hover {
    background: #000000;
    border-color: #000000;
    color: #ffffff;
    text-decoration: none;
}

.add-to-cart-button.loading {
    cursor: wait;
    opacity: 0.7;
}

.add-to-cart-button.added {
    background: #198754;
    border-color: #198754;
}

.add-to-cart-button:disabled {
    cursor: not-allowed;
}
.product-filter-widget .customize-product-button,
.product-filter-widget .select-options-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 60px;
    box-sizing: border-box;
    text-decoration: none;
    cursor: pointer;
}

.product-filter-widget .customize-product-button:hover,
.product-filter-widget .select-options-button:hover {
    text-decoration: none;
    opacity: 0.9;
}

/* =========================================================
   OUT OF STOCK
   ========================================================= */

.out-of-stock {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 100%;

    min-height: 42px;

    padding: 9px 14px;

    border: 1px solid #dddddd;
    border-radius: 6px;

    background: #f5f5f5;
    color: #777777;

    font-size: 14px;
    font-weight: 600;
}


/* =========================================================
   LOADING
   ========================================================= */

.products-grid.loading {
    pointer-events: none;
}

.products-grid.loading .products-grid-inner {
    opacity: 0.35;
}

.loading-spinner {
    display: none;

    position: absolute;

    top: 50%;
    left: 50%;

    z-index: 20;

    transform: translate(-50%, -50%);

    padding: 15px;
}

.spinner {
    width: 40px;
    height: 40px;

    border: 4px solid #eeeeee;
    border-top-color: #222222;

    border-radius: 50%;

    animation:
        productFilterSpin 0.8s linear infinite;
}

@keyframes productFilterSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}


/* =========================================================
   NO PRODUCTS
   ========================================================= */

.no-products {
    display: flex;

    flex-direction: column;
    align-items: center;
    justify-content: center;

    width: 100%;

    min-height: 250px;

    padding: 40px 20px;

    border: 1px dashed #dddddd;
    border-radius: 8px;

    background: #fafafa;

    text-align: center;
}

.no-products i {
    margin-bottom: 15px;

    color: #999999;

    font-size: 40px;
}

.no-products p {
    margin: 0;

    color: #666666;

    font-size: 16px;
}


/* =========================================================
   ERROR
   ========================================================= */

.error-message {
    display: flex;

    flex-direction: column;
    align-items: center;
    justify-content: center;

    width: 100%;

    min-height: 250px;

    padding: 40px 20px;

    border: 1px solid #f0d0d0;
    border-radius: 8px;

    background: #fff7f7;

    text-align: center;
}

.error-message i {
    margin-bottom: 12px;

    color: #d62828;

    font-size: 38px;
}

.error-message p {
    margin: 0 0 20px;

    color: #555555;

    font-size: 15px;
}

.retry-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 40px;

    padding: 8px 18px;

    border: 0;
    border-radius: 6px;

    background: #222222;
    color: #ffffff;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background-color 0.25s ease;
}

.retry-button:hover {
    background: #000000;
}


/* =========================================================
   PAGINATION
   ========================================================= */

.pagination {
    display: flex;

    flex-wrap: wrap;
    align-items: center;
    justify-content: center;

    gap: 8px;

    width: 100%;

    margin-top: 30px;
}

.page-number {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-width: 38px;
    height: 38px;

    padding: 5px 10px;

    border: 1px solid #dddddd;
    border-radius: 5px;

    background: #ffffff;
    color: #333333;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background-color 0.25s ease,
        border-color 0.25s ease,
        color 0.25s ease;
}

.page-number:hover {
    background: #f5f5f5;
    border-color: #cccccc;
}

.page-number.active {
    background: #222222;
    border-color: #222222;
    color: #ffffff;
}


/* =========================================================
   NOTIFICATION
   ========================================================= */

.notification {
    position: relative;

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 15px;

    width: 100%;

    margin-bottom: 20px;

    padding: 12px 15px;

    border-radius: 6px;

    font-size: 14px;
    line-height: 1.4;

    z-index: 100;
}

.notification.success {
    border: 1px solid #b7e4c7;
    background: #d8f3dc;
    color: #155724;
}

.notification.error {
    border: 1px solid #f1b0b7;
    background: #f8d7da;
    color: #721c24;
}

.notification-close {
    flex: 0 0 auto;

    padding: 0;

    border: 0;

    background: transparent;

    color: inherit;

    font-size: 22px;
    line-height: 1;

    cursor: pointer;
}


/* =========================================================
   QUICK VIEW
   ========================================================= */

.quick-view-modal {
    position: fixed;

    top: 0;
    right: 0;
    bottom: 0;
    left: 0;

    z-index: 999999;

    padding: 30px;

    background: rgba(0, 0, 0, 0.65);
}

.quick-view-modal .modal-content {
    position: relative;

    width: 100%;
    max-width: 900px;
    max-height: 90vh;

    margin: 5vh auto 0;

    overflow-y: auto;

    padding: 30px;

    border-radius: 10px;

    background: #ffffff;
}

.quick-view-modal .modal-close {
    position: absolute;

    top: 10px;
    right: 10px;

    z-index: 10;

    width: 38px;
    height: 38px;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: #222222;
    color: #ffffff;

    font-size: 24px;
    line-height: 1;

    cursor: pointer;
}


/* =========================================================
   ANIMATION
   ========================================================= */

.product-item.fade-in {
    animation: productFilterFadeIn 0.4s ease forwards;
}

@keyframes productFilterFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

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


/* =========================================================
   ELEMENTOR EDITOR
   ========================================================= */

.elementor-editor-active .product-filter-widget {
    min-height: 50px;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1024px) {

    .products-grid-inner {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px;
    }

    .products-grid-inner.cols-4,
    .products-grid-inner.cols-5,
    .products-grid-inner.cols-6 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .category-list {
        gap: 10px;
    }

    .category-item > a {
        padding: 9px 14px;
    }

    .product-title {
        font-size: 15px;
    }

    .product-price {
        font-size: 16px;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    .product-filter-categories {
        margin-bottom: 20px;
    }

    .category-list {
        display: grid;

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 10px;

        justify-content: stretch;
    }

    .category-item {
        width: 100%;
    }

    .category-item > a {
        width: 100%;
        min-height: 42px;
        padding: 9px 10px;
        font-size: 14px;
    }

    .category-name {
        font-size: 14px;
    }

    .category-count {
        font-size: 12px;
    }

    .product-subcategories {
        display: grid;

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 8px;
    }

    .subcategory-item {
        width: 100%;
    }

    .subcategory-link {
        width: 100%;
        padding: 8px 7px;
        font-size: 13px;
    }


    /*
     * Product grid
     */

    .products-grid-inner {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 12px;
    }

    .products-grid-inner.cols-3,
    .products-grid-inner.cols-4,
    .products-grid-inner.cols-5,
    .products-grid-inner.cols-6 {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .product-item {
        border-radius: 7px;
    }

    .product-title {
        margin: 10px 10px 6px;

        font-size: 14px;
        line-height: 1.35;
    }

    .product-rating {
        margin: 0 10px 5px;
    }

    .product-price {
        margin: 0 10px 10px;

        font-size: 15px;
    }

    .product-price del {
        font-size: 12px;
    }

    .product-actions {
        padding: 0 10px 10px;
    }

    .add-to-cart-button {
        min-height: 38px;

        padding: 7px 8px;

        font-size: 12px;
    }

    .sale-badge {
        top: 7px;
        left: 7px;

        padding: 4px 7px;

        font-size: 10px;
    }

    .pagination {
        margin-top: 20px;

        gap: 5px;
    }

    .page-number {
        min-width: 34px;
        height: 34px;

        font-size: 13px;
    }

    .quick-view-modal {
        padding: 15px;
    }

    .quick-view-modal .modal-content {
        padding: 20px;

        margin-top: 3vh;

        max-height: 94vh;
    }
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .category-list {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .products-grid-inner,
    .products-grid-inner.cols-1,
    .products-grid-inner.cols-2,
    .products-grid-inner.cols-3,
    .products-grid-inner.cols-4,
    .products-grid-inner.cols-5,
    .products-grid-inner.cols-6 {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 10px;
    }

    .product-thumbnail {
        aspect-ratio: 1 / 1;
    }

    .product-title {
        font-size: 13px;
    }

    .product-price {
        font-size: 14px;
    }

    .add-to-cart-button {
        min-height: 36px;

        font-size: 11px;
    }

    .add-to-cart-button i {
        font-size: 11px;
    }
}


/* =========================================================
   VERY SMALL DEVICES
   ========================================================= */

@media (max-width: 360px) {

    .category-list {
        grid-template-columns: 1fr;
    }

    .product-subcategories {
        grid-template-columns: 1fr;
    }

    .products-grid-inner,
    .products-grid-inner.cols-1,
    .products-grid-inner.cols-2,
    .products-grid-inner.cols-3,
    .products-grid-inner.cols-4,
    .products-grid-inner.cols-5,
    .products-grid-inner.cols-6 {
        grid-template-columns: 1fr;
    }
}
.add-to-cart-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.add-to-cart-button .add-to-cart-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    display: block;
    color: currentColor;
}

.add-to-cart-button .add-to-cart-text {
    display: inline-block;
}