
.hdr-top-notification-bar {
    background: var(--gradient-primary);
    color: white;
    padding: 8px 0;
    font-size: 0.85rem;
    position: relative;
    z-index: 1030;
}

.hdr-top-notification-bar a {
    transition: opacity 0.3s ease;
}

.hdr-top-notification-bar a:hover {
    opacity: 0.8;
}

/* Logo do header */
.hdr-logo-img {
    height: 45px;
    max-width: 200px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.hdr-brand-text {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color);
    text-decoration: none;
}

/* Container de busca melhorado */
.hdr-search-container-improved {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.hdr-search-form {
    width: 100%;
}

.hdr-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.hdr-search-input-wrapper:focus-within {
    border-color: var(--accent-color);
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.hdr-search-input-improved {
    border: none;
    background: transparent;
    padding: 14px 60px 14px 20px;
    font-size: 0.95rem;
    width: 100%;
    outline: none;
    box-shadow: none;
}

.hdr-search-input-improved::placeholder {
    color: #6c757d;
}

.hdr-btn-search-improved {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--gradient-primary);
    border: none;
    color: white;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
}

.hdr-btn-search-improved:hover {
    background: var(--accent-color);
    transform: translateY(-50%) scale(1.05);
}

.hdr-search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 15px 15px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* Menu de navegação */
.hdr-navbar-nav-improved {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hdr-navbar-nav-improved .nav-item {
    margin: 0;
}

.hdr-navbar-nav-improved .nav-link {
    padding: 12px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.hdr-navbar-nav-improved .nav-link:hover {
    background: rgba(var(--primary-color), 0.1);
    color: var(--accent-color);
    transform: translateY(-1px);
}

.hdr-navbar-nav-improved .nav-link.active {
    background: var(--gradient-primary);
    color: white;
}

/* Modal de categorias */
.hdr-categories-modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.hdr-categories-modal-header {
    background: var(--gradient-primary);
    color: white;
    border-bottom: none;
    padding: 2rem;
    text-align: center;
}

.hdr-categories-modal-header .modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.hdr-categories-modal-header .btn-close {
    filter: invert(1);
    opacity: 0.8;
    font-size: 1.2rem;
}

.hdr-categories-modal-header .btn-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

.hdr-categories-modal-body {
    padding: 2.5rem;
    background: #f8f9fa;
    min-height: 400px;
}

.hdr-category-modal-card {
    display: block;
    text-decoration: none;
    transition: all 0.3s ease;
}

.hdr-category-item-modal {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    height: 100%;
    position: relative;
    cursor: pointer;
}

.hdr-category-modal-card:hover .hdr-category-item-modal {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.hdr-category-image-container {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.hdr-category-image-modal {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.hdr-category-placeholder-modal {
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.hdr-category-overlay-modal {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    color: white;
    font-size: 2rem;
}

.hdr-category-modal-card:hover .hdr-category-overlay-modal {
    opacity: 1;
}

.hdr-category-modal-card:hover .hdr-category-image-modal {
    transform: scale(1.1);
}

.hdr-category-content-modal {
    padding: 1.5rem;
}

.hdr-category-title-modal {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.hdr-category-modal-card:hover .hdr-category-title-modal {
    color: var(--accent-color);
}

.hdr-category-description-modal {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0;
    line-height: 1.4;
}

.hdr-categories-modal-footer {
    background: white;
    border-top: 1px solid #e9ecef;
    padding: 1.5rem;
}

.hdr-category-item-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.hdr-category-modal-card:hover .hdr-category-item-modal::before {
    opacity: 0.03;
}

/* Dropdown do usuário */
.hdr-user-dropdown-container {
    position: relative;
}

.hdr-user-dropdown-improved {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 300px;
    margin-top: 8px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-radius: 15px;
    padding: 0;
    z-index: 1050;
    background: white;
    transform-origin: top right;
    animation: hdr-dropdownSlide 0.3s ease-out;
}

@keyframes hdr-dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.hdr-user-dropdown-improved::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
    filter: drop-shadow(0 -2px 4px rgba(0,0,0,0.1));
}

.hdr-user-dropdown-improved .dropdown-item {
    transition: all 0.2s ease;
    border-radius: 8px;
    margin: 2px 0;
}

.hdr-user-dropdown-improved .dropdown-item:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateX(5px);
}

/* Botão de menu mobile */
.hdr-custom-toggler {
    border: none;
    padding: 4px 8px;
    position: relative;
    width: 30px;
    height: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

.hdr-toggler-line {
    width: 100%;
    height: 3px;
    background: var(--primary-color);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hdr-custom-toggler.collapsed .hdr-toggler-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hdr-custom-toggler.collapsed .hdr-toggler-line:nth-child(2) {
    opacity: 0;
}

.hdr-custom-toggler.collapsed .hdr-toggler-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Avatar do usuário */
.hdr-user-avatar {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--dark-text);
}

.hdr-avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    overflow: hidden;
}

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

.hdr-user-info {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: 15px 15px 0 0;
    margin: -0.5rem -0.5rem 0;
}

.hdr-user-avatar-large {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.5rem;
    overflow: hidden;
}

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

.hdr-user-name {
    display: none;
}

/* Botões do carrinho e favoritos */
.hdr-cart-button,
.hdr-favorites-button {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--gradient-primary);
    color: white;
    padding: 10px 15px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.hdr-cart-button:hover,
.hdr-favorites-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    color: white;
}

/* Contador do carrinho - POSICIONADO NA DIAGONAL DIREITA */
.hdr-cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

/* Contador dos favoritos - POSICIONADO NA DIAGONAL DIREITA */
.hdr-favorites-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff6b6b;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

/* Remove margens anteriores dos contadores */
.hdr-cart-button .hdr-cart-count,
.hdr-favorites-button .hdr-favorites-count {
    margin-left: 0;
}

/* Ajuste para quando há texto ao lado dos ícones */
.hdr-cart-button .d-none.d-lg-inline,
.hdr-favorites-button .d-none.d-lg-inline {
    margin-left: 8px;
}

/* Estados hover */
.hdr-cart-button:hover .hdr-cart-count,
.hdr-favorites-button:hover .hdr-favorites-count {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* Animações para atualizações */
.hdr-cart-count.updated,
.hdr-favorites-count.updated {
    animation: hdr-pulse 0.6s ease;
}

@keyframes hdr-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.hdr-cart-dropdown {
    min-width: 320px;
    padding: 0.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    max-height: 70vh;
    overflow-y: auto;
}

.hdr-cart-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: background-color 0.2s ease;
}

.hdr-cart-item:hover {
    background-color: #f8f9fa;
}

.hdr-cart-item-img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f1f1f1;
    color: #6c757d;
}

.hdr-cart-item-img i {
    font-size: 1.5rem;
}

.hdr-btn-remove {
    color: #dc3545;
    padding: 0.25rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    transition: all 0.2s ease;
}

.hdr-btn-remove:hover {
    background-color: rgba(220, 53, 69, 0.1);
}

.hdr-cart-total {
    padding: 0.75rem 1rem;
    background-color: #f8f9fa;
    font-size: 1.1rem;
}

.hdr-dropdown-footer {
    padding: 0.75rem;
}

.hdr-cart-dropdown .btn {
    margin: 0.25rem;
    font-size: 0.9rem;
    padding: 0.5rem;
}

/* Breadcrumb */
.hdr-breadcrumb-nav {
    background: var(--light-bg);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.hdr-breadcrumb-nav .breadcrumb {
    margin-bottom: 0;
    background: none;
    padding: 0;
}

.hdr-breadcrumb-nav .breadcrumb-item a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.hdr-breadcrumb-nav .breadcrumb-item a:hover {
    color: var(--accent-color);
}

.hdr-breadcrumb-nav .breadcrumb-item.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* Busca mobile */
.hdr-search-mobile {
    display: none;
}

/* Efeitos de loading */
.hdr-categories-modal-body.hdr-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: hdr-shimmer 1.5s infinite;
}

@keyframes hdr-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Scroll customizado */
.hdr-categories-modal-body::-webkit-scrollbar {
    width: 8px;
}

.hdr-categories-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.hdr-categories-modal-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.hdr-categories-modal-body::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Dropdown de favoritos */
.hdr-favorites-dropdown {
    min-width: 320px;
    padding: 0.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    max-height: 70vh;
    overflow-y: auto;
}

.hdr-favorites-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    position: relative;
}

.hdr-favorites-item:hover {
    background-color: #f8f9fa;
    transform: translateX(2px);
}

.hdr-favorites-item-img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f1f1f1;
    color: #6c757d;
}

.hdr-favorites-item-img i {
    font-size: 1.5rem;
}

.hdr-favorites-notes {
    background: #fff3cd;
    border-left: 3px solid #ffc107;
    padding: 0.25rem 0.5rem;
    margin: 0.25rem 0;
    border-radius: 0 4px 4px 0;
    font-size: 0.8rem;
}

/* Layout melhorado dos itens da lista de desejos */
.hdr-favorites-item .flex-grow-1 {
    min-width: 0; /* Permite que o texto quebre corretamente */
}

.hdr-favorites-item .fw-medium {
    font-size: 0.9rem;
    line-height: 1.3;
    color: var(--primary-color);
    transition: color 0.2s ease;
}

.hdr-favorites-item:hover .fw-medium {
    color: var(--accent-color);
}

/* Melhorias no dropdown de favoritos */
.hdr-favorites-dropdown .dropdown-header {
    background: #f8f9fa;
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
}

/* Estado vazio melhorado */
.hdr-favorites-dropdown .dropdown-item.text-center {
    padding: 2rem 1rem;
}

.hdr-favorites-dropdown .dropdown-item.text-center .bi-heart {
    color: #dee2e6;
}

/* Animações para favoritos */
@keyframes hdr-heartBeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.1); }
    50% { transform: scale(1); }
    75% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.hdr-favorites-button.added .bi-heart {
    animation: hdr-heartBeat 0.6s ease;
    color: #ff6b6b;
}

/* ============================================
   MEDIA QUERIES
   ============================================ */

@media (min-width: 992px) {
    .hdr-user-name {
        display: inline;
        margin-left: 0.5rem;
    }
}

@media (max-width: 1199px) {
    .hdr-search-container-improved {
        max-width: 400px;
    }
    
    .hdr-search-input-improved {
        padding: 12px 55px 12px 18px;
        font-size: 0.9rem;
    }
    
    .hdr-btn-search-improved {
        width: 38px;
        height: 38px;
        right: 5px;
    }
}

@media (max-width: 991px) {
    .hdr-search-container-improved {
        display: none !important;
    }
    
    .hdr-search-mobile {
        display: block;
        margin-bottom: 1rem;
    }
    
    .hdr-navbar-nav-improved {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }
    
    .hdr-navbar-nav-improved .nav-link {
        padding: 15px 20px;
        border-radius: 0;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }
    
    .hdr-user-dropdown-improved {
        position: static !important;
        width: 100%;
        box-shadow: none;
        border-radius: 8px;
        margin-top: 1rem;
        border: 1px solid #dee2e6;
    }
    
    .hdr-user-dropdown-improved::before {
        display: none;
    }
    
    .hdr-cart-dropdown {
        min-width: 100%;
    }
    
    .hdr-favorites-dropdown {
        min-width: 100%;
    }
    
    .modal-xl {
        max-width: 95%;
    }
    
    .hdr-categories-modal-body {
        padding: 1.5rem;
    }
    
    .hdr-category-image-container {
        height: 150px;
    }

    /* Ajustes para mobile dos contadores */
    .hdr-cart-count,
    .hdr-favorites-count {
        top: -8px;
        right: -8px;
        width: 18px;
        height: 18px;
        font-size: 0.7rem;
    }
}

@media (max-width: 767px) {
    .hdr-top-notification-bar {
        font-size: 0.8rem;
        padding: 6px 0;
    }
    
    .hdr-user-dropdown-improved {
        min-width: 300px;
        max-width: 90vw;
    }
    
    .hdr-cart-item-img {
        width: 40px;
        height: 40px;
    }
    
    .hdr-favorites-item-img {
        width: 40px;
        height: 40px;
    }
    
    .hdr-favorites-dropdown {
        min-width: 300px;
        max-width: 90vw;
    }
    
    .hdr-favorites-item {
        padding: 0.6rem 0.8rem;
    }
    
    .hdr-categories-modal-header {
        padding: 1.5rem;
    }
    
    .hdr-categories-modal-header .modal-title {
        font-size: 1.4rem;
    }
    
    .hdr-categories-modal-body {
        padding: 1rem;
    }
    
    .hdr-category-image-container {
        height: 120px;
    }
    
    .hdr-cart-count,
    .hdr-favorites-count {
        top: -6px;
        right: -6px;
        width: 16px;
        height: 16px;
        font-size: 0.65rem;
    }
}

@media (max-width: 576px) {
    .modal-xl {
        max-width: 98%;
        margin: 0.5rem;
    }
    
    .hdr-categories-modal-header {
        padding: 1rem;
    }
    
    .hdr-categories-modal-body {
        padding: 0.75rem;
    }
    
    .hdr-category-image-container {
        height: 100px;
    }
    
    .hdr-favorites-dropdown {
        min-width: 280px;
        max-width: 95vw;
    }

    .hdr-cart-button,
    .hdr-favorites-button {
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    .hdr-cart-count,
    .hdr-favorites-count {
        top: -4px;
        right: -4px;
        width: 16px;
        height: 16px;
        font-size: 0.6rem;
    }
}

/* Versão minimalista sem texto (apenas ícone + badge) */
.hdr-cart-button.minimal,
.hdr-favorites-button.minimal {
    padding: 8px 12px;
}

.hdr-cart-button.minimal .hdr-cart-count,
.hdr-favorites-button.minimal .hdr-favorites-count {
    top: -3px;
    right: -3px;
}