@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 500;
  src: url(../fonts/Fredoka-Medium.ttf) format('truetype');
}
@font-face {
  font-family: 'Dosis';
  font-style: normal;
  font-weight: 500;
  src: url(../fonts/Dosis-Medium.ttf) format('truetype');
}

/* Header principal do site (aberto em header.php) */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    background-color: var(--color-bg);
    transition: background-color 300ms ease-in-out 0s;
	border-bottom: 1px solid var(--color-border, #e0e0e0);
}

.fixed .site-header {
    background-color: var(--color-bg-transp);
}

.site-header:hover {
    background-color: var(--color-bg);
}

/* Container interno do header para alinhamento */
.site-header-inner {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
}


/* Container principal: coluna */
.site-header-inner {
    display: flex;
    flex-direction: row;
}

.header-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.title-section {
    white-space: nowrap;
    font-weight: 900;
    font-size: 1.4em;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0.5rem 0 0 0;
}

.title-section a {
    color: var(--color-dark-grey);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.title-section a:hover {
    color: var(--color-text);
}

.title-section img {
    width: 160px;
    height: auto;
    margin-right: 0.5rem;
    object-fit: contain;
    transition: width 300ms ease-in 0s;
}

.fixed .title-section img {
    width: 80px;
}

.header-line1,
.header-line2 {
    flex: 1 1 50%;
    display: flex;
    align-items: center;
    padding: 4px;
    min-width: 0;
    justify-content: flex-end;
    /* min-height: 30px; */
}

.header-line1 {
    max-height: 40px;
    min-height: 0px;
    transition: all 300ms ease-in 0s;
}

.fixed .header-line1 {
    max-height: 0;
    height: 0;
    padding: 0;
    overflow: hidden;
}

.today-temperature {
    font-size: 0.95rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-right: 2.5rem;
    color: var(--color-primary-dark);
}

.today-temperature .msg {
    margin-right: 1rem;
}

.today-temperature .weather {
    margin-right: 1rem;
    text-transform: lowercase;
}

.today-temperature .temperature {
    margin-right: 1rem;
    text-transform: lowercase;
}

.menu-adds .today-temperature,
.menu-adds .temperature {
    margin-right: 0;
}
.menu-adds .today-temperature .msg {
    display: none;
}


.main-navigation {
    /* min-height: 60px; */
    width: 100%;
}

.site-header .open-menu,
.site-header .close-menu {
    display: none;
    color: var(--color-dark-grey);
    text-decoration: none;
    cursor: pointer;
    height: 60px;
    /* width: 40px; */
    align-items: center;
}

.site-header .open-menu .bi,
.site-header .close-menu .bi {
    font-size: 32px;
    display: inline-block;
}

.nav-menu {
	display: flex;
	flex-wrap: wrap;
	list-style: none;
    justify-content: space-between;
	margin: 0;
	padding: 0;
	column-gap: 1.5rem;
    row-gap: 0;
}

.nav-menu li a {
	display: block;
	padding: 0.5rem 0;
	text-decoration: none;
	color: var(--color-text, #111);
	font-weight: 500;
    font-size: 1.5em;
    font-family: 'Dosis', sans-serif;
}

.nav-menu li a[href*="/eventos"] {
    color: #eb8c58;
}

.nav-menu li a[href*="/servicos-de-entrega"] {
    color: #8e2828;
}

/* .nav-menu > li:nth-child(1) a { color: #E64A3F; }
.nav-menu > li:nth-child(2) a { color: #caaf41; }
.nav-menu > li:nth-child(3) a { color: #EB8C58; }
.nav-menu > li:nth-child(4) a { color: #5D6D47; }
.nav-menu > li:nth-child(5) a { color: #2C5F6A; }
.nav-menu > li:nth-child(6) a { color: #8E2828; } */

/* .nav-menu li a:hover, */
.nav-menu li.current-menu-item > a {
	/* color: var(--color-primary, #0066cc) !important; */
    font-weight: 600;
}

/* =========================================
   SUBMENU - Desktop (hover)
   ========================================= */

/* 1. Pai precisa de position: relative para o submenu absoluto */
.nav-menu li.menu-item-has-children {
    position: relative;
}
.nav-menu li.menu-item-has-children > a[href="#"] {
    /* pointer-events: none; */
    cursor: default;
}

/* 2. Submenu: escondido, posicionado abaixo do pai */
.nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--color-bg, #fff);
    min-width: 220px;
    padding: 0.25rem 0;
    border: 1px solid var(--color-border, #e0e0e0);
    border-width: 0 1px 1px;
    border-radius: 0 0 8px 8px;
    box-shadow: 0px 12px 16px rgba(0, 0, 0, 0.12);
    display: none;
    flex-direction: column;
    z-index: 1000;
    margin: 0;
    list-style: none;
}

/* 3. Mostrar no hover do li pai */
.nav-menu li.menu-item-has-children:hover > .sub-menu {
    display: flex;
}

/* 4. Itens do submenu */
.nav-menu .sub-menu li {
    margin: 0;
    width: 100%;
}

.nav-menu .sub-menu a {
    padding: 0.6rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text, #111);
    text-decoration: none;
    display: block;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-menu .sub-menu a:hover {
    color: var(--color-primary, #0066cc);
    background: rgba(0,0,0,0.03);
}

/* 5. Indicador sutil de submenu (seta) - opcional */
.nav-menu li.menu-item-has-children > a {
    position: relative;
    padding-right: 1.25rem;
}

.nav-menu li.menu-item-has-children > a::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.nav-menu li.menu-item-has-children:hover > a::after {
    opacity: 1;
}

.menu-links {
    display: none;
}

.menu-adds {
    /* display: flex; */
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    margin: 10px 20px;
    display: none;
}

.mobile {
    display: none;
}

/* =========================================
   MOBILE: não interferir no JS existente
   ========================================= */
@media (max-width: 960px) {
}

@media (max-width: 590px) {
}

@media (max-width: 1100px) {
    .mobile {
        display: initial;
    }
    .menu-adds {
        display: flex !important;
    }
    .search-form:not(.menu-adds *) {
        display: none;
    }

    .today-temperature:not(.menu-adds *) {
        display: none;
    }

    .header-content {
        flex-direction: row;
        align-items: center;
    }
    .title-section img {
        width: 80px;
    }
    .header-line1 {
        justify-content: flex-end;
        flex-grow: 4;
        flex-shrink: 0;
        flex-basis: 85%;
    }
    .header-line2 {
        justify-content: flex-end;
        flex-grow: 0;
        flex-shrink: 4;
    }
    .fixed .header-line1 {
        overflow: visible;
    }


    .menu-links {
        display: block;
    }
    
    .nav-menu .sub-menu {
        position: static;
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding-left: 1rem;
        background: transparent;
        display: none; /* JS controla a exibição no mobile */
    }
    
    .nav-menu .sub-menu a {
        font-size: 1rem;
        padding: 0.4rem 1rem;
    }
    
    .nav-menu li.menu-item-has-children > a::after {
        display: none;
    }
    
    /* Se quiser submenu aberto por clique no mobile, 
       adicione esta classe via JS ou use um plugin */
    .nav-menu li.menu-item-has-children.submenu-open > .sub-menu {
        display: flex;
    }
    .main-navigation {
        display: none;
    }

    .site-header .open-menu {
        display: inline-flex;
    }
    .site-header .close-menu {
        display: none;
    }

    .menu-open,
    .fixed .menu-open {
        background-color: var(--color-bg);
    }

    .menu-open .main-navigation {
        display: block;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: var(--color-bg);
	    border-bottom: 1px solid var(--color-border, #e0e0e0);
        padding-bottom: 1rem;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }

    .menu-open .nav-menu {
        display: block;
    }

    .nav-menu .sub-menu {
        display: block;
    }

    .menu-open .nav-menu li a {
        padding: 0.5rem 1rem;
    }
    .menu-open .open-menu {
        display: none;
    }
    .menu-open .close-menu {
        display: inline-flex;
    }
}