/* ==============================
   CUSTOM MODERN HEADER + MEGA MENU
============================== */

/* GENERAL */
body, .custom-header {
    font-family: 'Inter', sans-serif;
}

/* ==============================
   HEADER TOP – LOGO + SEARCH + ICONS
============================== */
.header-top {
    display: grid;
    grid-template-columns: auto 1fr auto; /* logo | search | icons */
    align-items: center;
    column-gap: 24px;
    padding: 14px 30px;
}

/* LOGO */
.logo {
    display: flex;
    align-items: center;
}

.logo img {
    max-height: 70px;
    display: block;
    object-fit: contain;
}

/* ==============================
   SEARCH – input + lupica
============================== */
.search {
    display: flex;       /* flex da input zauzme pun prostor */
}

.search form {
    flex: 1;             /* forma raste do maksimalnog prostora */
    position: relative;  /* važno za pozicioniranje dugmeta */
}

.search input[type="search"] {
    width: 100%;         /* input zauzima sav prostor forme */
    min-width: 200px;
    max-width: 720px;    /* opcionalno, da ne raste previše */
    height: 44px;
    padding: 0 50px 0 22px; /* desni padding za lupicu */
    border-radius: 999px;
    border: 1px solid #ddd;
    font-size: 14px;
    background: #f9f9f9;
    transition: all 0.25s ease;
    display: block;
}

.search input[type="search"]:focus {
    background: #fff;
    border-color: #1e7b8b;
    box-shadow: 0 4px 12px rgba(30,123,139,0.18);
    outline: none;

}
/* ==============================
   SEARCH – input + lupica
============================== */
/* SEARCH WRAPPER */
.search {
    display: flex;       /* da forma može da raste */
    flex: 1;             /* zauzima sav prostor između loga i ikona */
    max-width: 720px;    /* opcionalno, ne da raste previše */
}

/* SEARCH FORM */
.search form {
    position: relative;  /* ključno za absolute dugme */
    width: 100%;         /* forma zauzima sav prostor parenta */
}

/* INPUT */
.search input[type="search"] {
    width: 100%;
    min-width: 200px;
    height: 44px;
    padding: 0 50px 0 22px;  /* dovoljno prostora za dugme */
    border-radius: 999px;
    border: 1px solid #ddd;
    font-size: 14px;
    background: #f9f9f9;
    transition: all 0.25s ease;
    box-sizing: border-box;  /* VAŽNO da padding ne “izleće” */
}

/* FOCUS */
.search input[type="search"]:focus {
    background: #fff;
    border-color: #1e7b8b;
    box-shadow: 0 4px 12px rgba(30,123,139,0.18);
    outline: none;
}

/* SEARCH BUTTON (LUPICA) */
.search-btn {
    position: absolute;
    top: 50%;
    right: 6px;               /* prostor sa desne strane */
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #263339;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(38,51,57,0.15);
    transition: all 0.25s ease;
    z-index: 10;
}

.search-btn:hover {
    background: #1e7b8b !important; /* ista nijansa koja se koristi na linkovima i hover-u menija */
    box-shadow: 0 6px 16px rgba(30,123,139,0.3); /* mekani shadow u istoj paleti */
    transform: scale(1.05); /* blagi “pop” efekt */
}


/* ICON */
.search-btn i {
    font-size: 16px;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .search input[type="search"] {
        padding: 0 44px 0 16px;
    }
    .search-btn {
        width: 32px;
        height: 32px;
    }
    .search-btn i {
        font-size: 14px;
    }
}


/* ==============================
   RESPONSIVE (tablet/mobile)
============================== */
@media (max-width: 1024px) {
    .search input[type="search"] {
        max-width: 100% !important;
        padding: 0 44px 0 16px; 
    }

    .search-btn {
        width: 32px !important;
        height: 32px !important;
    }

    .search-btn i {
        font-size: 14px !important;
    }
}

/* ICONS RIGHT */
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-self: end;
}

/* MINI CART */
.header-right .mini-cart {
    position: relative;
    width: 44px;
    height: 44px;
    background: #f5f7f9; /* svetli neutralni ton, kao kod account */
    border-radius: 12px;  /* blagi radius */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 2px 6px rgba(45,54,57,0.1);
}

.header-right .mini-cart i {
    font-size: 20px;
    color: #2d3639;  /* unutrašnja boja ikone */
    transition: color 0.25s ease;
}

.header-right .mini-cart:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(45,54,57,0.2);
    background: #fff;  /* malo svetlije na hover za efekat */
}

.header-right .cart-count {
    position: absolute;
    top: -16px; /* podignut iznad korpe */
    right: -5px;
    background: rgba(245, 247, 249, 0.85); /* transparentni svetli oval */
    color: #2d3639;  
    font-size: 12px;
    font-weight: 600;
    padding: 2px 3px; /* padding ostaje isti, ne povećava se oval */
    border-radius: 10px; 
    border: 1px solid rgba(45,54,57,0.15);
    box-shadow: 0 2px 6px rgba(45,54,57,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease, transform 0.25s ease, background 0.25s ease;
}

/* Hover efekat - blagi pop */
.header-right .mini-cart:hover .cart-count {
    transform: scale(1.1);
    background: rgba(245, 247, 249, 1);
}





/* ACCOUNT */
/* ACCOUNT IKONICA */
.header-right .account a {
    width: 44px;
    height: 44px;
    background: #f5f7f9;  /* svetla neutralna pozadina */
    border-radius: 12px;    /* blagi radius */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2d3639;         /* nova boja ikonice */
    font-size: 20px;
    transition: all 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
    box-shadow: 0 2px 6px rgba(45,54,57,0.1);
}

.header-right .account a:hover {
    background: #fff;        /* malo svetlije na hover */
    color: #2d3639;          /* ista boja unutrašnje ikonice */
    transform: scale(1.05);  /* mali “pop” efekat */
    box-shadow: 0 6px 16px rgba(45,54,57,0.2);
}

/* ==============================
   RESPONSIVE (tablet/mobile)
============================== */
@media (max-width: 1024px) {
    .header-top {
        grid-template-columns: 1fr;
        row-gap: 12px;
    }

    .search form {
        width: 100%;
    }

    .search input[type="search"] {
        max-width: 100%;
    }

    .header-right {
        justify-self: start;
    }
}


/* ==============================
   HEADER BOTTOM
============================== */
.header-bottom-inner {
    display: flex;
    gap: 20px;
    width: 100%;
    align-items: flex-start;
    flex-wrap: wrap;
    position: relative;
    padding: 10px 30px;
    background: #fff;
}

/* WP MAIN NAVIGATION */
.main-navigation {
    flex: 1;
    position: relative;
    z-index: 10;
}

.main-nav-menu {
    display: flex;
    flex-wrap: wrap; /* omogućava dva reda ako je više stavki */
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 14px; /* manji font */
    font-weight: 500;
}

.main-nav-menu li {
    position: relative;
}

.main-nav-menu li a {
    padding: 8px 12px; /* malo više paddinga za čitljivost */
    color: #222;       /* osnovna boja slova */
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
    white-space: nowrap;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
}

/* HOVER - GLAVNI MENI (ne dropdown) */
.main-nav-menu > li > a:hover {
    color: #fff;             /* bela slova */
    background: #1e7b8b;     /* tirkiz/plava pozadina */
    box-shadow: 0 4px 12px rgba(30,123,139,0.2); /* mekana senka */
    transform: translateY(-2px); /* blagi pop */
}


/* Dropdown */
.main-nav-menu li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border-radius: 6px;
    padding: 10px 0;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    z-index: 1000;
}

.main-nav-menu li:hover > ul {
    display: block;
}

.main-nav-menu li ul li a {
    padding: 8px 16px;
    color: #333;
    display: block;
    font-weight: 400;
    transition: all 0.3s ease;
}

.main-nav-menu li ul li a:hover {
    background: #1e7b8b;
    color: #fff;
    transform: translateX(2px);
    box-shadow: 0 4px 12px rgba(30,123,139,0.15);
}


/* ==============================
   RESPONSIVE
============================== */
@media (max-width: 1024px) {
    .header-bottom-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .main-navigation {
        width: 100%;
    }

    .main-nav-menu {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .main-nav-menu li ul {
        position: relative;
        top: 0;
        left: 0;
        box-shadow: none;
        border: none;
        padding-left: 15px;
    }
}

/* HAMBURGER MOBILE MENU */
@media (max-width: 1024px) {
    .main-nav-menu li > ul {
        display: none;
        padding-left: 15px;
    }

    .main-nav-menu li.open > ul {
        display: block;
    }

    .main-nav-menu li.menu-item-has-children > a {
        cursor: pointer;
    }
}

/* ==============================
   MEGA MENU (moderno)
============================== */
.hh-mega-wrapper {
    position: relative;
    z-index: 9999;
    font-family: 'Inter', sans-serif;
}

/* Toggle dugme */
.hh-mega-toggle {
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 500;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.hh-mega-toggle:hover {
    background: #1e7b8b;
}

.hh-mega-menu {
    position: fixed;
    top: calc(var(--header-height, 160px) + 12px); /* diskretno spuštanje */
    left: 0;
    right: 0;
    width: 100vw;
    display: none;
    background: #fff;
    box-shadow: 0 6px 25px rgba(0,0,0,0.08);
    max-height: calc(100vh - var(--header-height, 160px) - 12px); /* da se uklopi u ekran */
    flex-direction: row;
    transition: all 0.3s ease;
    border-top: 1px solid #e5e5e5;
    overflow: hidden;
}


.hh-mega-menu.open {
    display: flex;
}

/* Left categories */
.hh-mega-left {
    width: 300px;
    border-right: 1px solid #eee;
    overflow-y: auto;
    padding: 20px 0;
    background: #fff;
    box-shadow: inset -4px 0 8px -4px rgba(136,158,160,0.1);
    transition: background 0.3s ease;
}

.hh-mega-left ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hh-mega-left li {
    padding: 14px 20px;
    cursor: pointer;
    font-size: 14px;
    border-radius: 6px;
    transition: background 0.3s ease, color 0.3s ease;
    color: #222;
    font-weight: 500;
}

.hh-mega-left li:hover {
    background: #f0f7f9;
    color: #1e7b8b;
}

.hh-mega-left li.active {
    background: #e4f1f4;
    color: #1e7b8b;
}

/* Scrollbar left */
.hh-mega-left::-webkit-scrollbar {
    width: 8px;
}
.hh-mega-left::-webkit-scrollbar-thumb {
    background: rgba(136,158,160,0.3);
    border-radius: 4px;
}

/* Right subcategories */
.hh-mega-right {
    flex: 1;
    overflow-y: auto;
    padding: 40px 30px 50px 30px;
    background: #fff;
    box-shadow: inset 5px 0 10px -5px rgba(136,158,160,0.08);
}

/* Subcategory panels */
.hh-subcats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
    padding: 20px 0;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.hh-subcats.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.hh-subcats a {
    width: 100%;
    max-width: 140px;
    justify-self: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #333;
    transform: scale(0.95);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hh-subcats a:hover {
    transform: scale(1.05);
}

/* Image circles */
.hh-subcat-thumb {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background: #f5f5f5;
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hh-subcats a:hover .hh-subcat-thumb {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.hh-subcat-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.hh-thumb-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #eaeaea;
}

.hh-subcats a span {
    font-size: 14px;
    text-align: center;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.hh-subcats a:hover span {
    color: #1e7b8b;
}





/* Responsive tablet/mobile */
@media (max-width: 1024px) {
    .hh-mega-menu {
        flex-direction: column;
    }

    .hh-mega-left {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eee;
    }

    .hh-mega-right {
        padding: 20px;
    }

    .hh-subcats.active {
        grid-template-columns: repeat(3, 1fr);
    }
}
/* Sprečava layout shift kod slika */
img {
    aspect-ratio: attr(width) / attr(height);
    height: auto;
    max-width: 100%;
}