/* Menú app + FAB carrito — solo móvil */

.sh-app-nav,
.sh-cart-fab {
  display: none;
}

@media (max-width: 720px) {
  .sh-app-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    min-height: 64px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: rgba(248, 243, 234, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid rgba(76, 88, 47, 0.1);
    box-shadow: 0 -8px 28px rgba(43, 41, 36, 0.08);
    transition: transform .42s cubic-bezier(.22, 1, .36, 1), opacity .28s ease;
  }

  .sh-app-nav.is-logged-in {
    grid-template-columns: repeat(3, 1fr);
  }

  .sh-app-nav.is-guest [data-app-nav-orders] {
    display: none !important;
  }

  .sh-app-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: 0;
    background: transparent;
    color: var(--sh-muted, #7a7468);
    font-family: var(--sh-sans, Manrope, system-ui, sans-serif);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    padding: 6px 4px;
    border-radius: 12px;
    transition: color .2s ease, background .2s ease;
  }

  .sh-app-nav-item svg {
    display: block;
  }

  .sh-app-nav-item.is-active,
  .sh-app-nav-item:active {
    color: var(--sh-olive, #4C582F);
    background: rgba(76, 88, 47, 0.08);
  }

  /* FAB carrito — flota encima, a la derecha del menú */
  .sh-cart-fab {
    display: grid;
    place-items: center;
    position: fixed;
    right: 16px;
    bottom: calc(72px + env(safe-area-inset-bottom));
    z-index: 41;
    width: 56px;
    height: 56px;
    border: 0;
    border-radius: 50%;
    background: var(--sh-olive, #4C582F);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(76, 88, 47, 0.35);
    transition: transform .2s ease, box-shadow .2s ease, opacity .28s ease;
  }

  .sh-cart-fab:active {
    transform: scale(0.94);
  }

  .sh-cart-fab .cart-num {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--sh-gold, #C4A35A);
    color: #1f1c16;
    font-size: 10px;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
    box-shadow: none;
  }

  .sh-cart-fab .cart-num:empty,
  body:not(.has-cart-items) .sh-cart-fab .cart-num {
    display: none;
  }

  /* Espacio para que el contenido no quede bajo el menú */
  .shuevo-body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  .shuevo-home .sh-footer,
  .sh-footer {
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }

  /* Sin carrito duplicado en header */
  .sh-header-actions .cart-opener {
    display: none !important;
  }

  /* Ocultar nav/FAB cuando hay sheets/modales abiertos */
  body.modal-cart-open .sh-app-nav,
  body.checkout-sheet-open .sh-app-nav,
  body.cuenta-app-open .sh-app-nav,
  body.cuenta-auth-open .sh-app-nav,
  body.modal-product-open .sh-app-nav {
    transform: translateY(110%);
    pointer-events: none;
  }

  body.modal-cart-open .sh-cart-fab,
  body.checkout-sheet-open .sh-cart-fab,
  body.cuenta-app-open .sh-cart-fab,
  body.cuenta-auth-open .sh-cart-fab,
  body.modal-product-open .sh-cart-fab {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.85);
  }
}
