/* ParmaZoo sökning. Avgränsade regler; mallens CSS och JavaScript lämnas orörda. */
#header.pz-search-header {
    position: sticky !important;
    top: calc(-1 * var(--pz-top-height, 0px)) !important;
    left: auto;
    right: auto;
    margin: 0 !important;
    z-index: 1000;
    overflow: visible !important;
}
#header.pz-search-header #topNav {
    position: relative !important;
    top: auto !important;
    transform: none !important;
    overflow: visible !important;
    max-height: none !important;
    background: #fff;
}
#header.pz-search-header #topNav > .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding-top: 10px;
    padding-bottom: 10px;
}
#header.pz-search-header #topNav > .container::before,
#header.pz-search-header #topNav > .container::after { display: none; }
#header.pz-search-header .nav-main-collapse { order: 1; flex: 1 1 100%; }
#header.pz-search-header .pz-search { order: 0; flex: 1 1 100%; }
#header.pz-search-header #topNav .btn-mobile { display: none; }
.pz-search, .pz-search * { box-sizing: border-box; }
.pz-search { position: relative; min-width: 0; font-family: inherit; }
.pz-search-form { margin: 0; padding: 0; }
.pz-search-field {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 46px;
    border: 1px solid #bcbcbc;
    border-radius: 8px;
    background: #f7f7f7;
    transition: border-color .15s, box-shadow .15s;
}
.pz-search-field:focus-within { border-color: #ed2e32; box-shadow: 0 0 0 3px rgba(237,46,50,.13); background: #fff; }
.pz-search #pz-search-input {
    flex: 1 1 auto;
    min-width: 0;
    width: 0;
    height: 44px;
    margin: 0;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    outline: none;
    box-shadow: none;
    background: transparent;
    color: #242121;
    font: inherit;
    font-size: 16px;
    appearance: none;
}
.pz-search #pz-search-input::-webkit-search-cancel-button { display: none; }
.pz-search button { cursor: pointer; font-family: inherit; }
.pz-search-field button { flex: 0 0 44px; width: 44px; height: 44px; border: 0; border-radius: 6px; background: transparent; color: #242121; font-size: 20px; padding: 0; }
.pz-search-field .pz-search-clear, .pz-search-field .pz-search-close { font-size: 28px; }
.pz-search-field .pz-search-close { display: none; }
.pz-search button:focus-visible, .pz-search-result:focus-visible { outline: 2px solid #d52126; outline-offset: -3px; }
.pz-search-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: max(100%, 460px);
    max-width: calc(100vw - 30px);
    max-height: min(650px, 70vh);
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid #e4e1e1;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(0,0,0,.18);
    z-index: 1010;
}
.pz-search-result { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border-bottom: 1px solid #eee; color: #242121; text-decoration: none !important; }
.pz-search-result:hover, .pz-search-result[aria-selected="true"] { color: #242121; background: #fff2f2; }
.pz-search-result img { flex: 0 0 60px; width: 60px; height: 60px; object-fit: contain; background: #fff; border-radius: 5px; }
.pz-search-result-copy { min-width: 0; display: grid; gap: 4px; }
.pz-search-result strong { font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.pz-search-stock { color: #666; font-size: 12px; line-height: 1.3; }
.pz-search-stock.is-available { color: #28703d; }
.pz-search-price { font-size: 16px; font-weight: 700; line-height: 1.3; }
.pz-search-price small { font-size: 11px; font-weight: 400; color: #666; white-space: nowrap; }
.pz-search .pz-search-all { display: block; width: calc(100% - 28px); margin: 14px; padding: 12px; border: 0; border-radius: 6px; background: #ed2e32; color: #fff; font-size: 15px; font-weight: 600; text-align: center; }
.pz-search-message { padding: 18px; margin: 0; font-size: 14px; line-height: 1.5; color: #555; }
.pz-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.pz-search [hidden], .pz-search-backdrop[hidden] { display: none !important; }
.pz-search-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 19999; }
@media (min-width: 1300px) {
    #header.pz-search-header .nav-main-collapse { order: 0; flex: 1 1 0; min-width: 0; }
    #header.pz-search-header .pz-search { order: 1; flex: 0 0 300px; }
    #header.pz-search-header #topMain > li > a { padding-left: 10px; padding-right: 10px; }
}
@media (max-width: 990px) {
    #header.pz-search-header #topNav > .container { gap: 10px; padding: 10px 15px; }
    #header.pz-search-header .pz-search { flex: 1 1 0; order: 0; }
    #header.pz-search-header #topNav .btn-mobile { display: block; order: 1; flex: 0 0 44px; width: 44px; height: 46px; float: none; margin: 0; padding: 0; border-radius: 6px; }
    #header.pz-search-header .nav-main-collapse { order: 2; flex: 1 1 100%; width: 100%; margin: 0; max-height: 65dvh; overflow-y: auto; }
    #header.pz-search-header .nav-main-collapse.collapse:not(.in) { display: none !important; }
    #header.pz-search-header .nav-main-collapse.in { display: block !important; }
    .pz-search.pz-search-modal { position: fixed; z-index: 20000; inset: var(--pz-search-top, 0px) 0 auto; width: 100%; height: var(--pz-search-height, 100dvh); padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); background: #fff; }
    .pz-search-modal .pz-search-form { display: flex; flex-direction: column; height: 100%; }
    .pz-search-modal .pz-search-field { flex: 0 0 auto; }
    .pz-search-modal .pz-search-close { display: block; }
    .pz-search-modal .pz-search-panel { position: static; width: 100%; max-width: none; max-height: none; min-height: 0; flex: 1 1 auto; margin-top: 12px; border: 0; border-radius: 0; box-shadow: none; }
    .pz-search-modal .pz-search-result { padding: 12px 4px; }
    .pz-search-modal .pz-search-all { margin: 14px 0; width: 100%; }
}

@media (min-width: 1300px) {
    #header.pz-search-header .pz-search {
        flex: 0 0 220px;
    }

    #header.pz-search-header .pz-search-field {
        min-height: 38px;
    }

    #header.pz-search-header #pz-search-input {
        height: 36px;
        font-size: 14px;
    }

    #header.pz-search-header .pz-search-field button {
        flex-basis: 36px;
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
}
