/* Trigger button */
.brx-search-ajax-trigger {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
/* Overlay */
.brx-search-ajax-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.brx-search-ajax-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal container - slides from right */
.brx-search-ajax-offcanvas {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    z-index: 9999;
    display: flex;
    justify-content: flex-end;
    pointer-events: none;
}

.brx-search-ajax-modal {
    background-color: #ffffff;
    width: 500px;
    max-width: 90vw;
    height: 100%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    pointer-events: auto;
    overflow: hidden;
}

.brx-search-ajax-offcanvas.active .brx-search-ajax-modal {
    transform: translateX(0);
}

/* Header with title and close button */
.brx-search-ajax-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.brx-search-ajax-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #000000;
}

.brx-search-ajax-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #000000;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    transition: opacity 0.2s ease;
}

.brx-search-ajax-close:hover {
    opacity: 0.7;
}

/* Search container */
.brx-search-ajax-container {
    display: flex;
    flex-direction: column;
}

/* Input field */
/* .brx-search-ajax-input {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    margin-bottom: 1rem;
    box-sizing: border-box;
} */

.brx-search-ajax-input:focus {
    outline: none;
}
.brx-search-ajax-input:focus-visible {
    outline: none!important;
    border-color: #aaa!important;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1)!important;
}
/* Loader */
.brx-search-ajax-loader {
    padding: 0.75rem;
    color: #666;
    font-size: 0.95rem;
    text-align: center;
}

/* Results container */
.brx-search-ajax-results {
    flex: 1;
    overflow-y: auto;
    max-height: 300px;
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 1rem;
    z-index: 9999;
}

/* Result item */
.brx-search-ajax-results .item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.brx-search-ajax-results .item:hover {
    background-color: #f9f9f9;
}

.brx-search-ajax-results .item .thumb {
    flex: 0 0 65.9px;
    height: 65.9px;
}

.brx-search-ajax-results .item .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.brx-search-ajax-results .item .center {
    flex: 1;
    padding: 0 0 0 0.5rem;
    line-height: 1.3;
}

.brx-search-ajax-results .item .center .title {
    display: block;
    margin: 0;
    padding: 0;
    text-decoration: none;
}

.brx-search-ajax-results .item .center .title:hover {
    text-decoration: underline;
}

.brx-search-ajax-results .item .right {
    flex: 0 0 auto;
    text-align: right;
}

.brx-search-ajax-results .item .price {
    margin: 0 0 0.25rem 0;
}

.brx-search-ajax-results .item .vat-info {
    margin: 0;
}

/* inline mode tweaks - apply to container when inline */
.brx-search-ajax-container.brx-search-ajax-inline {
    width: 100%;
    display: inline-block;
    position: relative;
    overflow: visible; /* keep header height unchanged when results open */
    min-height: 41.9px; /* reserve only input height in flow */
}

.brx-search-ajax-container.brx-search-ajax-inline .brx-search-ajax-shell {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    border: 1px solid #ddd;
    border-radius:2.25rem;
    background: #fff;
    overflow: hidden;
    z-index: 20;
}
.right .price .woocommerce-price-suffix{
	display:none!important;
}
.vat-info{
    line-height:1;
}
.search_sku{
    font-size:1.2rem;
    color:#666;
}
.brx-search-ajax-container.brx-search-ajax-inline .brx-search-ajax-input {
    width: 100%;
    max-width: 100%;
    border: 0;
    box-shadow: none;
    background: transparent;
    margin-bottom: 0;
}

.brx-search-ajax-container.brx-search-ajax-inline .brx-search-ajax-results {
    position: relative;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-sizing: border-box;
    margin-bottom: 0;
    display: none;
}

.brx-search-ajax-container.brx-search-ajax-inline.has-results .brx-search-ajax-input-wrap {
    border-bottom: 1px solid #f0f0f0;
}

.brx-search-ajax-container.brx-search-ajax-inline.has-results .brx-search-ajax-results {
    display: flex;
}


.brx-search-ajax-input-wrap {
    position: relative;
    display: block;
    width: 100%;
}
.brx-search-ajax-input-wrap .brx-search-ajax-input {
    margin-bottom: 0;
    padding-right: 3rem;
}

.brx-search-ajax-input-wrap.has-icon .brx-search-ajax-input {
    padding-left: 4rem;
}

.brx-search-ajax-input-icon {
    position: absolute;
    top: 50%;
    left: 1rem;
    line-height: 1;
    transform: translateY(-50%);
    pointer-events: none;
}
input[type="search"].brx-search-ajax-input::placeholder {
    color: var(--gray-txt)!important;
    opacity: 1;
}
.brx-search-ajax-input-icon > * {
    display: inline-block;
    transform-origin: center;
    transition: opacity 0.15s ease;
}

.brx-search-ajax-input-wrap.is-loading .brx-search-ajax-input-icon > * {
    opacity: 0;
}

.brx-search-ajax-input-wrap.is-loading .brx-search-ajax-input-icon::before {
    content: '';
    width: 1em;
    height: 1em;
    display: block;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    transform: translateY(55%);
    animation: brx-search-ajax-spin 0.7s linear infinite;
}

.brx-search-ajax-clear {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: currentColor;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
}

.brx-search-ajax-input-wrap.has-value .brx-search-ajax-clear {
    opacity: 1;
    visibility: visible;
}

.brx-search-ajax-clear:hover {
    opacity: 0.7;
}

.brx-search-ajax-clear:focus-visible {
    outline: none;
    opacity: 1;
    visibility: visible;
}

@keyframes brx-search-ajax-spin {
    from {
        transform: translateY(55%) rotate(0deg);
    }
    to {
        transform: translateY(55%) rotate(360deg);
    }
}

.brx-search-ajax-container.brx-search-ajax-inline .brx-search-ajax-input-wrap {
    border-radius:2.25rem;
    overflow: hidden;
    background: #fff;
}

/* header inside inline search */
.brx-search-ajax-header-inline {
    margin-bottom: 0.5rem;
}
.brx-search-ajax-header-inline .brx-search-ajax-title {
    margin: 0;
}
/* Counter */
.brx-search-ajax-count {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 0.5rem;
    order: -1; /* show at top inside results */
}

/* No results */
.brx-search-noresults {
    padding: 1rem 0.75rem;
    text-align: center;
}

/* Show all link */
.brx-search-ajax-showall {
    padding: 0.75rem 0;
    border-top: 1px solid #f0f0f0;
    text-align: center;
    order: 999;
    position: sticky;
    bottom: 0;
    background: white;
}

.brx-search-ajax-showall-link {
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.brx-search-ajax-showall-link:hover {
    opacity: 0.7;
}

/* thin dark scrollbar for all results */
.brx-search-ajax-results::-webkit-scrollbar {
    width: 6px;
}

.brx-search-ajax-results::-webkit-scrollbar-thumb {
    background-color: #212121;
    border-radius: 3px;
}

.brx-search-ajax-results {
    scrollbar-width: thin;
    scrollbar-color: #212121 transparent;
}
.btn-fill-slide, .single_add_to_cart_button, .single_buy_now_button, .bricks-background-primary, .cwg_popup_submit,
#place_order, .coupon-form button, .bricks-button, .quick-view {
  --fill-start: #212121;
  --fill-hover: var(--px-color-2);
  --text-color: #212121;
  --text-hover: #ffffff;
  border-radius:25px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  z-index: 0;
  color: var(--text-color);
  transition: color 0.35s ease;
}

.btn-fill-slide::before,.single_add_to_cart_button::before,
.btn-fill-slide::after,.single_add_to_cart_button::after,
.single_buy_now_button::before, .single_buy_now_button::after,
.bricks-background-primary::before, .bricks-background-primary::after,
.cwg_popup_submit::before, .cwg_popup_submit::after, #place_order::before, #place_order::after,
.coupon-form button::before, .coupon-form button::after, .bricks-button::before, .bricks-button::after, .quick-view::before, .quick-view::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -15%;
  width: 130%;
  z-index: -1;
  pointer-events: none;
  will-change: transform;
  transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* colore iniziale visibile */
.btn-fill-slide::before, .single_add_to_cart_button::before, .single_buy_now_button::before, .bricks-background-primary::before, .cwg_popup_submit::before,
#place_order::before, .coupon-form button::before, .bricks-button::before, .quick-view::before {
  background: var(--fill-start);
  transform: translateX(0) skewX(-18deg);
}

/* secondo colore nascosto a sinistra */
.btn-fill-slide::after, .single_add_to_cart_button::after, .single_buy_now_button::after, .bricks-background-primary::after, .cwg_popup_submit::after,
#place_order::after, .coupon-form button::after, .bricks-button::after, .quick-view::after {
  background: var(--fill-hover);
  transform: translateX(-115%) skewX(-18deg);
}

.btn-fill-slide:hover, .single_add_to_cart_button:hover,
.btn-fill-slide:focus-visible, .single_add_to_cart_button:focus-visible,
.single_buy_now_button:hover, .single_buy_now_button:focus-visible,
.bricks-background-primary:hover, .bricks-background-primary:focus-visible,
.cwg_popup_submit:hover, .cwg_popup_submit:focus-visible,
#place_order:hover, #place_order:focus-visible,
.coupon-form button:hover, .coupon-form button:focus-visible, .quick-view:hover, .quick-view:focus-visible {
  color: var(--text-hover);
}

.btn-fill-slide:hover::before, .single_add_to_cart_button:hover::before,
.btn-fill-slide:focus-visible::before, .single_add_to_cart_button:focus-visible::before,
.single_buy_now_button:hover::before, .single_buy_now_button:focus-visible::before,
.bricks-background-primary:hover::before, .bricks-background-primary:focus-visible::before,
.cwg_popup_submit:hover::before, .cwg_popup_submit:focus-visible::before,
#place_order:hover::before, #place_order:focus-visible::before,
.coupon-form button:hover::before, .coupon-form button:focus-visible::before, .quick-view:hover::before, .quick-view:focus-visible::before {
  transform: translateX(115%) skewX(-18deg);
}

.btn-fill-slide:hover::after,
.btn-fill-slide:focus-visible::after,
.single_add_to_cart_button:hover::after,
.single_add_to_cart_button:focus-visible::after,
.single_buy_now_button:hover::after,
.bricks-background-primary:hover::after,
.bricks-background-primary:focus-visible::after,
.cwg_popup_submit:hover::after,
.cwg_popup_submit:focus-visible::after, 
#place_order:hover::after,
#place_order:focus-visible::after,
.coupon-form button:hover::after,
.coupon-form button:focus-visible::after,
.bricks-button:hover::after,
.bricks-button:focus-visible::after,
.quick-view:hover::after,
.quick-view:focus-visible::after {
  transform: translateX(0) skewX(-18deg);
}


/* =========================
   VERSIONE 1
   Iniziale scuro -> hover var(--px-color-2)
========================= */
.btn-fill-slide--dark-to-brand, .single_add_to_cart_button, .bricks-background-primary, .cwg_popup_submit, .bricks-button{
  --fill-start: #212121;
  --fill-hover: var(--px-color-2);
  --text-color: #ffffff;
  --text-hover: #ffffff;
}


/* =========================
   VERSIONE 2
   Invertita: iniziale var(--px-color-2) -> hover scuro
========================= */
.btn-fill-slide--brand-to-dark, .single_buy_now_button, #place_order, .coupon-form button  {
  --fill-start: var(--px-color-2);
  --fill-hover: #212121;
  --text-color: #ffffff;
  --text-hover: #ffffff;
}

.btn-fill-slide--dark-to-white {
  --fill-start: #212121;
  --fill-hover: #ffffff;
  --text-color: #ffffff;
  --text-hover: #212121;
}

/* =========================
   VERSIONE 3
   Iniziale bianco -> hover var(--px-color-2)
========================= */
.btn-fill-slide--white-to-brand, .quick-view  {
  --fill-start: #ffffff;
  --fill-hover: var(--px-color-2);
  --text-color: var(--px-color-2);
  --text-hover: #ffffff;
}
.quick-view:hover svg{
  fill:#ffffff !important;
}
.btn-fill-slide--white-to-brand:hover, .bricks-background-primary:hover{
    color:#ffffff!important;
}


/* Responsive */
@media (max-width: 768px) {
    .brx-search-ajax-modal {
        width: 100%;
        max-width: 100%;
    }

    .brx-search-ajax-header {
        margin-bottom: 1rem;
    }

    .brx-search-ajax-title {
        font-size: 20px;
    }
}
