* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Arial', sans-serif;
}

body {
  background: #ededed;
  color: #333;
  /* Añadir padding-bottom igual o mayor a la altura del footer */
  padding-bottom: 50px;
}

.header-bg img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  /* filter: brightness(70%); */
}

/* WRAPPER PARA EL CONTENIDO QUE PERMANECE VISIBLE (Logo + Tabs) */
.sticky-header-wrapper {
  position: sticky;
  top: 0; /* Se fija en la parte superior de la ventana */
  z-index: 20; /* Asegura que esté por encima del contenido del menú */
  background: #fff; /* Fondo blanco para cubrir la imagen al hacer scroll */
}

.header-content {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  background: #fff;
  border-radius: 15px 15px 0 0;
  /* CAMBIO CLAVE: Sustituimos position: relative; top: -20px; por margin-top: -20px; */
  margin-top: -20px; 
}

.logo {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 3px solid #fff;
  object-fit: cover;
}

.info {
  margin-left: 10px;
}

.info h2 {
  font-size: 18px;
  font-weight: bold;
}

.info p {
  font-size: 14px;
  color: #777;
}

/* Posiciona los iconos sociales arriba a la derecha */
.menu-header .social {
  position: absolute;
  top: 10px;             
  right: 15px;           
  background: rgba(255, 255, 255, 0.85); 
  border-radius: 20px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 8px;              
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  z-index: 10;
}

.menu-header .social i {
  font-size: 18px;
  color: #333;
  cursor: pointer;
  transition: color 0.3s ease;
}

.menu-header .social i:hover {
  color: #007bff; /* color al pasar el mouse */
}

.status {
  position: absolute;
  top: 10px;
  left: 15px;
  background: #cf2e2e;
  color: white;
  padding: 5px 10px;
  border-radius: 10px;
  font-size: 13px;
}


/* TABS */
.tabs {
  display: flex;
  overflow-x: auto;
  background: #fff;
  border-bottom: 1px solid #eee;
  /* El z-index es importante aquí, aunque el padre es sticky */
  z-index: 10;
}

.tabs .tab-button { /* Usamos .tab-button si ya se implementó el JS */
  flex: 1;
  padding: 10px;
  border: none;
  background: none;
  font-weight: bold;
  cursor: pointer;
  color: #555;
  text-decoration: none;
  text-align: center;
}

.tabs button { /* Mantener compatibilidad si no se usó .tab-button */
  flex: 1;
  padding: 10px;
  border: none;
  background: none;
  font-weight: bold;
  cursor: pointer;
  color: #555;
}

.tabs .tab-button.active,
.tabs button.active {
  border-bottom: 3px solid #cf2e2e;
  color: #cf2e2e;
}

/* MENU ITEMS */
.menu-list {
  padding: 15px;
}

.menu-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  background: #fff;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  /* CLAVE: Establece el contexto de posicionamiento para el badge */
  position: relative; 
}

.menu-item img {
  width: 90px;
  height: 90px;
  border-radius: 10px;
  object-fit: cover;
  margin-left: 10px;
}

.details {
  flex: 1;
}

.details h3 {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 5px;
}

.details p {
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
}

.price-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price {
  font-weight: bold;
  font-size: 15px;
  color: #cf2e2e;
}

.btn-add {
  background: #fff;
  border: 1px solid #ccc;
  color: #000;
  border-radius: 6px;
  font-size: 18px;
  width: 35px;
  height: 35px;
  cursor: pointer;
}

.btn-add:hover {
  background: #007bff;
  color: #fff;
  border-color: #007bff;
}

/* BADGE: Posicionamiento sobrepuesto */
.badge {
  background: #fcb900;
  color: #333;
  font-size: 12px;
  padding: 3px 7px;
  border-radius: 5px;
  /* CLAVE: Posicionamiento absoluto */
  position: absolute;
  top: 6px; /* Pequeño desplazamiento fuera del borde superior */
  right: 10px; /* Pequeño desplazamiento fuera del borde derecho */
  z-index: 5; /* Asegura que esté por encima del contenido del item */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Sombra para destacarlo */
}

/* RESPONSIVE */
@media (max-width: 480px) {
  .menu-item {
    flex-direction: row;
    align-items: flex-start;
  }

  .menu-item img {
    width: 80px;
    height: 80px;
    margin-top: 20px;
  }

  .details h3 {
    font-size: 15px;
  }
}

/* OCULTA SECCIONES DEL MENU */
.menu-list .rubro {
  display: none; /* Por defecto, ocultas todas las secciones */
}

.menu-list .rubro.active {
  display: block; /* Solo la sección activa será visible */
}

/* PIE DE PÁGINA FIJO */
.fixed-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #cf2e2e; /* Fondo oscuro */
  color: #eee;
  text-align: center;
  padding: 10px 0;
  font-size: 12px;
  z-index: 100; /* Asegura que esté por encima de todo */
}

.fixed-footer a {
    color: #fcb900; /* Color de enlace */
    text-decoration: none;
    font-weight: bold;
}

.fixed-footer a:hover {
    text-decoration: underline;
}