/*
 * Header-only customization layer.
 *
 * Keep all future Flatsome header/topbar/navigation tweaks here so they stay
 * isolated from the shared child-theme stylesheet.
 */

/*
 * Suggested sections:
 * 1. Header layout
 * 2. Top bar
 * 3. Desktop navigation
 * 4. Mobile header / off-canvas
 * 5. Search / account / cart
 * 6. Sticky header states
 */

/* 1. Header layout */
#wide-nav > .flex-row {
    align-items: center;
}

#wide-nav > .flex-row > .flex-col {
    display: flex;
    align-items: center;
}

body.camap-theme-ui .maps-header a small,
body.camap-theme-ui .maps-header a small b,
body.camap-theme-ui .header-vertical-menu__opener .header-vertical-menu__title {
    color: var(--sicomp-text-inverse);
}

body.camap-theme-ui #wide-nav .nav > li > a.nav-top-link[aria-current="page"],
body.camap-theme-ui #wide-nav .nav > li.current-menu-item > a.nav-top-link,
body.camap-theme-ui #wide-nav .nav > li.current_page_item > a.nav-top-link {
    color: var(--sicomp-primary);
}

/* 3. Desktop navigation */
#wide-nav.header-bottom .header-bottom-nav {
    column-gap: clamp(12px, 2vw, 30px);
}

#wide-nav.header-bottom .header-bottom-nav > li {
    margin: 0;
}

#wide-nav.header-bottom .header-bottom-nav > li.camap-header-bottom-icon-item > a.nav-top-link {
    display: inline-flex;
    align-items: center;
    font-size: clamp(13.5px, 1.05vw, 15.5px);
    letter-spacing: 0;
}

.camap-header-bottom-menu-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.camap-header-bottom-menu-icon-mark {
    display: inline-flex;
    width: 17px;
    min-width: 17px;
    height: 17px;
    align-items: center;
    justify-content: center;
    color: var(--sicomp-primary);
}

.camap-header-bottom-menu-icon {
    width: 17px;
    min-width: 17px;
    height: 17px;
    color: currentColor;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

#wide-nav.header-bottom .camap-header-bottom-menu-text {
    min-width: 0;
}

li.current-dropdown:not(.account-item):not(.cart-item) > .nav-dropdown {
    left: 0;
}

.nav > li:not(.account-item):not(.cart-item) > .nav-dropdown.nav-dropdown-default > li > a {
    moz-transition: all 0.2s;
    -o-transition: all 0.2s;
    -webkit-transition: all 0.2s;
    transition: all 0.2s;
    color: var(--sicomp-text);
    font-size: 14px;
    position: relative;
}

.nav > li:not(.account-item):not(.cart-item) > .nav-dropdown.nav-dropdown-default > li > a::after {
    position: absolute;
    content: '';
    height: 100%;
    width: 2px;
    left: 0;
    -webkit-transition: 0.5s;
    transition: 0.5s;
    opacity: 0;
    visibility: hidden;
    top: 0;
    -webkit-transform: scale(0);
    transform: scale(0);
}

.nav > li:not(.account-item):not(.cart-item) > .nav-dropdown-default .nav-column li > a,
.nav > li:not(.account-item):not(.cart-item) > .nav-dropdown.nav-dropdown-default > li > a {
    padding-left: 20px;
    margin: 0;
}

.nav > li:not(.account-item):not(.cart-item) > .nav-dropdown.nav-dropdown-default > li {
    margin: 0;
}

.nav > li:not(.account-item):not(.cart-item) > .nav-dropdown.nav-dropdown-default > li > a:hover {
    background-color: transparent;
    color: var(--mainColor);
}

.nav > li:not(.account-item):not(.cart-item) > .nav-dropdown.nav-dropdown-default > li > a:hover::after {
    opacity: 1;
    visibility: visible;
    -webkit-transform: scale(1);
    transform: scale(1);
    background-color: var(--mainColor);
}

.nav-dropdown-has-border li:not(.account-item):not(.cart-item) > .nav-dropdown {
    border: none;
    padding: 0;
}

.nav-dropdown-has-arrow li.has-dropdown:not(.account-item):not(.cart-item):after,
.nav-dropdown-has-arrow li.has-dropdown:not(.account-item):not(.cart-item):before {
    display: none;
}

.nav > li:not(.account-item):not(.cart-item) > .nav-dropdown {
    border-radius: 14px;
    border: 1px solid var(--sicomp-border-alpha);
    box-shadow: 0 18px 42px rgba(var(--sicomp-shadow-rgb), 0.14);
    padding: 10px 0;
}

/* 4. Mobile header / off-canvas */
.off-canvas-left .mfp-content,
.off-canvas-right .mfp-content {
    background-color: var(--sicomp-card);
    border-radius: 14px;
}

.off-canvas:not(.off-canvas-center) .nav-vertical li > ul li a {
    padding: 5px 5px 5px 40px;
    font-size: 12px;
}

.nav-dropdown li.has-icon-left > a .camap-menu-icon,
.nav-sidebar li.has-icon-left > a .camap-menu-icon {
    width: 18px;
    height: 18px;
    margin-right: 8px;
}

.nav-vertical > li.has-icon-left > a {
    display: flex;
    align-items: center;
}

.nav-vertical li.has-icon-left > a .nav-top-link {
    display: inline-flex;
    align-items: center;
}

.off-canvas:not(.off-canvas-center) .nav-vertical li > a {
    padding: 10px 20px;
    letter-spacing: 0;
    text-transform: inherit;
    font-size: 14px;
    font-weight: 500;
    color: black;
}

.header-vertical-menu__fly-out .nav-vertical-fly-out > li.menu-item > a {
    color: var(--sicomp-text);
    font-size: 14px;
    font-weight: 500;
}

.header-vertical-menu__fly-out .nav-vertical-fly-out > li.menu-item > a:hover,
.header-vertical-menu__fly-out .nav-vertical-fly-out > li.menu-item.active > a,
.header-vertical-menu__fly-out .nav-vertical-fly-out > li.menu-item.current-dropdown > a {
    color: var(--sicomp-primary);
}

@media (max-width: 849px) {
    .header .nav-icon > a {
        display: inline-flex;
        width: 24px;
        height: 24px;
        align-items: center;
        justify-content: center;
    }

    .header .nav-icon > a .icon-menu {
        font-size: 24px;
        line-height: 1;
        width: 24px;
        height: 24px;
    }

    #wide-nav.header-bottom > .flex-row {
        min-width: 0;
        overflow: hidden;
    }

    #wide-nav.header-bottom > .flex-row > .show-for-medium.flex-col {
        min-width: 0;
        overflow: hidden;
    }

    #wide-nav.header-bottom .header-bottom-nav.mobile-nav {
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: clamp(20px, 6vw, 34px);
        width: 100%;
        max-width: 100%;
        padding: 8px 0 10px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        scroll-snap-type: x proximity;
    }

    .camap-mobile-header-search {
        position: relative;
        z-index: 11;
        background: var(--sicomp-primary);
    }

    .camap-mobile-header-search__nav {
        display: block;
        margin: 0;
        padding: 8px 0;
    }

    .camap-mobile-header-search__nav > li.header-search-form {
        display: block;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .camap-mobile-header-search__nav > li.header-search-form .header-search-form-wrapper,
    .camap-mobile-header-search__nav > li.header-search-form .searchform-wrapper,
    .camap-mobile-header-search__nav > li.header-search-form .searchform {
        width: 100%;
    }

    .camap-mobile-header-search__nav > li.header-search-form .searchform {
        margin: 0;
    }

    .header-wrapper.stuck #logo {
        opacity: 0;
        pointer-events: none;
    }

    .header-wrapper.stuck .header-inner .flex-left,
    .header-wrapper.stuck .header-inner .flex-right {
        position: relative;
        z-index: 14;
    }

    .header-wrapper.stuck .camap-mobile-header-search {
        position: absolute;
        top: 0;
        right: 58px;
        left: 58px;
        z-index: 13;
        height: 70px;
        background: transparent;
    }

    .header-wrapper.stuck .camap-mobile-header-search > .container,
    .header-wrapper.stuck .camap-mobile-header-search__nav,
    .header-wrapper.stuck .camap-mobile-header-search__nav > li.header-search-form,
    .header-wrapper.stuck .camap-mobile-header-search__nav > li.header-search-form .header-search-form-wrapper,
    .header-wrapper.stuck .camap-mobile-header-search__nav > li.header-search-form .searchform-wrapper,
    .header-wrapper.stuck .camap-mobile-header-search__nav > li.header-search-form .searchform {
        width: 100%;
        max-width: none;
        height: 100%;
        padding: 0;
    }

    .header-wrapper.stuck .camap-mobile-header-search__nav > li.header-search-form .searchform {
        display: flex;
        align-items: center;
    }

    .header-wrapper.stuck .camap-mobile-header-search__nav > li.header-search-form .searchform-wrapper {
        background: transparent;
    }

    .header-wrapper.stuck .camap-mobile-header-search__nav > li.header-search-form .searchform > .flex-row {
        width: 100%;
        height: 44px;
        min-height: 44px;
        border-radius: 999px;
    }

    .header-wrapper.stuck .camap-mobile-header-search__nav > li.header-search-form .searchform > .flex-row > .flex-grow {
        flex: 1 1 100%;
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .header-wrapper.stuck .camap-mobile-header-search__nav > li.header-search-form .searchform > .flex-row > .flex-col:last-child {
        display: none;
    }

    .header-wrapper.stuck .camap-mobile-header-search__nav > li.header-search-form .search-field {
        width: 100%;
        height: 42px;
        min-height: 42px;
        border-radius: 999px 0 0 999px;
        font-size: 14px;
    }

    .header-wrapper.stuck .camap-mobile-header-search__nav > li.header-search-form .ux-search-submit.button {
        display: none !important;
    }

    .header-wrapper.stuck .camap-mobile-header-search__nav > li.header-search-form .live-search-results {
        transform: none;
    }

    #wide-nav.header-bottom .header-bottom-nav.mobile-nav::-webkit-scrollbar {
        display: none;
    }

    #wide-nav.header-bottom .header-bottom-nav.mobile-nav > li {
        flex: 0 0 auto;
        scroll-snap-align: start;
    }

    #wide-nav.header-bottom .header-bottom-nav.mobile-nav > li > a {
        white-space: nowrap;
    }
}

.nav-sidebar.nav-vertical > li + li {
    border: none;
}

.sidebar-menu .nav-sidebar > li.cart-item > a.header-cart-link {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-menu .nav-sidebar > li.cart-item .camap-sidebar-cart-icon {
    display: inline-flex;
    width: 20px;
    min-width: 20px;
    align-items: center;
    justify-content: center;
    color: var(--sicomp-primary);
}

.sidebar-menu .nav-sidebar > li.cart-item .camap-sidebar-cart-icon i {
    margin: 0;
    font-size: 20px;
    line-height: 1;
}

.sidebar-menu .nav-sidebar > li.cart-item .camap-sidebar-cart-title {
    display: inline-flex;
    min-width: 0;
    align-items: baseline;
    gap: 6px;
}

.sidebar-menu .nav-sidebar > li.cart-item .camap-sidebar-cart-label {
    color: var(--sicomp-text);
    font-size: 14px;
    font-weight: 500;
}

.sidebar-menu .nav-sidebar > li.cart-item .camap-sidebar-cart-count,
.sidebar-menu .nav-sidebar > li.cart-item .cart-price {
    color: var(--sicomp-muted);
    font-size: 12px;
    font-weight: 500;
}

.header .camap-header-actions {
    margin: 0;
}

.header .camap-header-actions__inner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.header .camap-header-action {
    --camap-header-action-text: var(--sicomp-text-inverse);
    --camap-header-action-icon: var(--sicomp-text-inverse);
    position: relative;
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--camap-header-action-text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    text-transform: none;
    box-shadow: none;
}

.header .camap-header-action:hover,
.header .camap-header-action:focus-visible {
    background: transparent;
    color: var(--sicomp-text-inverse);
    outline: none;
    opacity: 0.88;
}

.header .camap-header-action__icon {
    position: relative;
    display: inline-flex;
    width: 20px;
    min-width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    color: var(--camap-header-action-icon);
}

.header .camap-header-action__icon i {
    margin: 0;
    font-size: 20px;
    line-height: 1;
}

.header .camap-header-action__icon svg {
    display: block;
    width: 20px;
    height: 20px;
}

.header .camap-header-action__text {
    white-space: nowrap;
}

.header .camap-header-action__badge {
    position: absolute;
    top: -8px;
    right: -9px;
    display: inline-flex;
    min-width: 16px;
    height: 16px;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 1px solid var(--sicomp-primary);
    border-radius: 999px;
    background: var(--sicomp-card);
    color: var(--sicomp-primary);
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}

@media (max-width: 849px) {
    .header .mobile-nav .camap-header-actions__inner {
        display: inline-grid;
        grid-auto-flow: column;
        grid-auto-columns: max-content;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }

    .header .mobile-nav .camap-header-action {
        min-width: 0;
        flex-direction: row;
        min-height: 32px;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 4px 0;
        font-size: 12px;
        font-weight: 600;
        box-shadow: none;
    }

    .header .mobile-nav .camap-header-action__icon,
    .header .mobile-nav .camap-header-action__icon i,
    .header .mobile-nav .camap-header-action__icon svg {
        width: 22px;
        min-width: 22px;
        height: 22px;
        font-size: 22px;
    }

    .header .mobile-nav .camap-header-action__text {
        max-width: none;
        overflow: hidden;
        text-align: left;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .header .mobile-nav .camap-header-actions--account .camap-header-action--account,
    .mobile-sidebar .camap-header-actions--account .camap-header-action--account {
        width: auto;
        min-width: max-content;
        max-width: 100%;
        flex: 0 0 auto;
    }

    .header .mobile-nav .camap-header-actions--account .camap-header-action__text,
    .mobile-sidebar .camap-header-actions--account .camap-header-action__text {
        display: inline-block;
        min-width: max-content;
        max-width: none;
        overflow: visible;
        text-overflow: clip;
        white-space: nowrap;
        word-break: keep-all;
    }

    .header .mobile-nav .camap-header-actions--cart .camap-header-action--cart,
    .mobile-sidebar .camap-header-actions--cart .camap-header-action--cart {
        width: 34px;
        min-width: 34px;
        height: 34px;
        min-height: 34px;
        padding: 0;
        border-radius: 999px;
        gap: 0;
    }

    .header .mobile-nav .camap-header-actions--cart .camap-header-action--cart .camap-header-action__text,
    .mobile-sidebar .camap-header-actions--cart .camap-header-action--cart .camap-header-action__text {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .header .mobile-nav .camap-header-action__badge {
        top: -7px;
        right: -10px;
    }

    .mobile-sidebar .camap-header-actions,
    .mobile-sidebar .camap-header-actions__inner {
        width: 100%;
    }

    .mobile-sidebar .camap-header-actions__inner {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        padding: 8px 16px 10px;
    }

    .mobile-sidebar .camap-header-actions--account,
    .mobile-sidebar .camap-header-actions--cart {
        display: inline-grid;
        width: auto;
        grid-template-columns: max-content;
    }

    .mobile-sidebar .camap-header-action {
        flex-direction: row;
        min-width: 0;
        min-height: 42px;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 9px 12px;
        border: 1px solid rgba(var(--sicomp-primary-rgb), 0.16);
        border-radius: 999px;
        background: rgba(var(--sicomp-primary-rgb), 0.08);
        color: var(--sicomp-primary);
        font-size: 13px;
        font-weight: 600;
    }

    .mobile-sidebar .camap-header-action:hover,
    .mobile-sidebar .camap-header-action:focus-visible {
        color: var(--sicomp-primary);
        background: rgba(var(--sicomp-primary-rgb), 0.12);
    }

    .mobile-sidebar .camap-header-action__icon,
    .mobile-sidebar .camap-header-action__icon i,
    .mobile-sidebar .camap-header-action__icon svg {
        width: 20px;
        min-width: 20px;
        height: 20px;
        font-size: 20px;
    }

    .mobile-sidebar .camap-header-action__text {
        min-width: 0;
        max-width: none;
        overflow: visible;
        text-align: center;
        text-overflow: clip;
        white-space: nowrap;
    }

    .mobile-sidebar .camap-header-action__badge {
        top: -7px;
        right: -9px;
    }

    .mobile-sidebar .camap-header-actions--account {
        display: inline-grid;
        width: auto;
        grid-template-columns: max-content;
    }

    .mobile-sidebar .camap-header-actions--account .camap-header-action--account {
        width: auto;
        min-width: max-content;
        max-width: 100%;
        flex: 0 0 auto;
    }

    .mobile-sidebar .camap-header-actions--account .camap-header-action__text {
        display: inline-block;
        min-width: max-content;
        max-width: none;
        overflow: visible;
        text-overflow: clip;
        white-space: nowrap;
        word-break: keep-all;
    }

    .mobile-sidebar .camap-header-actions--cart {
        display: inline-grid;
        width: auto;
        grid-template-columns: max-content;
    }

    .mobile-sidebar .camap-header-actions--cart .camap-header-action--cart {
        width: 34px;
        min-width: 34px;
        height: 34px;
        min-height: 34px;
        padding: 0;
        gap: 0;
    }

    .mobile-sidebar .camap-header-actions--cart .camap-header-action--cart .camap-header-action__text {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }
}

/* 5. Search / account / cart */
.header .header-search-form,
.header .header-search-form-wrapper,
.searchform-wrapper {
    overflow: visible;
}

.header .searchform-wrapper {
    border-radius: 18px;
}

.header .searchform {
    --camap-search-height: clamp(48px, 4vw, 56px);
    --camap-search-button-size: calc(var(--camap-search-height) - 8px);
    --camap-search-dropdown-radius: 18px;
    --camap-search-dropdown-gap: 8px;
    --camap-search-dropdown-shadow: 0 18px 40px rgba(var(--sicomp-shadow-rgb), 0.14);
    --camap-search-result-image-size: clamp(64px, 4.6vw, 80px);
    --camap-search-result-gap: clamp(12px, 1.2vw, 16px);
    --camap-search-result-padding-y: clamp(12px, 1vw, 15px);
    --camap-search-result-padding-x: clamp(14px, 1.2vw, 18px);
    --camap-search-result-name-size: clamp(14px, 1vw, 16px);
    --camap-search-result-price-size: clamp(15px, 1vw, 17px);
}

.header .searchform.camap-search-expanded {
    z-index: 32;
}

.header .live-search-results {
    left: 0;
    right: auto;
    display: none;
    width: auto;
    max-width: 100%;
    margin-top: var(--camap-search-dropdown-gap);
    box-sizing: border-box;
    border-radius: var(--camap-search-dropdown-radius);
    overflow: hidden;
    background: var(--sicomp-card);
    border: 1px solid var(--sicomp-border-alpha);
    box-shadow: var(--camap-search-dropdown-shadow);
    transform: none;
}

.header .searchform.camap-search-expanded .live-search-results,
.header .live-search-results[aria-hidden="false"] {
    display: block;
}

.header .live-search-results .autocomplete-suggestions {
    display: grid;
    width: 100% !important;
    max-height: min(70vh, 600px);
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--sicomp-card);
    border-radius: inherit;
}

.header .live-search-results .autocomplete-suggestion {
    display: grid;
    grid-template-columns: var(--camap-search-result-image-size) minmax(0, 1fr);
    align-items: start;
    gap: var(--camap-search-result-gap);
    padding: var(--camap-search-result-padding-y) var(--camap-search-result-padding-x);
    border-bottom: 1px solid var(--sicomp-border-alpha);
    cursor: pointer;
}

.header .live-search-results .autocomplete-suggestion:last-child {
    border-bottom: 0;
}

.header .live-search-results .autocomplete-selected,
.header .live-search-results .autocomplete-suggestion:hover {
    background: var(--sicomp-primary-subtle);
}

.header .live-search-results .autocomplete-suggestion.camap-search-empty-row,
.header .live-search-results .autocomplete-suggestion.camap-search-empty-row:hover,
.header .live-search-results .autocomplete-suggestion.camap-search-empty-row.autocomplete-selected {
    display: block;
    padding: 16px 18px;
    background: var(--sicomp-card);
    cursor: default;
}

.header .live-search-results .search-image {
    display: block;
    width: var(--camap-search-result-image-size);
    height: var(--camap-search-result-image-size);
    border: 1px solid var(--sicomp-border-alpha);
    border-radius: 8px;
    object-fit: contain;
    background: var(--sicomp-card);
}

.header .live-search-results .camap-search-result-content {
    display: grid;
    min-width: 0;
    align-content: start;
    gap: 5px;
}

.header .live-search-results .search-name {
    display: block;
    overflow: visible;
    color: var(--sicomp-text);
    font-size: var(--camap-search-result-name-size);
    line-height: 1.38;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.header .live-search-results .search-name strong {
    color: var(--sicomp-primary);
    font-weight: 700;
}

.header .live-search-results .search-price {
    display: block;
    min-width: 0;
    color: var(--sicomp-price);
    font-size: var(--camap-search-result-price-size);
    line-height: 1.15;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.header .live-search-results .search-price .woocommerce-Price-amount {
    color: inherit;
    text-decoration: none;
}

.header .live-search-results .search-price del {
    color: var(--sicomp-text-muted);
    font-size: 8px;
    line-height: 1.2;
    font-weight: 500;
}

.header .live-search-results .search-price ins {
    color: var(--sicomp-price);
    text-decoration: none;
}

.header .live-search-results .screen-reader-text {
    display: none;
}

.header .live-search-results .camap-search-empty {
    color: var(--sicomp-text-soft);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    font-size: 13px;
    line-height: 1.25;
    font-weight: 500;
    letter-spacing: -0.015em;
    text-align: center;
}

.header .live-search-results .camap-search-empty strong {
    color: var(--sicomp-text);
    font-weight: 650;
}

.header .search-field,
.searchform .search-field {
    min-height: 42px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.header .camap-search-input-wrap {
    position: relative;
}

.header .camap-search-input-wrap::before {
    position: absolute;
    top: 50%;
    left: 17px;
    z-index: 14;
    display: inline-flex;
    width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    color: var(--sicomp-text-muted);
    font-family: "fl-icons";
    font-size: 18px;
    line-height: 1;
    pointer-events: none;
    transform: translateY(-50%);
    transition: color var(--sicomp-duration-fast) var(--sicomp-ease);
    content: "\e012";
}

.header .searchform:focus-within .camap-search-input-wrap::before {
    color: var(--sicomp-primary);
}

.header .searchform.camap-search-is-loading .camap-search-input-wrap::before {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(var(--sicomp-primary-rgb), 0.18);
    border-top-color: var(--sicomp-primary);
    border-radius: 999px;
    font-size: 0;
    content: "";
    animation: camap-search-spin 0.75s linear infinite;
}

@keyframes camap-search-spin {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

.header .camap-search-clear {
    position: absolute;
    top: 50%;
    right: 10px;
    z-index: 14;
    display: inline-flex;
    width: 26px;
    height: 26px;
    min-height: 26px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--sicomp-text-muted);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-50%);
    transition: color var(--sicomp-duration-fast) var(--sicomp-ease), background-color var(--sicomp-duration-fast) var(--sicomp-ease), opacity var(--sicomp-duration-fast) var(--sicomp-ease);
}

.header .camap-search-clear.is-visible {
    opacity: 1;
    visibility: visible;
}

.header .camap-search-clear:hover,
.header .camap-search-clear:focus-visible {
    background: var(--sicomp-primary-soft);
    color: var(--sicomp-primary);
    outline: none;
}

.header .camap-search-clear span {
    display: block;
    font-size: 21px;
    line-height: 1;
    transform: translateY(-1px);
}

.header .camap-search-trending {
    padding: 16px;
    background: var(--sicomp-card);
}

.header .camap-search-trending__title {
    margin-bottom: 10px;
    color: var(--sicomp-text-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
}

.header .camap-search-trending__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.header .camap-search-trending__chip {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    padding: 6px 12px;
    border: 0;
    border-radius: 999px;
    background: var(--sicomp-secondary-soft);
    color: var(--sicomp-text-soft);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background-color var(--sicomp-duration-fast) var(--sicomp-ease), color var(--sicomp-duration-fast) var(--sicomp-ease);
}

.header .camap-search-trending__chip:hover,
.header .camap-search-trending__chip:focus-visible {
    background: var(--sicomp-primary-soft);
    color: var(--sicomp-primary);
    outline: none;
}

.header .camap-search-view-all {
    padding: 10px;
    border-top: 1px solid var(--sicomp-border-alpha);
    background: var(--sicomp-soft);
}

.header .camap-search-view-all__button {
    display: block;
    width: 100%;
    min-height: 36px;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--sicomp-primary);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    cursor: pointer;
}

.header .camap-search-view-all__button:hover,
.header .camap-search-view-all__button:focus-visible {
    background: var(--sicomp-primary-soft);
    outline: none;
}

.header .searchform .ux-search-submit.button {
    display: none !important;
}

.header .searchform .ux-search-submit.button i {
    position: relative;
    z-index: 13;
    display: inline-flex;
    width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    margin: 0;
    font-size: 20px;
    line-height: 20px;
    transform: translateY(1px);
}

.header .search-field:focus,
.searchform .search-field:focus {
    border-color: transparent;
    box-shadow: none;
    background: transparent;
    outline: none;
}

body.camap-theme-ui .header .searchform-wrapper,
body.camap-theme-ui .header .searchform {
    border-radius: 10px;
}

body.camap-theme-ui .header .searchform-wrapper {
    background: transparent;
}

body.camap-theme-ui .header .searchform > .flex-row {
    min-height: var(--camap-search-height);
    align-items: center;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 999px;
    background: #f0f4fc;
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

body.camap-theme-ui .header .searchform > .flex-row > .flex-grow {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

body.camap-theme-ui .header .searchform > .flex-row > .flex-col:last-child {
    display: none;
}

body.camap-theme-ui .header .searchform > .flex-row:hover {
    background: #e8eef9;
}

body.camap-theme-ui .header .searchform:focus-within > .flex-row {
    border-color: rgba(var(--sicomp-primary-rgb), 0.46);
    background: var(--sicomp-card);
    box-shadow: 0 0 0 4px rgba(var(--sicomp-primary-rgb), 0.1), 0 10px 24px rgba(var(--sicomp-shadow-rgb), 0.08);
}

body.camap-theme-ui .header .search-field,
body.camap-theme-ui .searchform .search-field {
    min-height: var(--camap-search-height);
    padding-left: 48px;
    padding-right: 44px;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
}

body.camap-theme-ui .header .searchform .ux-search-submit.button {
    display: none !important;
}

body.camap-theme-ui .header .searchform .ux-search-submit.button:hover,
body.camap-theme-ui .header .searchform .ux-search-submit.button:focus-visible {
    background: var(--sicomp-primary-hover) !important;
    color: var(--sicomp-text-inverse) !important;
}

@media (max-width: 849px) {
    .header .searchform {
        --camap-search-dropdown-radius: 16px;
        --camap-search-result-image-size: clamp(76px, 16vw, 112px);
        --camap-search-result-gap: clamp(14px, 3vw, 22px);
        --camap-search-result-padding-y: clamp(15px, 3vw, 22px);
        --camap-search-result-padding-x: clamp(15px, 3vw, 24px);
        --camap-search-result-name-size: clamp(15px, 3.2vw, 20px);
        --camap-search-result-price-size: clamp(16px, 3vw, 20px);
    }

    .header .live-search-results {
        border-radius: var(--camap-search-dropdown-radius);
    }

    .header .live-search-results .autocomplete-suggestion {
        grid-template-columns: var(--camap-search-result-image-size) minmax(0, 1fr);
        gap: var(--camap-search-result-gap);
        padding: var(--camap-search-result-padding-y) var(--camap-search-result-padding-x);
    }

    .header .live-search-results .search-image {
        width: var(--camap-search-result-image-size);
        height: var(--camap-search-result-image-size);
        border-radius: 8px;
    }

    .header .live-search-results .search-price {
        min-width: 0;
        font-size: var(--camap-search-result-price-size);
        line-height: 1.15;
    }

    .header .live-search-results .search-name {
        font-size: var(--camap-search-result-name-size);
        line-height: 1.38;
    }

    .header .live-search-results .autocomplete-suggestion.camap-search-empty-row {
        padding: 14px 12px;
    }

    .header .live-search-results .camap-search-empty {
        gap: 4px;
        font-size: 12px;
        line-height: 1.25;
    }
}
