.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--bottom-nav-h) + var(--safe-bottom));
  padding: 6px 8px var(--safe-bottom);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 24px rgba(15, 35, 22, 0.06);
  z-index: 150;
}

@media (max-width: 768px) {
  .bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    gap: 2px;
  }

  body {
    padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom));
  }
}

.bottom-nav-link {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  color: var(--text-muted);
  padding: 4px 6px 2px;
  border-radius: 14px;
  transition: color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 30px;
  border-radius: 12px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.bottom-nav-svg,
.bottom-nav svg,
.bottom-nav .deliche-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: block;
  color: currentColor;
}

.bottom-nav-label {
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bottom-nav-link.is-active,
.bottom-nav-link:hover {
  color: var(--brand);
}

.bottom-nav-link.is-active .bottom-nav-icon {
  background: color-mix(in srgb, var(--brand) 14%, transparent);
}

.bottom-nav-link.is-active .bottom-nav-label {
  font-weight: 700;
}

.bottom-nav-link:active .bottom-nav-icon {
  transform: scale(0.94);
}

/* دکمه‌های نوبار — همان فونت/استایل لینک‌ها (نه فونت پیش‌فرض مرورگر) */
.bottom-nav button.bottom-nav-link {
  margin: 0;
  padding: 4px 6px 2px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  color: inherit;
  appearance: none;
  -webkit-appearance: none;
  text-align: center;
  width: 100%;
}

.bottom-nav-cart-count {
  position: absolute;
  top: -2px;
  inset-inline-end: -4px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 17px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(15, 35, 22, 0.18);
}

.bottom-nav-link--cart.is-active .bottom-nav-icon,
.bottom-nav-link--cart:hover .bottom-nav-icon,
.bottom-nav-link--search.is-active .bottom-nav-icon,
.bottom-nav-link--search:hover .bottom-nav-icon,
.bottom-nav button.bottom-nav-link.is-active .bottom-nav-icon,
.bottom-nav button.bottom-nav-link:hover .bottom-nav-icon {
  background: color-mix(in srgb, var(--brand) 14%, transparent);
}
