/* ================================================
   BOTTOM NAV — Mobile
   Activo en ≤ 768px; en desktop no renderiza nada.
   ================================================ */

#bottom-nav {
  display: none;
}

@media (max-width: 768px) {

  /* ── Ocultar hamburguesa y nav dropdown ──────── */
  .menu-toggle   { display: none !important; }
  .nav-container { display: none !important; }

  /* ── Espacio para que el contenido no quede tapado */
  body {
    padding-bottom: 72px;
  }

  /* ── Barra ───────────────────────────────────── */
  #bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9990;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid rgba(198, 164, 106, 0.20);
    box-shadow: 0 -4px 24px rgba(47, 79, 70, 0.09);
    height: 64px;
    padding: 0 4px;
    padding-bottom: env(safe-area-inset-bottom);
    align-items: stretch;
  }

  /* ── Ítems ───────────────────────────────────── */
  .bn-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 2px 10px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    text-decoration: none;
    border: none;
    background: none;
    position: relative;
    min-width: 0;
    /* Sin transition en background para que el indicador
       sea la única señal visual, más limpio */
  }

  /* ── Icono ───────────────────────────────────── */
  .bn-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .bn-icon svg {
    width: 20px;
    height: 20px;
    color: #c2bdb7;           /* inactivo: gris cálido */
    transition: color 0.22s ease;
  }

  .bn-icon i {
    font-size: 20px;
    line-height: 1;
    color: #c2bdb7;           /* inactivo: gris cálido */
    display: block;
    transition: color 0.22s ease;
  }

  /* ── Etiqueta ────────────────────────────────── */
  .bn-label {
    font-family: var(--font-sans, "Inter", sans-serif);
    font-size: 9px;
    font-weight: 500;
    color: #c2bdb7;           /* inactivo: gris cálido */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1;
    transition: color 0.22s ease, font-weight 0.22s ease;
    letter-spacing: 0.1px;
  }

  /* ================================================
     ESTADO ACTIVO — iluminación dorada
     ================================================ */

  /* Píldora de fondo detrás del ícono activo */
  .bn-item.active .bn-icon {
    background: rgba(30, 56, 48, 0.14); /* verde con opacidad */
    border-radius: 10px;
    width: 36px;
    height: 28px;
    transform: translateY(-1px);
  }

  /* Ícono SVG activo → verde oscuro de la marca */
  .bn-item.active .bn-icon svg {
    color: var(--clr-green-mid, #1E3830);
  }

  /* Ícono Font Awesome activo → verde oscuro de la marca */
  .bn-item.active .bn-icon i {
    color: var(--clr-green-mid, #1E3830);
  }

  /* Etiqueta activa → verde oscuro */
  .bn-item.active .bn-label {
    color: var(--clr-green-mid, #1E3830);
    font-weight: 700;
  }

  /* Línea indicadora superior */
  .bn-item.active::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 2.5px;
    border-radius: 0 0 3px 3px;
    background: var(--clr-green-mid, #1E3830);
    animation: bnSlideIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  }

  @keyframes bnSlideIn {
    from { width: 0; opacity: 0; }
    to   { width: 24px; opacity: 1; }
  }

  /* ── Instagram — gradiente siempre, más vivo cuando activo */
  .bn-item.bn-ig .bn-icon i {
    background: linear-gradient(
      45deg,
      #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
  }

  /* Etiqueta Instagram — gradiente siempre */
  .bn-item.bn-ig .bn-label {
    background: linear-gradient(90deg, #e6683c, #bc1888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    font-weight: 600;
  }

  /* Instagram activo: píldora con tono rosa suave */
  .bn-item.bn-ig.active .bn-icon {
    background: rgba(188, 24, 136, 0.10);
  }

  /* Instagram activo: línea en gradiente */
  .bn-item.bn-ig.active::before {
    background: linear-gradient(90deg, #e6683c, #bc1888);
  }

  /* ── Feedback táctil al presionar ───────────── */
  .bn-item:active .bn-icon {
    transform: scale(0.88) translateY(-1px);
    transition: transform 0.1s ease;
  }

  /* ── Ajustes para elementos flotantes ─────────── */
  #cb-btn {
    bottom: 80px !important;
  }

  #cb-panel {
    bottom: 148px !important;
  }

  .footer-body {
    padding-bottom: calc(28px + 72px + env(safe-area-inset-bottom));
  }

  .cart-toast {
    bottom: calc(80px + 72px) !important;
  }
}