/* =========================================
   Custom WooCommerce Elementor Toolkit Main Styles
   ========================================= */

.cwet-ajax-search-widget-container {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.cwet-search-header {
    position: relative;
}

.cwet-ajax-search-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

.cwet-ajax-search-input:focus {
    border-color: #007cba;
    box-shadow: 0 0 5px rgba(0, 124, 186, 0.2);
}

/* Icon Alignment Rules */
.cwet-search-header.cwet-icon-align-left .cwet-ajax-search-input {
    padding-left: 45px;
}

.cwet-search-header.cwet-icon-align-right .cwet-ajax-search-input {
    padding-right: 45px;
}

.cwet-search-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cwet-search-icon.cwet-icon-left {
    left: 15px;
}

.cwet-search-icon.cwet-icon-right {
    right: 15px;
}

.cwet-search-header.cwet-icon-align-right .cwet-ajax-search-loader {
    right: 40px;
}

.cwet-ajax-search-loader {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: cwet-spin 1s linear infinite;
}

@keyframes cwet-spin {
    0% {
        transform: translateY(-50%) rotate(0deg);
    }

    100% {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* Product Grid */
.cwet-product-grid {
    display: grid;
    gap: 20px;
    transition: opacity 0.3s ease;
}

.cwet-product-grid.loading {
    opacity: 0.5;
    pointer-events: none;
}

.cwet-search-results-wrapper {
    display: none;
}

.cwet-search-results-wrapper.cwet-active {
    display: block;
}

.cwet-equal-height .cwet-product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cwet-equal-height .cwet-product-card a:first-child {
    flex-grow: 1;
}

.cwet-product-card {
    background: #fff;
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 4px;
    transition: box-shadow 0.3s ease;
    text-align: center;
}

.cwet-product-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.cwet-product-img img {
    max-width: 100%;
    height: auto;
    border-radius: 3px;
    margin-bottom: 15px;
}

.cwet-product-title {
    font-size: 16px;
    margin: 0 0 10px;
    color: #333;
    transition: color 0.3s ease;
}

.cwet-product-price {
    font-size: 15px;
    color: #007cba;
    font-weight: 600;
    margin-bottom: 15px;
}

.cwet-product-card .add_to_cart_button {
    display: inline-block;
    padding: 8px 15px;
    background: #007cba;
    color: #fff;
    text-decoration: none;
    border-radius: 3px;
    font-size: 14px;
    transition: background 0.3s ease;
}

.cwet-product-card .add_to_cart_button:hover {
    background: #005a87;
}

.cwet-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px;
    background: #f9f9f9;
    color: #777;
    border-radius: 4px;
}

/* --- Wishlist Button --- */
.cwet-wishlist-toggle {
    display: inline-block;
    cursor: pointer;
    font-size: 18px;
    color: #ccc;
    transition: color 0.3s;
}

.cwet-wishlist-toggle:hover,
.cwet-wishlist-toggle.in-wishlist {
    color: #e74c3c;
}

/* =========================================
   AJAX Filter Grid Styles
   ========================================= */

.cwet-filter-grid-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: flex-start;
}

.cwet-layout-right {
    flex-direction: row-reverse;
}

.cwet-layout-top {
    flex-direction: column;
}

.cwet-layout-top .cwet-filter-sidebar {
    width: 100% !important;
}

.cwet-layout-top .cwet-filter-main {
    width: 100% !important;
}

.cwet-layout-top .cwet-filters-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.cwet-layout-top .cwet-filter-widget {
    flex: 1;
    min-width: 250px;
    margin-bottom: 0;
}

.cwet-filter-sidebar {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.cwet-filter-widget {
    margin-bottom: 25px;
}

.cwet-filter-widget:last-child {
    margin-bottom: 0;
}

.cwet-filter-widget-title {
    font-size: 16px;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eaeaea;
}

.cwet-filter-search {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    outline: none;
    box-sizing: border-box;
}

.cwet-clear-filters {
    margin-top: 20px;
    background-color: #ef4444;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 15px;
    width: 100%;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.cwet-clear-filters:hover {
    background-color: #dc2626;
}

.cwet-filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cwet-filter-item {
    margin-bottom: 8px;
}

.cwet-filter-item label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    transition: color 0.2s;
    user-select: none;
}

.cwet-filter-item label:hover {
    color: #007cba;
}

.cwet-filter-item .count {
    margin-left: 4px;
    color: #999;
    font-size: 12px;
}

/* Price Slider native overrides */
.cwet-price-slider-wrapper {
    padding: 10px 5px;
}

.ui-slider-horizontal {
    height: 6px;
    background: #e1e1e1;
    border-radius: 3px;
    position: relative;
}

.ui-slider .ui-slider-range {
    position: absolute;
    z-index: 1;
    font-size: .7em;
    display: block;
    border: 0;
    background: #007cba;
    height: 100%;
    border-radius: 3px;
}

.ui-slider .ui-slider-handle {
    position: absolute;
    z-index: 2;
    width: 16px;
    height: 16px;
    cursor: grab;
    background: #fff;
    border: 2px solid #007cba;
    border-radius: 50%;
    top: -5px;
    margin-left: -8px;
    outline: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.ui-slider .ui-slider-handle:active {
    cursor: grabbing;
}

.cwet-price-display {
    margin-top: 15px;
    font-size: 14px;
    color: #555;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
}

.cwet-clear-filters {
    margin-top: 15px;
    width: 100%;
    padding: 10px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.cwet-clear-filters:hover {
    background: #c0392b;
}

/* Filter Loader & Main Area */
.cwet-filter-main {
    position: relative;
}

.cwet-filter-loader {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: cwet-spin 1s linear infinite;
    z-index: 10;
}

/* Pagination */
.cwet-pagination {
    list-style: none;
    padding: 0;
    margin: 40px 0 0;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.cwet-page-link {
    display: inline-block;
    padding: 8px 14px;
    background: #fff;
    border: 1px solid #ddd;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
}

.cwet-page-link:hover,
.cwet-page-link.active {
    background: #007cba;
    color: #fff;
    border-color: #007cba;
}

/* =========================================
   Default Kit — Product Card
   ========================================= */

.cwet-product-card {
    background: #ffffff;
    border: 1px solid #ebebeb;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow 0.25s ease, transform 0.2s ease;
    box-sizing: border-box;
}

.cwet-product-card:hover {
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.13);
    transform: translateY(-3px);
}

/* Image wrap — relative so badge + wishlist can be placed absolutely */
.cwet-product-image-wrap {
    position: relative;
    overflow: hidden;
}

/* Product image */
.cwet-product-img-link {
    display: block;
}

.cwet-product-img {
    display: block;
    overflow: hidden;
}

.cwet-product-img img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.cwet-product-card:hover .cwet-product-img img {
    transform: scale(1.06);
}

/* ---- Sale / Discount Badge ---- */
.cwet-sale-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e74c3c;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    padding: 5px 9px;
    border-radius: 4px;
    z-index: 3;
    pointer-events: none;
    letter-spacing: 0.3px;
}

/* ---- Wishlist Toggle Button ---- */
.cwet-wishlist-toggle {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.92);
    color: #bbb;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
    padding: 0;
    outline: none;
}

.cwet-wishlist-toggle:hover,
.cwet-wishlist-toggle.in-wishlist {
    background: #e74c3c;
    color: #ffffff;
    transform: scale(1.1);
}

.cwet-wishlist-toggle i {
    line-height: 1;
    pointer-events: none;
}

/* ---- Product Details ---- */
.cwet-product-details {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.cwet-product-details>a {
    text-decoration: none;
}

/* ---- Product Title ---- */
.cwet-product-title {
    font-size: 14px;
    font-weight: 600;
    color: #222;
    margin: 0 0 8px 0;
    line-height: 1.4;
    transition: color 0.2s;
}

.cwet-product-details a:hover .cwet-product-title {
    color: #007cba;
}

/* ---- Product Price ---- */
.cwet-product-price {
    font-size: 15px;
    color: #555;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.cwet-product-price del {
    color: #aaa;
    font-size: 13px;
    text-decoration: line-through;
}

.cwet-product-price ins {
    color: #e74c3c;
    text-decoration: none;
    font-weight: 600;
}

/* ---- Add to Cart Button ---- */
.cwet-add-to-cart-wrap {
    margin-top: auto;
}

.cwet-add-to-cart-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px 16px;
    background: #007cba;
    color: #ffffff;
    border: 2px solid #007cba;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    transition: background 0.22s ease, border-color 0.22s ease, color 0.22s ease, transform 0.15s ease;
    letter-spacing: 0.3px;
}

.cwet-add-to-cart-btn:hover {
    background: #005a87;
    border-color: #005a87;
    color: #ffffff;
    transform: translateY(-1px);
}

/* ---- No results notice ---- */
.cwet-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
    color: #888;
    font-size: 14px;
}