/* =========================
   MENU HAMBURGER - COMPLETO
   ========================= */

/* Botão Hamburger - ESCONDIDO em desktop */
.hamburger-btn {
  display: none !important;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  line-height: 1;
  transition: color 0.3s ease;
  margin-right: 5px;
}

.hamburger-btn:hover {
  color: #ff0c0c;
}

.hamburger-btn:focus {
  outline: none;
}

/* Overlay - fundo escuro */
.menu-overlay {
  display: none;
  position: fixed;
  top: 70px;
  left: 0;
  width: 100%;
  height: calc(100vh - 70px);
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(3px);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.menu-overlay.active {
  display: block;
  opacity: 1;
}

/* Actions mobile */
.menu-actions-mobile {
  display: none;
}

/* =========================
   RESPONSIVIDADE - MOBILE
   ========================= */
@media screen and (max-width: 992px) {
  
  /* Mostra hamburger apenas em mobile */
  .hamburger-btn {
    display: flex !important;
  }
  
  /* Ajustes topbar mobile */
  .topbar {
    height: 60px;
    padding: 0 10px;
    gap: 8px;
    flex-wrap: nowrap;
  }
  
  .topbar-left {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
  }
  
  .topbar .logo img {
    height: 35px;
  }
  
  /* Barra de busca - dentro do topbar-left no seu HTML */
  .search-box {
    flex: 1;
    margin: 0;
    max-width: none;
    min-width: 120px;
  }
  
  .search-box input {
    padding: 6px 10px;
    font-size: 12px;
    height: 36px;
    border-radius: 20px 0 0 20px;
  }
  
  .search-box button {
    padding: 6px 12px;
    height: 36px;
    border-radius: 0 20px 20px 0;
  }
  
  /* ===== IMPORTANTE: OCULTA AS ACTIONS DESKTOP EM MOBILE ===== */
  header .actions {
    display: none !important;
  }
  
  /* Menu mobile */
  .menu-bar {
    position: fixed;
    top: 60px;
    left: -100%;
    width: 280px;
    height: calc(100vh - 60px);
    background: #fff;
    transition: left 0.3s ease;
    z-index: 10000;
    display: block;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.2);
    border: none;
  }
  
  .menu-bar.active {
    left: 0;
  }
  
  /* Lista do menu */
  .menu-bar ul {
    flex-direction: column;
    padding: 0;
    margin: 0;
    gap: 0;
  }
  
  .menu-bar ul li {
    width: 100%;
    border-bottom: 1px solid #eee;
  }
  
  .menu-bar ul li:first-child {
    border-top: 1px solid #eee;
  }
  
  .menu-bar ul li a {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    white-space: normal;
  }
  
  .menu-bar ul li a:hover {
    background: #ff0c0c;
    color: #fff;
  }
  /* CORREÇÃO DEFINITIVA - FUNCIONA EM QUALQUER TAMANHO */
/* Link do carrinho como referência */


/* Container do ícone */
.cart-mobile .cart-icon {
  position: relative;
  display: inline-block;
}

/* Badge elevado */
.cart-mobile .cart-icon span {
  position: absolute;
  top: -6px;
  right: -8px;

  background: #ff0c0c;
  color: #fff;
  font-size: 0.65rem;
  font-weight: bold;

  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}


  /* Actions mobile - MOSTRA em mobile */
  .menu-actions-mobile {
    display: block;
    padding: 20px;
    border-top: 2px solid #ff0c0c;
    margin-top: 20px;
  }
  
  .menu-actions-mobile a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #eee;
  }
  
  .menu-actions-mobile a:last-child {
    border-bottom: none;
  }
  
  .menu-actions-mobile a:hover {
    color: #ff0c0c;
  }
  
  .menu-actions-mobile i {
    width: 25px;
    color: #ff0c0c;
  }
  
  /* Badge carrinho mobile */
  
  /* Overlay mobile */
  .menu-overlay {
    top: 60px;
    height: calc(100vh - 60px);
  }
}
/* =========================
   MENU HAMBURGER - CORREÇÃO DA FAIXA BRANCA
   ========================= */

@media screen and (max-width: 992px) {
  
  /* === CORREÇÃO: Esconde a barra branca original em mobile === */
  .menu-bar {
    position: fixed;
    top: 60px;
    left: -100%; /* Esconde fora da tela */
    width: 280px;
    height: calc(100vh - 60px);
    background: #fff;
    transition: left 0.3s ease;
    z-index: 10000;
    display: block;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.2);
    border: none;
  }
  
  /* Quando ativo, o menu aparece */
  .menu-bar.active {
    left: 0;
  }
  
  /* === CORREÇÃO: Ajusta o padding-top do body para mobile === */
  body {
    padding-top: 60px !important; /* Apenas a altura da topbar, sem o menu branco */
  }
  
  /* === CORREÇÃO: Remove a altura fixa do menu-bar em mobile === */
  .menu-bar {
    height: auto; /* Remove altura fixa */
    min-height: calc(100vh - 60px);
  }
  
  /* === CORREÇÃO: Garante que a topbar está no lugar certo === */
  .topbar {
    height: 60px;
    z-index: 10001;
  }
  
  /* === CORREÇÃO: Ajusta o overlay === */
  .menu-overlay {
    top: 60px;
    height: calc(100vh - 60px);
  }
}
/* Mobile pequeno */
@media screen and (max-width: 576px) {
  .topbar {
    padding: 0 8px;
    gap: 5px;
  }
  
  .topbar-left {
    gap: 3px;
  }
  
  .hamburger-btn {
    width: 35px;
    height: 35px;
    font-size: 1.5rem;
  }
  
  .topbar .logo img {
    height: 30px;
  }
  
  .search-box input {
    padding: 5px 8px;
    font-size: 11px;
    height: 32px;
  }
  
  .search-box button {
    padding: 5px 8px;
    height: 32px;
  }
  
  .menu-bar {
    width: 85%;
    max-width: 260px;
  }
}