.tba-site-header {
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 99999 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    width: 100%;
}

/* Kompenzacija za fiksni navbar na vrhu */
body {
    padding-top: 52px !important;
}

@media (max-width: 768px) {
    body {
        padding-top: 48px !important;
    }
}

/* KOMPAKTNI RASPON: 22% LIJEVA - 56% SREDNJA - 22% DESNA */
.tba-header-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 7px 20px;
    display: grid;
    grid-template-columns: minmax(0, 22%) minmax(0, 56%) minmax(0, 22%);
    align-items: center;
    gap: 16px;
    width: 100%;
}

/* 1. LIJEVA KOLONA (LOGO) */
.tba-header-logo-wrap {
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    min-width: 0;
}
.tba-header-logo-group {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}
.tba-header-logo-link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    line-height: 1;
    flex-shrink: 0;
}
.tba-navbar-logo-img {
    height: 25px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    display: block;
    transition: filter 0.2s ease, background 0.2s ease;
}
.tba-section-slash {
    color: #cbd5e1;
    font-size: 19px;
    font-weight: 300;
    line-height: 1;
    user-select: none;
    margin-left: 2px;
    margin-right: 5px !important;
    display: inline-block;
    flex-shrink: 0;
}
.tba-section-badge-link {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
    position: relative;
    top: 0px;
    margin-left: 5px !important;
    display: inline-block;
}
.tba-section-badge-link:hover {
    opacity: 0.85;
}

/* 2. SREDNJA KOLONA (PRETRAGA) */
.tba-header-search-wrap {
    display: flex;
    width: 100%;
    min-width: 0;
    position: relative;
}
.tba-search-form {
    width: 100%;
    position: relative;
}
.tba-header-search-input {
    width: 100%;
    padding: 8px 16px 8px 38px;
    font-size: 14.5px;
    border: 1px solid #dfe1e5;
    border-radius: 20px;
    outline: none;
    background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="17" height="17" viewBox="0 0 24 24" fill="%239aa0a6"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>') no-repeat 12px center;
    transition: border-color 0.2s, box-shadow 0.2s, border-radius 0.2s;
}
.tba-header-search-input:focus {
    box-shadow: 0 1px 6px rgba(32,33,36,0.24);
}
.tba-header-search-input.has-autocomplete {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* AUTOCOMPLETE PADAJUĆI PANEL */
.tba-autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #dfe1e5;
    border-top: none;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 10000;
    overflow: hidden;
    display: none;
}
.tba-autocomplete-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    text-decoration: none;
    color: #334155;
    font-size: 13.5px;
    border-top: 1px solid #f1f5f9;
    transition: background 0.15s ease;
    cursor: pointer;
}
.tba-autocomplete-item:hover, .tba-autocomplete-item.selected {
    background: #f8fafc;
}
.tba-autocomplete-item-left {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tba-autocomplete-icon {
    font-size: 15px;
    flex-shrink: 0;
}
.tba-autocomplete-title {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tba-autocomplete-badge {
    font-size: 10.5px;
    font-weight: 700;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 8px;
    text-transform: uppercase;
    flex-shrink: 0;
}

/* 3. DESNA KOLONA (MENI) */
.tba-header-nav-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    width: 100%;
    min-width: 0;
    overflow: visible;
}
.tba-nav-items-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 3px;
    white-space: nowrap;
    overflow: hidden;
}
.tba-header-nav-link {
    color: #475569;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 8px;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}
.tba-header-nav-link:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.tba-nav-more-wrapper {
    position: relative;
    display: none;
    flex-shrink: 0;
    margin-left: 0px;
}

.tba-nav-more-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 5px 7px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.5px;
    color: #64748b;
    cursor: pointer;
    border-radius: 6px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    transition: all 0.15s ease;
}
.tba-nav-more-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.tba-nav-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: #ffffff !important;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
    min-width: 170px;
    padding: 5px;
    z-index: 999999;
    flex-direction: column;
    gap: 2px;
}
.tba-nav-dropdown.show {
    display: flex !important;
}
.tba-nav-dropdown a {
    background: transparent !important;
    color: #334155 !important;
    padding: 7px 11px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-radius: 5px;
    border: none;
    transition: background 0.15s ease, color 0.15s ease;
    text-align: left;
    white-space: nowrap;
    display: block;
}
.tba-nav-dropdown a:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}

.tba-hamburger-btn {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: #334155;
    cursor: pointer;
    padding: 2px;
    flex-shrink: 0;
    line-height: 1;
    width: 32px;
    height: 32px;
    text-align: center;
}

/* MOBILNI MENI PREKO SADRŽAJA */
.tba-mobile-drawer {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 12px 28px rgba(0,0,0,0.12);
    padding: 6px 18px;
    flex-direction: column;
    z-index: 999999;
    max-height: 80vh;
    overflow-y: auto;
}
.tba-mobile-drawer.show {
    display: flex;
}
.tba-mobile-drawer a, .tba-mobile-accordion-toggle {
    color: #334155;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.tba-mobile-accordion-toggle {
    background: none;
    border: none;
    width: 100%;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}
.tba-mobile-drawer a:last-child {
    border-bottom: none;
}
.tba-mobile-submenu {
    display: none;
    flex-direction: column;
    background: #f8fafc;
    padding: 4px 0 4px 16px;
    border-bottom: 1px solid #e2e8f0;
}
.tba-mobile-submenu.open {
    display: flex;
}
.tba-mobile-submenu a {
    font-size: 13px;
    padding: 8px 0;
    color: #64748b;
    border-bottom: 1px solid #edf2f7;
}
.tba-mobile-submenu a:last-child {
    border-bottom: none;
}

/* PRILAGODBA NA TAMNIM TEMAMA (BERZA I IGRICE) */
.tba-site-header.theme-berza-dark .tba-navbar-logo-img,
.tba-site-header.theme-igrice-dark .tba-navbar-logo-img {
    background: rgba(255, 255, 255, 0.95);
    padding: 2px 6px;
    border-radius: 5px;
}
.tba-site-header.theme-berza-dark .tba-section-slash,
.tba-site-header.theme-igrice-dark .tba-section-slash {
    color: #64748b;
}

/* THEME: BERZA DARK */
.tba-site-header.theme-berza-dark {
    background: #111827;
    border-bottom: 1px solid #1f2937;
}
.tba-site-header.theme-berza-dark .tba-header-search-input {
    background-color: #0f172a;
    border-color: #374151;
    color: #f8fafc;
}
.tba-site-header.theme-berza-dark .tba-autocomplete-results {
    background: #111827;
    border-color: #374151;
}
.tba-site-header.theme-berza-dark .tba-autocomplete-item {
    color: #cbd5e1;
    border-top-color: #1f2937;
}
.tba-site-header.theme-berza-dark .tba-autocomplete-item:hover,
.tba-site-header.theme-berza-dark .tba-autocomplete-item.selected {
    background: #1f2937;
}
.tba-site-header.theme-berza-dark .tba-autocomplete-badge {
    background: #1f2937;
    color: #94a3b8;
}
.tba-site-header.theme-berza-dark .tba-header-nav-link,
.tba-site-header.theme-berza-dark .tba-hamburger-btn { color: #94a3b8; }
.tba-site-header.theme-berza-dark .tba-header-nav-link:hover {
    background: #1f2937;
    color: #f8fafc;
}
.tba-site-header.theme-berza-dark .tba-nav-more-btn {
    background: #1f2937;
    border-color: #374151;
    color: #94a3b8;
}
.tba-site-header.theme-berza-dark .tba-nav-more-btn:hover {
    background: #374151;
    color: #f8fafc;
}
.tba-site-header.theme-berza-dark .tba-nav-dropdown {
    background: #1f2937 !important;
    border-color: #374151;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}
.tba-site-header.theme-berza-dark .tba-nav-dropdown a {
    color: #cbd5e1 !important;
}
.tba-site-header.theme-berza-dark .tba-nav-dropdown a:hover {
    background: #374151 !important;
    color: #ffffff !important;
}
.tba-site-header.theme-berza-dark .tba-mobile-drawer {
    background: #111827;
    border-color: #1f2937;
}
.tba-site-header.theme-berza-dark .tba-mobile-drawer a,
.tba-site-header.theme-berza-dark .tba-mobile-accordion-toggle {
    color: #94a3b8;
    border-bottom-color: #1f2937;
}
.tba-site-header.theme-berza-dark .tba-mobile-submenu {
    background: #0f172a;
    border-bottom-color: #1f2937;
}

/* THEME: IGRICE DARK */
.tba-site-header.theme-igrice-dark {
    background: #1e293b;
    border-bottom: 1px solid #334155;
}
.tba-site-header.theme-igrice-dark .tba-header-search-input {
    background-color: #0f172a;
    border-color: #475569;
    color: #f8fafc;
}
.tba-site-header.theme-igrice-dark .tba-autocomplete-results {
    background: #1e293b;
    border-color: #334155;
}
.tba-site-header.theme-igrice-dark .tba-autocomplete-item {
    color: #cbd5e1;
    border-top-color: #334155;
}
.tba-site-header.theme-igrice-dark .tba-autocomplete-item:hover,
.tba-site-header.theme-igrice-dark .tba-autocomplete-item.selected {
    background: #334155;
}
.tba-site-header.theme-igrice-dark .tba-autocomplete-badge {
    background: #334155;
    color: #cbd5e1;
}
.tba-site-header.theme-igrice-dark .tba-header-nav-link,
.tba-site-header.theme-igrice-dark .tba-hamburger-btn { color: #cbd5e1; }
.tba-site-header.theme-igrice-dark .tba-header-nav-link:hover {
    background: #334155;
    color: #ffffff;
}
.tba-site-header.theme-igrice-dark .tba-nav-more-btn {
    background: #334155;
    border-color: #475569;
    color: #cbd5e1;
}
.tba-site-header.theme-igrice-dark .tba-nav-more-btn:hover {
    background: #475569;
    color: #ffffff;
}
.tba-site-header.theme-igrice-dark .tba-nav-dropdown {
    background: #1e293b !important;
    border-color: #334155;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}
.tba-site-header.theme-igrice-dark .tba-nav-dropdown a {
    color: #cbd5e1 !important;
}
.tba-site-header.theme-igrice-dark .tba-nav-dropdown a:hover {
    background: #334155 !important;
    color: #ffffff !important;
}
.tba-site-header.theme-igrice-dark .tba-mobile-drawer {
    background: #1e293b;
    border-color: #334155;
}
.tba-site-header.theme-igrice-dark .tba-mobile-drawer a,
.tba-site-header.theme-igrice-dark .tba-mobile-accordion-toggle {
    color: #cbd5e1;
    border-bottom-color: #334155;
}
.tba-site-header.theme-igrice-dark .tba-mobile-submenu {
    background: #0f172a;
    border-bottom-color: #334155;
}

/* TABLETI I TELEFONI */
@media (max-width: 900px) {
    .tba-header-container {
        grid-template-columns: auto 1fr auto !important;
        gap: 10px;
        padding: 6px 14px;
    }
    .tba-nav-items-container,
    .tba-nav-more-wrapper { 
        display: none !important; 
    }
    .tba-header-nav-wrap {
        display: flex !important;
        justify-content: flex-end !important;
        width: auto !important;
    }
    .tba-hamburger-btn { 
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 48px !important;
    }
    .tba-header-container {
        display: grid !important;
        grid-template-columns: auto 1fr auto !important;
        align-items: center !important;
        gap: 8px !important;
        padding: 6px 10px !important;
    }
    .tba-header-logo-wrap {
        width: auto !important;
        flex-shrink: 0 !important;
    }
    .tba-navbar-logo-img {
        height: 20px !important;
        max-width: 90px !important;
    }
    .tba-section-slash {
        font-size: 15px !important;
        margin-left: 2px !important;
        margin-right: 3px !important;
    }
    .tba-section-badge-link {
        font-size: 13px !important;
        margin-left: 3px !important;
    }
    .tba-header-search-wrap {
        width: 100% !important;
        min-width: 0 !important;
    }
    .tba-header-search-input {
        padding: 7px 12px 7px 32px !important;
        font-size: 13px !important;
        border-radius: 18px !important;
        background-size: 14px !important;
        background-position: 10px center !important;
    }
    .tba-header-nav-wrap {
        display: flex !important;
        justify-content: flex-end !important;
        width: auto !important;
        flex-shrink: 0 !important;
    }
    .tba-nav-items-container,
    .tba-nav-more-wrapper {
        display: none !important;
    }
    .tba-hamburger-btn { 
        display: flex !important; 
        align-items: center;
        justify-content: center;
        font-size: 22px !important;
        width: 32px !important;
        height: 32px !important;
        padding: 0 !important;
    }
}

/* =========================================================
   SCROLL REVEAL NAVBAR (SAMO ZA NASLOVNICU)
   ========================================================= */
body.home-landing {
    padding-top: 0 !important; /* Na naslovnici nema gornjeg razmaka dok je traka skrivena */
}

body.home-landing .tba-site-header {
    transform: translateY(-100%) !important;
    opacity: 0 !important;
    pointer-events: none;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.22s ease !important;
}

body.home-landing .tba-site-header.is-revealed {
    transform: translateY(0) !important;
    opacity: 1 !important;
    pointer-events: auto;
}

/* =========================================================
   ZAOBLJENO SPAJANJE SEARCH BARA I AUTOCOMPLETE PANELA
   ========================================================= */

/* Kada se pojave rezultati: input gubi samo donje uglove */
.tba-header-search-input.has-autocomplete {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-bottom-color: transparent !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

/* Osnovni izgled autocomplete panela */
.tba-autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #dfe1e5;
    border-top: none;
    border-bottom-left-radius: 20px !important;
    border-bottom-right-radius: 20px !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
    z-index: 10000;
    overflow: hidden;
    margin-top: -1px; /* Uklanja prazninu između inputa i panela */
}

/* =========================================================
   MOBILNI PORTRAIT REŽIM (FULL-WIDTH I ZAOBLJENI PANEL)
   ========================================================= */
@media (max-width: 768px) and (orientation: portrait) {
    .tba-header-container:has(.tba-header-search-input:focus) .tba-header-logo-wrap,
    .tba-header-container:has(.tba-header-search-input:focus) .tba-header-nav-wrap,
    .tba-header-container.search-active .tba-header-logo-wrap,
    .tba-header-container.search-active .tba-header-nav-wrap {
        display: none !important;
    }

    .tba-header-container:has(.tba-header-search-input:focus),
    .tba-header-container.search-active {
        grid-template-columns: 1fr !important;
        padding: 5px 10px !important;
    }

    .tba-header-container:has(.tba-header-search-input:focus) .tba-header-search-wrap,
    .tba-header-container.search-active .tba-header-search-wrap {
        width: 100% !important;
    }

    .tba-header-container:has(.tba-header-search-input:focus) .tba-header-search-input,
    .tba-header-container.search-active .tba-header-search-input {
        font-size: 14.5px !important;
        padding: 9px 14px 9px 36px !important;
        border-radius: 22px !important;
        background-position: 12px center !important;
    }

    /* Kada je autocomplete otvoren na mobitelu: gornji dio ostaje zaobljen, donji ravan */
    .tba-header-container:has(.tba-header-search-input:focus) .tba-header-search-input.has-autocomplete,
    .tba-header-container.search-active .tba-header-search-input.has-autocomplete {
        border-top-left-radius: 20px !important;
        border-top-right-radius: 20px !important;
        border-bottom-left-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
        border-bottom: none !important;
    }

    /* Panel se spaja sa inputom i zaobljuje na donjim uglovima identičnim radijusom */
    .tba-header-container:has(.tba-header-search-input:focus) .tba-autocomplete-results,
    .tba-header-container.search-active .tba-autocomplete-results {
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        margin-top: 0 !important;
        border: 1px solid #dfe1e5 !important;
        border-top: 1px solid #f1f5f9 !important;
        border-bottom-left-radius: 20px !important;
        border-bottom-right-radius: 20px !important;
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16) !important;
    }

    .tba-header-container:has(.tba-header-search-input:focus) .tba-autocomplete-item,
    .tba-header-container.search-active .tba-autocomplete-item {
        padding: 10px 14px !important;
        font-size: 14px !important;
    }

    /* Posljednja stavka u listi poštuje radijus panela */
    .tba-autocomplete-item:last-child {
        border-bottom-left-radius: 20px !important;
        border-bottom-right-radius: 20px !important;
    }
}