/* Simex - pretraga dok se kuca (inc/pretraga.php, assets/js/kha-pretraga.js) */

/* ---------- lupa u zaglavlju (zamena za plugin kha-woo-instant-search) ---------- */
#top #header .ksp-lupa {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-left: 12px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
#top #header.av_header_transparency .ksp-lupa { color: #fff; }
#top #header .ksp-lupa svg { width: 24px; height: 24px; display: block; }

/* ---------- polje (prodavnica i panel) ---------- */
.ksp-polje {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    height: 64px;
    padding: 0 20px 0 24px;
    background: #fff;
    border: 1px solid #e3e0d5;
    box-sizing: border-box;
    color: #111;
    cursor: text;
    transition: border-color .2s ease;
}
.ksp-polje:focus-within { border-color: #111; }
.ksp-polje > svg { flex: 0 0 auto; color: #111; }
#top .ksp-polje .ksp-unos,
.ksp-polje .ksp-unos {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0 !important;
    outline: 0;
    background: transparent !important;
    box-shadow: none !important;
    font-family: "Google Sans Flex", sans-serif;
    font-size: 18px;
    line-height: 1.2;
    letter-spacing: 0;
    color: #111;
    -webkit-appearance: none;
    appearance: none;
}
.ksp-polje .ksp-unos::placeholder { color: #8a8a84; opacity: 1; }
.ksp-polje .ksp-unos::-webkit-search-cancel-button,
.ksp-polje .ksp-unos::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.ksp-broj {
    flex: 0 0 auto;
    font-family: "Google Sans Flex", sans-serif;
    font-size: 13px;
    letter-spacing: .9px;
    text-transform: uppercase;
    color: #707070;
    white-space: nowrap;
}
.ksp-broj:empty { display: none; }
#top .ksp-obrisi,
.ksp-obrisi {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f1efe7;
    color: #111;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.ksp-obrisi[hidden] { display: none !important; }
.ksp-obrisi:hover { background: #e6e3d8; }

/* ---------- prodavnica ---------- */
.ksp-traka { margin: 0 0 26px; }
#top ul.products li.ksp-skriven { display: none !important; }
#top ul.products.ksp-sve-skriveno { display: none; }

.ksp-prazno {
    margin: 30px 0 100px;
    padding: 56px 24px;
    background: #fff;
    text-align: center;
    font-family: "Google Sans Flex", sans-serif;
}
#top .ksp-prazno__naslov, .ksp-prazno__naslov {
    font-weight: 400;
    margin: 0 0 12px;
    font-family: "KHA Kalnia SR", "Kalnia", serif;
    font-size: 30px;
    text-transform: uppercase;
    letter-spacing: -.6px;
    line-height: 1.25;
    color: #111;
    text-wrap: balance;
}
#top .ksp-prazno__tekst, .ksp-prazno__tekst { margin: 0 0 26px; font-size: 16px; line-height: 1.5; color: #707070; text-wrap: pretty; }
.ksp-prazno__tekst a { color: #111; text-decoration: underline; text-underline-offset: 3px; }
#top .ksp-dugme,
.ksp-dugme {
    display: inline-block;
    margin: 0;
    padding: 14px 26px;
    border: 1px solid #111;
    border-radius: 0;
    background: #111;
    color: #fff;
    font-family: "Google Sans Flex", sans-serif;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}
#top .ksp-dugme:hover { background: #fff; color: #111; }

/* ---------- panel na ostalim stranama ---------- */
html.ksp-otvoren, html.ksp-otvoren body { overflow: hidden; }
.ksp-panel {
    position: fixed;
    inset: 0;
    z-index: 100050;
    display: flex;
    flex-direction: column;
    background: #fafaf4;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s;
}
.ksp-panel.je-otvoren {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .22s ease, transform .22s ease, visibility 0s;
}
.admin-bar .ksp-panel { top: 32px; }
.ksp-panel__glava {
    flex: 0 0 auto;
    padding: 28px 79px 22px;
    background: #fafaf4;
    border-bottom: 1px solid #eaeaea;
}
.ksp-panel__red { display: flex; align-items: center; gap: 24px; max-width: 1762px; margin: 0 auto; }
.ksp-panel__red .ksp-polje { flex: 1 1 auto; }
#top .ksp-panel__zatvori,
.ksp-panel__zatvori {
    flex: 0 0 auto;
    margin: 0;
    padding: 10px 0;
    border: 0;
    background: transparent;
    color: #111;
    font-family: "Google Sans Flex", sans-serif;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
}
.ksp-panel__zatvori:hover { text-decoration: underline; text-underline-offset: 4px; }
.ksp-panel__telo {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 28px 79px 60px;
}
.ksp-panel__naslov {
    max-width: 1762px;
    margin: 0 auto 4px;
    font-family: "Google Sans Flex", sans-serif;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #707070;
}
.ksp-panel__mreza { max-width: 1762px; margin: 0 auto; }
#top .ksp-panel ul.products {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 16px 0 0;
    padding: 0;
}
#top .ksp-panel ul.products li { margin: 0; width: 100%; float: none; }
#top .ksp-panel ul.products li .inner_product .thumbnail_container img { padding: 40px 20px 16px; }
#top .ksp-panel ul.products li .inner_product_header { padding: 14px 20px 26px; }
#top .ksp-panel ul.products li h2 { font-size: 18px; line-height: 24px; }
.ksp-panel .ksp-prazno { margin: 16px 0 0; }
.ksp-ucitava {
    height: 3px;
    margin-top: 20px;
    background: linear-gradient(90deg, transparent, #111, transparent) 0 0 / 40% 100% no-repeat;
    animation: ksp-traka 1s linear infinite;
}
@keyframes ksp-traka { from { background-position: -40% 0; } to { background-position: 140% 0; } }

/* ---------- tablet i telefon ---------- */
@media (max-width: 1100px) {
    #top .ksp-panel ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 989px) {
    .ksp-panel__glava { padding: 18px 20px 14px; }
    .ksp-panel__telo { padding: 18px 20px 40px; }
    #top .ksp-panel ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .ksp-traka { margin: 0 0 18px; }
    .ksp-polje { height: 54px; padding: 0 12px 0 16px; gap: 10px; }
    #top .ksp-polje .ksp-unos, .ksp-polje .ksp-unos { font-size: 16px; } /* 16px: iOS ne zumira */
    .ksp-broj { font-size: 12px; letter-spacing: .6px; }
    .ksp-panel__red { gap: 14px; }
    .ksp-panel__zatvori { font-size: 12px; }
    #top .ksp-panel ul.products li .inner_product .thumbnail_container img { padding: 18px 10px 8px; }
    #top .ksp-panel ul.products li .inner_product_header { padding: 8px 10px 18px; }
    #top .ksp-panel ul.products li h2 { font-size: 14px; line-height: 18px; letter-spacing: -.3px; }
    #top .ksp-panel ul.products li .loop-product-category { font-size: 10px; }
    #top .ksp-panel ul.products li .inner_product_header .price,
    #top .ksp-panel ul.products li .inner_product_header .price bdi { font-size: 13px; letter-spacing: .2px; }
    #top .ksp-panel ul.products li .inner_product_header .price { display: block; text-align: center; letter-spacing: .2px; }
    .ksp-panel .ksp-broj { display: none; }
    .ksp-prazno { padding: 40px 18px; margin-bottom: 60px; }
    .ksp-prazno__naslov { font-size: 23px; }
    .admin-bar .ksp-panel { top: 46px; }
}
@media (prefers-reduced-motion: reduce) {
    .ksp-panel, .ksp-polje { transition: none; }
}
