/* Welcome Banner */
.welcome-banner {
    background-color: #f8f8f8;
    color: #333;
    text-align: center;
    height: 50px;
    line-height: 50px;
    font-size: 16px;
    font-weight: bold;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1001;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.welcome-banner.hidden {
    opacity: 0;
    visibility: hidden;
}

@media (max-width: 768px) {
    .welcome-banner {
        height: 40px;
        line-height: 40px;
        font-size: 14px;
    }
}

/* Navbar */
.navbar {
    position: fixed;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    top: 50px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    box-sizing: border-box;
    height: 120px;
    transition: top 0.3s ease;
}

@media (max-width: 768px) {
    .navbar {
        top: 40px;
        height: 100px;
    }
}

/* Container Interno da Navbar */
.container-inner {
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

/* Logo e Ícones */
.logo-icons {
    display: flex;
    align-items: center;
    transition: opacity 0.3s ease;
    flex-shrink: 0; /* Impede que encolha */
}

.navbar-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    justify-content: flex-start;
    position: relative;
    overflow: hidden; /* Contém o excedente da escala */
    width: 150px; /* Espaço reservado */
    height: 50px;
}

.logo-image {
    width: 150px; /* Tamanho base */
    height: auto;
    transition: width 0.3s ease;
    transform: scale(1.67); /* Aumenta para ~250px (150 * 1.67) */
    transform-origin: left top; /* Escala a partir do canto superior esquerdo */
    position: absolute;
    top: 0;
    left: 0;
}

@media (max-width: 768px) {
    .logo-image {
        width: 120px;
        transform: scale(1); /* Remove escala em mobile */
    }
    .navbar-logo {
        width: 120px;
        height: 40px;
    }
}

/* Container do Menu Desktop */
.container-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    flex-wrap: nowrap;
    position: relative;
}

/* Menu da Navbar */
.navbar-menu {
    display: flex;
    gap: 30px;
    flex-wrap: nowrap;
    justify-content: center;
    margin: 0 auto;
    transform: translateX(5%);
    max-width: 60%; /* Limita o menu para evitar sobreposição */
}

.nav-link {
    font-size: 18px;
    color: #000;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: #bb0606;
}

.nav-link::after {
    content: '';
    display: block;
    width: 0%;
    height: 2px;
    background: #bb0606;
    transition: width 0.3s;
    position: absolute;
    bottom: -5px;
    left: 0;
}

.nav-link:hover::after {
    width: 100%;
}

.button-link {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0;
    position: relative;
    outline: none;
    font-size: 18px;
}

.button-link:hover {
    color: #bb0606;
}

.button-link::after {
    content: '';
    display: block;
    width: 0%;
    height: 2px;
    background: #bb0606;
    transition: width 0.3s;
    position: absolute;
    bottom: -5px;
    left: 0;
}

.button-link:hover::after {
    width: 100%;
}

/* Barra de Busca Desktop */
.search-container-desktop {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0; /* Impede que encolha */
}

.search-form-desktop {
    display: flex;
    align-items: center;
    width: 200px;
    transition: width 0.3s ease;
    position: relative; /* Remove absolute para melhor controle */
    background: white;
    border-radius: 25px;
    padding: 5px;
    overflow: hidden;
}

.search-form-desktop.expanded {
    width: 500px;
}

.search-input-desktop {
    width: 0;
    opacity: 0;
    padding: 10px 15px;
    padding-right: 40px;
    border: 1px solid #ccc;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: width 0.3s ease, opacity 0.3s ease, border-color 0.2s ease;
}

.search-form-desktop.expanded .search-input-desktop {
    width: 100%;
    opacity: 1;
}

.search-input-desktop:focus {
    border-color: #bb0606;
}

.toggle-search-button {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #bb0606;
    transition: color 0.2s ease;
}

.toggle-search-button:hover {
    color: #800000;
}

/* Navbar Mobile */
.mobile-icons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-button,
.search-icon-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1003;
}

.menu-icon {
    color: #bb0606;
    width: 24px;
    height: 24px;
}

/* Barra de Busca Mobile */
.search-form-mobile {
    display: none;
    align-items: center;
    width: 100%;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.95);
    position: fixed;
    left: 0;
    z-index: 1002;
    flex-direction: column;
    justify-content: center;
}

.search-form-mobile.active {
    display: flex;
}

.search-input-wrapper-mobile {
    display: flex;
    width: 100%;
    max-width: 500px;
    position: relative;
}

.search-input-mobile {
    flex: 1;
    padding: 10px 15px;
    padding-right: 40px;
    border: 1px solid #ccc;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s ease;
}

.search-input-mobile:focus {
    border-color: #bb0606;
}

.search-button-mobile {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: #bb0606;
}

.search-button-mobile:hover {
    color: #800000;
}

/* Product Panel (mockado) */
.product-panel-content {
    background: #fff;
    padding: 20px;
    border: 1px solid #ccc;
    position: fixed; /* Alterado para fixed para acompanhar a rolagem */
    top: 170px; /* Ajustado para abaixo da navbar + banner */
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    z-index: 999;
    transition: top 0.3s ease; /* Transição suave */
}

@media (max-width: 768px) {
    .product-panel-content {
        top: 140px; /* Ajustado para mobile */
    }
}

/* Media Queries */
@media (max-width: 767px) {
    .container-menu {
        display: none;
    }

    .logo-icons {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
}

@media (min-width: 930px) {
    .mobile-icons {
        display: none;
    }
    .container-menu {
        display: flex;
    }
    .navbar {
        height: 120px;
    }
    .search-form-desktop {
        width: 200px;
    }
    .search-form-desktop.expanded {
        width: 500px;
    }
}