/* HEADER */
.header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: #009DE4;
}

/* BAR */
.header__bar {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 14px var(--container-padding);
  max-width: var(--container-max);
  margin: 0 auto;
}

.header__menu-toggle {
  position: absolute;
  left: var(--container-padding);
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.header__menu-toggle img {
  width: 28px;
  height: 28px;
}

.header__logo img {
  height: 32px;
  width: auto;
}

/* OVERLAY */
.header__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .4);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease, backdrop-filter .3s ease;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
}

.header__overlay.is-active {
  opacity: 1;
  visibility: visible;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

@media (max-width: 768px) {
  .header__overlay.is-active {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* DRAWER */
.header__drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 85%;
  max-width: 360px;
  height: 100%;
  background: #fff;
  z-index: 1001;
  transform: translateX(-100%);
  transition: transform .3s ease;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.header__drawer.is-open {
  transform: translateX(0);
}

/* DRAWER TOP */
.header__drawer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #009DE4;
}

.header__drawer-logo img {
  height: 30px;
  width: auto;
}

.header__menu-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

/* DRAWER BODY */
.header__drawer-body {
  display: flex;
  flex-direction: column;
  padding: 20px;
  flex: 1;
}

/* BUTTON "Ir para a loja" */
.header__drawer-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: #009DE4;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 6px;
  margin-bottom: 20px;
  transition: background .3s ease;
}

.header__drawer-btn svg {
  flex-shrink: 0;
}

.header__drawer-btn:hover {
  background: #0084c4;
  color: #fff;
}

/* DRAWER ITEMS */
.header__drawer-item {
  border-bottom: 1px solid #ccc;
}

/* DRAWER LINK */
.header__drawer-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 0;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  color: #333;
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--font-family);
}

.header__drawer-link:hover {
  color: #009DE4;
}

/* CHEVRON */
.header__drawer-chevron {
  width: 12px;
  height: auto;
  transition: transform .3s ease;
  color: #999;
}

.header__drawer-accordion.is-open .header__drawer-chevron {
  transform: rotate(180deg);
}

/* ACCORDION CONTENT */
.header__drawer-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}

.header__drawer-accordion.is-open .header__drawer-accordion-content {
  max-height: 500px;
}

/* SUBMENU */
.header__drawer-submenu {
  list-style: none;
  padding: 0 0 12px 8px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.header__drawer-submenu li a,
.header__drawer-submenu .category-list li a {
  display: block;
  padding: 6px 0;
  color: #555;
  font-size: 0.85rem;
  text-decoration: none;
  transition: color .3s ease;
}

.header__drawer-submenu li a:hover,
.header__drawer-submenu .category-list li a:hover {
  color: #009DE4;
}

/* Sub-menus inside WP nav */
.header__drawer-submenu .sub-menu {
  list-style: none;
  padding: 8px 0 0 12px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
