/* ===== Trigger (shortcode output) ===== */

.qc-custom-search-trigger {
    display: flex;
    align-items: stretch;
    width: 100%;
    background: #fff;
/*    border: 1px solid #ddd;*/
    cursor: pointer;
    box-sizing: border-box;
    max-width: 450px;
}

.qc-custom-search-trigger * {
    box-sizing: border-box;
}
body .wd-products-with-bg .wd-product .wd-product-wrapper,
body .wd-products-with-bg .wd-product{
    background: #fff !important;
}
/* body .qc-custom-search-trigger-input {
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 0 16px;
    box-shadow: none !important;
    outline: 0;
    font-size: 15px;
    cursor: pointer;
    height: 55px;
    border: 2px solid rgb(130 35 65) !important;
    box-shadow: inherit !important;
    background-color: #fdf0f0 !important;
    font-weight: 400;
    font-style: italic;
    font-size: 16px;
    color: #9b4f67;
} */
.qc-custom-search-trigger-input {
    border: 2px solid transparent !important;
    box-sizing: border-box;
    transition: border-color 0s ease !important;
}

.qc-custom-search-trigger:hover .qc-custom-search-trigger-input {
    border-color: #ea768f !important;
}

.qc-custom-search-trigger:hover .qc-custom-search-trigger-btn {
    background: #ea768f;
}
.qc-custom-search-trigger-input:not(:placeholder-shown) {
    color: #9b4f67b3;
    font-weight: 600;
}

.qc-custom-search-trigger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    background: #80213f;
    color: #fff;
}

.qc-custom-search-trigger-x {
    display: none;
}

.qc-custom-search-trigger:focus-visible {
    outline: 2px solid #80213f;
    outline-offset: 2px;
}
.wd-header-text{
    flex: 1 1 0%;
}

/* Mobile: only the search icon is shown (add mobile="bar" to the shortcode to keep the full bar) */
@media (max-width: 1010px) {
    .qc-custom-search-trigger:not(.qc-custom-search-trigger--bar-mobile) {
        display: flex;
        justify-content: flex-end;
        width: auto;
        background: transparent;
        border: 0;
    }
    
    .qc-custom-search-trigger-btn{
        justify-content: flex-end;
    }

    .qc-custom-search-trigger:not(.qc-custom-search-trigger--bar-mobile) .qc-custom-search-trigger-input {
        display: none;
    }

    .qc-custom-search-trigger:not(.qc-custom-search-trigger--bar-mobile) .qc-custom-search-trigger-btn {
        width: 40px;
        height: 40px;
        background: transparent;
        color: #222;
    }

    .qc-custom-search-trigger:not(.qc-custom-search-trigger--bar-mobile) .qc-custom-search-trigger-btn svg {
        width: 22px;
        height: 22px;
    }
}

/* ===== Overlay ===== */

html.qc-custom-search-locked,
html.qc-custom-search-locked body {
    overflow: hidden !important;
}

.qc-custom-search-overlay {
    --qc-custom-search-primary: #80213f;
    --qc-custom-search-badge: #5b3a8c;
    --qc-custom-search-green: #4aa564;
    --qc-custom-search-border: #dcdcdc;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999999;
    background: #fff !important;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    transform: translate3d(0, 100%, 0);
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.22, 0.8, 0.28, 1), visibility 0s linear 0.4s;
    will-change: transform;
    color: #333;
}

.qc-custom-search-overlay[hidden] {
    display: none !important;
}

.qc-custom-search-overlay * {
    box-sizing: border-box;
}

.qc-custom-search-overlay.qc-custom-search-is-open {
    transform: translate3d(0, 0, 0);
    visibility: visible;
    transition: transform 0.4s cubic-bezier(0.22, 0.8, 0.28, 1), visibility 0s;
}

/* After the slide-in the layer needs no transform any more (iOS paints a blank screen
   for a transformed fixed layer while the keyboard is open) */
.qc-custom-search-overlay.qc-custom-search-is-open.qc-cs-settled {
    transform: none;
    transition: none;
    will-change: auto;
}

.qc-custom-search-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #333;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
}

.qc-custom-search-close:hover {
    background: var(--qc-custom-search-primary);
    color: #fff;
}

.qc-custom-search-panel {
    width: 100%;
    max-width: 1600px;
    height: 100%;
    margin: 0 auto;
    padding: 64px 20px 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Form */

.qc-custom-search-form {
    display: flex;
    align-items: stretch;
    height: 58px;
    margin: 0;
    flex: 0 0 auto;
    border: 1.5px solid #00000026;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}


.qc-custom-search-field {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}

.qc-custom-search-input {
    flex: 1;
    min-width: 0;
    height: 100%;
    margin: 0;
    padding: 0 54px 0 22px;
    border: 0 !important;
    border-radius: 8px 0 0 8px !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: 0 !important;
    font-size: 16px;
    color: #222;
}

.qc-custom-search-input::placeholder {
    color: #9a9a9a;
    opacity: 1;
}

.qc-custom-search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #555;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}

.qc-custom-search-clear svg {
    width: 14px;
    height: 14px;
}

.qc-custom-search-clear:hover {
    background: #fff;
    color: #2b2a2a;
}

.qc-custom-search-clear[hidden] {
    display: none;
}

.qc-custom-search-select-wrap {
    position: relative;
    display: flex;
    align-items: stretch;
    flex: 0 0 250px;
    border-left: 1px solid #ececec;
    background: #fff;
    transition: background 0.15s;
}

.qc-custom-search-select-wrap:hover {
    background: #f5eef1;
}

.qc-custom-search-select {
    display: block;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 42px 0 18px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background-color: transparent !important;
    box-shadow: none !important;
    outline: 0;
    font-family: inherit;
    font-size: 13px !important;
    font-weight: 700;
    line-height: normal !important;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #555;
    cursor: pointer;
    text-overflow: ellipsis;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%23555' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-size: 12px 8px !important;
    background-position: right 18px center !important;
}

.qc-custom-search-submit {
    flex: 0 0 68px;
    margin: 0;
    padding: 0;
    border: 0;
    background: var(--qc-custom-search-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: filter 0.15s;
}

.qc-custom-search-submit:hover {
    filter: brightness(1.15);
    background: #EA768F;
    color: #fff;
}

/* Custom category dropdown (matches the theme: brand colour, theme font, max 40% of the screen height) */

.qc-cs-enhanced .qc-custom-search-select {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    opacity: 0 !important;
    overflow: hidden;
    pointer-events: none !important;
    background-image: none !important;
}

.qc-cs-dd {
    position: relative;
    width: 100%;
    height: 100%;
}

body .qc-cs-dd-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0 18px;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: 0;
    font-family: 'Urbanist' !important;
    font-weight: 600 !important;
    letter-spacing: 0px;
    font-size: 14px;
    line-height: 1.2;
    text-transform: uppercase;
    text-align: left;
    color: #555;
    cursor: pointer;
}

.qc-cs-dd-btn:focus-visible {
    box-shadow: inset 0 0 0 2px var(--qc-custom-search-primary) !important;
}

.qc-cs-dd-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qc-cs-dd-btn svg {
    flex: 0 0 auto;
    width: 12px;
    height: 8px;
    transition: transform 0.2s ease;
}

.qc-cs-dd.is-open .qc-cs-dd-btn svg {
    transform: rotate(180deg);
}

.qc-cs-dd-list {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 30;
    width: max(100%, 300px);
    max-height: 40vh;
    overflow-y: auto;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #fff;
    border: 1px solid #eadde1;
    border-radius: 10px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.16);
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--qc-custom-search-primary) #f3e6ea;
    animation: qc-cs-pop 0.16s ease;
}

.qc-cs-dd-list::-webkit-scrollbar {
    width: 6px;
}

.qc-cs-dd-list::-webkit-scrollbar-thumb {
    background: var(--qc-custom-search-primary);
    border-radius: 6px;
}

.qc-cs-dd-list[hidden] {
    display: none;
}

@keyframes qc-cs-pop {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.qc-cs-dd-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0;
    padding: 10px 16px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: 0;
    text-transform: none;
    color: #333;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}
#qc-custom-search-form li.qc-cs-dd-item{
    padding: 7px 10px;
}
.qc-cs-dd-item[data-depth="0"] {
    font-weight: 700;
}

.qc-cs-dd-item.is-active {
    background: #fbf2f5;
    color: var(--qc-custom-search-primary);
}

.qc-cs-dd-item.is-selected {
    background: #f6e6ec;
    color: var(--qc-custom-search-primary);
}

.qc-cs-dd-item.is-selected::after {
    content: "";
    flex: 0 0 auto;
    width: 6px;
    height: 11px;
    margin-right: 2px;
    border: solid var(--qc-custom-search-primary);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translateY(-2px);
}

/* Category list */

.qc-custom-search-select option {
    font-size: 14px;
    font-weight: 500;
    text-transform: none;
    color: #333;
}

.qc-custom-search-select option[data-depth="0"] {
    font-weight: 700;
}

/* Body */

.qc-custom-search-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 26px 8px 40px 0;
    transition: opacity 0.15s;
}

.qc-custom-search-loading .qc-custom-search-body {
    opacity: 0.55;
}

.qc-custom-search-section {
    margin: 0 0 26px;
}

.qc-custom-search-section[hidden],
.qc-custom-search-empty[hidden] {
    display: none;
}

.qc-custom-search-heading {
    margin: 0 0 14px !important;
    padding: 0 !important;
    font-size: 1.08em !important;
    line-height: 1.2 !important;
    font-weight: 600 !important;
    font-style: italic;
    letter-spacing: 0 !important;
    text-transform: none !important;
    color: #111;
}

.qc-custom-search-empty {
    margin: 40px 0;
    text-align: center;
    font-size: 16px;
    color: #666;
}

.qc-custom-search-dym {
    margin: -4px 0 16px;
    font-size: 15px;
    color: #666;
}

.qc-custom-search-dym[hidden] {
    display: none;
}

.qc-custom-search-dym strong {
    color: var(--qc-custom-search-primary);
}

.qc-custom-search-empty-hint {
    max-width: 320px;
    margin: 0 auto;
    font-size: 15px;
    line-height: 1.5;
    color: #8a7a80;
}

/* Category chips */

.qc-custom-search-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.qc-custom-search-chip {
    display: inline-block;
    padding: 10px 16px;
    border: 1px solid var(--qc-custom-search-border);
    background: #fff;
    color: var(--qc-custom-search-primary);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s;
}

.qc-custom-search-chip:hover {
    border-color: var(--qc-custom-search-primary);
    background: #fbf2f5;
}

.qc-custom-search-mark {
    background: none;
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    padding: 0;
}

/* Product grid */

.qc-custom-search-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px;
}

.qc-custom-search-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #eee;
    padding: 12px;
}

.qc-custom-search-card-img {
    position: relative;
    display: block;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: #fff;
}

.qc-custom-search-card-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.qc-custom-search-badge {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1;
    min-width: 46px;
    padding: 6px 6px 14px;
    background: var(--qc-custom-search-badge);
    color: #fff;
    text-align: center;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.1;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%);
}

.qc-custom-search-badge b {
    display: block;
    font-size: 15px;
}

.qc-custom-search-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding-top: 10px;
}

.qc-custom-search-card-cat {
    font-size: 13px;
    color: #888;
    margin-bottom: 2px;
}

.qc-custom-search-card-title {
    display: block;
    margin-bottom: 10px;
    font-size: 15px;
    font-weight: 700;
    font-style: italic;
    line-height: 1.25;
    color: var(--qc-custom-search-primary);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.qc-custom-search-prices {
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid #e5e5e5;
}

.qc-custom-search-price-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    margin-top: 4px;
    font-size: 13px;
}

.qc-custom-search-price-label {
    font-size: 12px;
    font-weight: 700;
    font-style: italic;
    color: var(--qc-custom-search-primary);
}

.qc-custom-search-price-label-main {
    font-size: 14px;
    text-transform: uppercase;
    border-bottom: 3px solid #f1c5d2;
}

.qc-custom-search-price-old {
    color: #888;
    font-style: italic;
}

.qc-custom-search-price-now {
    font-size: 18px;
    font-weight: 700;
    color: #222;
}

.qc-custom-search-card .woocommerce-Price-amount {
    white-space: nowrap;
}

.qc-custom-search-cart-btn {
    display: block;
    margin-top: 12px;
    padding: 11px 8px;
    background: var(--qc-custom-search-primary);
    color: #fff;
    text-align: center;
    font-size: 14px;
    font-weight: 800;
    font-style: italic;
    text-transform: uppercase;
    text-decoration: none;
    transition: filter 0.15s;
}

.qc-custom-search-cart-btn:hover {
    filter: brightness(1.15);
    color: #fff;
}

.qc-custom-search-btn-loading {
    opacity: 0.6;
    pointer-events: none;
}

.qc-custom-search-btn-done {
    background: var(--qc-custom-search-green);
}

/* View all results (top, right side, one line) */

.qc-custom-search-viewall {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    margin: 0 0 20px;
    padding: 0 0 16px;
    border-bottom: 1px solid #eee;
    font-size: 15px;
    color: #555;
    white-space: nowrap;
}

.qc-custom-search-viewall[hidden] {
    display: none;
}

.qc-custom-search-viewall-text {
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.qc-custom-search-viewall-link {
    flex: 0 0 auto;
    display: inline-block;
    padding: 10px 20px;
    background: var(--qc-custom-search-primary);
    color: #fff !important;
    font-size: 14px;
    font-weight: 800;
    font-style: italic;
    text-transform: uppercase;
    text-decoration: none !important;
    transition: filter 0.15s;
}

.qc-custom-search-viewall-link:hover {
    filter: brightness(1.15);
}

/* View all results (bottom, centered) */

.qc-custom-search-viewall-bottom {
    display: flex;
    justify-content: center;
    margin: 30px 0 10px;
}

.qc-custom-search-viewall-bottom[hidden] {
    display: none;
}

/* Search button loader */

.qc-custom-search-submit {
    position: relative;
}

@keyframes qc-custom-search-spin {
    to {
        transform: rotate(360deg);
    }
}

.qc-custom-search-loading .qc-custom-search-submit svg,
.qc-custom-search-submitting .qc-custom-search-submit svg {
    opacity: 0;
}

.qc-custom-search-loading .qc-custom-search-submit::after,
.qc-custom-search-submitting .qc-custom-search-submit::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: qc-custom-search-spin 0.7s linear infinite;
}

.qc-custom-search-submitting .qc-custom-search-submit {
    pointer-events: none;
}

/* Theme cards inside the grid: equal height, footer on one line at the bottom */

.qc-custom-search-grid {
    align-items: stretch;
}

.qc-custom-search-item {
    display: flex;
    min-width: 0;
    position: relative;
    animation: qc-custom-search-up 0.35s ease both;
    border: 1px solid #eee;
}

.qc-custom-search-item:nth-child(5n+2) {
    animation-delay: 0.04s;
}

.qc-custom-search-item:nth-child(5n+3) {
    animation-delay: 0.08s;
}

.qc-custom-search-item:nth-child(5n+4) {
    animation-delay: 0.12s;
}

.qc-custom-search-item:nth-child(5n+5) {
    animation-delay: 0.16s;
}

@keyframes qc-custom-search-up {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.qc-custom-search-item > * {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 auto !important;
    float: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    height: auto;
}

.qc-custom-search-item .product-wrapper,
.qc-custom-search-item .wd-product-wrapper {
    display: flex !important;
    flex-direction: column;
    height: 100%;
}

.qc-custom-search-item .product-element-bottom {
    display: flex !important;
    flex-direction: column;
    flex: 1 1 auto;
}

.qc-custom-search-item .wd-entities-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    line-height: 1.25;
    min-height: 3.75em;
}

.qc-custom-search-item .wd-product-footer {
    margin-top: auto !important;
}

.qc-custom-search-card {
    height: 100%;
}

.qc-custom-search-card .qc-custom-search-card-title {
    min-height: 2.5em;
}

.qc-custom-search-card .wd-product-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.qc-custom-search-card .wd-product-footer .wd-add-btn {
    flex: 1;
}

/* Discount badge: always on top of the image, top-right */

.qc-custom-search-item .product-element-top,
.qc-custom-search-item .content-product-imagin + *,
.qc-custom-search-card-img {
    position: relative;
}

.qc-custom-search-item .product-labels,
.qc-custom-search-item .onsale {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    z-index: 7 !important;
    margin: 0 !important;
}

.qc-custom-search-badge {
    z-index: 7;
}

/* Instant card -> theme card swap */

.qc-swapped > * {
    animation: qc-custom-search-swap 0.3s ease;
}

@keyframes qc-custom-search-swap {
    from {
        opacity: 0.35;
    }
    to {
        opacity: 1;
    }
}

/* No star rating inside the popup cards */

.qc-custom-search-item .star-rating,
.qc-custom-search-item .wd-star-rating {
    display: none !important;
}

/* Thin brand scrollbar for the results */

.qc-custom-search-body {
    scrollbar-width: thin;
    scrollbar-color: var(--qc-custom-search-primary) #f3e6ea;
}

.qc-custom-search-body::-webkit-scrollbar {
    width: 8px;
}

.qc-custom-search-body::-webkit-scrollbar-track {
    background: #f3e6ea;
    border-radius: 8px;
}

.qc-custom-search-body::-webkit-scrollbar-thumb {
    background: var(--qc-custom-search-primary);
    border-radius: 8px;
}

/* Keep the theme's quick view popup, mini-cart and notices above our fullscreen layer */

.mfp-bg {
    z-index: 1000001 !important;
}

.mfp-wrap {
    z-index: 1000002 !important;
}

.wd-close-side {
    z-index: 1000003 !important;
}

.wd-side-hidden,
.cart-widget-side {
    z-index: 1000004 !important;
}
.wd-product-footer .wd-add-btn > a > span.wd-action-icon {
    display: none !important;
}
.qc-custom-search-item .product-labels .onsale .onsale-text {
    text-align: center !important;
}
/* .wd-close-side {
    z-index: 10000034599 !important;
} */
.wd-side-hidden, .cart-widget-side {
    z-index: 9999999999 !important;
}
/* Responsive */

@media (max-width: 1100px) {
    .qc-custom-search-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .qc-custom-search-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    /* The site header stays visible: the popup starts right below it.
       JS sets the exact value from the header row; 53px is only the fallback. */
    .qc-custom-search-overlay {
        --qc-custom-search-header-height: 53px;
        top: var(--qc-custom-search-header-height);
        height: auto;
    }

    .qc-custom-search-panel {
        padding: 14px 12px 0;
    }

    .qc-custom-search-trigger-btn {
        cursor: pointer;
    }

    /* The header search icon turns into the cancel (X) button */
    html.qc-custom-search-locked .qc-custom-search-trigger:not(.qc-custom-search-trigger--bar-mobile) .qc-custom-search-icon-search {
        display: none;
    }

    html.qc-custom-search-locked .qc-custom-search-trigger:not(.qc-custom-search-trigger--bar-mobile) .qc-custom-search-trigger-x {
        display: block !important;
        width: 22px;
        height: 22px;
    }

    /* So the popup's own X is hidden; JS shows it only when no search icon is visible in the header */
    .qc-custom-search-close {
        display: none;
    }

    .qc-custom-search-show-close .qc-custom-search-close {
        display: flex;
        top: 10px;
        right: 12px;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: #333;
        color: #fff;
    }

    .qc-custom-search-show-close .qc-custom-search-panel {
        padding-top: 60px;
    }

    /* Search input: full width */
    .qc-custom-search-form {
        flex-wrap: nowrap;
        height: 56px;
        margin-right: 0;
    }

    .qc-custom-search-field {
        flex: 1 1 100%;
    }

    .qc-custom-search-input {
        height: 100%;
        border-radius: 0 !important;
    }

    /* No search button next to the input on mobile (Enter on the keyboard searches) */
    .qc-custom-search-submit {
        display: none;
    }

    .qc-custom-search-select-wrap {
        display: none;
    }

    .qc-custom-search-viewall {
        white-space: normal;
        flex-wrap: wrap;
        gap: 10px;
    }

    .qc-cs-dd-list {
        width: 100%;
        max-height: 40vh;
    }

    .qc-custom-search-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .qc-custom-search-card {
        padding: 8px;
    }

    .qc-custom-search-body {
        padding-right: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .qc-custom-search-overlay,
    .qc-custom-search-body {
        transition: none;
    }

    .qc-custom-search-item {
        animation: none;
    }

    .qc-custom-search-submit::after {
        animation-duration: 1.6s !important;
    }
}
/* ============================================================
   QC Custom Search — grid loader + skeleton placeholders
   ============================================================ */

/* White cover + top spinner while theme cards are fetching */
#qc-custom-search-products-section.qc-cards-loading #qc-custom-search-products {
    position: relative;
    min-height: 180px;
}
#qc-custom-search-products-section.qc-cards-loading #qc-custom-search-products::after {
    content: "";
    position: absolute;
    inset: 0;
    background: #ffffff;
    z-index: 10;
    pointer-events: auto;
    visibility: visible; /* grid is visibility:hidden while loading; pseudo-elements inherit it */
}
#qc-custom-search-products-section.qc-cards-loading #qc-custom-search-products::before {
    content: "";
    position: absolute;
    top: 20px;
    left: 50%;
    width: 32px;
    height: 32px;
    margin-left: -16px;
    border: 3px solid #e5e5e5;
    border-top-color: #333;
    border-radius: 50%;
    animation: qc-cs-spin .8s linear infinite;
    z-index: 11;
    pointer-events: none;
    visibility: visible; /* otherwise inherits visibility:hidden from .qc-prods-hidden */
}
@keyframes qc-cs-spin { to { transform: rotate(360deg); } }

/* Grid hidden until reveal */
#qc-custom-search-products.qc-prods-hidden {
    visibility: hidden;
}

/* Skeleton placeholder card (shown only if theme cards are slow/fail) */
.qc-custom-search-item.qc-is-placeholder {
    min-height: 340px;
}
.qc-custom-search-placeholder {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fff;
    min-height: 340px;
    box-sizing: border-box;
}
.qc-custom-search-skeleton {
    display: block;
    background: linear-gradient(90deg, #f2f2f2 25%, #e9e9e9 37%, #f2f2f2 63%);
    background-size: 400% 100%;
    animation: qc-skel 1.4s ease infinite;
    border-radius: 4px;
}
.qc-skel-img   { width: 100%; height: 220px; }
.qc-skel-title { width: 80%; height: 16px; }
.qc-skel-price { width: 40%; height: 16px; }
@keyframes qc-skel {
    0%   { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

/* Fallback card that remains when a theme card could not be fetched */
.qc-custom-search-item.qc-is-failed {
    opacity: .95;
}
.qc-custom-search-item.qc-is-failed .qc-custom-search-placeholder {
    display: none; /* hide skeleton, but you can inject a lite card here if you want */
}

/* While loading, keep the results area compact so the spinner is always in view */
#qc-custom-search-products-section.qc-cards-loading #qc-custom-search-products {
    max-height: 260px;
    overflow: hidden;
}

/* ============================================================
   WoodMart product card: "buttons on hover" style
   Copied from the theme and scoped to the popup, so the add to
   cart / quick view buttons are styled the moment the cards
   appear (no waiting for the theme CSS to load).
   ============================================================ */

.qc-custom-search-overlay .wd-product.wd-hover-buttons-on-hover {
    --text-align: start;
    --btn-accented-height: 36px;
    --wd-btn-inset: 0;
    --wd-thumb-brd-radius: var(--wd-brd-radius);
    --wd-trans-h: calc(var(--wd-prod-gap) + var(--btn-accented-height));
}

.qc-custom-search-overlay .wd-product.wd-hover-buttons-on-hover .wd-product-wrapper {
    overflow: hidden;
    border-radius: 0;
    transition: all 0.3s ease;
    transform: translate3d(0, 0, 0);
}

@supports (overflow: clip) {
    .qc-custom-search-overlay .wd-product.wd-hover-buttons-on-hover .wd-product-wrapper {
        overflow: clip;
    }
}

.qc-custom-search-overlay .wd-product.wd-hover-buttons-on-hover .wd-product-thumb {
    border-radius: var(--wd-thumb-brd-radius);
}

.qc-custom-search-overlay .wd-product.wd-hover-buttons-on-hover .product-element-bottom {
    padding: var(--wd-prod-bg-cont-sp);
    background-color: inherit;
}

.qc-custom-search-overlay .wd-product.wd-hover-buttons-on-hover .product-element-bottom .wd-action-btn {
    --wd-action-w: 25px;
    --wd-action-h: 25px;
}

.qc-custom-search-overlay .wd-product.wd-hover-buttons-on-hover .wd-product-countdown .wd-timer {
    flex-wrap: nowrap;
    width: 100%;
    padding-top: 5px;
    border-top: 1px solid var(--brdcolor-gray-300);
}

.qc-custom-search-overlay .wd-product.wd-hover-buttons-on-hover .wd-product-countdown .wd-timer > span {
    flex: 1 1 0%;
    min-width: 0;
}

.qc-custom-search-overlay .wd-product.wd-hover-buttons-on-hover :is(.wd-product-header,.wrap-price) {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--wd-prod-gap);
}

.qc-custom-search-overlay .wd-product.wd-hover-buttons-on-hover .wrap-price {
    flex-wrap: wrap;
}

.qc-custom-search-overlay .wd-product.wd-hover-buttons-on-hover .wd-action-buttons {
    display: inline-flex;
    gap: var(--wd-prod-gap);
}

.qc-custom-search-overlay .wd-product.wd-hover-buttons-on-hover .wd-add-btn {
    flex-grow: 1;
    overflow: hidden;
}

.qc-custom-search-overlay .wd-product.wd-hover-buttons-on-hover .wd-add-btn > a {
    min-height: var(--btn-accented-height, var(--btn-height, 42px));
    border-radius: var(--btn-accented-brd-radius);
    color: var(--btn-accented-color);
    box-shadow: var(--btn-accented-box-shadow);
    background: rgb(234, 118, 143);
    text-transform: var(--btn-accented-transform, var(--btn-transform, uppercase));
    font-weight: var(--btn-accented-font-weight, var(--btn-font-weight, 600));
    font-family: var(--btn-accented-font-family, var(--btn-font-family, inherit));
    font-style: var(--btn-accented-font-style, var(--btn-font-style, unset));
    width: 100%;
}

.qc-custom-search-overlay .wd-product.wd-hover-buttons-on-hover .wd-add-btn > a:hover {
    color: var(--btn-accented-color-hover);
    box-shadow: var(--btn-accented-box-shadow-hover);
    background-color: var(--btn-accented-bgcolor);
}

.qc-custom-search-overlay .wd-product.wd-hover-buttons-on-hover .wd-add-btn > a:active {
    box-shadow: var(--btn-accented-box-shadow-active);
    bottom: var(--btn-accented-bottom-active, 0);
}

.qc-custom-search-overlay .wd-product.wd-hover-buttons-on-hover .add-to-cart-loop .wd-action-text {
    font-size: 12px;
    padding: 0 14px;
    white-space: nowrap;
    text-overflow: ellipsis;
    display: block;
    line-height: var(--btn-accented-height);
    overflow: hidden;
}

.qc-custom-search-overlay .wd-product.wd-hover-buttons-on-hover .wd-buttons {
    opacity: 0.6;
    visibility: visible;
    transform: none;
    background: none;
    box-shadow: none;
}

:is(.catalog-mode-on,.login-see-prices) .qc-custom-search-overlay .wd-product.wd-hover-buttons-on-hover {
    --wd-trans-h: calc(var(--wd-prod-gap) + 25px);
}

.qc-custom-search-overlay .wd-product.wd-hover-buttons-on-hover .wd-quick-shop-2 {
    width: 100%;
}

.qc-custom-search-overlay .wd-product.wd-hover-buttons-on-hover .wd-quick-shop-2 table.variations {
    display: inline-flex;
}

.qc-custom-search-overlay :is(.products-bordered-grid-ins,.wd-products-with-bg:not(.products-bordered-grid),.wd-products-with-shadow:not(.products-bordered-grid)) .wd-product.wd-hover-buttons-on-hover {
    --wd-prod-bg-sp: 0;
    --wd-prod-bg-cont-sp: 15px;
    --wd-thumb-brd-radius: 0;
}

.qc-custom-search-overlay :is(.products-bordered-grid-ins,.wd-products-with-bg:not(.products-bordered-grid),.wd-products-with-shadow:not(.products-bordered-grid)) .wd-product.wd-hover-buttons-on-hover .wd-product-wrapper {
    border-radius: var(--wd-brd-radius);
    gap: 0;
}

@media (min-width: 1025px) {
    .qc-custom-search-overlay .wd-product.wd-hover-buttons-on-hover .wd-product-wrapper:hover {
        transform: translateY(-10px);
    }

    .qc-custom-search-overlay .wd-product.wd-hover-buttons-on-hover .wd-product-thumb {
        clip-path: inset(0 0 0 0 round var(--wd-thumb-brd-radius));
        transition: all 0.3s ease;
    }

    .qc-custom-search-overlay .wd-product.wd-hover-buttons-on-hover .product-element-bottom {
        margin-bottom: calc(var(--wd-trans-h)*-1);
        transition: all 0.3s ease;
        z-index: 2;
    }

    .qc-custom-search-overlay .wd-product.wd-hover-buttons-on-hover .wd-product-footer {
        display: flex;
        align-items: center;
        gap: 15px;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .qc-custom-search-overlay .wd-product.wd-hover-buttons-on-hover:not(:is(.quick-shop-shown,.wd-loading)):is(:hover,.wd-variation-active) :is(.product-element-bottom,.wd-product-grid-slider-pagin) {
        transform: translateY(calc(var(--wd-trans-h) * -1));
    }

    .qc-custom-search-overlay .wd-product.wd-hover-buttons-on-hover:not(:is(.quick-shop-shown,.wd-loading)):is(:hover,.wd-variation-active) .wd-product-footer {
        opacity: 1;
        visibility: visible;
    }

    .qc-custom-search-overlay .wd-product.wd-hover-buttons-on-hover:not(:is(.quick-shop-shown,.wd-loading)):is(:hover,.wd-variation-active) .wd-product-thumb {
        clip-path: inset(0 0 var(--wd-trans-h) 0 round var(--wd-thumb-brd-radius));
    }

    .qc-custom-search-overlay :is(.wd-carousel,.products-bordered-grid) .wd-product.wd-hover-buttons-on-hover .wd-product-wrapper {
        transform: none;
    }
}

@media (max-width: 1024px) {
    :is(.catalog-mode-on,.login-see-prices) .qc-custom-search-overlay .wd-product.wd-hover-buttons-on-hover .wd-product-footer {
        display: none;
    }

    .qc-custom-search-overlay .wd-product.wd-hover-buttons-on-hover .wd-action-buttons {
        display: none;
    }
}

/* Same look for the plain fallback card (used only if a theme card is unavailable) */
.qc-custom-search-overlay .qc-custom-search-fallback .wd-product-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.qc-custom-search-overlay .qc-custom-search-fallback .wd-add-btn {
    flex-grow: 1;
    overflow: hidden;
}

.qc-custom-search-overlay .qc-custom-search-fallback .wd-add-btn > a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: var(--btn-accented-height, 36px);
    border-radius: var(--btn-accented-brd-radius);
    color: var(--btn-accented-color);
    background-color: var(--btn-accented-bgcolor);
    box-shadow: var(--btn-accented-box-shadow);
    text-transform: var(--btn-accented-transform, var(--btn-transform, uppercase));
    font-weight: var(--btn-accented-font-weight, var(--btn-font-weight, 600));
}

.qc-custom-search-overlay .qc-custom-search-fallback .wd-add-btn > a:hover {
    color: var(--btn-accented-color-hover);
    background-color: var(--btn-accented-bgcolor-hover);
}

.qc-custom-search-overlay .qc-custom-search-fallback .add-to-cart-loop .wd-action-text {
    padding: 0 14px;
    font-size: 12px;
    white-space: nowrap;
}

.qc-custom-search-overlay .qc-custom-search-fallback .wd-action-buttons {
    display: inline-flex;
    gap: 10px;
}

/* Quick view button is not used in the search popup */
.qc-custom-search-overlay .wd-quick-view-btn,
.qc-custom-search-overlay .open-quick-view,
.qc-custom-search-overlay .quick-view {
	display: none !important;
}
