/* =============================================================================
   Facets & AI Welcome Screen
   ============================================================================= */

.all-machines-subtitle p {
    margin: 0;
}

@media screen and (max-width: 1024px) {

    /* custom spacing for the chatbot icon on this page for mobile 
    since we have a sticky bar at the bottom */
    body.ch-facets-bar-visible {
        --custom-chat-icon-bottom: 80px;
        --custom-chat-bubble-bottom: 150px;
    }
}

/* ── Product Loop Items ───────────────────────────────────────────────────   */
.products-with-filters .elementor-loop-container {
    gap: 20px !important;
}

.products-with-filters .e-loop-item>a {
    transform: none !important;
    opacity: 1 !important;
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* push the tags to the bottom and move the title up a bit */
.products-with-filters .filters-product-content {
    flex: 1;
    margin-top: -20px;
}

.products-with-filters .filters-product-content .product-tags {
    margin-top: auto;
    padding-top: 10px;
}

/* laptops too tight */
@media screen and (max-width: 1700px) {
    .products-with-filters .e-loop-item>a {
        padding: 20px !important;
    }
}

@media screen and (max-width: 767px) {
    .products-with-filters .e-loop-item>a {
        padding: 20px;
    }
}

.products-with-filters .e-loop-item>a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at top left, rgba(243, 112, 33, 0.4) 0%, transparent 40%), radial-gradient(circle at bottom right, rgba(243, 112, 33, 0.5) 0%, transparent 40%);
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.products-with-filters .e-loop-item>a:hover::before {
    opacity: 1;
}

.products-with-filters .e-loop-item .related-products-Image {
    aspect-ratio: 1024 / 529;
    transition: all .25s ease-in;
    width: 100%;
}

.products-with-filters .e-loop-item>a:hover .related-products-Image {
    transform: scale(1.05);
}

.products-with-filters .e-loop-item .prod-desc {
    font-size: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 157%;
}

/* ── Product Tags  ────────────────────────────────────────────── */
.ch-product-tag {
    display: inline-flex;
    align-items: center;
    padding: 7px 8px;
    background: rgba(255, 255, 255, .05);
    border: 1px rgba(255, 255, 255, 0.08) solid !important;
    color: var(--darktheme-bg-light-gray);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 400;
    white-space: nowrap;
}

/* ── Welcome Screen  ────────────────────────────────────────────── */
.ai-welcome-screen {
    margin: 0 auto;
    border-radius: 10px;
    border: 1px var(--darktheme-bg-medium-gray) solid;
}

/* hide the ai welcome screen completely on mobile */
@media screen and (max-width: 1024px) {
    .ai-welcome-screen {
        display: none;
    }
}

/* show/hide the ai welcome screen on desktop based on user interaction */
@media screen and (min-width: 1025px) {
    .ai-welcome-screen {
        max-width: 90%;
        padding: 40px;
    }

    .products-with-filters:not(.ai-welcome-screen-disabled) {
        display: none;
    }

    .products-with-filters-wrapper:has(.products-with-filters.ai-welcome-screen-disabled) .ai-welcome-screen {
        display: none;
    }

}

@media screen and (min-width: 1600px) {
    .ai-welcome-screen {
        max-width: 75%;
        padding: 75px;
    }
}

.ai-welcome-screen img {
    opacity: 0.2;
}

.ai-welcome-screen .ch-products-quick-choice {
    display: inline-block;
    font-size: 16px !important;
    padding: 2px 8px;
    cursor: pointer;
    background: var(--darktheme-black);
    border-radius: 3px;
    border: solid 1px var(--darktheme-bg-gray-dark);
    transition: all 0.3s ease !important;
}

.ai-welcome-screen .ch-products-quick-choice:hover {
    transform: translateY(-2px);
}

.ai-welcome-screen .custom-title-3 h2,
.ai-welcome-screen .custom-title-3 h2 span {
    color: var(--darktheme-light-orange);
}

/* ── Dismiss Link ────────────────────────────────────────────────────────────  */
.ai-welcome-screen-dismiss {
    cursor: pointer;
    text-underline-offset: 5px;
}

.ai-welcome-screen-dismiss:hover {
    text-decoration: underline;
}

/* ── Result Count ──────────────────────────────────────────────────────────── */
.ch-facets-count {
    font-size: 0.85em;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px var(--darktheme-bg-medium-gray) solid;
    color: var(--darktheme-bg-medium-gray);
    font-family: var(--font-stack-heading);
    max-width: 350px;
}

/* ── Facet Block ──────────────────────────────────────────────────────────── */
.ch-facet {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    max-width: 350px;
}

.ch-products-sidebar .elementor-widget-shortcode:not(:last-child) .ch-facet {
    border-bottom: 1px var(--darktheme-bg-medium-gray) solid;
}

.ch-facet+.ch-facet {
    border-top: 1px solid var(--e-global-color-primary);
    padding-top: 1.5em;
}


/* ── Facet Label ────────────────────────────────────────────────────────────*/
.ch-facet__label {
    font-size: 1.1em;
    font-weight: 600;
    margin: 0 0 0.75em;
    font-family: var(--font-stack-heading);
}


/* ── Facet List & Items ──────────────────────────────────────────────────── */
.ch-facet__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ch-facet__item {
    margin: 0 0 0.5em;
    transition: opacity 0.2s;
    font-family: var(--font-stack-heading);
}

.ch-facet__item--empty {
    opacity: 0.35;
    pointer-events: none;
}

.ch-facet__item label {
    display: flex;
    align-items: flex-start;
    gap: 0.6em;
    cursor: pointer;
    line-height: 1.35;
}


/* ── Custom Checkbox ───────────────────────────────────────────────────────── */
.ch-facet__item input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    flex-shrink: 0;
    width: 1.1em;
    height: 1.1em;
    margin-top: 0.15em;
    border: 1.5px solid #fff;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    position: relative;
    transition: background 0.15s, border-color 0.15s;
}

.ch-facet__item input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: .6em;
    height: .6em;
    border-radius: 50%;
    background: var(--e-global-color-primary);
}

/* .ch-facet__item input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 45%;
    width: 0.28em;
    height: 0.52em;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: translate(-50%, -50%) rotate(45deg);
} */

.ch-facet__item input[type="radio"]:checked+.ch-facet__term {
    color: var(--darktheme-light-orange);
}


/* ── Count Badge ─────────────────────────────────────────────────────────── */
.ch-facet__badge {
    opacity: 0.6;
    font-size: 0.9em;
}

/* ── Product Cards  ───────────────────────────────────────────────────────── */
.filters-product-card .custom-title-6 h3 {
    color: var(--darktheme-light-orange) !important;
}

.filters-product-card {
    background: var(--darktheme-black);
    border: rgba(255, 255, 255, .2) 1px solid;
    border-radius: 12px;
    padding: 30px;
}

.filters-product-card .product-name-chip {
    opacity: 1;
    border-radius: 3px;
    background-color: rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    align-self: start;
    padding: 7px 8px;
    display: flex;
    font-size: 20px;
    align-items: center;
    gap: 10px;
}

.filters-product-card .product-name-chip span {
    line-height: 150%;
}

.filters-product-card .product-name-chip::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: var(--darktheme-bg-orange);
    flex-shrink: 0;
}

/* ── Loading Overlay ──────────────────────────────────────────────────────── */
.ch-loading {
    position: relative;
    pointer-events: none;
}

.ch-loading::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
}

.ch-loading::after {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    width: 2em;
    height: 2em;
    margin: -1em 0 0 -1em;
    border: 3px solid var(--e-global-color-primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: ch-spin 0.7s linear infinite;
    z-index: 9999;
}

@keyframes ch-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---------------------------------------------------------------
     Mobile sidebar + bottom bar + mobile selected info
  --------------------------------------------------------------- */

.ch-facets-mobile-bar {
    display: none;
}

@media (max-width: 1024px) {

    .ch-facets-selected {
        display: block;
        font-size: 1.25rem;
        color: var(--darktheme-light-orange);
        font-family: var(--font-stack-heading);
    }

    .ch-facets-count {
        padding: .5rem 0 0;
        border: 0;
        border-top: 1px var(--darktheme-bg-medium-gray) solid;
        margin: 0;
    }

    .facet-selected-wrapper {
        display: none;
    }

    body.ch-facets-has-selection .facet-selected-wrapper {
        display: block;
    }

    .ch-products-sidebar .elementor-widget-shortcode:last-child {
        margin-bottom: 80px;
    }

    .ch-products-sidebar {
        position: fixed;
        inset: 0;
        z-index: 1001;
        background: var(--darktheme-bg-black-primary);
        overflow-y: auto;
        padding: 24px 20px 120px;
        transform: translateX(-100%);
        transition: transform .3s ease;
        left: 0;
        bottom: 0;
        width: 80%;
        height: 100vh;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
    }

    .ch-products-sidebar.is-active {
        transform: translateX(0) !important;
    }

    body.ch-facets-open {
        overflow: hidden;
    }

    .ch-facets-mobile-bar.is-visible {
        display: block;
    }

    .ch-facets-mobile-bar {
        z-index: 1002;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--darktheme-bg-black-primary);
        border-top: 2px var(--darktheme-light-orange) solid;
    }

    .ch-facets-mobile-bar__row {
        display: none;
        grid-template-columns: 1fr 1fr;
    }

    .ch-facets-mobile-bar:not(.is-active) .ch-facets-mobile-bar__row--closed {
        display: grid;
    }

    .ch-facets-mobile-bar.is-active .ch-facets-mobile-bar__row--open {
        display: grid;
    }

    .ch-facets-mobile-bar__btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 18px 12px;
        background: transparent;
        border: 0;
        color: var(--darktheme-light-orange);
        font-family: var(--font-stack-heading);
        cursor: pointer;
    }

    .ch-facets-mobile-bar__btn+.ch-facets-mobile-bar__btn {
        border-left: 1px solid var(--darktheme-bg-medium-gray);
    }

    .ch-facets-mobile-bar__icon {
        width: 20px;
        height: 20px;
        background: center / contain no-repeat;
    }

    body.ch-facets-open::before {
        content: '';
        position: fixed;
        inset: 0;
        z-index: 1000;
        background: rgba(255, 255, 255, 0.04);
        opacity: 1;
        transition: opacity .3s ease;
        backdrop-filter: blur(3px);
    }

    .products-with-filters .e-loop-item .prod-desc {
        display: none;
    }
}

/* ---------------------------------------------------------------
     Pagination
  --------------------------------------------------------------- */
.ch-facets-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 24px;
}

.ch-facets-pagination__btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #fff;
}

/* Circular ‹ › buttons at the edges */
.ch-facets-pagination__btn--prev,
.ch-facets-pagination__btn--next {
    width: 30px;
    height: 30px;
    background-image: url(/wp-content/uploads/2026/04/next.svg);
    background-position: 50% 50%;
    background-size: contain;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    transition: background 0.2s ease;
    color: transparent;
}

.ch-facets-pagination__btn--prev {
    background-image: url(/wp-content/uploads/2026/04/prev.svg);
}

.ch-facets-pagination__btn--prev:disabled {
    opacity: 0.55;
    cursor: default;
}

/* Number buttons */
.ch-facets-pagination__btn--num {
    font-size: var(--custom-title-5-default);
    color: var(--darktheme-bg-medium-gray);
    padding: 4px 12px;
    transition: color 0.2s ease;
}

.ch-facets-pagination__btn--num:hover {
    color: var(--darktheme-bg-light-gray);
}

/* Current page: white + underline */
.ch-facets-pagination__btn--current {
    color: var(--darktheme-bg-light-gray);
    text-decoration: underline;
    text-underline-offset: 5px;
    text-decoration-thickness: 1px;
}

/* Center the number group, push next button to the far right */
.ch-facets-pagination__btn--prev {
    margin-right: 50px;
}

.ch-facets-pagination__btn--next {
    margin-left: 50px;
}

@media (min-width: 1024px) {
    .ch-facets-pagination:not(.ai-welcome-screen-disabled) {
        display: none;
    }
}