:root {
    --hm-blue: #1a1a1a; 
    --hm-accent: #f5f5f5; 
    --hm-text: #222;
    --hm-hover: #f9f9f9;
}

/* --- HEADER PRINCIPAL DESKTOP --- */
.main-header { 
    padding: 20px 5%; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    gap: 30px; 
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    z-index: 1010;
    position: sticky;
    top: 0;
}

.logo { 
    font-family: 'Montserrat', sans-serif; 
    font-size: 1.6rem; 
    font-weight: 900; 
    color: var(--hm-blue); 
    text-decoration: none; 
    text-transform: uppercase;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.search-container { 
    flex-grow: 1; 
    max-width: 500px; 
    position: relative; 
}

.search-container input { 
    width: 100%; 
    padding: 12px 25px; 
    border-radius: 50px; 
    border: 1px solid #ddd; 
    outline: none; 
    background: #f8f8f8; 
}

.search-container button { 
    position: absolute; 
    right: 15px; 
    top: 50%; 
    transform: translateY(-50%); 
    border: none; 
    background: none; 
    cursor: pointer; 
}

/* ASCUNS PE DESKTOP */
.search-mobile-nav { display: none; }

.header-icons { display: flex; align-items: center; gap: 15px; }

.icon-item { 
    position: relative; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    color: var(--hm-blue); 
    text-decoration: none; 
    font-size: 1.3rem; 
    min-width: 45px; 
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.icon-item:hover { background-color: var(--hm-hover); }

.badge { 
    position: absolute; 
    top: 2px; 
    right: 5px; 
    background: var(--hm-accent); 
    color: var(--hm-blue); 
    width: 18px; height: 18px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.65rem; border-radius: 50%; font-weight: 800;
    border: 1px solid #ddd;
}

.icon-label { font-size: 0.85rem; font-weight: 700; margin-left: 8px; }

/* --- NAVIGARE --- */
.nav-menu { 
    background: #fff; 
    border-bottom: 1px solid #eee; 
    padding: 0 5%; 
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    height: 55px;
    z-index: 1009;
    position: sticky;
    top: 81px; 
}

.cat-btn { 
    background: var(--hm-accent); 
    padding: 10px 20px; 
    border-radius: 5px; 
    font-weight: 700; 
    color: var(--hm-blue); 
    font-size: 0.85rem; 
    display: flex; align-items: center; gap: 10px;
}

.nav-links { 
    display: flex; 
    align-items: center; 
    height: 100%; 
    gap: 4px;                 /* MENIU MAI APROPIAT (link-urile una lângă alta) */
}

.nav-links a { 
    text-decoration: none; 
    color: var(--hm-text); 
    font-weight: 600; 
    font-size: 0.85rem; 
    padding: 8px 12px;        /* padding redus pentru a fi mai compact */
    text-transform: uppercase;
    transition: background 0.2s;
}

.nav-links a:hover { 
    background-color: var(--hm-hover); 
}

/* NOU MODEL BADGE - mai modern, mai mic, cu shadow și fără padding inutil */
.badge-new, .badge-sale {
    background: #ff3e6c;
    color: #fff;
    font-size: 0.55rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 4px;
    text-transform: uppercase;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    letter-spacing: 0.3px;
}

.badge-sale {
    background: #000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* --- REZOLVARE BARA CAUTARE PE MOBIL + ICONURI MAI APROPIATE --- */
@media screen and (max-width: 768px) {
    .main-header { 
        padding: 12px 5%; 
    }
    
    /* Ascundem elementele inutile pe mobil */
    .search-container, .nav-links, .icon-label { 
        display: none !important; 
    }

    .nav-menu {
        position: relative;
        top: auto;
        height: auto;
        padding: 8px 5%;               
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 8px;
    }

    /* Buton categorii - dimensiune controlată */
    .cat-btn {
        height: 32px;                  
        padding: 0 12px;
        font-size: 0.8rem;
        white-space: nowrap;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Bara căutare - acum proporțională cu cat-btn */
    .search-mobile-nav {
        display: flex !important;
        flex-grow: 1;
        position: relative;
        max-width: 60%;                
    }

    .search-mobile-nav input {
        width: 100%;
        height: 32px;                  
        padding: 0 36px 0 12px;
        border-radius: 6px;
        border: 1px solid #ddd;
        background: #f8f8f8;
        font-size: 0.85rem;
        outline: none;
        font-family: 'Inter', sans-serif;
    }

    .search-mobile-nav button {
        position: absolute;
        right: 0;
        top: 0;
        height: 100%;
        width: 36px;                   
        border: none;
        background: transparent;
        color: var(--hm-blue);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.05rem;            
    }

    .search-mobile-nav button i {
        line-height: 1;
    }

    /* ICONURI MAI APROPIATE PE MOBIL */
    .header-icons {
        display: flex;
        align-items: center;
        gap: 4px;                     
    }

    .icon-item {
        padding: 6px 8px;             
        min-width: 36px;              
        font-size: 1.25rem;           
    }

    .badge {
        top: 0;
        right: 2px;
        width: 16px;
        height: 16px;
        font-size: 0.6rem;
    }
}