/* ===== ESTILOS GENERALES DEL HEADER ===== */


.header {
    background: linear-gradient(135deg, #67b501 0%, #67b501 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    margin: 0;
    left: 0;
}

.header-inner {
    position: relative;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    background-color: transparent;
    height: 80px;
    position: relative;
    z-index: 20;
    overflow: visible;
}

/* ===== LADO IZQUIERDO ===== */
.header-left {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    /* Allow it to shrink to content width */
    margin: 0;
    padding: 0;
}

.logo {
    margin-right: 20px;
}

.logo-img {
    height: 45px;
    width: auto;
    object-fit: contain;
}

.categorias {
    position: relative;
    margin-right: 15px;
    z-index: 1;
}

.dropdown-btn {
    background-color: transparent;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.dropdown-btn:hover {
    background-color: #f5f5f5;
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    min-width: 200px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 9999;
    padding: 10px 0;
    display: none;
}

.dropdown-content a {
    display: block;
    padding: 8px 15px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: background-color 0.2s;
}

.dropdown-content a:hover {
    background-color: #f0f0f0;
}

.vender-btn {
    background-color: #4d8701;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.vender-btn:hover {
    background-color: #4d8701;
}

/* ===== CENTRO: Barra de búsqueda ===== */
.header-center {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    /* Grow to fill space */
    max-width: 900px;
    /* Increased max-width */
    position: relative;
    margin: 0 20px;
    /* Add margin for spacing */
    padding: 0;
}

.search-text-short {
    display: none;
}

.search-text-full {
    display: inline;
}

@media (max-width: 1000px) {
    .search-text-full {
        display: none;
    }

    .search-text-short {
        display: inline;
    }
}

.search-input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 1px solid #e6e6e6;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.search-input:focus {
    border-color: #3483fa;
}

.search-icon {
    position: absolute;
    right: 10px;
    cursor: pointer;
    color: #666;
    padding: 8px;
}

/* ===== LADO DERECHO ===== */
.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    /* Compact width */
    margin: 0;
    padding: 0;
}

.menu-item {
    margin: 0 10px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    white-space: nowrap;
    transition: color 0.3s;
    display: flex;
    align-items: center;
}

/* Estilos específicos para Mis Compras */
.menu-item[href="mis-compras.html"] {
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s;
}

.menu-item[href="mis-compras.html"]:hover {
    background-color: white;
    color: #333;
    text-decoration: none;
}

/* Hover genérico para otros items de menú (como Favoritos) */
.menu-item:not([href="mis-compras.html"]):hover {
    color: white;
}

.notificacion-icono {
    position: relative;
    margin: 0 10px;
    text-decoration: none;
    color: #333;
    font-size: 18px;
    transition: color 0.3s;
    display: flex;
    align-items: center;
}

.notificacion-icono:hover {
    color: white;
}

.contador-notificaciones {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #f44;
    color: white;
    border-radius: 50%;
    width: 18px;
    /* Slightly larger for better visibility */
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 1px solid white;
}

.icon {
    margin-left: 10px;
    text-decoration: none;
    color: #333;
    font-size: 18px;
    transition: color 0.3s;
    display: flex;
    align-items: center;
}

.icon:hover {
    color: white;
}

.contador-carrito {
    position: absolute;
    top: -5px;
    right: -10px;
    background-color: #3483fa;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 1px solid white;
}

/* ===== PERFIL DE USUARIO ===== */
.user-profile-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    margin: 0 10px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.user-profile-link:hover {
    background-color: #f5f5f5;
    text-decoration: none;
}

.user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 8px;
    border: 2px solid transparent;
    transition: border-color 0.3s;
    flex-shrink: 0;
}

.user-avatar svg {
    width: 100%;
    height: 100%;
    display: block;
}

.user-profile-link:hover .user-avatar {
    border-color: #3483fa;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-text {
    font-size: 14px;
    white-space: nowrap;
    color: #333;
}

/* ===== CATEGORÍA SELECCIONADA ===== */
.dropdown-content a.active {
    background-color: #e8f5d6;
    font-weight: bold;
    color: #4d8701;
}

.dropdown-btn.categoria-activa {
    background-color: #e8f5d6;
    color: #4d8701;
    font-weight: 500;
}

/* ===== FILTROS POR TIPO DE VENTA ===== */
.filtros-tipo-venta {
    background: linear-gradient(to right, #f8f9fa, #e9ecef);
    border-top: 1px solid #dee2e6;
    padding: 12px 0;
    width: 100%;
    display: none;
    position: relative;
    z-index: 10;
}

body.index-page .filtros-tipo-venta {
    display: block;
}

.filtros-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.filtros-titulo {
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
    white-space: nowrap;
}

.filtros-botones {
    display: flex;
    gap: 8px;
    /* Reducido de 10px */
}

.filtro-btn {
    padding: 6px 12px;
    /* Reducido de 8px 16px */
    border: 2px solid #67b501;
    background: white;
    color: #67b501;
    border-radius: 20px;
    font-size: 12px;
    /* Reducido de 14px */
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: auto;
    flex-shrink: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filtro-btn svg {
    width: 16px;
    /* Reducido de 24px */
    height: 16px;
    margin-right: 4px;
    /* Reducido de 5px */
}

.filtro-btn:hover {
    background: #4d8701;
    color: white;
    transform: translateY(-2px);
}

.filtro-btn.active {
    background: #4d8701;
    color: white;
}

/* ✅ NUEVO: Estilos específicos para el botón de mensajes */
.filtro-btn.mensajes-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    /* ✅ No permitir que se encoja */
}

.filtro-btn.mensajes-btn:hover {
    background: #4d8701;
    color: white;
    transform: translateY(-2px) scale(1.1);
}

/* Ocultar el contador cuando está vacío */
#contador-carrito:empty,
.contador-notificaciones:empty {
    display: none !important;
}

/* ===== MEGA MENÚ DE CATEGORÍAS ===== */
.mega-menu {
    display: none;
    position: absolute;
    top: 80px;
    left: max(20px, calc((100% - 1200px) / 2 + 20px));
    background: white;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-radius: 8px;
    min-width: 680px;
    z-index: 9999;
    padding: 20px;
    border: 1px solid #e8e8e8;
}

.mega-menu.open {
    display: block;
}

.mega-menu-all {
    display: block;
    padding: 10px 0 14px 0;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--brand-green);
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
}

.mega-menu-all:hover {
    color: var(--brand-green-dark);
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px 24px;
}

.mega-menu-col {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mega-menu-parent {
    display: block;
    font-weight: 700;
    color: var(--brand-green-dark);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 8px 4px;
    margin-top: 4px;
    text-decoration: none;
}

.mega-menu-col .mega-menu-parent:first-child {
    padding-top: 0;
    margin-top: 0;
}

.mega-menu-parent:hover {
    color: var(--brand-green-darker);
    background-color: var(--brand-green-light);
}

.mega-menu a[data-categoria] {
    display: block;
    padding: 5px 8px;
    text-decoration: none;
    color: #444;
    font-size: 13px;
    border-radius: 4px;
    transition: background-color 0.15s, color 0.15s;
}

.mega-menu a[data-categoria]:hover {
    background-color: var(--brand-green-light);
    color: var(--brand-green-darker);
}

.mega-menu a[data-categoria].active {
    background-color: var(--brand-green-light);
    font-weight: 600;
    color: var(--brand-green-dark);
}

.dropdown-btn.categoria-activa {
    background-color: var(--brand-green-light);
    color: var(--brand-green-dark);
    font-weight: 500;
}

body.mega-menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

.mega-menu-header {
    display: none;
}

@media (max-width: 768px) {
    .mega-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        min-width: auto;
        border-radius: 0;
        border: none;
        box-shadow: none;
        margin-top: 0;
        padding: 0;
        z-index: 9999;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .mega-menu-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 16px;
        border-bottom: 2px solid var(--brand-green);
        background: white;
        position: sticky;
        top: 0;
        z-index: 1;
    }

    .mega-menu-header span:first-child {
        font-size: 18px;
        font-weight: 700;
        color: #222;
    }

    .mega-menu-close {
        font-size: 28px;
        cursor: pointer;
        color: #666;
        line-height: 1;
        padding: 0 4px;
    }

    .mega-menu-close:hover {
        color: #222;
    }

    .mega-menu-grid {
        padding: 8px 16px 24px;
    }



    .mega-menu-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .mega-menu-all {
        display: none;
    }

    .mega-menu-parent {
        padding: 10px 8px 4px;
        font-size: 14px;
    }

    .mega-menu a[data-categoria] {
        padding: 8px 8px;
        font-size: 14px;
    }
}

/* =========================================================
  RESPONSIVE - HEADER MÓVIL
  ========================================================= */

@media (max-width: 768px) {

    /* Header móvil - layout vertical */
    .header-container {
        flex-direction: row;
        flex-wrap: wrap;
        height: auto;
        padding: 25px 15px 10px 15px;
        /* Increased top padding for floating label */
        gap: 0;
        justify-content: flex-start;
        align-items: center;
        /* Ensure vertical alignment */
    }

    .header-left {
        width: auto;
        /* Change from 100% to auto to contract width */
        flex: 0 0 auto;
        /* Don't grow/shrink */
        margin-right: 15px;
        /* Small consistent gap */
        justify-content: flex-start;
        /* Align logo left */
        order: 1;
    }

    .logo {
        margin-right: 0;
        padding-right: 0;
    }

    .logo-img {
        height: 40px;
        object-fit: contain;
    }

    /* Ocultar botón vender del HEADER en móvil */
    .header .vender-btn {
        display: none !important;
    }

    .header-center {
        flex: 1;
        /* Make search take remaining space */
        width: auto;
        max-width: none;
        /* Remove constraint */
        margin: 0;
        order: 2;
        /* Move next to logo */
    }

    .search-input {
        padding: 12px 15px;
        font-size: 16px;
    }

    /* Dropdown de categorías visible en móvil (solo en header) */
    .header-center .categorias {
        display: block !important;
        width: 100%;
        flex-basis: 100%;
        /* Force to new line */
        margin: 10px 0 0 0;
        order: 4;
    }

    .dropdown-btn {
        width: 100%;
        text-align: center;
        padding: 12px;
        background: #f8f9fa;
        border: 1px solid #ddd;
        border-radius: 8px;
        font-size: 16px;
    }

    .header-right {
        order: 3;
        /* After search bar */
        width: auto;
        justify-content: flex-end;
        margin-left: auto;
        /* Push to far right if space allows, or wrap */
        display: none !important;
        /* Hide completely in this header version since we have the mobile bottom nav? 
         WAIT - The user asked to fix spacing between logo and search. 
         Usually mobile header has Logo + Search. Right menu is bottom nav.
         Let's keep hiding it as before but ensure order is correct if shown */
    }

    /* Ocultar elementos del header derecho en móvil */
    .header-right .menu-item,
    .header-right .user-profile-link .profile-text {
        display: none !important;
    }

    /* Mostrar solo íconos en móvil */
    .header-right {
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .user-profile-link {
        margin: 0;
    }

    .user-avatar {
        width: 32px;
        height: 32px;
        margin-right: 0;
    }

    /* Filtros de tipo de venta - ajustes móvil */
    .filtros-tipo-venta {
        padding: 10px 0;
    }

    .filtros-container {
        padding: 0 15px;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .filtros-botones {
        justify-content: center;
        flex-wrap: wrap;
        gap: 6px;
        /* Reducido de 8px */
    }

    .filtro-btn {
        flex: 1 1 auto;
        min-width: 0;
        text-align: center;
        padding: 6px 10px;
        /* Reducido de 8px 12px */
        font-size: 11px;
        /* Reducido de 12px */
        max-width: calc(33.333% - 6px);
    }

    .filtro-btn svg {
        width: 14px;
        /* Reducido para móvil */
        height: 14px;
        margin-right: 3px;
    }

    /* ✅ NUEVO: Estilos específicos para botón de mensajes en móvil */
    .filtro-btn.mensajes-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
        flex: 0 0 auto;
        /* ✅ No crecer ni encoger */
        /* order: 4; REMOVED to avoid conflict */
    }
}

/* ===== Mostrar/ocultar elementos entre Desktop y Móvil ===== */
/* El header mantiene todos sus items en desktop. En móvil ocultamos algunos elementos */
@media (max-width: 768px) {

    .header-right .user-profile-link {
        display: none !important;
    }

    .header-right .notificacion-icono {
        display: none !important;
    }

    .header-right .icon {
        display: none !important;
    }

    .header .menu-item {
        display: none !important;
    }

    /* Reducir gaps en header para móvil */
    .header-container {
        padding: 8px 12px;
    }
}

/* Estilos para pantallas muy pequeñas */
@media (max-width: 480px) {
    .header-container {
        padding: 8px 10px;
    }

    .search-input {
        padding: 10px 12px;
        font-size: 14px;
    }

    .logo-img {
        height: 40px;
    }

    .user-avatar {
        width: 28px;
        height: 28px;
    }

    .filtro-btn {
        padding: 5px 8px;
        /* Reducido de 6px 10px */
        font-size: 10px;
        /* Reducido de 11px */
        max-width: calc(50% - 6px);
    }

    .filtro-btn svg {
        width: 12px;
        /* Reducido para pantallas pequeñas */
        height: 12px;
        margin-right: 2px;
    }

    .filtro-btn.mensajes-btn {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    /* ✅ NUEVO: Reorganizar botones en pantallas muy pequeñas */
    .filtros-botones {
        gap: 5px;
        /* Reducido de 6px */
    }
}

/* Estilos de debug temporal */
.contador-carrito-mobile:empty {
    border: 2px solid red !important;
}



/* Floating label input styles for header search */
.form-control {
    position: relative;
    width: 100%;
}

.form-control input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 1px solid #e6e6e6;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
    background: white;
}

.form-control input:focus {
    border-color: green;
}

.form-control label {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: #80868b;
    font-size: 16px;
    pointer-events: none;
    transition: all 0.3s ease;
    background: transparent;
    padding: 0 4px;
}

.form-control input:focus+label,
.form-control input:valid+label {
    transform: translateY(-35px) scale(0.8);
    /* Slightly reduced travel distance */
    color: #4d8701;
    background-color: #f4f4f4;
    padding: 0 4px;
    z-index: 5;
}

.form-control .search-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
    padding: 8px;
}

/* Responsive adjustments for floating label input */
@media (max-width: 768px) {
    .form-control input {
        padding: 12px 15px;
        font-size: 16px;
    }

    .form-control label {
        font-size: 15px;
        left: 12px;
    }

    .filtros-container {
        padding: 0 15px;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        /* ✅ CAMBIO: Reducir gap */
    }

    .filtros-titulo {
        font-size: 14px;
        /* ✅ CAMBIO: Título más pequeño */
        text-align: center;
    }
}

@media (max-width: 480px) {
    .form-control input {
        padding: 10px 12px;
        font-size: 14px;
    }

    .form-control label {
        font-size: 14px;
        left: 10px;
    }
}

/* Estilos mejorados para el avatar */
.user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 8px;
    border: 2px solid transparent;
    transition: border-color 0.3s;
    flex-shrink: 0;
}

.user-avatar[has-img] {
    border: 2px solid #e0e0e0;
}

.user-avatar svg {
    width: 100%;
    height: 100%;
    display: block;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.user-profile-link:hover .user-avatar {
    border-color: #3483fa;
}

/* Estilos para contador de notificaciones en desktop (header) */
.notificacion-icono {
    position: relative;
}

.contador-notificaciones {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    font-size: 11px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    font-weight: bold;
    border: 2px solid white;
    z-index: 10;
}

.contador-notificaciones:not(:empty) {
    display: flex;
}

/* ===== ESTILOS SPECIFICOS PARA LA NUEVA CABECERA MÓVIL SIMPLIFICADA ===== */

/* Por defecto (Desktop), ocultar la cabecera simplificada */
.mobile-special-header {
    display: none !important;
}

.standard-header-wrapper {
    display: block;
}

/* Categorías dentro del header móvil */
.mobile-header-categorias {
    display: none;
}

.mobile-dropdown-btn {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.mobile-dropdown-btn:hover {
    background: rgba(255,255,255,0.25);
}

/* Botón mensajes en header móvil */
.mobile-mensajes-btn {
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    margin-right: 8px;
}

.mobile-mensajes-btn .contador-mensajes-mobile {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    min-width: 16px;
    height: 16px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 1px solid white;
}

/* En móvil: mostrar cabecera simplificada y ocultar la búsqueda desktop en TODAS las páginas */
@media (max-width: 768px) {
    .mobile-special-header {
        display: flex !important;
        align-items: center;
        justify-content: flex-start;
        padding: 10px 15px;
        width: 100%;
        height: 60px;
        gap: 8px;
    }


    .mobile-header-left {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
    }

    .mobile-header-categorias {
        flex: 0 0 auto;
        display: none;
        align-items: center;
    }

    body.index-page .mobile-header-categorias,
    body.page-detalle .mobile-header-categorias {
        display: flex;
    }

    .mobile-header-right {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        margin-left: auto;
    }

    /* Ocultar la barra de búsqueda desktop en móvil para todas las páginas */
    .header-center {
        display: none !important;
    }

    /* En index page: ocultar el logo duplicado del standard-header (ya está en mobile-special-header) */
    body.index-page .header-left .logo {
        display: none !important;
    }

    /* En móvil: categorías ahora están en mobile-special-header, ocultar la del standard */
    body.index-page .header-left .categorias,
    body.page-detalle .header-left .categorias {
        display: none !important;
    }

    body:not(.index-page):not(.page-detalle) .header-left .categorias {
        display: none !important;
    }

    /* Reducir padding del header-container en móvil */
    body.index-page .header-container {
        padding: 4px 15px;
    }

    /* En index page: header-left ya no necesita todo el ancho (categorías movidas) */
    body.index-page .header-left {
        width: auto;
        flex: 0 0 auto;
    }

    /* En index page: mantener visible el resto del standard-header (categorías, right icons, filtros) */
    body.index-page .standard-header-wrapper {
        display: block;
    }

    /* En páginas que NO son index: ocultar completamente el standard-header */
    body:not(.index-page) .standard-header-wrapper {
        display: none !important;
    }

    /* Ajustes específicos para los elementos internos */
    .mobile-special-header .mobile-header-left,
    .mobile-special-header .mobile-header-right {
        display: flex;
        align-items: center;
    }

    .mobile-special-header .logo-img {
        height: 40px;
        width: auto;
        object-fit: contain;
    }

    /* Estilos para el icono de búsqueda */
    #mobileSearchTrigger svg {
        width: 28px;
        height: 28px;
        fill: white;
    }

    /* Estilos del Overlay de búsqueda */
    #mobileSearchOverlay {
        background-color: white;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    #mobileSearchInputSimpl {
        font-family: inherit;
    }
}

/* ===== SEARCH SUGGESTIONS (AUTOCOMPLETE) ===== */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    border: 1px solid #ddd;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
    max-height: 300px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.active {
    background-color: #f5f5f5;
}

.suggestion-icon {
    color: #999;
    font-size: 14px;
}

.suggestion-text {
    flex: 1;
}

.suggestion-match {
    font-weight: bold;
    color: #333;
}

.suggestion-category {
    font-size: 12px;
    color: #666;
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: auto;
}