/* ============================================================
   NUTS PREMIUM - 02-header.css
   Topbar, Header, Nav, Carrossel mobile, Overlay, Drawer
   ============================================================ */

/* ============================================================
   BARRA SUPERIOR
   ============================================================ */
.np-topbar {
  background-color: var(--np-secondary);
  padding: 8px 0;
  font-family: var(--np-font-body);
  font-size: var(--np-fs-sm);
  font-weight: var(--np-fw-medium);
  color: var(--np-white);
}
.np-topbar a { color: var(--np-white); font-weight: var(--np-fw-medium); }
.np-topbar a:hover { color: var(--np-off-white); text-decoration: underline; }
.np-topbar__text { letter-spacing: 0.3px; }
.np-topbar__sep { margin: 0 8px; opacity: 0.6; }

@media (max-width: 576px) {
  .np-topbar { font-size: 0.82rem; padding: 9px 0; }
  .np-topbar__sep { margin: 0 5px; }
  .np-topbar__text { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 2px 6px; line-height: 1.6; }
}

/* ============================================================
   HEADER
   ============================================================ */
.np-header {
  background-color: var(--np-primary);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 12px 0;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.np-header__inner {
  display: flex;
  align-items: center;
  gap: var(--np-spacing-lg);
}

/* Logo */
.np-logo img {
  height: 48px;
  width: auto;
  object-fit: contain;
}
.np-logo--mobile img { height: 50px; }

/* Search desktop */
.np-search {
  flex: 1;
  max-width: 500px;
  margin: 0 auto;
}

.np-search__form {
  display: flex;
  border-radius: var(--np-radius-md);
  overflow: hidden;
  border: 2px solid var(--np-secondary);
}

.np-search__input {
  flex: 1;
  padding: 10px 16px;
  border: none;
  outline: none;
  font-family: var(--np-font-text);
  font-size: var(--np-fs-sm);
  background: var(--np-white);
  color: var(--np-primary);
}
.np-search__input::placeholder { color: var(--np-grey); }

.np-search__btn {
  background: var(--np-white);
  border: none;
  padding: 10px 18px;
  color: var(--np-secondary);
  cursor: pointer;
  font-size: var(--np-fs-base);
  transition: var(--np-transition);
}

/* Actions desktop */
.np-header__actions {
  display: flex;
  align-items: center;
  gap: var(--np-spacing-lg);
}

.np-header__action {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--np-white);
  cursor: pointer;
  transition: var(--np-transition);
  font-size: var(--np-fs-xs);
  font-family: var(--np-font-body);
  font-weight: var(--np-fw-medium);
  gap: 4px;
  text-decoration: none;
}
.np-header__action:hover { color: var(--np-secondary); }
.np-header__action i { font-size: 1.4rem; }

.np-header__cart { position: relative; }

.np-cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--np-secondary);
  color: var(--np-white);
  font-size: 10px;
  font-weight: var(--np-fw-bold);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ── Header Mobile ─────────────────────────────────────── */
.np-header__icon-btn {
  background: none;
  border: none;
  color: var(--np-white);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: var(--np-transition);
  text-decoration: none;
}
.np-header__icon-btn:hover { color: var(--np-secondary); }

/* Search mobile expansível */
#npMobileSearchBar {
  display: none;
  padding: 6px 0 8px;
  border-top: 1px solid rgba(255,255,255,.1);
}
#npMobileSearchBar.open { display: inherit !important; }

#npMobileSearchBar .np-search__form {
  border-radius: var(--np-radius-md);
  overflow: hidden;
  border: 2px solid var(--np-secondary);
  display: flex;
}

#npMobileSearchBar .np-search__input {
  flex: 1;
  padding: 9px 14px;
  border: none;
  outline: none;
  font-family: var(--np-font-text);
  font-size: var(--np-fs-sm);
  background: var(--np-white);
  color: var(--np-primary);
}
#npMobileSearchBar .np-search__input::placeholder { color: var(--np-grey); }

#npMobileSearchBar .np-search__btn {
  background: var(--np-secondary);
  border: none;
  padding: 9px 16px;
  color: var(--np-white);
  cursor: pointer;
  font-size: var(--np-fs-base);
  transition: var(--np-transition);
}
#npMobileSearchBar .np-search__btn:hover { background: var(--np-secondary-dark); }

/* ============================================================
   NAV DESKTOP
   ============================================================ */
.np-nav {
  background-color: var(--np-primary);
  border-top: 3px solid var(--np-secondary);
  border-bottom: 3px solid var(--np-secondary);
}

.np-nav__list {
  display: flex;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.np-nav__item { position: relative; }

.np-nav__link {
  display: block;
  padding: 14px 20px;
  font-family: var(--np-font-body);
  font-size: var(--np-fs-sm);
  font-weight: var(--np-fw-semibold);
  color: var(--np-off-white) !important;
  letter-spacing: 0.3px;
  transition: var(--np-transition);
  text-transform: uppercase;
  white-space: nowrap;
}
.np-nav__link:hover {
  background-color: var(--np-secondary);
  color: var(--np-white) !important;
  border-radius: 10px 10px 0 0;
}

.np-nav__sep {
  width: 1px;
  min-width: 1px;
  background: rgba(255,255,255,.15);
  margin: 10px 4px;
  flex-shrink: 0;
  align-self: stretch;
}

.np-nav__link--cat {
  color: rgba(255,255,255,.8) !important;
  font-weight: 500 !important;
}
.np-nav__link--cat:hover {
  color: var(--np-white) !important;
  background-color: rgba(212,162,76,.2) !important;
  border-radius: 10px 10px 0 0;
}

/* Dropdown Categorias desktop */
.np-nav__item--dropdown { position: relative; }

.np-nav__dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--np-white);
  min-width: 200px;
  box-shadow: var(--np-shadow-md);
  border-top: 3px solid var(--np-secondary);
  z-index: 999;
  border-radius: 0 0 var(--np-radius-md) var(--np-radius-md);
  padding: 4px 0;
}
.np-nav__item--dropdown:hover .np-nav__dropdown { display: block; }

.np-nav__dropdown-link {
  display: block;
  padding: 10px 20px;
  font-family: var(--np-font-body);
  font-size: var(--np-fs-sm);
  font-weight: var(--np-fw-medium);
  color: var(--np-primary) !important;
  transition: var(--np-transition);
  border-bottom: 1px solid var(--np-light-grey);
  white-space: nowrap;
}
.np-nav__dropdown-link:hover {
  background: var(--np-off-white);
  color: var(--np-secondary) !important;
  padding-left: 28px;
}

/* ============================================================
   CARROSSEL DE CATEGORIAS — MOBILE APENAS
   ============================================================ */
.np-cat-carousel {
  align-items: center;
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 4px 0;
}

.np-cat-carousel__arrow {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--np-white);
  font-size: .85rem;
  cursor: pointer;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  transition: color .2s, opacity .2s;
}
.np-cat-carousel__arrow:hover { color: var(--np-secondary); }

.np-cat-carousel__list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  scroll-behavior: smooth;
  flex: 1;
  gap: 0;
}

.np-cat-carousel__item { flex-shrink: 0; }

.np-cat-carousel__link {
  display: block;
  padding: 8px 14px;
  font-family: var(--np-font-body);
  font-size: .78rem;
  font-weight: 600;
  color: rgba(255,255,255,.85) !important;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: .3px;
  transition: color .2s;
  text-decoration: none;
}
.np-cat-carousel__link:hover { color: var(--np-secondary) !important; }

/* ============================================================
   OVERLAY
   ============================================================ */
.np-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(2px);
  z-index: 1039;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.np-nav-overlay.active { display: block; opacity: 1; }

/* ============================================================
   DRAWER MOBILE — abre pela ESQUERDA
   ============================================================ */
.np-drawer {
  position: fixed;
  top: 0;
  left: 0;
  height: 100dvh;
  width: min(320px, 85vw);
  background: var(--np-black);
  z-index: 1040;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 6px 0 32px rgba(0,0,0,0.4);
}
.np-drawer.open { transform: translateX(0); }

.np-drawer__top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--np-secondary);
  position: relative;
  flex-shrink: 0;
}
.np-drawer__account-icon { color: #fff; font-size: 1.3rem; }
.np-drawer__account-link {
  color: #fff;
  font-family: var(--np-font-body);
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity .2s;
}
.np-drawer__account-link:hover { opacity: .8; color: #fff; }

.np-drawer__close {
  margin-left: auto;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: .9rem;
  transition: background 0.2s;
  flex-shrink: 0;
}
.np-drawer__close:hover { background: rgba(255,255,255,0.25); }

.np-drawer__logo {
  text-align: center;
  padding: 28px 24px 16px;
  flex-shrink: 0;
}
.np-drawer__logo img {
  height: 90px;
  width: auto;
  object-fit: contain;
}

.np-drawer__list { list-style: none; margin: 0; padding: 0; flex: 1; }
.np-drawer__item { border-bottom: 1px solid rgba(255,255,255,0.07); }

.np-drawer__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 18px 28px;
  color: #fff;
  font-family: var(--np-font-body);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: .2px;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.np-drawer__link:hover { color: var(--np-secondary); }

.np-drawer__item--active .np-drawer__link {
  background: rgba(212,162,76,0.15);
  color: var(--np-secondary);
  border-left: 3px solid var(--np-secondary);
}

.np-drawer__chevron { font-size: .75rem; transition: transform .25s; }
.np-drawer__chevron.rotated { transform: rotate(180deg); }

.np-drawer__sub {
  display: none;
  list-style: none;
  margin: 0;
  padding: 4px 0 8px 0;
  background: rgba(255,255,255,0.03);
}
.np-drawer__sub.open { display: block; }

.np-drawer__sub-link {
  display: block;
  padding: 10px 28px 10px 44px;
  color: rgba(255,255,255,.65);
  font-family: var(--np-font-body);
  font-size: .875rem;
  text-decoration: none;
  transition: color .2s;
}
.np-drawer__sub-link:hover { color: var(--np-secondary); }

.np-drawer__social {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  flex-shrink: 0;
}
.np-drawer__social-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--np-secondary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  text-decoration: none;
  transition: background .2s, transform .2s;
}
.np-drawer__social-btn:hover {
  background: var(--np-secondary-dark);
  color: #fff;
  transform: translateY(-2px);
}